/* Illustrations Page - Clean Implementation */

.illustrations-section {
    padding: 40px 0;
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    font-size: 3.5em;
    text-align: center;
    margin-bottom: 50px;
    padding-top: 20px;
    font-family: 'Cormorant Garamond', serif;
    color: #333;
    font-weight: 600;
    position: relative;
}

.page-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #e87a5d, transparent);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.tab-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95em;
    font-weight: 500;
    color: #666;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateZ(0);
}

.tab-btn:hover {
    border-color: #e87a5d;
    color: #e87a5d;
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 6px 16px rgba(232, 122, 93, 0.25);
}

.tab-btn.active {
    background: #e87a5d;
    border-color: #e87a5d;
    color: white;
    box-shadow: 0 4px 12px rgba(232, 122, 93, 0.3);
}

/* Illustrations Grid */
.illustrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 0 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Single Item Layout - Center and Feature */
.illustrations-grid.single-item {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.illustrations-grid.single-item .illustration-card {
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Two Items Layout - Center */
.illustrations-grid.two-items {
    grid-template-columns: repeat(2, minmax(300px, 450px));
    justify-content: center;
}

/* Few Items Layout - Better Spacing */
.illustrations-grid.few-items {
    grid-template-columns: repeat(auto-fit, minmax(350px, 400px));
    justify-content: center;
    gap: 40px;
}

/* Illustration Card */
.illustration-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
    position: relative;
    transform: translateZ(0);
    will-change: transform;
}

.illustration-card:hover {
    transform: translateY(-12px) translateZ(0);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.illustration-card.hidden {
    display: none;
}

/* Card Image */
.card-image {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
    position: relative;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.illustration-card:hover .card-image::after {
    opacity: 1;
}

/* Card Content */
.card-content {
    padding: 24px;
}

.card-title {
    font-size: 1.4em;
    font-family: 'Cormorant Garamond', serif;
    font-weight: bold;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.card-description {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.card-button {
    background: #e87a5d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-family: 'Montserrat', sans-serif;
    transform: translateZ(0);
}

.card-button:hover {
    background: #d96a4c;
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 6px 12px rgba(232, 122, 93, 0.35);
}

/* Category Badge */
.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(232, 122, 93, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: capitalize;
}

/* Animations */
.fade-in {
    animation: fadeInSmooth 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes fadeInSmooth {
    from {
        opacity: 0;
        transform: translateY(30px) translateZ(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .illustrations-section {
        padding: 20px 0;
    }
    
    .page-title {
        font-size: 2.5em;
        margin-bottom: 30px;
    }
    
    .illustrations-grid,
    .illustrations-grid.single-item,
    .illustrations-grid.two-items,
    .illustrations-grid.few-items {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
        display: grid;
    }
    
    .illustrations-grid.single-item .illustration-card {
        max-width: 100%;
    }
    
    .tab-btn {
        padding: 10px 18px;
        font-size: 0.9em;
    }
    
    .card-image {
        height: 240px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    /* Reduce hover effects on mobile */
    .illustration-card:hover {
        transform: translateY(-5px) translateZ(0);
    }
    
    .tab-btn:hover,
    .card-button:hover {
        transform: translateY(-2px) translateZ(0);
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2.2em;
    }
    
    .filter-tabs {
        gap: 6px;
        margin-bottom: 30px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.85em;
    }
    
    .illustrations-grid {
        padding: 0 10px;
    }
}