/* ============================================================
   DOCTOR CLIMA — DESIGN SYSTEM & LANDING PAGE STYLES
   Manual de Marca — Paleta oficial:
     Marian Blue   #24397C  → textos principales, footer
     Denim         #3B61A9  → fondos secundarios, gradientes
     Mint          #36B082  → botones CTA, iconos
     Silver Light  #C7C6C6  → bordes, divisores
     Blanco        #FFFFFF  → cabecera, fondo general
   Tipografía:
     Saira     → titulares (h1, h2, h3)
     Poppins   → párrafos y textos de cuerpo
   ============================================================ */

/* -----------------------------------------------------------
   1. CUSTOM PROPERTIES (DESIGN TOKENS)
   ----------------------------------------------------------- */
:root {
    /* -- Paleta de Marca -- */
    --color-marian-blue: #24397C;
    /* Azul Marian — textos principales, pie de página */
    --color-denim: #3B61A9;
    /* Denim — fondos secundarios, hero gradiente */
    --color-mint: #36B082;
    /* Mint — botones CTA e iconos */
    --color-mint-dark: #2A9168;
    /* Mint oscuro — hover de CTA */
    --color-silver: #C7C6C6;
    /* Silver Light — bordes y divisores */
    --color-white: #FFFFFF;
    /* Blanco — cabecera y fondo general */

    /* -- Derivados funcionales -- */
    --color-primary: var(--color-marian-blue);
    --color-primary-dark: #1A2C60;
    /* versión más oscura para hover */
    --color-secondary: var(--color-denim);
    --color-accent: var(--color-mint);
    --color-accent-dark: var(--color-mint-dark);
    --color-border: var(--color-silver);
    --color-whatsapp: #25D366;
    --color-whatsapp-dark: #1EB552;

    /* -- Fondos y superficies -- */
    --color-bg: #F8F9FC;
    /* Fondo general muy claro */
    --color-bg-alt: #EEF1F8;
    /* Fondo alternativo secciones */
    --color-surface: var(--color-white);

    /* -- Textos -- */
    --color-text: var(--color-marian-blue);
    /* Texto principal */
    --color-text-muted: #4E5F85;
    /* Secundario */
    --color-text-light: #8A96B0;
    /* Menor jerarquía */

    /* -- Tipografía -- */
    --font-head: 'Saira', system-ui, sans-serif;
    /* TITULARES */
    --font-body: 'Poppins', system-ui, sans-serif;
    /* PÁRRAFOS */

    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.5rem;
    --fs-2xl: 2rem;
    --fs-3xl: 2.5rem;
    --fs-4xl: 3.25rem;
    --fs-5xl: 4rem;

    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semi: 600;
    --fw-bold: 700;
    --fw-extra: 800;
    --fw-black: 900;

    --lh-tight: 1.15;
    --lh-snug: 1.35;
    --lh-normal: 1.65;

    /* -- Espaciado generoso (breathing room Mobile-First) -- */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Padding de sección — amplio en mobile */
    --section-pad-y: clamp(var(--space-12), 8vw, var(--space-24));

    /* -- Bordes -- */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;

    /* -- Sombras (tonalizadas en Marian Blue) -- */
    --shadow-sm: 0 1px 4px rgba(36, 57, 124, 0.08);
    --shadow-md: 0 4px 18px rgba(36, 57, 124, 0.12), 0 2px 6px rgba(36, 57, 124, 0.06);
    --shadow-lg: 0 10px 40px rgba(36, 57, 124, 0.16), 0 4px 12px rgba(36, 57, 124, 0.08);
    --shadow-xl: 0 20px 60px rgba(36, 57, 124, 0.22);

    /* -- Transiciones -- */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* -- Layout -- */
    --header-height: 4.75rem;
    --container-max: 1200px;
    --container-pad: clamp(1.25rem, 5vw, 2rem);
}

/* -----------------------------------------------------------
   2. RESET & BASE
   ----------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

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

ul {
    list-style: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    line-height: var(--lh-tight);
}

/* -----------------------------------------------------------
   3. UTILITIES
   ----------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* Entrada animada */
.service-card,
.gallery__item,
.contact__info-card,
.contact__btn,
.hero__stat {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.service-card.is-visible,
.gallery__item.is-visible,
.contact__info-card.is-visible,
.contact__btn.is-visible,
.hero__stat.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(2) {
    transition-delay: 60ms;
}

.service-card:nth-child(3) {
    transition-delay: 120ms;
}

.service-card:nth-child(4) {
    transition-delay: 180ms;
}

.service-card:nth-child(5) {
    transition-delay: 240ms;
}

.service-card:nth-child(6) {
    transition-delay: 300ms;
}

/* -----------------------------------------------------------
   4. BOTONES
   ----------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.9em 1.75em;
    font-family: var(--font-head);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    letter-spacing: 0.03em;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

.btn__icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}

/* Mint — CTA principal */
.btn--mint {
    background: var(--color-mint);
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(54, 176, 130, 0.4);
}

.btn--mint:hover,
.btn--mint:focus-visible {
    background: var(--color-mint-dark);
    box-shadow: 0 6px 28px rgba(54, 176, 130, 0.52);
    transform: translateY(-2px);
}

/* Primary — Marian Blue */
.btn--primary {
    background: var(--color-marian-blue);
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(36, 57, 124, 0.32);
}

.btn--primary:hover,
.btn--primary:focus-visible {
    background: var(--color-primary-dark);
    box-shadow: 0 6px 28px rgba(36, 57, 124, 0.44);
    transform: translateY(-2px);
}

/* Accent alias → Mint (para header CTA) */
.btn--accent {
    background: var(--color-mint);
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(54, 176, 130, 0.38);
}

.btn--accent:hover,
.btn--accent:focus-visible {
    background: var(--color-mint-dark);
    box-shadow: 0 6px 28px rgba(54, 176, 130, 0.5);
    transform: translateY(-2px);
}

.btn--whatsapp {
    background: var(--color-whatsapp);
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.btn--whatsapp:hover,
.btn--whatsapp:focus-visible {
    background: var(--color-whatsapp-dark);
    transform: translateY(-2px);
}

/* Instagram — Custom Gradient Outline */
.btn--instagram {
    position: relative;
    background: transparent;
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.15);
    z-index: 1;
    isolation: isolate;
}

.btn--instagram::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
}

.btn--instagram::after {
    /* Fondo oscuro hiper-sutil para mejorar contraste en el Hero sin matar el outline */
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: calc(var(--radius-full) - 2px);
    background: rgba(15, 25, 50, 0.25);
    z-index: -2;
    transition: background var(--transition-fast);
}

.btn--instagram:hover,
.btn--instagram:focus-visible {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 39, 67, 0.3);
}

.btn--instagram:hover::after {
    background: rgba(15, 25, 50, 0.45);
}

.btn:active {
    transform: translateY(0) !important;
}

.btn:focus-visible,
a:focus-visible {
    outline: 3px solid var(--color-mint);
    outline-offset: 3px;
}

/* -----------------------------------------------------------
   Hero CTA Group Layout
   ----------------------------------------------------------- */
.hero__cta-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    width: 100%;
}

.hero__btn {
    width: 100%;
    justify-content: center;
    min-width: unset;
}

@media (min-width: 48em) {
    .hero__cta-group {
        flex-direction: row;
        width: 100%;
        max-width: 620px;
        margin-inline: auto;
        justify-content: space-between;
        gap: var(--space-8);
    }
    
    .hero__btn {
        width: 100%;
    }
}

/* -----------------------------------------------------------
   5. CABECERAS DE SECCIÓN
   ----------------------------------------------------------- */
.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-tag {
    display: inline-block;
    font-family: var(--font-head);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-mint);
    background: rgba(54, 176, 130, 0.1);
    border: 1px solid rgba(54, 176, 130, 0.25);
    padding: 0.35em 1em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.section-tag--light {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.section-title {
    font-family: var(--font-head);
    font-size: clamp(var(--fs-2xl), 4vw, var(--fs-3xl));
    font-weight: var(--fw-extra);
    color: var(--color-marian-blue);
    margin-bottom: var(--space-4);
}

.section-title--light {
    color: var(--color-white);
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    max-width: 52ch;
    margin-inline: auto;
    font-weight: var(--fw-light);
}

.section-subtitle--light {
    color: rgba(255, 255, 255, 0.8);
}

/* -----------------------------------------------------------
   6. HEADER — FONDO BLANCO
   ----------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 1000;
    background: var(--color-white);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.header--scrolled {
    border-color: var(--color-silver);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    height: var(--header-height);
}

/* Logo */
.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.header__logo-img {
    height: 2.75rem;
    width: 2.75rem;
    object-fit: contain;
    flex-shrink: 0;
}

.header__logo-img + .header__logo-wordmark {
    margin-left: var(--space-2);
}

.header__logo-wordmark {
    height: 2.6rem;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.header__logo-nominal {
    height: 2rem;
    width: auto;
    object-fit: contain;
}

/* Logotipo Principal completo (isotipo + nombre + tagline integrados) */
.header__logo-principal {
    height: 3.5rem;
    width: auto;
    object-fit: contain;
}

/* Texto + tagline en columna */
.header__logo-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.05em;
    line-height: 1;
}

.header__logo-text {
    font-family: var(--font-head);
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    color: var(--color-marian-blue);
    letter-spacing: 0.05em;
    line-height: 1;
}

.header__logo-text strong {
    font-weight: var(--fw-black);
}

.header__logo-tagline {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: var(--fw-light);
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
    line-height: 1;
}

/* Nav */
.header__nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    padding-right: var(--space-6);
}

.header__nav-list {
    display: flex;
    gap: var(--space-4);
}

.header__nav-link {
    font-family: var(--font-head);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semi);
    color: var(--color-text-muted);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.header__nav-link:hover {
    color: var(--color-marian-blue);
    background: rgba(36, 57, 124, 0.06);
}

/* CTA */
.header__cta {
    flex-shrink: 0;
    font-size: var(--fs-sm);
    padding: 0.7em 1.4em;
}

/* Hamburger */
.header__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
    margin-left: auto;
}

.header__hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-marian-blue);
    border-radius: 2px;
    transition: all var(--transition-normal);
    transform-origin: center;
}

.header__hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header__hamburger.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.header__hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu — solo enlaces de texto, sin botón extra */
.mobile-menu {
    display: none;
    background: var(--color-white);
    border-top: 1px solid var(--color-silver);
    padding: var(--space-4) var(--container-pad) var(--space-6);
    box-shadow: var(--shadow-lg);
}

.mobile-menu.is-open {
    display: block;
    animation: slideDown 0.25s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mobile-menu__link {
    display: block;
    font-family: var(--font-head);
    font-size: var(--fs-md);
    font-weight: var(--fw-semi);
    color: var(--color-marian-blue);
    padding: var(--space-4) var(--space-4);
    border-bottom: 1px solid var(--color-silver);
    transition: color var(--transition-fast);
    opacity: 0;
}

.mobile-menu.is-open .mobile-menu__link {
    animation: slideDownLink 0.3s ease forwards;
}

.mobile-menu.is-open li:nth-child(1) .mobile-menu__link { animation-delay: 0.1s; }
.mobile-menu.is-open li:nth-child(2) .mobile-menu__link { animation-delay: 0.15s; }
.mobile-menu.is-open li:nth-child(3) .mobile-menu__link { animation-delay: 0.2s; }
.mobile-menu.is-open li:nth-child(4) .mobile-menu__link { animation-delay: 0.25s; }
.mobile-menu.is-open li:nth-child(5) .mobile-menu__link { animation-delay: 0.3s; }

@keyframes slideDownLink {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu__link:last-child {
    border-bottom: none;
}

.mobile-menu__link:hover {
    color: var(--color-denim);
}

/* -----------------------------------------------------------
   7. HERO — IMAGEN DE FONDO + OVERLAY
   ----------------------------------------------------------- */
.hero {
    position: relative;
    padding-top: calc(var(--header-height) + var(--space-16));
    padding-bottom: 0;
    overflow: hidden;
    /* Imagen de fondo */
    background-image: url('assets/img/banner-hero.jpg');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
}

/* Overlay degradado — cubre toda la sección para garantizar contraste */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
            rgba(36, 57, 124, 0.92) 0%,
            rgba(59, 97, 169, 0.80) 55%,
            rgba(59, 97, 169, 0.45) 100%);
    pointer-events: none;
    z-index: 0;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
    position: relative;
    z-index: 1;
    padding-bottom: var(--space-20);
}

/* Badge */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-head);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-mint);
    background: rgba(54, 176, 130, 0.15);
    border: 1px solid rgba(54, 176, 130, 0.35);
    padding: 0.4em 1em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-6);
}

.hero__badge-icon {
    width: 0.9em;
    height: 0.9em;
}

/* Title */
.hero__title {
    font-family: var(--font-head);
    font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl));
    font-weight: var(--fw-black);
    line-height: var(--lh-tight);
    color: var(--color-white);
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;
}

.hero__title-accent {
    color: var(--color-mint);
    position: relative;
}

.hero__title-accent::after {
    content: '';
    position: absolute;
    bottom: -0.06em;
    left: 0;
    right: 0;
    height: 0.1em;
    background: var(--color-mint);
    border-radius: 2px;
    opacity: 0.45;
}

/* Subtitle */
.hero__subtitle {
    font-family: var(--font-body);
    font-size: var(--fs-md);
    font-weight: var(--fw-light);
    line-height: var(--lh-normal);
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: var(--space-8);
    max-width: 48ch;
}

.hero__subtitle strong {
    color: var(--color-white);
    font-weight: var(--fw-semi);
}

/* Un único botón CTA */
.hero__cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-10);
}

.hero__btn {
    font-size: var(--fs-base);
    padding: 1em 2em;
}

/* Stats */
.hero__stats {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.hero__stat-divider {
    width: 1px;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.3);
}

.hero__stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-black);
    color: var(--color-white);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.hero__stat-label {
    display: block;
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Media — columna derecha */
.hero__media {
    position: relative;
    z-index: 1;
}

/* Tarjeta de garantía sobre la imagen */
.hero__img-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: rgba(36, 57, 124, 0.4);
}

.hero__img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    opacity: 0.85;
}

.hero__img-badge {
    position: absolute;
    bottom: var(--space-6);
    left: var(--space-6);
    right: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-md);
}

.hero__img-badge-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-mint);
    flex-shrink: 0;
}

.hero__img-badge strong {
    display: block;
    font-family: var(--font-head);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--color-marian-blue);
}

.hero__img-badge span {
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

/* Wave de cierre */
.hero__wave {
    position: relative;
    margin-top: -1px;
    line-height: 0;
    z-index: 1;
}

.hero__wave svg {
    display: block;
    width: 100%;
    height: auto;
}

/* -----------------------------------------------------------
   8. MARCAS
   ----------------------------------------------------------- */
.brands {
    background: var(--color-white);
    padding: var(--space-12) 0;
    border-top: 1px solid var(--color-silver);
    border-bottom: 1px solid var(--color-silver);
}

.brands__label {
    text-align: center;
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semi);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin-bottom: var(--space-8);
}

.brands__logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: var(--space-8) var(--space-6);
}

@media (max-width: 48em) {
    .brands__logos {
        justify-content: center;
        gap: var(--space-6) var(--space-8);
    }
}

.brands__logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.brands__logo-img {
    max-width: 130px;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.65;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.brands__logo-item:hover .brands__logo-img {
    opacity: 1;
    transform: scale(1.05);
}

/* Tablet / Desktop - Flexbox maneja la distribución y centrado automático sin media queries */

/* -----------------------------------------------------------
   9. SERVICIOS
   ----------------------------------------------------------- */
.services {
    padding: var(--section-pad-y) 0;
    background: var(--color-bg);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

/* Service Card */
.service-card {
    position: relative;
    background: var(--color-surface);
    border: 1.5px solid var(--color-silver);
    border-radius: var(--radius-lg);
    padding: var(--space-8) var(--space-6);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
    cursor: default;
}

.service-card:hover,
.service-card:focus-visible {
    border-color: var(--color-denim);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    outline: none;
}

.service-card:focus-visible {
    outline: 3px solid var(--color-mint);
    outline-offset: 2px;
}

.service-card__badge {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    font-family: var(--font-head);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-white);
    background: var(--color-mint);
    padding: 0.3em 0.85em;
    border-radius: var(--radius-full);
}

/* Icon wrap → Mint en hover */
.service-card__icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-md);
    background: rgba(54, 176, 130, 0.1);
    color: var(--color-mint);
    margin-bottom: var(--space-5);
    transition: background var(--transition-normal), color var(--transition-normal);
}

.service-card:hover .service-card__icon-wrap,
.service-card:focus-visible .service-card__icon-wrap {
    background: var(--color-mint);
    color: var(--color-white);
}

.service-card__icon {
    width: 1.6rem;
    height: 1.6rem;
}

.service-card__title {
    font-family: var(--font-head);
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: var(--color-marian-blue);
    margin-bottom: var(--space-3);
}

.service-card__desc {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-light);
    color: var(--color-text-muted);
    line-height: var(--lh-normal);
}

/* Tarjeta destacada — Fondo Azul Oscuro */
.service-card--featured {
    background: linear-gradient(135deg, var(--color-marian-blue) 0%, var(--color-denim) 100%);
    border-color: transparent;
}

/* El isotipo en un cuadrado fijo con esquinas ligeramente redondeadas y fondo oscuro/grisáceo */
.service-card--featured .service-card__icon-wrap {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    /* Flexbox ya está centrándolo desde icon-wrap base */
}

.service-card--featured:hover .service-card__icon-wrap {
    background: rgba(0, 0, 0, 0.4);
}

.service-card--featured .service-card__title {
    color: var(--color-white);
}

/* Descripción con ligera opacidad o gris claro para no competir con el título */
.service-card--featured .service-card__desc {
    color: rgba(255, 255, 255, 0.75);
}

.service-card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-5);
    font-family: var(--font-head);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    opacity: 0.9;
    transition: opacity var(--transition-fast), gap var(--transition-fast);
}

.service-card__link:hover {
    opacity: 1;
    gap: var(--space-3);
}

.service-card__link svg {
    width: 0.9em;
    height: 0.9em;
}

/* ============================================================
   Airzone isotipo transparente (PNG)
   ============================================================ */
.service-card__airzone-img {
    /* Aumentamos el tamaño al 85% para que sea más protagonista visualmente y similar a los otros iconos */
    width:  85%;
    height: 85%;
    display: block;
    object-fit: contain;
    
    /* Mejoramos el suavizado de la imagen PNG en caso de escalar para mejor resolución percibida */
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
    
    transition: transform var(--transition-normal);
}

.service-card--featured:hover .service-card__airzone-img,
.service-card--featured:focus-visible .service-card__airzone-img {
    transform: scale(1.08); /* Animación suave al pasar el ratón */
}

/* -----------------------------------------------------------
   10. GALERÍA
   ----------------------------------------------------------- */
.gallery {
    padding: var(--section-pad-y) 0;
    background: var(--color-bg-alt);
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: var(--space-4);
}

.gallery__item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.gallery__item--tall {
    grid-row: span 2;
}

.gallery__item--wide {
    grid-column: span 2;
}

.gallery__placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    transition: transform var(--transition-normal);
}

.gallery__item:hover .gallery__placeholder {
    transform: scale(1.02);
}

.gallery__placeholder--1 {
    background: linear-gradient(135deg, var(--color-marian-blue) 0%, var(--color-denim) 100%);
    min-height: 480px;
}

.gallery__placeholder--2 {
    background: linear-gradient(135deg, var(--color-denim) 0%, #4F7EC0 100%);
}

.gallery__placeholder--3 {
    background: linear-gradient(135deg, var(--color-mint) 0%, #2A9168 100%);
}

.gallery__placeholder--4 {
    background: linear-gradient(135deg, var(--color-marian-blue) 0%, var(--color-denim) 100%);
    min-height: 220px;
}

.gallery__placeholder--5 {
    background: linear-gradient(135deg, var(--color-denim) 0%, var(--color-mint) 100%);
}

.gallery__placeholder-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    padding: var(--space-4);
}

.gallery__placeholder-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto var(--space-3);
    opacity: 0.6;
}

.gallery__placeholder-content span {
    display: block;
    font-family: var(--font-head);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semi);
    letter-spacing: 0.03em;
}

/* ============================================================
   OVERLAY DE GALERIA AL HOVER (Difuminado Gris)
   ============================================================ */
.gallery__overlay {
    position: absolute;
    inset: 0;
    background: rgba(25, 25, 25, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-6);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 2;
    pointer-events: none;
}

.gallery__overlay-title {
    font-family: var(--font-head);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    margin-bottom: var(--space-2);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.gallery__overlay-desc {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-light);
    color: rgba(255, 255, 255, 0.9);
    line-height: var(--lh-snug);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
    transition-delay: 50ms;
}

.gallery__item:hover .gallery__overlay,
.gallery__item:focus-visible .gallery__overlay {
    opacity: 1;
}

.gallery__item:hover .gallery__overlay-title,
.gallery__item:focus-visible .gallery__overlay-title,
.gallery__item:hover .gallery__overlay-desc,
.gallery__item:focus-visible .gallery__overlay-desc {
    transform: translateY(0);
}

/* -----------------------------------------------------------
   11. CONTACTO
   ----------------------------------------------------------- */
.contact {
    padding: var(--section-pad-y) 0;
    background: linear-gradient(135deg, var(--color-marian-blue) 0%, var(--color-denim) 100%);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: -25%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    position: relative;
    z-index: 1;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    justify-content: stretch;
}

.contact__info .contact__info-card {
    flex: 1;
}

.contact__info-card {
    display: flex;
    gap: var(--space-5);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    backdrop-filter: blur(8px);
}

.contact__info-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: rgba(54, 176, 130, 0.2);
    color: var(--color-mint);
}

.contact__info-icon-wrap svg {
    width: 1.3rem;
    height: 1.3rem;
}

.contact__info-title {
    font-family: var(--font-head);
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    margin-bottom: var(--space-3);
}

.contact__schedule {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.contact__schedule-item {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
}

.contact__schedule-days {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.8);
}

.contact__schedule-hours {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semi);
    color: var(--color-white);
}

.contact__schedule-item--closed .contact__schedule-hours {
    color: rgba(255, 255, 255, 0.4);
    font-weight: var(--fw-regular);
}

.contact__info-text {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-light);
    color: rgba(255, 255, 255, 0.8);
    line-height: var(--lh-normal);
}

.contact__info-text strong {
    color: var(--color-white);
    font-weight: var(--fw-semi);
}

/* Acciones */
.contact__actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact__actions-title {
    font-family: var(--font-head);
    font-size: var(--fs-xl);
    font-weight: var(--fw-extra);
    color: var(--color-white);
    margin-bottom: var(--space-2);
}

.contact__actions-subtitle {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-light);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-6);
}

.contact__btn {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-4);
    color: var(--color-white);
    text-decoration: none;
    transition: all var(--transition-normal);
    backdrop-filter: blur(8px);
}

.contact__btn:last-of-type {
    margin-bottom: 0;
}

.contact__btn:hover,
.contact__btn:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    outline: none;
}

.contact__btn--phone .contact__btn-icon {
    background: rgba(36, 57, 124, 0.4);
}

.contact__btn--whatsapp .contact__btn-icon {
    background: rgba(37, 211, 102, 0.25);
}

.contact__btn--email .contact__btn-icon {
    background: rgba(54, 176, 130, 0.25);
}

.contact__btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: var(--radius-md);
}

.contact__btn-icon svg,
.contact__btn-icon i {
    width: 1.4rem;
    height: 1.4rem;
}

.contact__btn-text {
    flex: 1;
}

.contact__btn-label {
    display: block;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-light);
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2px;
}

.contact__btn-value {
    display: block;
    font-family: var(--font-head);
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: var(--color-white);
}

.contact__btn-arrow {
    width: 1.1rem;
    height: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.contact__btn:hover .contact__btn-arrow {
    transform: translateX(3px);
    color: var(--color-white);
}

.contact__trust {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: rgba(255, 255, 255, 0.75);
}

.contact__trust-icon {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--color-mint);
}

/* -----------------------------------------------------------
   12. FOOTER — MARIAN BLUE
   ----------------------------------------------------------- */
.footer {
    background: var(--color-marian-blue);
    padding: var(--space-6) 0;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
}

.footer__logo-link {
    display: block;
    flex-shrink: 0;
}

.footer__logo-img {
    height: 5.5rem;
    max-width: 350px;
    width: 100%;
    object-fit: contain;
    opacity: 1;
}

.footer__content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer__text-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: var(--lh-normal);
}

.footer__text-group a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer__text-group a:hover,
.footer__text-group a:focus-visible {
    color: var(--color-white);
}

.footer__dot {
    margin: 0 var(--space-1);
    opacity: 0.5;
}

.footer__copy {
    white-space: nowrap;
}

@media (min-width: 64em) {
    .footer__inner {
        flex-direction: row;
        justify-content: space-between;
        gap: var(--space-6);
    }

    .footer__content {
        flex: 1;
        justify-content: flex-end;
        text-align: right;
    }
    
    .footer__text-group {
        justify-content: flex-end;
    }
}

/* -----------------------------------------------------------
   13. WHATSAPP FAB
   ----------------------------------------------------------- */
.whatsapp-fab {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: var(--radius-full);
    background: var(--color-whatsapp);
    color: var(--color-white);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.55);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.whatsapp-fab svg {
    width: 2rem;
    height: 2rem;
}

.whatsapp-fab:hover,
.whatsapp-fab:focus-visible {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 40px rgba(37, 211, 102, 0.65);
    outline: none;
}

.whatsapp-fab::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: var(--color-whatsapp);
    animation: waPulse 2.5s infinite;
    z-index: -1;
}

@keyframes waPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(1.6);
        opacity: 0;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.whatsapp-fab__tooltip {
    position: absolute;
    right: calc(100% + var(--space-3));
    white-space: nowrap;
    font-family: var(--font-head);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    background: rgba(36, 57, 124, 0.92);
    padding: 0.4em 0.9em;
    border-radius: var(--radius-full);
    opacity: 0;
    pointer-events: none;
    transform: translateX(6px);
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.whatsapp-fab:hover .whatsapp-fab__tooltip,
.whatsapp-fab:focus-visible .whatsapp-fab__tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* -----------------------------------------------------------
   14. RESPONSIVE — MOBILE-FIRST APPROACH
   ----------------------------------------------------------- */

/* Base = Mobile (≤ 480px): todo en columna única, mucho breathing room */

/* Tablet vertical (≥ 600px) */
@media (min-width: 37.5em) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .gallery__item--tall {
        grid-row: span 1;
    }

    .gallery__item--wide {
        grid-column: span 1;
    }

    .gallery__placeholder--1 {
        min-height: 280px;
    }
}

/* Tablet horizontal (≥ 768px) */
@media (min-width: 48em) {
    .hero__inner {
        grid-template-columns: 1fr 1fr;
        padding-bottom: var(--space-20);
    }

    .hero__media {
        display: block;
    }

    .contact__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Desktop (≥ 1024px) */
@media (min-width: 64em) {
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery__grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto;
    }

    .gallery__item--tall {
        grid-row: span 2;
    }

    .gallery__item--wide {
        grid-column: span 2;
    }

    .gallery__placeholder--1 {
        min-height: 480px;
    }
}

/* Mobile (< 768px) — reglas específicas */
@media (max-width: 47.99em) {
    :root {
        --header-height: 4.25rem;
    }

    /* Ocultar nav y CTA de escritorio */
    .header__nav,
    .header__cta {
        display: none;
    }

    .header__hamburger {
        display: flex;
    }

    /* Hero: solo columna de texto */
    .hero {
        padding-top: calc(var(--header-height) + var(--space-8));
    }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        padding-bottom: var(--space-12);
    }

    .hero__title {
        font-size: clamp(var(--fs-2xl), 9vw, var(--fs-4xl));
    }

    .hero__media {
        display: none;
    }

    /* La imagen está ya de fondo */

    .hero__cta-group {
        flex-direction: column;
    }

    .hero__btn {
        justify-content: center;
        width: 100%;
        max-width: 22rem;
    }

    .hero__stats {
        justify-content: center;
        gap: var(--space-6);
    }

    /* Servicios en 1 columna */
    .services__grid {
        grid-template-columns: 1fr;
    }

    /* Galería en 1 columna */
    .gallery__grid {
        grid-template-columns: 1fr;
    }

    .gallery__item--wide,
    .gallery__item--tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery__placeholder--1 {
        min-height: 240px;
    }

    /* Contacto en 1 columna */
    .contact__grid {
        grid-template-columns: 1fr;
    }

    /* Footer en columna */
    .footer__inner {
        flex-direction: column;
        text-align: center;
    }

    .footer__nav {
        justify-content: center;
    }

    /* FAB más pequeño */
    .whatsapp-fab {
        bottom: var(--space-4);
        right: var(--space-4);
        width: 3.25rem;
        height: 3.25rem;
    }

    .whatsapp-fab svg {
        width: 1.75rem;
        height: 1.75rem;
    }
}

/* Extra small (< 375px) */
@media (max-width: 23.44em) {
    .hero__title {
        font-size: var(--fs-2xl);
    }

    .hero__btn {
        font-size: var(--fs-sm);
    }

    .contact__btn-value {
        font-size: var(--fs-base);
    }

    .brands__logos {
        gap: var(--space-3) var(--space-4);
    }
}

/* Print */
@media print {

    .header,
    .whatsapp-fab,
    .hero__wave {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .hero {
        padding-top: 0;
        background: var(--color-bg);
    }

    .hero::before {
        display: none;
    }

    .hero__title,
    .contact .section-title {
        color: #000;
    }
}