/* cafe-y-biodiversidad.css - EPIC Dark Theme with 3D Carousel */

/* === 1. DARK THEME BASE === */
:root {
    --bg-dark: #0a0e27;
    --bg-dark-secondary: #151929;
    --color-green-primary: #2ecc71;
    --color-green-accent: #27ae60;
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --shadow-dark: 0 15px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow-green: 0 0 30px rgba(46, 204, 113, 0.4);
}

body.biodiversidad-page {
    background-color: var(--bg-dark) !important;
    background-image: linear-gradient(135deg, #0a0e27 0%, #151929 100%) !important;
    color: var(--text-white) !important;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

.biodiversidad-page .encabezado {
    background-color: rgba(10, 14, 39, 0.95) !important;
}

.contenedor-biodiv {
    padding-top: 100px;
}

/* === 2. EPIC HERO === */
.hero-biodiv {
    position: relative;
    height: 90vh;
    min-height: 650px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay-biodiv {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(10, 14, 39, 0.7) 0%,
            rgba(10, 14, 39, 0.9) 50%,
            rgba(46, 204, 113, 0.2) 100%);
    z-index: 1;
}

.hero-content-biodiv {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1000px;
    padding: 20px;
}

.museum-logo-badge {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    padding: 15px;
    border: 3px solid var(--color-green-primary);
    box-shadow: var(--shadow-glow-green);
}

.museum-logo-badge img {
    width: 100%;
    border-radius: 50%;
}

.hero-title-biodiv {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    line-height: 1;
    margin: 0 0 30px;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    color: var(--text-white);
}

.text-green {
    color: var(--color-green-primary);
    text-shadow: 0 0 20px rgba(46, 204, 113, 0.8);
}

.hero-subtitle-biodiv {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 50px;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 30px;
    background: rgba(46, 204, 113, 0.1);
    border: 2px solid var(--color-green-primary);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.stat-item strong {
    font-size: 2.5rem;
    color: var(--color-green-primary);
    font-weight: 700;
}

.stat-item span {
    font-size: 0.9rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === 3. INTRO SECTION (SPLIT LAYOUT) === */
.biodiv-intro {
    padding: 100px 5%;
    background: var(--bg-dark-secondary);
}

.intro-container-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.intro-text {
    text-align: left;
}

.intro-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--color-green-primary);
    margin-bottom: 25px;
    text-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
    line-height: 1.2;
}

.intro-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 25px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Tighter fit next to video */
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: rgba(46, 204, 113, 0.05);
    border: 2px solid rgba(46, 204, 113, 0.3);
    padding: 20px 15px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(46, 204, 113, 0.15);
    border-color: var(--color-green-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow-green);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--color-green-primary);
    margin-bottom: 10px;
}

.feature-card h4 {
    color: var(--text-white);
    font-size: 1rem;
    margin: 0;
}

/* === 3.5. VIDEO COLUMN === */
.intro-video {
    text-align: center;
    /* Removed padding and background for seamless look */
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.video-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: 25px;
    text-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
}

.tiktok-wrapper-compact {
    display: flex;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    width: 100%;
    /* Add shadow directly to the video wrapper */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(46, 204, 113, 0.2);
    /* Enhance the video border slightly */
}

.tiktok-wrapper-compact blockquote {
    margin: 0;
}

/* === 4. 3D ROTATING CAROUSEL (PROFESSIONAL UPGRADE) === */
.carousel-section {
    padding: 100px 20px;
    background: var(--bg-dark);
    overflow: hidden;
}

.carousel-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--text-white);
    text-align: center;
    margin-bottom: 15px;
}

.carousel-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 80px;
    /* Increased from 60px to push items down */
    font-size: 1.1rem;
}

.carousel-3d-container {
    perspective: 1500px;
    /* Increased perspective for deeper 3D feel */
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 50px;
    /* Space for reflection */
}

.carousel-3d {
    width: 100%;
    height: 320px;
    /* Reduced height */
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Smooth cubic-bezier */
}

.carousel-item {
    position: absolute;
    width: 220px;
    /* Reduced width (was 260) */
    height: 300px;
    /* Reduced height (was 350) */
    left: 50%;
    top: 50%;
    transform-origin: center center;
    /* Calculated in JS: rotateY(angle) translateZ(radius) */
    margin-left: -110px;
    /* Half width */
    margin-top: -150px;
    /* Half height */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(46, 204, 113, 0.3);
    cursor: pointer;
    transition: all 0.5s ease;
    /* Reflection effect */
    -webkit-box-reflect: below 15px linear-gradient(transparent 60%, rgba(0, 0, 0, 0.3));
    background: #000;
    /* Fallback */
    filter: brightness(0.6);
    /* Dim inactive items */
}

.carousel-item.active {
    border-color: var(--color-green-primary);
    box-shadow: 0 0 40px rgba(46, 204, 113, 0.5);
    filter: brightness(1.1);
    /* Highlight active */
    z-index: 10;
}

.carousel-item:hover {
    filter: brightness(1.2);
    border-color: #fff;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.carousel-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-green-primary), var(--color-green-accent));
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-glow-green);
}

.carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(46, 204, 113, 0.6);
}

/* === 5. QUOTE === */
.quote-biodiv {
    padding: 80px 20px;
    background: var(--bg-dark-secondary);
}

.quote-biodiv blockquote {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.quote-biodiv i {
    font-size: 4rem;
    color: rgba(46, 204, 113, 0.3);
    margin-bottom: 20px;
}

.quote-biodiv p {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    line-height: 1.6;
    color: var(--text-white);
    font-style: italic;
    margin: 0;
}

/* === 6. BIODIVERSITY MUSEUM === */
.biodiv-museum {
    padding: 100px 20px;
    background: var(--bg-dark);
}

.museum-header {
    text-align: center;
    margin-bottom: 60px;
}

.museum-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--color-green-primary);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
}

.museum-location {
    font-size: 1.2rem;
    color: var(--text-gray);
}

.museum-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto 80px;
    align-items: center;
}

.museum-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 25px;
}

.biodiv-list {
    list-style: none;
    padding: 0;
}

.biodiv-list li {
    padding: 12px 0;
    color: var(--text-gray);
    font-size: 1.05rem;
}

.biodiv-list i {
    color: var(--color-green-primary);
    margin-right: 12px;
}

.museum-image img {
    width: 100%;
    border-radius: 20px;
    border: 3px solid var(--color-green-primary);
    box-shadow: var(--shadow-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.museum-image img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow-green);
}

/* === 7. BIODIV GRID === */
.biodiv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

.biodiv-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.biodiv-card:hover {
    border-color: var(--color-green-primary);
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow-green);
}

.biodiv-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.biodiv-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 14, 39, 0.95) 0%, transparent 100%);
    padding: 30px 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.biodiv-card:hover .biodiv-card-overlay {
    transform: translateY(0);
}

.biodiv-card-overlay h4 {
    color: var(--color-green-primary);
    margin: 0;
    font-size: 1.3rem;
}

.final-quote {
    max-width: 800px;
    margin: 60px auto 0;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-white);
    font-style: italic;
    padding: 40px;
    background: rgba(46, 204, 113, 0.05);
    border-left: 5px solid var(--color-green-primary);
    border-radius: 10px;
}

/* === 8. MODAL === */
.modal-expand {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.modal-expand.show {
    display: flex;
}

.modal-expand img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(46, 204, 113, 0.5);
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--color-green-primary);
}

/* === 9. RESPONSIVE === */
@media (max-width: 968px) {
    .intro-container-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .intro-text,
    .intro-text h3,
    .intro-text p {
        text-align: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .intro-video {
        margin-top: 20px;
    }

    .museum-content {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hero-title-biodiv {
        font-size: 3rem;
    }

    .stat-item strong {
        font-size: 2rem;
    }

    .carousel-item {
        width: 280px;
        margin-left: -140px;
        height: 350px;
    }

    .carousel-3d {
        height: 350px;
    }

    .biodiv-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero-biodiv {
        height: 70vh;
        min-height: 500px;
    }

    .hero-title-biodiv {
        font-size: 2.2rem;
    }

    .hero-subtitle-biodiv {
        font-size: 1.1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .museum-logo-badge {
        width: 90px;
        height: 90px;
    }

    .carousel-title {
        font-size: 2rem;
    }

    .museum-header h3,
    .intro-text h3 {
        font-size: 2rem;
    }

    .biodiv-intro,
    .carousel-section,
    .biodiv-museum {
        padding: 60px 15px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Prevent horizontal overflow */
    body,
    html {
        overflow-x: hidden;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}