/* Variables de Diseño Editorial */
:root {
    --primary-blue: #2B6CA3;
    --primary-red: #D93B3B;
    --dark-bg: #0F172A;
    --light-bg: #F8FAFC;
    --white: #FFFFFF;
    --text-main: #334155;
    --text-muted: #64748B;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* Evita que el navbar tape los títulos al deslizarse (Smooth Scroll por JS) */
html {
    scroll-padding-top: 90px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.7;
    background-color: var(--white);
    overflow-x: hidden;
}

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

.section {
    padding: 8rem 0;
}

.bg-white { background-color: var(--white); }
.bg-light { background-color: var(--light-bg); }
.bg-dark { background-color: var(--dark-bg); }
.text-white { color: var(--white); }
.text-center { text-align: center; }

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    background: var(--white);
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
    z-index: 1000;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

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

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo img {
    height: 70px;
    display: block;
    transition: var(--transition);
    filter: none; 
}

.navbar.scrolled .brand-logo img {
    height: 55px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.btn-quote {
    background: var(--primary-red);
    color: var(--white) !important;
    padding: 0.8rem 1.8rem;
    border-radius: 2px;
    font-weight: 700;
}

.btn-quote:hover {
    background: #b82d2d;
    transform: translateY(-2px);
}

/* Hero Section - REGRESADO A 95vh (Tamaño Completo e Imponente) */
.hero {
    height: 95vh; 
    background: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.6)), url('images/casa17.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    padding-top: 80px; 
}

.hero-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--white);
}

.editorial-title {
    font-family: var(--font-heading);
    font-size: 5.5rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.editorial-title em {
    font-style: italic;
    font-weight: 600;
    color: #f4f4f4;
}

.hero-content p {
    font-size: 1.3rem;
    font-weight: 400;
    max-width: 600px;
    margin-bottom: 3rem;
}

.btn-outline {
    display: inline-block;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 1rem 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    border-radius: 4px;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark-bg);
}

/* Títulos y Textos */
.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--text-main);
    font-weight: 700;
}

.divider {
    height: 3px;
    width: 60px;
    background: var(--primary-red);
    margin: 1.5rem auto 2rem;
}

.editorial-text {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-muted);
    font-weight: 300;
}

/* Servicios - DISTRIBUCIÓN DIAMANTE (3 ARRIBA, 2 CENTRADOS ABAJO) */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
}

.service-card {
    flex: 1 1 300px;
    max-width: 360px;
    background: var(--white);
    padding: 3.5rem 2.5rem;
    border-radius: 16px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.4s ease;
    text-align: left;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--primary-blue);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--dark-bg);
}

.service-card p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* --- GALERÍA ESTRICTA (Impecable, Simétrica, Cero Huecos) --- */
.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-auto-rows: 320px;
    gap: 20px;
    margin-top: 4rem;
}

.gallery-item {
    overflow: hidden;
    position: relative;
    border-radius: 4px; 
    background: #eee;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.8s ease;
}

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

/* Logos de Socios Comerciales */
.brand-partners-section {
    padding: 5rem 0;
}

.partners-logo-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 2rem;
}

.partner-logo-item {
    padding: 1rem;
    max-width: 250px;
}

.partner-logo-item img {
    width: 100%;
    height: auto;
    filter: grayscale(100%); 
    opacity: 0.6;
    transition: all 0.3s ease;
}

.partner-logo-item:hover img {
    filter: none; 
    opacity: 1;
}

/* Testimonios - TARJETAS FLOTANTES (CORREGIDO EL TYPO AQUÍ) */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
}

.testimonial-card {
    background: var(--white);
    padding: 3rem 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    position: relative;
    border-radius: 16px; 
    border: 1px solid #f1f5f9;
    text-align: left;
}

.quote-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.client-name {
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* Cierre de Marca */
.brand-signature-section {
    padding: 5rem 0;
}

.signature-logo {
    width: 250px; 
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Contacto */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.contact-details p {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: #cbd5e1;
    font-weight: 300;
}

.contact-details i {
    width: 25px;
    color: var(--primary-red);
}

.modern-form {
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modern-form input,
.modern-form select,
.modern-form textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #475569;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.modern-form input:focus,
.modern-form select:focus,
.modern-form textarea:focus {
    border-bottom-color: var(--primary-blue);
}

.btn-submit {
    background: var(--white);
    color: var(--dark-bg);
    border: none;
    padding: 1.2rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.btn-submit:hover {
    background: var(--primary-red);
    color: var(--white) !important;
}

/* BOTÓN WHATSAPP FLOTANTE */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

/* Footer */
footer {
    background: #020617;
    padding: 3rem 0;
    color: #64748B;
    font-size: 0.9rem;
}

/* Animaciones Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .portfolio-gallery { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .contact-container { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 600px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .editorial-title { font-size: 3.5rem; }
    .hero { height: 80vh; }
}