/* 
Theme Name: LQ Arquitectura Theme
Description: Tema premium a medida para estudio de arquitectura
Author: Assistant
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&display=swap');
@import url('https://fonts.cdnfonts.com/css/lemon-milk');

:root {
    --bg-color: #F3EFE6;
    --bg-alt: #EBE2DB;
    --accent-sand: #E2C9B3;
    --accent-wood-light: #B9A081;
    --accent-wood-dark: #AB896E;
    --accent-green-light: #B9B89C;
    --accent-green-dark: #5E6B5A;
    --text-color: #5D5D5D;
    
    --font-main: 'Montserrat', sans-serif;
    --hero-image: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&q=80&w=1920');
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-weight: 300;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 48vh; /* Reduced height to naturally pull up the grid without overlap */
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fade gradiente sutil hacia el fondo */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, transparent, var(--bg-color));
    pointer-events: none;
}

.logo-container {
    z-index: 2;
    text-align: center;
    padding-bottom: 0; /* Removed bottom padding so it centers properly in shorter hero */
}

.logo-text {
    font-size: 5.5rem;
    color: var(--accent-green-dark);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.hero-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.hero-logo-text {
    font-family: 'LEMON MILK', 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 3rem;
    color: #000;
    letter-spacing: 3px;
    line-height: 1;
    margin-top: 5px; /* Adjust alignment given the light font might have different baseline */
}

/* Services Container */
.services-container {
    padding: 0 0 5rem 0;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    text-align: center;
}

.services-title {
    font-size: 0.95rem;
    margin-bottom: 0;
    padding: 1.5rem 0;
    color: #000;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.service-item {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease;
    padding-bottom: 0;
}

.service-item:last-child {
    border-right: none;
}

.service-item:hover {
    background-color: var(--bg-alt);
}

.service-title-container {
    padding: 1.5rem 0;
}

.service-title-container h3 {
    font-size: 1rem;
    letter-spacing: 1px;
    color: #000;
    font-weight: 700;
}

.service-image {
    width: 100%;
    height: 240px; /* Reduced from 300px to help it fit on the screen */
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-item:hover .service-image img {
    transform: scale(1.03);
}

.service-desc {
    font-size: 0.8rem;
    color: var(--text-color);
    padding: 1rem 1.5rem;
    line-height: 1.4;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

/* About Section */
.about-section {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}
.about-text-container {
    flex: 1 1 50%;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 10%;
}
.about-headline {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--accent-green-dark);
    line-height: 1.3;
    margin-bottom: 2.5rem;
}
.about-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--accent-wood-dark);
    background-color: transparent;
    color: var(--accent-wood-dark);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    align-self: flex-start;
    transition: all 0.3s ease;
}
.about-button:hover {
    background-color: var(--accent-wood-dark);
    color: var(--bg-color);
}
.about-image-container {
    flex: 1 1 50%;
}
.about-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 1024px) {
    .logo-text {
        font-size: 4rem;
    }
    .hero-logo-text {
        font-size: 2.2rem;
    }
    .service-title-container h3 {
        font-size: 0.9rem;
    }
    .service-desc {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
    .about-text-container {
        padding: 4rem 5%;
    }
    .about-headline {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .hero {
        height: 50vh;
    }
    .hero-logo-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }
    .logo-text {
        font-size: 2.5rem;
    }
    .hero-logo-text {
        font-size: 1.5rem;
    }
    .about-text-container, .about-image-container {
        flex: 1 1 100%;
    }
    .service-title-container {
        padding: 0.5rem 0;
    }
    .service-title-container h3 {
        font-size: 0.65rem;
        word-break: break-word;
    }
    .service-desc {
        font-size: 0.6rem;
        padding: 0.25rem;
        border-top: none;
    }
    .service-image {
        height: 90px;
    }
}

/* Footer Section */
.site-footer {
    background-color: #171615; /* Dark almost black with slight warmth */
    color: #e0e0e0;
    padding: 5rem 10% 2rem 10%;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}
.footer-brand {
    flex: 1 1 40%;
    margin-bottom: 2rem;
}
.footer-brand h2 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: var(--accent-sand); /* Para "Arquitectos" */
    letter-spacing: 0.5px;
}
.footer-brand h2 span {
    color: #ffffff; /* Para "LQ" */
    font-weight: 400;
}
.footer-brand p {
    font-size: 0.85rem;
    color: #a0a0a0;
}
.footer-links {
    flex: 1 1 60%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.footer-col {
    margin-bottom: 2rem;
    padding: 0 1rem;
}
.footer-col h4 {
    color: var(--accent-sand);
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
}
.footer-col p {
    font-size: 0.85rem;
    color: #c0c0c0;
    margin-bottom: 0.8rem;
}
.footer-col p a {
    transition: color 0.3s ease;
}
.footer-col p a:hover {
    color: #ffffff;
}
.footer-bottom {
    border-top: 1px solid #333333;
    padding-top: 2rem;
    text-align: center;
}
.footer-bottom p {
    font-size: 0.75rem;
    color: #888888;
}

@media (max-width: 768px) {
    .footer-brand {
        flex: 1 1 100%;
    }
    .footer-links {
        flex: 1 1 100%;
        flex-direction: column;
    }
    .footer-col {
        padding: 0;
    }
}

/* Página Nosotros - ZigZag */
.nosotros-container {
    width: 100%;
    overflow: hidden;
}

.zigzag-section {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    align-items: stretch;
}

/* default order: text left, image right */
.zigzag-text, .zigzag-image {
    flex: 1 1 50%;
}

.zigzag-text {
    padding: 6rem 10%;
    background-color: var(--bg-alt); /* off-white cream slightly darker */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.zigzag-text h2 {
    font-size: 2.5rem;
    color: var(--accent-green-dark);
    margin-bottom: 2rem;
    font-weight: 300;
}

.zigzag-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.zigzag-body p {
    margin-bottom: 1rem;
}

.zigzag-image {
    min-height: 50vh;
}

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

/* Reverse section */
.zigzag-reverse {
    flex-direction: row-reverse;
}
.zigzag-reverse .zigzag-text {
    background-color: var(--bg-color); /* alternate background */
}

@media (max-width: 900px) {
    .zigzag-section, .zigzag-reverse {
        flex-direction: column;
    }
    .zigzag-text { 
        order: 2; 
        padding: 4rem 2rem; 
    }
    .zigzag-image { 
        order: 1; 
        width: 100%;
        min-height: 35vh;
    }
    .zigzag-text h2 {
        font-size: 2rem;
    }
}

/* --- Sistema de Portafolio --- */

/* --- Sistema de Portafolio (Mockup) --- */

.portfolio-page-wrapper {
    background-color: var(--bg-alt); /* El fondo arena/beige solicitado */
    padding: 3rem 5% 8rem 5%;
    min-height: 80vh;
}

.portfolio-header-left {
    max-width: 1600px;
    margin: 0 auto 3rem auto;
    text-align: left;
}

.portfolio-header-left h1 {
    font-size: 3.2rem;
    color: #2b2b2b;
    font-weight: 300;
    margin-bottom: 0.8rem;
    text-transform: none; /* Como "Arquitectura" en el mockup */
}

.portfolio-header-left p {
    color: #666666;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Grilla del Portafolio (Mosaico) */
.portfolio-grid-large {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 350px; /* Altura base para formar rectángulos/cuadrados */
    gap: 1.5rem; /* Gap sutil */
    grid-auto-flow: dense; /* Rellena los huecos vacíos */
}

.portfolio-item-large {
    display: block;
    width: 100%;
    height: 100%; /* Usa todo el alto de su celda */
    overflow: hidden;
    position: relative;
}

/* --- PATRÓN MOSAICO DE 6 ELEMENTOS --- */
/* 1. Grande (2 columnas x 2 filas) */
.portfolio-item-large:nth-child(6n + 1) { grid-column: span 2; grid-row: span 2; }
/* 2. Horizontal (2 columnas x 1 fila) */
.portfolio-item-large:nth-child(6n + 2) { grid-column: span 2; grid-row: span 1; }
/* 3. Pequeño (1 columna x 1 fila) */
.portfolio-item-large:nth-child(6n + 3) { grid-column: span 1; grid-row: span 1; }
/* 4. Vertical (1 columna x 2 filas) */
.portfolio-item-large:nth-child(6n + 4) { grid-column: span 1; grid-row: span 2; }
/* 5. Pequeño (1 columna x 1 fila) */
.portfolio-item-large:nth-child(6n + 5) { grid-column: span 1; grid-row: span 1; }
/* 6. Horizontal (2 columnas x 1 fila) */
.portfolio-item-large:nth-child(6n + 6) { grid-column: span 2; grid-row: span 1; }

.portfolio-image-large {
    width: 100%;
    height: 100%;
}

.portfolio-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item-large:hover .portfolio-image-large img {
    transform: scale(1.03);
}

/* --- OVERLAY EFECTO HOVER --- */
.portfolio-overlay-large {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.35); /* Quitar brillo */
    backdrop-filter: blur(5px); /* Efecto Blur/Desenfocado */
    -webkit-backdrop-filter: blur(5px); 
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; 
    transition: opacity 0.5s ease;
}

.portfolio-title-large {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.5s ease;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.portfolio-item-large:hover .portfolio-overlay-large {
    opacity: 1;
}

.portfolio-item-large:hover .portfolio-title-large {
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .portfolio-grid-large {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 300px;
    }
    /* Resetear todos a 1x1 */
    .portfolio-item-large:nth-child(n) { grid-column: span 1; grid-row: span 1; }
    /* Hacer que algunos destaquen (2x2) en tablet */
    .portfolio-item-large:nth-child(3n + 1) { grid-column: span 2; grid-row: span 2; }
}

@media (max-width: 600px) {
    .portfolio-grid-large {
        grid-template-columns: 1fr;
        grid-auto-rows: 350px;
    }
    /* En móviles, todo es 1 columna */
    .portfolio-item-large:nth-child(n) { grid-column: span 1; grid-row: span 1; }
    .portfolio-header-left h1 {
        font-size: 2.2rem;
    }
}

/* Single Project Details */
.single-project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.project-header {
    text-align: center;
    margin-bottom: 4rem;
}

.project-title {
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--accent-green-dark);
    margin-bottom: 1rem;
}

.project-category {
    display: inline-block;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-wood-dark);
    border-bottom: 1px solid var(--accent-sand);
    padding-bottom: 0.5rem;
}

.project-category a {
    color: inherit;
    text-decoration: none;
}

.project-category a:hover {
    color: var(--accent-green-dark);
}

.project-hero-image {
    margin-bottom: 4rem;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
}

.project-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.project-content p {
    margin-bottom: 1.5rem;
}

.project-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem 0;
}

.project-navigation {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--accent-sand);
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .project-title {
        font-size: 2.5rem;
    }
}

/* --- Global Header --- */
.site-header {
    width: 100%;
    padding: 2.5rem 5%;
    background-color: var(--bg-color); /* Same creamy background as home */
}

.header-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo-area {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-logo-lq {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    text-decoration: none;
    color: #000;
}

.header-logo-main-text {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -2px;
}

.header-logo-arquitectos {
    font-size: 0.5rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 0.2rem;
    font-weight: 400;
    margin-left: 4px; /* visually center against LQ tracking */
}

.header-separator {
    font-size: 2rem;
    color: #bebebe;
    font-weight: 300;
    margin-top: -0.5rem; /* align correctly with LQ */
}

.header-section-title {
    font-size: 1rem;
    letter-spacing: 2px;
    color: #888888;
    text-transform: uppercase;
    font-weight: 400;
}

.header-navigation .primary-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    margin: 0;
    padding: 0;
}

.header-navigation .primary-menu li a {
    text-decoration: none;
    color: #333333;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 400;
    transition: color 0.3s ease;
}

.header-navigation .primary-menu li a:hover {
    color: var(--accent-green-dark);
}

/* --- Dropdown Menus --- */
.header-navigation .primary-menu li {
    position: relative;
}

.header-navigation .primary-menu li:hover > ul.sub-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.header-navigation .primary-menu ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--bg-alt);
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    z-index: 99;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    border-top: 2px solid var(--accent-wood-dark);
}

.header-navigation .primary-menu ul.sub-menu li {
    width: 100%;
}

.header-navigation .primary-menu ul.sub-menu li a {
    display: block;
    padding: 0.8rem 1.5rem;
    font-size: 0.70rem;
    color: var(--text-color);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-navigation .primary-menu ul.sub-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.4);
    color: var(--accent-green-dark);
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 2rem;
    }
    .header-navigation .primary-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    .header-navigation .primary-menu ul.sub-menu {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background-color: transparent;
        border-top: none;
        padding: 0;
        margin-top: 1rem;
        text-align: center;
    }
    .header-navigation .primary-menu ul.sub-menu li a {
        padding: 0.5rem 1rem;
        font-size: 0.65rem;
    }
}

/* --- Preloader --- */
#lq-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#lq-preloader img {
    max-width: 300px;
    height: auto;
    animation: lqPulse 2s infinite ease-in-out;
}

@keyframes lqPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-logo-img {
    height: 90px;
    width: auto;
    max-width: 90%;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}
