/* AI Tools Page Styles - 1:1 Thumbnail Grid Layout */
:root {
    --primary-color: #005B41;
    --primary-hover: #007a58;
    --primary-dark: #003d2e;
    --text-primary: #222;
    --text-secondary: #666;
    --text-tertiary: #444;
    --body-background: #ffffff;
    --card-background: #ffffff;
    --border-color: #e1e1e1;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

/* Main Container */
.ai-tools-wrapper {
   width: 90%;
    max-width: 1600px;
    margin: 0 auto;
}

/* Page Header */
.ai-tools-header {
    text-align: center;
    margin-bottom: 50px;
}

.ai-tools-header .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.ai-tools-header .page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Grid Layout - 1:1 Ratio Cards */
.ai-tools-grid {
     display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Tool Card */
.ai-tool-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.ai-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

/* Thumbnail Wrapper - 1:1 Aspect Ratio */
.ai-tool-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Creates 1:1 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.ai-tool-thumbnail-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.ai-tool-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-tool-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.ai-tool-card:hover .ai-tool-image {
    transform: scale(1.05);
}

/* Placeholder for images without thumbnails */
.ai-tool-thumbnail-placeholder {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
}

.placeholder-content i {
    font-size: 2.5rem;
    opacity: 0.3;
}

.placeholder-content span {
    font-size: 0.9rem;
    opacity: 0.5;
}

/* Tool Info Section */
.ai-tool-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Tool Name/Title */
.ai-tool-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.ai-tool-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.ai-tool-name a:hover {
    color: var(--primary-color);
}

/* Category Display */
.ai-tool-category {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ai-tool-category a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ai-tool-category a:hover {
    color: var(--primary-color);
}

/* Pricing Display */
.ai-tool-pricing {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
    background: rgba(0, 91, 65, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    align-self: flex-start;
}

/* No Tools Found State */
.no-tools-found {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-background);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    margin: 40px 0;
}

.no-tools-found i {
    font-size: 3rem;
    color: var(--text-secondary);
    opacity: 0.3;
    margin-bottom: 20px;
    display: block;
}

.no-tools-found p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .ai-tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 4fr));
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .ai-tools-wrapper {
        margin: 40px auto;
        padding: 20px;
    }
    
    .ai-tools-header .page-title {
        font-size: 2rem;
    }
    
    .ai-tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .ai-tools-wrapper {
        margin: 30px auto;
        padding: 15px;
    }
    
    .ai-tools-header {
        margin-bottom: 30px;
    }
    
    .ai-tools-header .page-title {
        font-size: 1.75rem;
    }
    
    .ai-tools-header .page-subtitle {
        font-size: 1rem;
    }
    
    .ai-tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .ai-tool-info {
        padding: 15px;
    }
    
    .ai-tool-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .ai-tools-wrapper {
        margin: 20px auto;
        padding: 10px;
    }
    
    .ai-tools-header .page-title {
        font-size: 1.5rem;
    }
    
    .ai-tools-header .page-subtitle {
        font-size: 0.9rem;
    }
    
    .ai-tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .ai-tool-info {
        padding: 12px;
        gap: 6px;
    }
    
    .ai-tool-name {
        font-size: 0.9rem;
    }
    
    .ai-tool-category {
        font-size: 0.75rem;
    }
    
    .ai-tool-pricing {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .placeholder-content i {
        font-size: 2rem;
    }
}

/* Animation */
.ai-tool-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for cards */
.ai-tool-card:nth-child(1) { animation-delay: 0.05s; }
.ai-tool-card:nth-child(2) { animation-delay: 0.1s; }
.ai-tool-card:nth-child(3) { animation-delay: 0.15s; }
.ai-tool-card:nth-child(4) { animation-delay: 0.2s; }
.ai-tool-card:nth-child(5) { animation-delay: 0.25s; }
.ai-tool-card:nth-child(6) { animation-delay: 0.3s; }
.ai-tool-card:nth-child(7) { animation-delay: 0.35s; }
.ai-tool-card:nth-child(8) { animation-delay: 0.4s; }

/* Accessibility */
.ai-tool-name a:focus,
.ai-tool-thumbnail-link:focus {
    outline: 2px solid var(--primary-color);
    
}

/* Print Styles */
@media print {
    .ai-tools-wrapper {
        margin: 0;
        padding: 20px;
    }
    
    .ai-tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .ai-tool-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .ai-tool-card:hover {
        transform: none;
    }
}