/* ------------------- */
/* 1. Global Styles & Variables
/* ------------------- */
:root {
    --color-background: #121212;
    --color-surface: #1e1e1e;
    --color-primary-text: #e0e0e0;
    --color-secondary-text: #a0a0a0;
    --color-accent: #c5a47e; /* A sophisticated gold */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky header */
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-primary-text);
    line-height: 1.7;
}

/* Language-specific text visibility */
body.lang-es [lang="en"] { display: none; }
body.lang-en [lang="es"] { display: none; }

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
    margin: 0.5rem auto 0;
}

section {
    padding: 5rem clamp(1rem, 8vw, 10rem);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ------------------- */
/* 2. Header & Navigation
/* ------------------- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    z-index: 1000;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
    border-radius: 8px; /* Soften edges if logo background is visible */
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--color-primary-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--color-accent);
}

.nav-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
}

.nav-toggle .hamburger {
    width: 25px;
    height: 2px;
    background-color: white;
    display: block;
    position: relative;
    transition: all 0.3s ease;
}

.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

.nav-toggle .hamburger::before { top: -8px; }
.nav-toggle .hamburger::after { top: 8px; }

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 2rem;
}

.lang-switcher a {
    color: var(--color-secondary-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.lang-switcher a.active {
    color: var(--color-accent);
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-icons a {
    color: var(--color-primary-text);
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--color-accent);
    transform: scale(1.1);
}

.header-socials {
    margin-right: 2rem;
}


/* ------------------- */
/* 3. Hero Section
/* ------------------- */
#hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 1rem;
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/hero-background.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 1;
    transform: none;
}

#hero h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.cta-button {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 1rem 2.5rem;
    background-color: var(--color-accent);
    color: var(--color-background);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--color-accent);
}

.cta-button:hover {
    transform: translateY(-5px);
    background-color: transparent;
    color: var(--color-accent);
}

/* ------------------- */
/* 4. "Quién Soy" (About) Section
/* ------------------- */
#quien-soy .container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

#quien-soy .profile-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

#quien-soy p {
    color: var(--color-secondary-text);
    margin-bottom: 1rem;
}

#quien-soy strong {
    color: var(--color-primary-text);
}

/* ------------------- */
/* 5. "Espectáculo" (Show) Section
/* ------------------- */
#espectaculo {
    background-color: var(--color-surface);
}

#espectaculo .show-title {
    font-size: 1.5rem;
    text-align: center;
    color: var(--color-accent);
    margin-top: -2rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

#espectaculo .show-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.detail-card {
    background-color: var(--color-background);
    padding: 2rem;
    border-radius: 10px;
    flex: 1 1 250px; /* Make cards flexible */
    max-width: 350px; /* Prevent cards from becoming too wide */
}

.detail-card h3 {
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.detail-card p {
    color: var(--color-secondary-text);
}

/* Style the technical requirements card to be wider and centered on its own row */
.tech-requirements-card {
    flex-basis: 100%; /* Take up the full width to force a new line */
    max-width: 650px; /* A wider card */
    margin-top: 2em; /* Add some vertical space from the cards above */
    flex-grow: 0; /* Prevent it from growing */
}

/* Remove bullet points from the technical requirements list */
.tech-requirements-card ul {
    list-style: none;
    padding-left: 0;
}

.show-description {
    margin: 3rem auto 0;
    max-width: 800px;
    text-align: center;
    color: var(--color-secondary-text);
}

.show-description p {
    margin-bottom: 1.5rem;
}
.show-description p:last-child {
    margin-bottom: 0;
}

.show-trophy-image {
    margin-top: 3rem;
    text-align: center;
}

.show-trophy-image img {
    max-width: 450px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* ------------------- */
/* 6. "Galería" (Gallery) Section
/* ------------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    aspect-ratio: 4 / 3;
}

.gallery-item img, .gallery-item iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.7));
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.overlay-icon {
    font-size: 3rem;
    color: white;
}

/* ------------------- */
/* 7. Trayectoria (Career) Section
/* ------------------- */
 #trayectoria {
    background-color: var(--color-surface);
}

.trajectory-container {
    display: flex;
    gap: 2rem;
    align-items: stretch !important;
}

.trajectory-card-wrapper {
    flex: 1;
    display: flex;
}

.trajectory-card {
    background: var(--color-background);
    padding: 2rem;
    border-radius: 10px;
    flex: 1;
}

.trajectory-card h3 {
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.trajectory-card ul {
    list-style-type: none;
    color: var(--color-secondary-text);
    padding-left: 0;
}
.trajectory-card ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 20px;
}

.trajectory-card ul li::before {
    content: '•';
    color: var(--color-accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ------------------- */
/* 8. Contact Section
/* ------------------- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-secondary-text);
}
.contact-info a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: bold;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-surface);
    border: 1px solid #333;
    border-radius: 5px;
    color: var(--color-primary-text);
    font-family: var(--font-body);
    font-size: 1rem;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

/* ------------------- */
/* 9. Footer
/* ------------------- */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--color-background);
    border-top: 1px solid #222;
    color: var(--color-secondary-text);
}
.footer-socials {
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem; /* Larger icons in footer */
}

/* ------------------- */
/* 10. Modal (Lightbox) for Gallery
/* ------------------- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    max-width: 90%;
    max-height: 85%;
    display: block;
    margin: auto;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--color-accent);
}

/* ------------------- */
/* 11. Responsive Design
/* ------------------- */
@media (max-width: 768px) {
    html { scroll-padding-top: 70px; }

    .main-header { padding: 0.5rem 1rem; }
    .nav-container {
        flex-wrap: wrap;
    }
    .nav-toggle { display: block; }
    .main-nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
    }
    .main-nav ul {
        flex-direction: column;
        padding: 1rem 0;
        align-items: center;
    }
    .main-nav.active {
        max-height: 300px;
    }
    .nav-toggle.active .hamburger { background-color: transparent; }
    .nav-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
    .nav-toggle.active .hamburger::after { transform: rotate(-45deg); top: 0; }

    #quien-soy .container, .contact-container {
        grid-template-columns: 1fr;
    }

    .trajectory-container {
        flex-direction: column;
    }
    
    #quien-soy .profile-image {
        grid-row: 1; /* Make image appear first on mobile */
    }

    .lang-switcher {
        order: -1; /* Move switcher to the top left on mobile */
        margin-left: 0;
        margin-right: auto;
        padding: 0.5rem 0;
    }

    .logo {
        order: -1;
    }

    .nav-toggle {
        margin-left: auto;
    }

    .header-socials {
        display: none; /* Hide header socials on mobile to save space */
    }
}