/* 70s-Inspired Design matching the prototype */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

:root {
    --tropical-green: #00684a;
    --tropical-yellow: #ffd900;
    --nav-height: 4rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: url('../images/bg-tropical.jpg') center/cover fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    overflow-x: hidden;
    color: #fff;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: url('../images/image05.jpg') center top/cover no-repeat;
    opacity: 1;
    pointer-events: none;
    z-index: -2;
    transform: scale(1.1);
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.9) 10%,
        rgba(0, 0, 0, 0.8) 20%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0) 70%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.9) 10%,
        rgba(0, 0, 0, 0.8) 20%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0) 70%
    );
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 48, 36, 0.1), rgba(0, 48, 36, 0.6));
    z-index: -1;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--tropical-yellow);
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-link {
    color: var(--tropical-green);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
    padding: 0 0.5rem;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--tropical-green);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    opacity: 0;
}

.nav-link:hover::after {
    width: 100%;
    opacity: 1;
}

.nav-link svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 2;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 1rem;
    padding-top: var(--nav-height);
}

.logo {
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 230, 0, 0.2);
    transition: transform 0.3s ease;
    opacity: 0;
    animation: fadeInLogo 1s ease-in-out 0.2s forwards;
    object-fit: cover;
    background-color: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

@keyframes fadeInLogo {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo:hover {
    transform: scale(1.05);
}

h1 {
    font-family: 'Pacifico', cursive;
    color: var(--tropical-yellow);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2), 4px 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    line-height: 1.1;
    text-align: center;
}

main {
    max-width: 48rem;
    margin: 0 auto;
}

blockquote {
    text-align: center;
    font-style: italic;
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 0 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.76);
    line-height: 1.6;
    position: relative;
}

blockquote::before,
blockquote::after {
    content: '"';
    font-family: 'Pacifico', cursive;
    font-size: 3rem;
    color: var(--tropical-yellow);
    opacity: 0.5;
    position: absolute;
}

blockquote::before {
    left: 0;
    top: -1rem;
}

blockquote::after {
    right: 0;
    bottom: -2rem;
}

.carousel-container {
    margin-top: 0.5rem;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(139, 69, 19, 0.15);
    background: var(--sage-green);
}

.carousel-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    object-fit: contain;
    cursor: pointer;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    padding: 0.5rem 1rem;
    background: rgba(139, 69, 19, 0.7);
    border-radius: 2rem;
}

.carousel-dot {
    width: 0.75rem;
    height: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--tropical-yellow);
    transform: scale(1.2);
}

.gallery-section {
    margin-top: 3rem;
}

.gallery-section h2 {
    font-family: 'Pacifico', cursive;
    color: var(--tropical-yellow);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-item {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
    border: 2px solid var(--earth-brown);
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* Gallery Carousel Styles */
.gallery-sections {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: minmax(400px, 1fr) minmax(400px, 1fr) minmax(400px, 1fr);
    gap: 1rem;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    justify-content: center;
}

.galeria-section,
.presentaciones-section,
.donde-jose-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 400px;
    width: 100%;
}

.galeria-section h2,
.presentaciones-section h2,
.donde-jose-section h2 {
    font-family: 'Pacifico', cursive;
    color: var(--tropical-yellow);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.2rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.gallery-carousel-container {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(139, 69, 19, 0.15);
    background: var(--sage-green);
    min-width: 350px;
}

.gallery-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.gallery-carousel-slide.active {
    opacity: 1;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--mustard);
    border: 2px solid var(--earth-brown);
    color: var(--earth-brown);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

.gallery-nav-btn:hover {
    background: var(--burnt-orange);
    color: var(--cream);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn.prev {
    left: 15px;
}

.gallery-nav-btn.next {
    right: 15px;
}

.gallery-nav-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(139, 69, 19, 0.9);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
}

.lightbox-button {
    background: var(--mustard);
    border: 2px solid var(--earth-brown);
    color: var(--earth-brown);
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.lightbox-button:hover {
    background: var(--burnt-orange);
    color: var(--cream);
    transform: scale(1.1);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--mustard);
    border: 2px solid var(--earth-brown);
    color: var(--earth-brown);
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.lightbox-close:hover {
    background: var(--burnt-orange);
    color: var(--cream);
    transform: scale(1.1);
}

footer {
    text-align: center;
    margin-top: 4rem;
}

.back-to-top {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: static;
    margin: 2rem auto 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.back-to-top i {
    font-size: 1.5rem;
    color: var(--tropical-green);
}

/* Smooth scrolling effect */
html {
    scroll-behavior: smooth;
}

/* Loading indicators */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--earth-brown);
    font-size: 1rem;
    text-align: center;
    min-height: 200px;
    background: var(--cream);
    border-radius: 8px;
    margin: 1rem 0;
    border: 2px dashed var(--earth-brown);
}

/* Media Sections (Streaming + Music Player) */
.media-sections {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: minmax(500px, 1fr) minmax(500px, 1fr);
    gap: 2rem;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    align-items: start;
    justify-content: center;
}

.streaming-section,
.music-player-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0; /* Allows content to shrink properly */
    width: 100%; /* Ensures full width usage */
    height: 500px; /* Fixed height for both sections */
    display: flex;
    flex-direction: column;
}

.streaming-section h2,
.music-player-section h2 {
    font-family: 'Pacifico', cursive;
    color: var(--tropical-yellow);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    flex-shrink: 0; /* Don't shrink the heading */
}

/* Streaming section specific grid styling */
.streaming-section .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    flex: 1; /* Take remaining space like music playlist */
    overflow-y: auto;
    margin-bottom: 0;
    padding-right: 0.5rem;
}

.streaming-section .gallery-item {
    height: 140px;
}

/* Music Player Styles */
.music-player-container {
    display: flex;
    flex-direction: column;
    flex: 1; /* Take remaining space after heading */
    min-height: 0; /* Allow shrinking */
    overflow: hidden; /* Prevent container overflow */
}

.music-playlist {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    flex: 1; /* Take most of the available space */
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 0; /* Allow shrinking */
    margin-bottom: 1rem;
}

.music-track {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    min-height: 40px; /* Consistent height */
}

.music-track:hover {
    background: rgba(255, 217, 0, 0.1);
    border-color: var(--tropical-yellow);
    transform: translateX(5px);
}

.music-track.active {
    background: rgba(255, 217, 0, 0.2);
    border-color: var(--tropical-yellow);
}

.music-track-icon {
    margin-right: 0.75rem;
    color: var(--tropical-yellow);
}

.music-track-name {
    color: var(--cream);
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
}

.music-track.active .music-track-name {
    color: var(--tropical-yellow);
    font-weight: 600;
}

.audio-player-controls {
    background: rgba(0, 0, 0, 0.1); /* More transparent */
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05); /* Subtle border */
    flex-shrink: 0; /* Don't shrink the controls */
}

#audio-player {
    width: 100%;
    height: 40px; /* Fixed height for audio controls */
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    background: transparent; /* Make player transparent */
    opacity: 0.8;
}

#audio-player::-webkit-media-controls-panel {
    background-color: transparent; /* Make webkit controls transparent too */
}

/* Video Section */
.video-section {
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.video-section h2 {
    font-family: 'Pacifico', cursive;
    color: var(--tropical-yellow);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.video-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

#tropical-video {
    width: 100%;
    max-width: 800px;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Center the media sections */
.media-sections {
    align-items: center;
    justify-content: center;
}

/* Custom scrollbar styling for overflow areas */
.streaming-section .gallery-grid::-webkit-scrollbar,
.music-playlist::-webkit-scrollbar {
    width: 6px;
}

.streaming-section .gallery-grid::-webkit-scrollbar-track,
.music-playlist::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.streaming-section .gallery-grid::-webkit-scrollbar-thumb,
.music-playlist::-webkit-scrollbar-thumb {
    background: var(--tropical-yellow);
    border-radius: 3px;
}

.streaming-section .gallery-grid::-webkit-scrollbar-thumb:hover,
.music-playlist::-webkit-scrollbar-thumb:hover {
    background: #e6c700;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-sections {
        grid-template-columns: minmax(350px, 1fr) minmax(350px, 1fr) minmax(350px, 1fr);
        gap: 0.8rem;
    }
    
    .galeria-section,
    .presentaciones-section,
    .donde-jose-section {
        padding: 1.5rem;
        min-width: 350px;
    }
    
    .galeria-section h2,
    .presentaciones-section h2,
    .donde-jose-section h2 {
        font-size: 1.6rem;
    }
    
    .gallery-carousel-container {
        height: 400px;
        min-width: 300px;
    }
}

@media (max-width: 900px) {
    .gallery-sections {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .donde-jose-section {
        grid-column: 1 / -1;
        margin-top: 1rem;
    }
}

@media (max-width: 1100px) {
    .media-sections {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 800px;
    }
    
    .streaming-section,
    .music-player-section {
        padding: 2rem;
    }
    
    .streaming-section h2,
    .music-player-section h2 {
        font-size: 1.8rem;
    }
    
    .video-section h2 {
        font-size: 2rem;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 3rem;
        letter-spacing: 0.5px;
    }
    
    .logo {
        width: 16rem;
        height: 16rem;
    }
    
    .nav-links {
        gap: 2rem;
        padding: 0 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    blockquote {
        font-size: 1.1rem;
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .gallery-sections {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .galeria-section h2,
    .presentaciones-section h2,
    .donde-jose-section h2,
    .gallery-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .gallery-carousel-container {
        height: 300px;
    }
    
    .gallery-nav-btn {
        width: 45px;
        height: 45px;
    }
    
    .gallery-nav-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .music-playlist {
        max-height: 200px;
    }
    
    .music-track {
        padding: 0.5rem;
    }
    
    .music-track-name {
        font-size: 0.8rem;
    }
    
    .audio-player-controls {
        padding: 1rem;
    }
    
    .video-container {
        padding: 1rem;
    }
    
    .gallery-item {
        min-height: 150px;
    }
}

/* Presentaciones section - isolated styling */
.presentaciones-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.presentaciones-section .gallery-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.presentaciones-section .gallery-carousel-slide.active {
    opacity: 1;
}

/* Galeria section - isolated styling */
.galeria-section .gallery-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.galeria-section .gallery-carousel-slide.active {
    opacity: 1;
}

/* Donde Jose section - isolated styling */
.donde-jose-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donde-jose-section .gallery-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.donde-jose-section .gallery-carousel-slide.active {
    opacity: 1;
}
