/* ===== Q&A PAGE SPECIFIC STYLES ===== */

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.page-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ===== DIFFICULTY SELECTOR ===== */
.difficulty-selector {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.difficulty-selector h3 {
    color: #1a1a2e;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.difficulty-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 0.75rem 2rem;
    border: 2px solid #ddd;
    background: white;
    color: #555;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.difficulty-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.difficulty-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* ===== Q&A SECTIONS ===== */
.qa-section {
    margin-bottom: 4rem;
}

.section-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid #e94560;
}

.section-header h3 {
    font-size: 1.8rem;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.difficulty-icon {
    font-size: 2rem;
}

.difficulty-icon.easy {
    color: #28a745;
}

.difficulty-icon.hard {
    color: #e94560;
}

.section-description {
    color: #666;
    font-size: 1.05rem;
}

/* ===== ENHANCED GALLERY GRID (4 items per row) ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

/* Ensure 4 columns on larger screens */
@media (min-width: 1400px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1100px) and (max-width: 1399px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1099px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Q&A CARD LINK ===== */
.qa-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

/* ===== ENHANCED THUMBNAIL CARD (Q&A) ===== */
.thumbnail-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.thumbnail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 15px;
    z-index: 1;
}

.thumbnail-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.3);
}

.difficulty-easy:hover {
    border-color: #28a745;
    box-shadow: 0 20px 50px rgba(40, 167, 69, 0.2);
}

.difficulty-hard:hover {
    border-color: #e94560;
    box-shadow: 0 20px 50px rgba(233, 69, 96, 0.2);
}

.thumbnail-card:hover::before {
    opacity: 1;
}

/* ===== THUMBNAIL IMAGE ===== */
.thumbnail-image {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    position: relative;
}

.thumbnail-image.easy-bg {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.thumbnail-image.hard-bg {
    background: linear-gradient(135deg, #e94560 0%, #d4364c 100%);
}

.thumbnail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.thumbnail-card:hover .thumbnail-image img {
    transform: scale(1.1);
}

.qa-icon {
    font-size: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ===== THUMBNAIL CONTENT ===== */
.thumbnail-content {
    padding: 1.8rem;
    position: relative;
    z-index: 2;
}

.thumbnail-content h3 {
    color: #1a1a2e;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.thumbnail-content p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ===== THUMBNAIL FOOTER & BADGES ===== */
.thumbnail-footer {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.badge {
    display: inline-block;
    background-color: #e94560;
    color: white;
    padding: 0.35rem 0.95rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(233, 69, 96, 0.2);
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

.badge.easy {
    background-color: #28a745;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.2);
}

.badge.easy:hover {
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.badge-count {
    display: inline-block;
    background-color: #f0f0f0;
    color: #666;
    padding: 0.35rem 0.95rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== STATS BOX ===== */
.stats-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-top: 4rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.stats-box h4 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ===== ANIMATION EFFECTS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qa-card {
    animation: fadeInUp 0.6s ease-out both;
}

/* Stagger animation for easy section */
#easy-section .qa-card:nth-child(1) { animation-delay: 0.05s; }
#easy-section .qa-card:nth-child(2) { animation-delay: 0.1s; }
#easy-section .qa-card:nth-child(3) { animation-delay: 0.15s; }
#easy-section .qa-card:nth-child(4) { animation-delay: 0.2s; }
#easy-section .qa-card:nth-child(5) { animation-delay: 0.25s; }
#easy-section .qa-card:nth-child(6) { animation-delay: 0.3s; }
#easy-section .qa-card:nth-child(7) { animation-delay: 0.35s; }
#easy-section .qa-card:nth-child(8) { animation-delay: 0.4s; }

/* Stagger animation for hard section */
#hard-section .qa-card:nth-child(1) { animation-delay: 0.05s; }
#hard-section .qa-card:nth-child(2) { animation-delay: 0.1s; }
#hard-section .qa-card:nth-child(3) { animation-delay: 0.15s; }
#hard-section .qa-card:nth-child(4) { animation-delay: 0.2s; }
#hard-section .qa-card:nth-child(5) { animation-delay: 0.25s; }
#hard-section .qa-card:nth-child(6) { animation-delay: 0.3s; }
#hard-section .qa-card:nth-child(7) { animation-delay: 0.35s; }
#hard-section .qa-card:nth-child(8) { animation-delay: 0.4s; }

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .page-header h2 {
        font-size: 1.6rem;
    }

    .difficulty-selector h3 {
        font-size: 1.2rem;
    }

    .difficulty-buttons {
        flex-direction: column;
    }

    .difficulty-btn {
        width: 100%;
    }

    .section-header h3 {
        font-size: 1.4rem;
    }

    .thumbnail-image {
        height: 180px;
    }

    .qa-icon {
        font-size: 3rem;
    }

    .thumbnail-content {
        padding: 1.5rem;
    }

    .thumbnail-content h3 {
        font-size: 1.05rem;
    }

    .thumbnail-content p {
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 2rem 1rem;
    }

    .page-header h2 {
        font-size: 1.3rem;
    }

    .difficulty-selector {
        padding: 1.5rem 1rem;
    }

    .section-header {
        padding-bottom: 1rem;
    }

    .section-header h3 {
        font-size: 1.1rem;
    }

    .thumbnail-image {
        height: 150px;
    }

    .qa-icon {
        font-size: 2.5rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.7rem;
    }

    .badge-count {
        font-size: 0.7rem;
        padding: 0.25rem 0.7rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-box {
        padding: 1.5rem 1rem;
    }

    .stats-box h4 {
        font-size: 1.2rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }
}
