/* ==========================================================================
   VARIABLES CSS (Paleta extraída del logotipo Hachi: Azul Marino Profundo + Dorado)
   ========================================================================== */
:root {
    --color-navy: #04131D;          /* Azul marino casi negro del isotipo */
    --color-navy-light: #0B2232;    /* Variación para tarjetas oscuras/hover */
    --color-gold: #C6A868;          /* Dorado metálico de la barra inferior del logo */
    --color-gold-light: #DFC78E;    /* Brillo dorado para acentos */
    --color-cream: #FAF8F5;         /* Fondo cálido editorial */
    --color-white: #FFFFFF;
    --color-text: #1E293B;
    --color-text-muted: #5A6572;
    --color-border: #E5E0D8;

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --container-max: 1240px;
    --header-height: 84px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   RESET Y BASE (MOBILE-FIRST)
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section-padding {
    padding: 4.5rem 0;
}

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-gold);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 2.85rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-navy);
    margin-bottom: 1rem;
}

/* ==========================================================================
   1. NAVBAR
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 46px;
    width: auto;
    object-fit: contain;
}

/* Botón Hamburguesa (Móvil) */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--color-navy);
    transition: var(--transition);
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Menú Móvil Desplegable */
.nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    border-bottom: 2px solid var(--color-gold);
    padding: 2rem 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-navy);
}

.nav-link:hover {
    color: var(--color-gold);
}

.nav-cta {
    display: inline-block;
    padding: 0.65rem 1.35rem;
    background-color: var(--color-navy);
    color: var(--color-white);
    border: 1px solid var(--color-navy);
    text-align: center;
}

.nav-cta:hover {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-navy);
}

/* ==========================================================================
   2. HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    background-color: var(--color-navy);
    color: var(--color-white);
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(4, 19, 29, 0.92) 0%,
        rgba(4, 19, 29, 0.78) 55%,
        rgba(4, 19, 29, 0.5) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 3rem;
    padding-bottom: 3rem;
    max-width: 760px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: var(--color-white);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 620px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.95rem 1.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-gold);
    color: var(--color-navy);
}

.btn-primary:hover {
    background-color: var(--color-gold-light);
}

.btn-outline {
    border-color: rgba(255, 255, 255, 0.45);
    color: var(--color-white);
}

.btn-outline:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

/* ==========================================================================
   3. SERVICIOS / PILARES (1 col móvil -> 2 col tablet -> 4 col desktop)
   ========================================================================== */
.services {
    background-color: var(--color-cream);
}

.section-header {
    max-width: 680px;
    margin-bottom: 3rem;
}

.section-desc {
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

.service-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-gold);
    box-shadow: 0 18px 36px rgba(4, 19, 29, 0.07);
}

.card-img-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--color-navy);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.75rem 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-number {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

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

/* ==========================================================================
   4. SOBRE NOSOTROS
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-media {
    position: relative;
}

.about-img {
    width: 100%;
    aspect-ratio: 6 / 7;
    object-fit: cover;
    border-bottom: 4px solid var(--color-gold);
}

.about-accent-box {
    background-color: var(--color-navy);
    color: var(--color-white);
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
    border-left: 4px solid var(--color-gold);
}

.accent-stat {
    display: block;
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold);
    line-height: 1;
}

.accent-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.about-text {
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}

.signature-block {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.signature-name {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-navy);
}

.signature-role {
    font-size: 0.85rem;
    color: var(--color-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.footer {
    background-color: var(--color-navy);
    color: rgba(255, 255, 255, 0.8);
    padding-top: 4rem;
    border-top: 3px solid var(--color-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-bottom: 3.5rem;
}

/* Convierte el logo oscuro a blanco puro sobre fondo marino */
.footer-logo {
    height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    max-width: 300px;
}

.footer-heading {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.footer ul li {
    margin-bottom: 0.65rem;
    font-size: 0.92rem;
}

.footer a:hover {
    color: var(--color-gold);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.social-pill {
    padding: 0.45rem 0.95rem;
    border: 1px solid rgba(198, 168, 104, 0.4);
    font-size: 0.82rem;
    color: var(--color-white);
}

.social-pill:hover {
    background-color: var(--color-gold);
    color: var(--color-navy);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}

/* ==========================================================================
   MEDIA QUERIES (TABLET Y ESCRITORIO)
   ========================================================================== */
@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
    }

    /* 2 Columnas en Tablet */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .section-padding {
        padding: 6.5rem 0;
    }

    /* Navbar Escritorio */
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        width: auto;
        background: transparent;
        border: none;
        padding: 0;
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: row;
        align-items: center;
        gap: 2.25rem;
    }

    /* 4 Columnas en Escritorio */
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .about-grid {
        grid-template-columns: 0.95fr 1.05fr;
        gap: 4.5rem;
    }

    .about-accent-box {
        position: absolute;
        bottom: 2rem;
        right: -1.5rem;
        margin-top: 0;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    }

    .footer-grid {
        grid-template-columns: 1.4fr 0.8fr 1fr 1fr;
    }
    
    
}

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background-color: var(--color-navy);
    color: var(--color-white);
    border: 1.5px solid var(--color-gold);
    border-radius: 50px;
    padding: 0.85rem;
    box-shadow: 0 10px 25px rgba(4, 19, 29, 0.35);
    transition: var(--transition);
}

.whatsapp-icon {
    width: 26px;
    height: 26px;
    color: #25D366; /* Verde oficial de WhatsApp para reconocimiento inmediato */
    flex-shrink: 0;
    transition: var(--transition);
}

.whatsapp-label {
    display: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding-right: 0.35rem;
}

.whatsapp-float:hover {
    background-color: var(--color-gold);
    color: var(--color-navy);
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(4, 19, 29, 0.45);
}

.whatsapp-float:hover .whatsapp-icon {
    color: var(--color-navy);
}

@media (min-width: 768px) {
    .whatsapp-float {
        bottom: 2rem;
        right: 2rem;
        padding: 0.75rem 1.25rem;
    }

    .whatsapp-label {
        display: inline-block;
    }
}