/* =========================================
   MYSTIC LEGEND THEME (LEYENDA)
   ========================================= */
body.legend-mystic-theme {
    background-color: #010402 !important;
    background-image:
        radial-gradient(circle at 50% 50%, #081209, #010402) !important;
    color: #f1f5f0;
    overflow-x: hidden;
}

.legend-mystic-theme .navbar.scrolled {
    background-color: rgba(1, 4, 2, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(92, 158, 71, 0.3);
}

.legend-mystic-theme .nav-link {
    color: #f1f5f0;
}

/* Mobile Menu Fix for Dark Theme */
@media (max-width: 991px) {
    .legend-mystic-theme .nav-links {
        background-color: #0b0f14 !important;
        border-top: 1px solid rgba(92, 158, 71, 0.2);
    }

    .legend-mystic-theme .nav-link {
        color: #ffffff !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .legend-mystic-theme .nav-link.active {
        color: #5c9e47 !important;
    }
}

.legend-mystic-theme .logo-img {
    filter: brightness(0) invert(1);
}

/* Mystic Background Patterns */
.mystic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(92, 158, 71, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(49, 92, 43, 0.1) 0%, transparent 45%);
    z-index: 0;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
}

.ancient-runes {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10 L20 20 M80 80 L90 90 M30 70 Q 50 50 70 30' stroke='rgba(92, 158, 71, 0.05)' fill='none' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 400px;
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
    transform: translateZ(0);
}

@media (max-width: 991px) {

    .ancient-runes,
    .sunbeams {
        display: none !important;
        /* Hide expensive overlays on mobile */
    }
}

/* Legend Hero */
.legend-hero-mystic {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
}

.legend-hero-mystic .inner-hero-bg img {
    filter: brightness(0.6) sepia(20%) contrast(1.1);
}

.legend-hero-mystic .hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 8.5rem);
    color: #ffffff;
    text-shadow: 0 0 50px rgba(92, 158, 71, 0.4), 0 10px 30px rgba(0, 0, 0, 0.9);
    line-height: 0.8;
}

.legend-hero-mystic .section-subtitle {
    color: #a3e68b;
    letter-spacing: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Messages Section - Ethereal Style */
.ethereal-messages {
    padding: 180px 0;
    background: transparent;
    border: none;
    position: relative;
    z-index: 10;
}

.message-node {
    text-align: center;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s ease;
}

.message-node:hover {
    transform: translateY(-10px);
}

.message-node i {
    font-size: 3.8rem;
    color: #5c9e47;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 25px rgba(92, 158, 71, 0.5));
}

.message-node h4 {
    color: #ffffff;
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.message-node p {
    color: #ffffff;
    font-size: 1.25rem;
    line-height: 1.8;
    max-width: 320px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Narrative Flow - NO MORE CARDS */
.labyrinth-story-block {
    background: transparent;
    border: none;
    backdrop-filter: none;
    border-radius: 0;
    padding: 100px 0;
    margin-bottom: 15vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 80px;
}

.labyrinth-story-block.reverse {
    flex-direction: row-reverse;
}

.story-visual {
    flex: 1;
    height: 70vh;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.story-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(2, 6, 3, 0.2));
}

.story-content {
    flex: 1;
    padding: 60px;
    z-index: 5;
}

.story-content h3 {
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    line-height: 0.95;
    margin-bottom: 25px;
    color: #ffffff;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
}

.story-content .section-subtitle {
    color: #5c9e47;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
}

.story-content p {
    font-size: 1.4rem;
    line-height: 1.8;
    color: #ffffff;
    margin-bottom: 0;
    font-weight: 400;
    opacity: 0.95;
}

/* Sunbeams Effect */
.sunbeams {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 100px);
    mask-image: radial-gradient(circle at 50% 0%, black, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 50% 0%, black, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Firefly Particles Layer */
.mystic-fireflies {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, #5c9e47 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 2;
    animation: fireflyMove 20s linear infinite;
    will-change: background-position;
    transform: translateZ(0);
}

@media (max-width: 991px) {
    .mystic-fireflies {
        animation: none;
        /* Disable expensive bg animation on mobile */
        opacity: 0.1;
    }
}

@keyframes fireflyMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 200px 100px;
    }
}

/* Correct Button Sync */
.legend-mystic-theme .btn-primary {
    background-color: #5c9e47 !important;
    border: 2px solid #315c2b !important;
    box-shadow: 0 5px 0 #315c2b !important;
    color: #ffffff !important;
}

.legend-mystic-theme .btn-primary:hover {
    background-color: #315c2b !important;
    transform: translateY(3px) !important;
    box-shadow: 0 2px 0 #315c2b !important;
}

.story-content .btn-mystic {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #5c9e47, #315c2b);
    color: #ffffff;
    border-radius: 50px;
    font-weight: 700;
    margin-top: 25px;
    box-shadow: 0 15px 30px rgba(49, 92, 43, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.story-content .btn-mystic:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(49, 92, 43, 0.5);
    background: linear-gradient(135deg, #6bb354, #3d7236);
}

/* Timeline Element */
.story-timeline-accent {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(92, 158, 71, 0.4), transparent);
    transform: translateX(-50%);
    z-index: 1;
}

@media (max-width: 991px) {

    .labyrinth-story-block,
    .labyrinth-story-block.reverse {
        flex-direction: column !important;
        padding: 40px 0;
        gap: 30px;
        margin-bottom: 8vh;
    }

    .story-visual {
        width: 100%;
        height: 45vh;
        border-radius: 25px;
        flex: none;
    }

    .story-content {
        padding: 20px 0;
        text-align: center;
        flex: none;
    }

    .story-content h3 {
        font-size: clamp(2.2rem, 8vw, 3rem);
        margin-bottom: 15px;
    }

    .story-content p {
        font-size: 1.15rem;
        line-height: 1.6;
    }

    .legend-hero-mystic {
        height: auto;
        min-height: 70vh;
        padding: 120px 0 80px;
    }

    .legend-hero-mystic .hero-title {
        font-size: clamp(2.8rem, 10vw, 4.5rem);
        line-height: 1;
    }

    .ethereal-messages {
        padding: 80px 0;
    }

    .message-node {
        padding: 20px;
    }

    .message-node i {
        font-size: 3rem;
        margin-bottom: 20px;
    }

    .message-node h4 {
        font-size: 1.8rem;
    }

    .message-node p {
        font-size: 1.1rem;
    }

    .scroll-quote {
        font-size: 1.8rem;
        padding: 0 20px;
    }

    .scroll-quote::before,
    .scroll-quote::after {
        font-size: 6rem;
        opacity: 0.15;
    }

    .scroll-quote::before {
        top: -40px;
        left: 0;
    }

    .scroll-quote::after {
        bottom: -70px;
        right: 0;
    }

    .ancient-scroll-section {
        padding: 100px 0;
    }
}

@media (max-width: 576px) {
    .legend-hero-mystic .section-subtitle {
        letter-spacing: 4px;
        font-size: 0.8rem;
    }

    .labyrinth-story-block {
        margin-bottom: 5vh;
    }

    .story-visual {
        height: 35vh;
        border-radius: 20px;
    }

    .story-content h3 {
        font-size: 2rem;
    }

    .promos-grid {
        gap: 40px !important;
    }
}

/* Ancient Scroll Section */
.ancient-scroll-section {
    padding: 200px 0;
    background: radial-gradient(circle at center, rgba(92, 158, 71, 0.15), transparent 75%);
    text-align: center;
    position: relative;
    z-index: 5;
}

.scroll-quote {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.4;
    color: #ffffff;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    padding: 0 80px;
    text-shadow: 0 0 40px rgba(92, 158, 71, 0.5);
}

.scroll-quote::before,
.scroll-quote::after {
    content: '"';
    color: #5c9e47;
    font-size: 10rem;
    opacity: 0.3;
    position: absolute;
    font-family: serif;
    pointer-events: none;
}

.scroll-quote::before {
    top: -60px;
    left: -40px;
}

.scroll-quote::after {
    bottom: -110px;
    right: -40px;
}

/* Legendary Gallery Masonry */
.legend-gallery {
    background-color: rgba(1, 4, 2, 0.4);
    position: relative;
    z-index: 10;
}

.modern-gallery-grid {
    columns: 3 320px;
    column-gap: 30px;
    margin-top: 60px;
}

.gallery-item-wrap {
    break-inside: avoid;
    margin-bottom: 30px;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(92, 158, 71, 0.15);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #000;
}

.gallery-item-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.8s ease;
    filter: brightness(0.9) contrast(1.1);
}

.gallery-info-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(1, 4, 2, 0.95) 0%, transparent 70%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.gallery-info-overlay h4 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-family: var(--font-heading);
}

.gallery-info-overlay span {
    color: #5c9e47;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.gallery-item-wrap:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(92, 158, 71, 0.3);
    border-color: rgba(92, 158, 71, 0.6);
}

.gallery-item-wrap:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1);
}

.gallery-item-wrap:hover .gallery-info-overlay {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991px) {
    .modern-gallery-grid {
        columns: 2 300px;
    }
}

@media (max-width: 576px) {
    .modern-gallery-grid {
        columns: 1;
        padding: 0 15px;
    }
}