/* ==========================================================================
   1. RESET, FUENTES Y CONFIGURACIÓN GLOBAL
   ========================================================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Helvetica', Arial, sans-serif; 
    background: #000; 
    color: #fff; 
    overflow-x: hidden;
}

/* ==========================================================================
   2. HEADER PRINCIPAL (BARRA SUPERIOR CORREGIDA)
   ========================================================================== */
.main-header {
    position: fixed; 
    top: 0; 
    left: 0;
    width: 100%; 
    padding: 30px;
    display: flex; 
    align-items: center;
    justify-content: space-between; /* Distribución perfecta: Menú a la izq, Logo a la der */
    z-index: 100;
}

.burger-menu { 
    cursor: pointer; 
}

.burger-menu span { 
    display: block; 
    width: 30px; 
    height: 2px; 
    background: #fff; 
    margin-bottom: 6px; 
}

.burger-menu span:last-child {
    margin-bottom: 0;
}

/* Contenedor del Logo alineado a la derecha */
.logo-container {
    display: flex;
    align-items: center;
    margin-left: auto; /* Fuerza magnética que posiciona el logo a la derecha */
}

.site-logo {
    height: 55px; /* Altura sutil y editorial de revista */
    width: auto;  /* Evita que se deforme la proporción original */
    display: block;
    transition: opacity 0.3s ease;
}

.site-logo:hover {
    opacity: 0.7;
}

/* ==========================================================================
   3. MENÚ DE NAVEGACIÓN DESPLEGABLE (OVERLAY)
   ========================================================================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.close-menu {
    position: absolute;
    top: 30px;    
    left: 30px;   
    font-size: 2rem; 
    color: #fff;
    cursor: pointer;
    font-weight: 300; 
    line-height: 1;
    z-index: 210;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.close-menu:hover {
    opacity: 0.7;
    transform: rotate(90deg);
}

.filters-nav {
    max-width: 600px;
    width: 100%;
    padding: 0 20px;
}

.filters-nav ul {
    list-style: none;
    text-align: left; 
}

.filters-nav a {
    color: #fff; 
    text-decoration: none;
    font-size: 1.8rem; 
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.5;
    transition: color 0.3s;
}

.filters-nav a:not(.active) {
    color: #666;
}

.filters-nav a:hover, 
.filters-nav a.active {
    color: #fff; 
}

/* Espaciador físico para separar filtros de secciones institucionales */
.menu-links li.menu-spacer {
    height: 50px; 
    width: 30px;  
    position: relative;
    list-style: none; 
    display: block !important; 
}

.menu-links li.menu-spacer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 30px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-50%);
}

/* ==========================================================================
   4. VISTA PRINCIPAL: GRILLA MASONRY ORIGINAL RESTAURADA (HOME)
   ========================================================================== */
.masonry-grid,
#portfolio-grid {
    padding: 100px 10px;
    column-count: 4; 
    column-gap: 5px;
    background: #000;
    width: 100%;
}

.grid-item {
    break-inside: avoid;
    margin-bottom: 5px;
    position: relative;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    
    /* Aislamiento de capa para evitar parpadeos visuales al hacer hover */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%) brightness(95%);    /* EDITAR ACA BRILLO IMAGENES HOME */
    transition: all 0.5s ease;
    backface-visibility: hidden;
}

.grid-item:hover img {
    filter: grayscale(0%) brightness(100%);
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none; 
    z-index: 2;
}

.overlay p {
    color: #aaa; 
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.overlay h3 {
    color: #fff; 
    font-size: 1.2rem;
    font-weight: normal;
}

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

/* Filtros dinámicos */
.grid-item.hidden {
    display: none !important;
}

/* ==========================================================================
   5. VISTA DETALLE DE PROYECTO (SCROLL SNAP E INTRO)
   ========================================================================== */
.project-container {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory; 
    scroll-behavior: smooth;       
    background-color: #000;
}

.project-container::-webkit-scrollbar { display: none; }
.project-container { -ms-overflow-style: none; scrollbar-width: none; }

.project-slide {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start; 
    position: relative;
    overflow: hidden;
}

.project-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.project-intro {
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10%;
    position: relative;
}

.intro-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; 
}

.intro-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(40%);
    opacity: 0.55; 
}

.intro-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
}

.intro-location {
    color: #666; 
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.intro-title {
    color: #fff; 
    font-size: 3rem; 
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.intro-text {
    color: #ccc; 
    font-size: 1.1rem;
    line-height: 1.8; 
    font-weight: 300;
    text-align: justify; 
}

/* ==========================================================================
   6. SECCIÓN: NOSOTROS (DIAGRAMACIÓN ASIMÉTRICA)
   ========================================================================== */
.about-container {
    width: 100vw;
    height: 100vh;
    background-color: #000;
    display: flex;
    overflow: hidden; 
    position: relative;
}

.about-text-column {
    width: 55%;
    height: 100%;
    overflow-y: auto; 
    padding: 120px 5% 60px 10%; 
    display: flex;
    flex-direction: column;
    background-color: #000;
}

.about-text-column::-webkit-scrollbar { display: none; }
.about-text-column { -ms-overflow-style: none; scrollbar-width: none; }

.about-content {
    max-width: 85%;
    width: 100%;
}

.about-subtitle {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.about-title {
    color: #fff;
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 40px;
}

.about-content p {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 25px;
    text-align: justify;
    font-weight: 300;
}

.about-content p strong {
    color: #fff;
    font-weight: 600;
}

.about-image-column {
    width: 45%;
    height: 100%;
    background-color: #111;
}

.about-image-column img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   7. SECCIÓN: CONTACTO (DIAGRAMACIÓN TIPOGRÁFICA)
   ========================================================================== */
.contact-container {
    min-height: 100vh;
    width: 100vw;
    background-color: #000;
    display: flex;
    align-items: center; 
    justify-content: flex-start;
    padding: 120px 10% 60px 10%; 
}

.contact-wrapper {
    max-width: 1000px;
    width: 100%;
}

.contact-section-title {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 60px;
}

.contact-block {
    margin-bottom: 45px;
}

.contact-label {
    display: block;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}

.contact-value, 
.contact-value-text {
    font-size: 3.5rem; 
    font-weight: 900;  
    color: #fff;
    text-decoration: none;
    line-height: 1.1;
    letter-spacing: -1px; 
    text-transform: uppercase;
    display: block;
    transition: opacity 0.3s ease;
}

a.contact-value:hover {
    opacity: 0.6;
}

/* ==========================================================================
   8. COMPONENTES GLOBALES INTERACTIVOS (BOTONES FLOTANTES)
   ========================================================================== */
/* Botón Volver (Izquierda Vertical) */
.back-home-btn {
    position: fixed; 
    left: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: left top;
    z-index: 10;
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 3px;
    white-space: nowrap;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.back-home-btn:hover {
    opacity: 1;
}

/* Botón WhatsApp (Derecha Abajo) */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px; 
    width: 55px;
    height: 55px;
    background-color: #1a1a1a; 
    color: #ffffff; 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 100; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1); 
    transition: all 0.3s ease;
}

.whatsapp-icon {
    width: 25px;
    height: 25px;
}

.whatsapp-float:hover {
    background-color: #ffffff; 
    color: #000000;
    transform: scale(1.08) translateY(-3px); 
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   9. MEDIA QUERIES GENERALES (RESPONSIVE OPTIMIZADO)
   ========================================================================== */
@media (max-width: 1024px) {
    .masonry-grid { 
        column-count: 2; 
    }
    .about-container {
        flex-direction: column; 
        overflow-y: auto;
    }
    .about-text-column {
        width: 100%;
        height: auto;
        padding: 100px 40px 40px 40px;
    }
    .about-image-column {
        width: 100%;
        height: 50vh; 
    }
    .contact-value, 
    .contact-value-text {
        font-size: 2.5rem; 
    }
}

@media (max-width: 768px) {
    .back-home-btn {
        top: 32px; 
        font-size: 0.75rem;
    }
    .project-intro {
        padding: 0 40px;
    }
    .intro-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    .intro-text {
        font-size: 1rem;
        line-height: 1.6;
    }
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 600px) {
    .masonry-grid { 
        column-count: 1; 
    }
    .contact-container {
        padding: 100px 30px 40px 30px;
    }
    .contact-section-title {
        margin-bottom: 40px;
    }
    .contact-block {
        margin-bottom: 35px;
    }
    .contact-value, 
    .contact-value-text {
        font-size: 1.6rem; 
        letter-spacing: 0;
    }
}

@media (max-width: 480px) {
    .site-logo {
        height: 20px; 
    }
}





/* ==========================================================================
   10. ESTRUCTURA MODAL DINÁMICO A PANTALLA COMPLETA (SCROLL SNAP)
   ========================================================================== */
.project-modal {
    display: none; 
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: #000;
    z-index: 99999;
    overflow-y: scroll;
    scroll-snap-type: y mandatory; 
    scroll-behavior: smooth;
}

.project-modal::-webkit-scrollbar { display: none; }
.project-modal { -ms-overflow-style: none; scrollbar-width: none; }

.modal-content {
    width: 100%;
    height: auto;
}

.close-modal {
    position: fixed;
    top: 30px;    
    left: 30px;   
    font-size: 2.5rem; 
    color: #fff;
    cursor: pointer;
    font-weight: 200; 
    z-index: 100000;
    transition: opacity 0.3s ease;
    opacity: 0.6;
}

.close-modal:hover {
    opacity: 1;
}

/* Cada imagen ocupa el 100% de la pantalla con efecto imán */
.modal-fullscreen-item {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start; 
    scroll-snap-stop: always;
    position: relative;
    overflow: hidden;
    background: #000;
}

.modal-fullscreen-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Ajustes exclusivos para la primera vista del proyecto */
.modal-fullscreen-item.hero-image img {
    filter: brightness(40%);
}

.modal-hero-text {
    position: absolute;
    bottom: 80px;
    left: 10%;
    right: 10%;
    z-index: 2;
    max-width: 800px;
}

.modal-hero-text .category-tag {
    color: #666; 
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.modal-hero-text h2 {
    color: #fff; 
    font-size: 3rem; 
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.modal-hero-text p {
    color: #ccc; 
    font-size: 1.1rem;
    line-height: 1.8; 
    font-weight: 300;
    text-align: justify; 
}