/* === DECLARACIÓN DE FUENTE PERSONALIZADA: QUICKSAND === */
@font-face {
  font-family: 'Quicksand';
  src: url('../fonts/Quicksand-Light.otf') format('opentype');
  font-weight: 300; /* Peso para "Light" */
  font-style: normal;
}

/* === FONT & ROOT VARIABLES === */
:root {
    --font-primary: 'Italiana', serif; /* Fuente para TÍTULOS */
    --font-secondary: 'Quicksand', sans-serif; /* Fuente para TEXTO */
    --color-primary: #efbc05;
    --color-dark: #000;
    --color-light: #ffffff;
    --color-dark-accent: #111;
}

/* === GENERAL & RESET STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    background: var(--color-dark);
    color: var(--color-light);
    overflow-x: hidden;
}

/* === VIDEO BACKGROUND (index.html) === */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    object-fit: cover;
}

#horizontalVideo {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
}

#verticalVideo {
    width: 100vw;
    height: 100vh;
    display: none;
}

.video-background video.fade-out {
    opacity: 0;
}

/* === NAVIGATION (Shared) === */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background: transparent;
    transition: all 0.3s ease;
}

.main-nav.scrolled {
    background: rgba(0, 0, 0, 0.8);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-container .logo-link img {
    max-height: 80px;
    max-width: 80px;
    transition: transform 0.3s ease;
}

.nav-container .logo-link:hover img {
    transform: scale(1.1);
}

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

.nav-menu a {
    font-family: var(--font-primary);
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--color-light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.1rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-light);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1100;
    position: fixed;
    top: 1.5rem;
    right: 5%;
}

/* === CENTERED LOGO (index.html) === */
.centered-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

.centered-logo.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

.centered-logo a {
    display: block;
    transition: transform 0.3s ease;
}

.centered-logo a:hover {
    transform: scale(1.1);
}

.centered-logo img {
    max-height: 156px;
    max-width: 156px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

/* === ABOUT SECTION (about.html) === */
.about-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(239, 188, 5, 0.1) 30%, rgba(0, 0, 0, 0.9) 70%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 1;
}

.about-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.about-content {
    max-width: 600px; 
    margin: 0 auto;
    text-align: center;
}

.about-title, .contact-title, .work-title {
    font-family: var(--font-primary);
    font-weight: 500;
    letter-spacing: 5px;
    text-transform: uppercase;
    background: linear-gradient(45deg, var(--color-light), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    text-align: center;
}

.about-title {
    font-size: clamp(5rem, 8vw, 6rem);
    margin-bottom: 5rem;
}

.contact-title {
    font-size: clamp(rem, 6vw, 4.5rem);
    margin-bottom: 4rem;
    margin-top: 3rem;
}

.work-title {
    font-size: clamp(4rem, 8vw, 6rem);
    margin-bottom: 3rem; 
    margin-top: 3rem;
}

.about-text {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-highlight {
    color: var(--color-primary);
    font-weight: 500;
}

/* === WORK SECTION (work.html) === */
.work-container, .contact-section {
    min-height: 100vh;
    padding-top: 150px;
    padding-left: 5%;
    padding-right: 5%;
    background: var(--color-dark);
}

.about-section {
    min-height: 100vh;
    padding-top: 120px; 
    padding-left: 5%;
    padding-right: 5%;
    background: var(--color-dark);
}

.about-background, .work-container {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-accent) 50%, var(--color-dark) 100%);
}

.about-section {
    position: relative;
    display: flex;
    align-items: center;
}

.work-header {
    text-align: center;
    padding: 1.5rem 5%;
    margin-bottom: 0rem;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5% 6rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    display: flex;
    flex-direction: column-reverse; 
    border-radius: 0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: transparent;
}

.gallery-thumbnail {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: all 0.4s ease;
}

.gallery-overlay {
    position: static;
    background: transparent;
    opacity: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    text-align: center;
}

.gallery-title {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--color-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-description {
    font-family: var(--font-secondary);
    font-size: 1.0rem;
    opacity: 0.9;
    line-height: 1.4;
    color: var(--color-light);
    font-weight: 300;
}

/* === CONTACT SECTION (contacto.html) === */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 5%;
    text-align: center;
}

.contact-info-wrapper {
    margin-top: 3rem;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 4rem;
    justify-items: center;
}

.contact-item {
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(239, 188, 5, 0.1);
    border: 2px solid rgba(239, 188, 5, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    background: rgba(239, 188, 5, 0.2);
    border-color: var(--color-primary);
    box-shadow: 0 5px 20px rgba(239, 188, 5, 0.3);
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--color-light);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 300;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: var(--color-primary);
}

/* === VIDEO MODAL (work.html) === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    /* aspect-ratio: 16/9; */ /* <-- MODIFICACIÓN: Quitado */
    background: var(--color-dark);
    border-radius: 12px;
    overflow: hidden;
    animation: slideUp 0.4s ease;
    
    /* --- NUEVAS LÍNEAS --- */
    max-height: 90vh; /* Evita que el modal sea más alto que la pantalla */
    display: flex;
    flex-direction: column;
    /* --- FIN NUEVAS LÍNEAS --- */
}

.modal-video {
    width: 100%;
    /* height: 100%; */ /* <-- MODIFICACIÓN: Quitado */
    
    /* --- NUEVAS LÍNEAS --- */
    aspect-ratio: 16/9; /* El video SÍ mantiene el aspect ratio */
    display: block; 
    /* --- FIN NUEVAS LÍNEAS --- */
}

.modal-info {
    /* display: none; */ /* <-- MODIFICACIÓN: Quitado */
    
    /* --- NUEVAS LÍNEAS --- */
    display: block; /* Hazlo visible */
    padding: 1.5rem 2rem;
    background: var(--color-dark-accent); /* Un fondo sutil */
    overflow-y: auto; /* Para descripciones largas */
    /* --- FIN NUEVAS LÍNEAS --- */
}

.modal-title {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.modal-description {
    font-family: var(--font-secondary);
    opacity: 0.9;
    line-height: 1.5;
    font-weight: 300;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    border: none;
    color: var(--color-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

/* --- NUEVA CLASE PARA EL BOTÓN DE GALERÍA --- */
.gallery-link-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: var(--color-dark);
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-top: 1rem;
    transition: all 0.3s ease;
}
.gallery-link-btn:hover {
    background: var(--color-light);
    transform: scale(1.05);
}
/* --- FIN NUEVA CLASE --- */


@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(50px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* === FOOTER (Shared) === */
.footer {
    background: linear-gradient(135deg, var(--color-dark-accent) 0%, var(--color-dark) 100%);
    border-top: 1px solid rgba(239, 188, 5, 0.2);
    padding: 3rem 5% 2rem;
    margin-top: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    max-height: 60px;
    max-width: 60px;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-link {
    display: inline-block;
    color: var(--color-light);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px;
}

.social-link i {
    font-size: 26px; 
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--color-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* === RESPONSIVE STYLES === */
@media screen and (orientation: portrait) {
    #verticalVideo {
        object-fit: cover;
        width: 100vw;
        height: 100vh;
        min-width: 100vw;
        min-height: 100vh;
    }
}

@media screen and (orientation: portrait) and (max-aspect-ratio: 9/16) {
    #verticalVideo {
        width: auto;
        height: 100vh;
        min-width: 100vw;
    }
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 1rem 5%;
    }
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    .nav-menu.active {
        transform: translateX(0);
    }
    .nav-menu a {
        font-size: 1.5rem;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .centered-logo img {
        max-height: 130px;
        max-width: 130px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .work-container, .contact-section {
        padding-top: 150px;
    }
    
    .about-section {
        padding-top: 120px;
    }
    
    body#work-page .work-container {
        padding-top: 150px;
    }
    
    body#work-page .work-header {
      margin-top: 0; 
      margin-bottom: 2rem; 
    }
    
    .work-title {
       font-size: 3.5rem;
       margin-bottom: 2rem;
       margin-top: 2rem;
    }

    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }
    
    .contact-info-wrapper {
        margin-top: 2rem;
    }
    
    .contact-item {
        margin-bottom: 1.5rem;
    }

    .footer {
        padding: 2rem 5% 1.5rem;
    }
    .footer-content, .footer-social {
        gap: 1.5rem;
    }

    .gallery-title {
        font-size: 0.9rem; 
    }
    .gallery-description {
        font-size: 0.7rem; 
    }
    
    #home-page .mobile-menu-toggle {
        display: none;
    }

    #home-page .nav-menu {
        position: static;
        transform: none;
        flex-direction: row;
        background: transparent;
        height: auto;
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }

    #home-page .nav-menu a {
        font-size: 0.9rem;
    }

    .about-content {
        text-align: center;
        padding-left: 5rem;
        padding-right: 5rem;
    }

    .about-text {
        font-size: 0.1rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .centered-logo img {
        max-height: 95px;
        max-width: 95px;
    }
    
    #home-page .nav-menu {
        gap: 1rem;
    }

    #home-page .nav-menu a {
        font-size: 0.8rem;
    }
    
    .contact-title {
        margin-bottom: 2rem;
        margin-top: 2rem;
    }
}