/* =====================================================================
   🏛️ EXPLORE SECTION - EPIC GREEK ANCIENT WISDOM THEME
   ===================================================================== 
   Created: January 1, 2026
   Inspired by ancient Greek temples, marble columns, and golden wisdom
   ===================================================================== */

/* =====================================================================
   EXPLORE SECTION BASE
   ===================================================================== */
.explore-section {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, 
        rgba(20, 20, 35, 1) 0%,
        rgba(30, 30, 50, 1) 50%,
        rgba(40, 40, 60, 1) 100%
    );
    padding: 3rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    z-index: 999 !important;
}

.explore-section:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Marble Texture Background */
.explore-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.01) 0px,
            transparent 1px,
            transparent 40px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.01) 0px,
            transparent 1px,
            transparent 40px
        );
    opacity: 0.3;
    pointer-events: none;
}

/* Golden Particle Effects */
.explore-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.02) 0%, transparent 50%);
    pointer-events: none;
    animation: goldenShimmer 20s ease-in-out infinite;
}

@keyframes goldenShimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* =====================================================================
   BACK TO MAIN BUTTON
   ===================================================================== */
.btn-back-to-main {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.2) 0%,
        rgba(212, 175, 55, 0.15) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    color: #FFD700;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    outline: none;
}

.btn-back-to-main:hover {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.35) 0%,
        rgba(212, 175, 55, 0.3) 100%);
    border-color: rgba(255, 215, 0, 0.7);
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.btn-back-to-main:focus,
.btn-back-to-main:focus-visible {
    outline: none !important;
}

.btn-back-to-main .btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-back-to-main:hover .btn-icon {
    transform: translateX(-3px);
}

/* =====================================================================
   TEMPLE HEADER - GREEK PEDIMENT DESIGN
   ===================================================================== */
.explore-temple-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.temple-pediment {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    position: relative;
}

/* Pediment Ornaments (Greek Acroteria) */
.pediment-ornament {
    font-size: 3rem;
    color: #FFD700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.5);
    animation: ornamentFloat 4s ease-in-out infinite;
}

.pediment-left {
    animation-delay: 0s;
}

.pediment-right {
    animation-delay: 0.5s;
}

@keyframes ornamentFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* Temple Title */
.temple-title {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, 
        #FFD700 0%, 
        #FDB931 25%,
        #FFD700 50%,
        #D4AF37 75%,
        #FFD700 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 0 30px rgba(255, 215, 0, 0.5),
        0 4px 20px rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
    animation: goldenGlow 3s ease-in-out infinite;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
}

@keyframes goldenGlow {
    0%, 100% { 
        filter: brightness(1) drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
        background-position: 0% center;
    }
    50% { 
        filter: brightness(1.2) drop-shadow(0 0 40px rgba(255, 215, 0, 0.8));
        background-position: 100% center;
    }
}

.title-greek-column {
    display: inline-block;
    font-size: 4rem;
    animation: columnPulse 2s ease-in-out infinite;
}

@keyframes columnPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Temple Inscription */
.temple-inscription {
    font-size: 1.3rem;
    color: rgba(255, 215, 0, 0.9);
    font-weight: 600;
    letter-spacing: 1px;
    margin: 1.5rem 0;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.5);
    font-style: italic;
}

/* Temple Divider */
.temple-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem auto;
    max-width: 600px;
}

.divider-ornament {
    font-size: 1.5rem;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: ornamentSpin 5s linear infinite;
}

@keyframes ornamentSpin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 215, 0, 0.8) 50%, 
        transparent 100%
    );
}

/* =====================================================================
   KNOWLEDGE GROUPS GRID - MARBLE CARDS WITH GOLD ACCENTS
   ===================================================================== */
.knowledge-groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Knowledge Card - Epic Greek Temple Card */
.knowledge-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: rgba(20, 20, 35, 0.9);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 215, 0, 0.2);
}

.knowledge-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(255, 215, 0, 0.4),
        0 0 80px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 215, 0, 0.5);
}

/* Marble Background Effect */
.card-marble-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, 
            rgba(240, 240, 245, 0.05) 0%,
            rgba(220, 220, 230, 0.03) 50%,
            rgba(240, 240, 245, 0.05) 100%
        ),
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.02) 0px,
            transparent 2px,
            transparent 10px
        );
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.knowledge-card:hover .card-marble-bg {
    opacity: 0.9;
}

/* Gold Border - Greek Meander Pattern */
.card-gold-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid transparent;
    border-radius: 16px;
    background: linear-gradient(135deg, 
        #FFD700 0%, 
        #D4AF37 25%,
        #FFD700 50%,
        #FDB931 75%,
        #FFD700 100%
    );
    background-clip: padding-box;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 3px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.knowledge-card:hover .card-gold-border {
    opacity: 1;
    animation: borderPulse 2s ease-in-out infinite;
}

@keyframes borderPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.5); }
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 1;
    padding: 2.5rem 2rem;
    text-align: center;
}

/* Card Icon - Epic Large */
.card-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.5),
        0 4px 10px rgba(0, 0, 0, 0.5);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.knowledge-card:hover .card-icon {
    animation: iconGlow 1s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% { 
        filter: brightness(1) drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    }
    50% { 
        filter: brightness(1.3) drop-shadow(0 0 30px rgba(255, 215, 0, 0.9));
    }
}

/* Card Title */
.card-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #FDE68A;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.knowledge-card:hover .card-title {
    color: #FFD700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Card Subtitle */
.card-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-weight: 500;
    min-height: 45px;
}

/* Quote Count Badge */
.card-quote-count {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.15) 0%,
        rgba(212, 175, 55, 0.15) 100%
    );
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    padding: 0.6rem 1.2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.knowledge-card:hover .card-quote-count {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.25) 0%,
        rgba(212, 175, 55, 0.25) 100%
    );
    border-color: rgba(255, 215, 0, 0.7);
    transform: scale(1.05);
}

.count-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.count-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Explore Button - Epic Golden CTA */
.card-explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, 
        #FFD700 0%,
        #FDB931 50%,
        #FFD700 100%
    );
    background-size: 200% auto;
    color: #1a1a2e;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-explore-btn:hover {
    background-position: 100% center;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 30px rgba(255, 215, 0, 0.6),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}

.card-explore-btn:active {
    transform: translateY(0px);
    box-shadow: 
        0 2px 10px rgba(255, 215, 0, 0.4),
        inset 0 2px 0 rgba(0, 0, 0, 0.3);
}

.card-explore-btn .btn-icon {
    font-size: 1.3rem;
}

/* =====================================================================
   QUOTES DISPLAY AREA - TOP 30 GRID
   ===================================================================== */
.explore-quotes-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.quotes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(20, 20, 35, 0.9);
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.btn-back-explore {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back-explore:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateX(-5px);
}

.quotes-title {
    font-size: 2rem;
    font-weight: 800;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.quotes-count {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

/* Quotes Grid - Masonry Style */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.quote-grid-card {
    background: rgba(20, 20, 35, 0.9);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 1.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quote-grid-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 
        0 10px 30px rgba(255, 215, 0, 0.3),
        0 0 40px rgba(255, 215, 0, 0.1);
}

.quote-grid-rank {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.rank-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-views {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.quote-grid-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-style: italic;
}

.quote-grid-author {
    font-size: 1rem;
    color: #FFD700;
    font-weight: 700;
    text-align: right;
}

.quote-grid-author::before {
    content: '— ';
    color: rgba(255, 215, 0, 0.6);
}

/* Loading State */
.quotes-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.ancient-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.quotes-loading p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

/* =====================================================================
   RESPONSIVE DESIGN
   ===================================================================== */
@media (max-width: 768px) {
    .explore-section {
        padding: 2rem 1rem;
    }

    .temple-title {
        font-size: 2.5rem;
    }

    .temple-inscription {
        font-size: 1.1rem;
    }

    .knowledge-groups-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .card-icon {
        font-size: 4rem;
    }

    .card-title {
        font-size: 1.4rem;
    }

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

    .quotes-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    /* Fix Back to Explore button positioning on mobile */
    .btn-back-explore {
        margin-bottom: 1rem;
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .temple-title {
        font-size: 2rem;
    }

    .temple-inscription {
        font-size: 1rem;
    }

    .card-content {
        padding: 2rem 1.5rem;
    }

    .card-icon {
        font-size: 3.5rem;
    }

    .card-title {
        font-size: 1.2rem;
    }
    
    /* Further optimize Back to Explore button for small screens */
    .btn-back-explore {
        margin-bottom: 1.5rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
}
