/* ============================================
   Design system — ejecutivo (navy + bronce)
   ============================================ */
:root {
    --primary-color: #0f2744;
    --primary-dark: #0a1628;
    --primary-light: #1e3a5c;
    --accent-color: #b8963e;
    --accent-bright: #c9a959;
    --accent-soft: #e8dcc4;
    --accent-muted: #8a7340;
    --secondary-color: #0a0e14;
    --text-primary: #1a2332;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg-primary: #f8f9fb;
    --bg-secondary: #eef1f6;
    --bg-elevated: #ffffff;
    --bg-dark: #0a0e14;
    --border-color: #e2e6ed;
    --shadow-sm: 0 1px 2px rgba(10, 14, 20, 0.05);
    --shadow-md: 0 4px 16px rgba(10, 14, 20, 0.08);
    --shadow-lg: 0 12px 36px rgba(10, 14, 20, 0.1);
    --shadow-xl: 0 24px 56px rgba(10, 14, 20, 0.12);
    --shadow-accent: 0 8px 32px rgba(15, 39, 68, 0.18);
    --shadow-glow: 0 0 0 1px rgba(184, 150, 62, 0.35), 0 12px 40px rgba(184, 150, 62, 0.15);
    --gradient-primary: linear-gradient(148deg, #0a1628 0%, #0f2744 48%, #152a47 100%);
    --gradient-accent: linear-gradient(135deg, #c9a959 0%, #8f7330 100%);
    --gradient-text: linear-gradient(120deg, #0f2744 0%, #1e3a5c 38%, #b8963e 100%);
    --gradient-secondary: linear-gradient(180deg, #06090e 0%, #121a28 100%);
    --gradient-hero: radial-gradient(ellipse 100% 80% at 50% -25%, rgba(201, 169, 89, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 0%, rgba(15, 39, 68, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #fafbfc 0%, #eef1f6 100%);
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --bp-mobile-max: 639px;
    --bp-tablet-min: 641px;
    --bp-tablet-max: 1024px;
    --bp-desktop-min: 1025px;
    --nav-height: 64px;
    --nav-metal-bg: linear-gradient(
        168deg,
        #030508 0%,
        #0a1018 18%,
        #0c1626 42%,
        #080d16 68%,
        #050709 100%
    );
    --nav-metal-shine: linear-gradient(
        180deg,
        rgba(120, 170, 220, 0.09) 0%,
        transparent 42%
    );
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.icon {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.icon--sm {
    width: 0.9rem;
    height: 0.9rem;
}

.icon--xs {
    width: 0.8rem;
    height: 0.8rem;
}

/*
   Scroll: un único eje vertical a nivel de viewport.
   - Sin overflow-y en html/body (evita dos “visores” de scroll).
   - clip en X evita desbordes por 100vw sin crear barra horizontal fantasma.
*/
html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: clip;
}

@supports not (overflow-x: clip) {
    html {
        overflow-x: hidden;
    }
}

.site-body {
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 120% 70% at 50% -30%, rgba(201, 169, 89, 0.07) 0%, transparent 52%),
        radial-gradient(ellipse 60% 45% at 100% 10%, rgba(15, 39, 68, 0.05) 0%, transparent 48%);
    background-attachment: scroll;
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

@supports not (overflow-x: clip) {
    .site-body {
        overflow-x: hidden;
    }
}

.container {
    width: 100%;
    max-width: min(1200px, 100%);
    margin: 0 auto;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    box-sizing: border-box;
}

/* Barra superior y pie: contenido al 80% (porcentaje del padre; 80vw suele desbordar con la barra de scroll) */
.navbar > .container,
.footer > .container {
    max-width: 90%;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

@media (max-width: 640px) {
    p,
    .section-description,
    .lead,
    .hero-description,
    .contact-item p,
    .form-group label {
        font-size: max(1rem, 16px);
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ============================================
   Navigation — mobile-first, megamenú en escritorio
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    max-width: 100%;
    background-color: #050709;
    background-image: var(--nav-metal-shine), var(--nav-metal-bg);
    background-blend-mode: normal, normal;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 4px 24px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(60, 100, 150, 0.12);
    border-bottom: 1px solid rgba(30, 60, 100, 0.35);
    transition: box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.45s ease;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(201, 169, 89, 0.5) 50%, transparent 95%);
    pointer-events: none;
}

.navbar.scrolled {
    background-color: #020305;
    background-image: linear-gradient(180deg, rgba(80, 130, 190, 0.07) 0%, transparent 38%), var(--nav-metal-bg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(40, 80, 130, 0.2);
    border-bottom-color: rgba(40, 70, 110, 0.45);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    gap: 0.75rem;
    min-width: 0;
    transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Buscador header: móvil — lupa a la derecha junto al menú */
.nav-wrapper .logo {
    order: 1;
}

.nav-wrapper .nav-search {
    order: 2;
    margin-left: auto;
}

.nav-wrapper .menu-toggle {
    order: 3;
}

.nav-wrapper .nav-menu {
    order: 4;
}

/* ============================================
   Buscador header (lupa → panel de derecha a izquierda)
   ============================================ */
.nav-search {
    position: relative;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    flex-shrink: 0;
    gap: 0.25rem;
    z-index: 1002;
}

.nav-search__panel {
    overflow: hidden;
    max-width: 0;
    transition: max-width 0.48s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: max-width;
}

.nav-search.is-open .nav-search__panel {
    max-width: min(22rem, calc(100vw - 7.5rem));
}

.nav-search__inner {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.4rem 0.15rem 0;
    min-width: min(22rem, calc(100vw - 7.5rem));
    transform: translateX(1rem);
    opacity: 0;
    transition:
        transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.32s ease;
}

.nav-search.is-open .nav-search__inner {
    transform: translateX(0);
    opacity: 1;
}

.nav-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-search__input {
    flex: 1;
    min-width: 0;
    width: 8rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.96);
    color: var(--primary-dark);
    font-family: inherit;
    font-size: 0.8125rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.nav-search__input::placeholder {
    color: rgba(15, 39, 68, 0.45);
}

.nav-search__input:focus {
    outline: none;
    border-color: rgba(201, 169, 89, 0.65);
    box-shadow: 0 0 0 2px rgba(201, 169, 89, 0.25);
}

.nav-search__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.nav-search__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.nav-search__btn .icon {
    flex-shrink: 0;
    opacity: 0.95;
}

.nav-search__btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(201, 169, 89, 0.45);
}

.nav-search__btn:active {
    transform: scale(0.97);
}

.nav-search__btn--normal:hover {
    background: rgba(201, 169, 89, 0.22);
}

.nav-search__btn--filter:hover {
    background: rgba(100, 160, 220, 0.25);
}

.nav-search__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease;
}

.nav-search__toggle:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(201, 169, 89, 0.4);
}

.nav-search__toggle:focus-visible {
    outline: 2px solid rgba(201, 169, 89, 0.65);
    outline-offset: 2px;
}

.nav-search.is-open .nav-search__toggle {
    background: rgba(201, 169, 89, 0.2);
    border-color: rgba(201, 169, 89, 0.5);
    box-shadow: 0 0 0 1px rgba(201, 169, 89, 0.2);
}

.nav-search__toggle-icon {
    display: block;
    pointer-events: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.nav-search__feedback {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    max-width: 14rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.82);
    text-align: right;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.nav-search__feedback:empty {
    display: none;
}

section.nav-search-highlight {
    animation: navSearchPulse 1.6s ease-out;
}

@keyframes navSearchPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(201, 169, 89, 0.55);
    }
    40% {
        box-shadow: 0 0 0 6px rgba(201, 169, 89, 0.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(201, 169, 89, 0);
    }
}

@media (max-width: 480px) {
    .nav-search__btn-text {
        display: none;
    }

    .nav-search__btn {
        padding: 0.45rem;
        border-radius: 50%;
    }

    .nav-search.is-open .nav-search__panel {
        max-width: min(18rem, calc(100vw - 5.5rem));
    }

    .nav-search__inner {
        min-width: min(18rem, calc(100vw - 5.5rem));
    }
}

.navbar.scrolled .nav-wrapper {
    padding: 0.625rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.logo-image {
    height: 40px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.navbar .logo-text {
    background: linear-gradient(135deg, #f2f5fa 0%, #d8e2f0 38%, #c9a959 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Panel móvil / tablet: drawer */
.nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1rem 1rem 1.5rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    background-color: #050709;
    background-image: var(--nav-metal-shine), var(--nav-metal-bg);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-top: 1px solid rgba(40, 80, 130, 0.25);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: hidden;
    overflow-x: hidden;
    z-index: 999;
}

.nav-menu.active {
    transform: translateX(0);
}

@media (max-width: 1024px) {
    /* Drawer cerrado: sin región interactiva ni scroll interno */
    .nav-menu:not(.active) {
        pointer-events: none;
        overflow-y: hidden !important;
    }

    /* Solo abierto: scroll interno del menú y captura de eventos */
    .nav-menu.active {
        pointer-events: auto;
        max-height: calc(100vh - var(--nav-height));
        overflow-y: auto;
    }
}

.nav-item {
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.nav-link {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-primary);
    position: relative;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 39, 68, 0.06);
    opacity: 0;
    border-radius: var(--radius-md);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
    border-radius: 2px 2px 0 0;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    box-shadow: 0 0 12px rgba(201, 169, 89, 0.45);
    opacity: 0.95;
}

.nav-link:hover {
    color: var(--primary-dark);
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--primary-dark);
    font-weight: 600;
}

.nav-link.active::before {
    opacity: 1;
    background: rgba(15, 39, 68, 0.08);
}

.nav-link.active::after {
    width: 80%;
    height: 3px;
}

.nav-link.mega-link::after {
    display: none;
}

.nav-link.btn-contact {
    background: linear-gradient(135deg, #fdfcfa 0%, #f5f0e8 100%);
    color: var(--primary-dark);
    border: 1px solid rgba(201, 169, 89, 0.35);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-left: 0;
    margin-top: 0.25rem;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    justify-content: center;
}

.nav-link.btn-contact::before {
    background: rgba(255, 255, 255, 1);
    opacity: 0;
}

.nav-link.btn-contact::after {
    display: none;
}

.nav-link.btn-contact:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: var(--primary-color);
    background: white;
}

.nav-link.btn-contact:hover::before {
    opacity: 1;
}

.nav-link.btn-contact:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Enlaces de la barra (no Contacto ni el panel megamenú en escritorio) */
.navbar .nav-menu > .nav-item > a.nav-link:not(.btn-contact) {
    color: rgba(255, 255, 255, 0.92);
}

.navbar .nav-menu > .nav-item > a.nav-link:not(.btn-contact):hover {
    color: #fff;
}

.navbar .nav-menu > .nav-item > a.nav-link:not(.btn-contact):hover::before {
    background: rgba(255, 255, 255, 0.12);
}

.navbar .nav-menu > .nav-item > a.nav-link:not(.btn-contact).active {
    color: #fff;
}

.navbar .nav-menu > .nav-item > a.nav-link:not(.btn-contact).active::before {
    background: rgba(255, 255, 255, 0.14);
}

/* Acordeón megamenú (móvil / tablet) */
.nav-mega-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.75rem;
    text-align: left;
    font-family: inherit;
    font-weight: 500;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    min-height: 44px;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.nav-mega-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(201, 169, 89, 0.35);
}

.nav-mega-trigger__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
    text-align: left;
}

.nav-mega-trigger__label {
    display: block;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav-mega-trigger__hint {
    display: none;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

.mega-chevron {
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    margin-left: auto;
}

.nav-item--mega.is-open .mega-chevron {
    transform: rotate(180deg);
}

@media (max-width: 1024px) {
    .nav-menu .nav-link::after {
        display: none;
    }

    .mega-panel {
        display: none;
    }

    .nav-item--mega.is-open .mega-panel {
        display: flex;
        flex-direction: column;
    }

    .mega-panel__header {
        padding: 0.75rem 0 1rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mega-panel__eyebrow {
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: rgba(201, 169, 89, 0.95);
        margin: 0 0 0.35rem;
    }

    .mega-panel__title {
        font-family: var(--font-display);
        font-size: 1.35rem;
        font-weight: 600;
        color: #fff;
        margin: 0 0 0.35rem;
        line-height: 1.2;
    }

    .mega-panel__subtitle {
        font-size: 0.8125rem;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.65);
        margin: 0;
    }

    .mega-panel-inner--grid {
        gap: 1.25rem;
    }

    .mega-heading {
        color: rgba(255, 255, 255, 0.45);
    }

    .mega-feature-card__text,
    .mega-feature-card__title {
        color: #fff;
    }

    .mega-feature-card__text {
        color: rgba(255, 255, 255, 0.72);
    }

    .mega-feature-card {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .mega-panel__footer {
        border-top-color: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.45);
    }

    .mega-link-title {
        color: rgba(255, 255, 255, 0.95) !important;
    }

    .mega-link-desc {
        color: rgba(255, 255, 255, 0.55) !important;
    }

    .mega-link-icon-wrap {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
        color: rgba(255, 255, 255, 0.95) !important;
    }

    .mega-feature-card__contact {
        color: rgba(255, 255, 255, 0.85) !important;
    }

    .mega-feature-card__contact:hover {
        color: #fff !important;
    }

    .nav-link.mega-link {
        color: rgba(255, 255, 255, 0.92);
    }

    .nav-link.mega-link:hover {
        color: #fff;
    }

    .nav-link.mega-link:hover::before {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-link.mega-link.active {
        color: #fff;
    }

    .nav-link.mega-link.active::before {
        background: rgba(255, 255, 255, 0.12);
    }
}

.mega-panel {
    padding: 0.5rem 0 0.75rem 0;
    margin-top: 0.35rem;
    border-left: 2px solid rgba(201, 169, 89, 0.45);
    padding-left: 0.75rem;
}

.mega-panel-inner--grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mega-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.mega-heading {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin: 0 0 0.35rem;
}

h3.mega-heading {
    font-family: var(--font-primary);
}

.mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-link.mega-link {
    font-size: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
}

/* Enlaces enriquecidos (icono + título + descripción) */
.mega-link--rich {
    align-items: flex-start;
    gap: 0.65rem;
    text-align: left;
}

.mega-link-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(145deg, rgba(201, 169, 89, 0.15) 0%, rgba(15, 39, 68, 0.06) 100%);
    border: 1px solid rgba(201, 169, 89, 0.2);
    color: var(--primary-dark);
}

.mega-link--rich .mega-link-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.mega-link-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}

.mega-link-desc {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.35;
}

.mega-feature-card {
    padding: 1.1rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 39, 68, 0.1);
    background: var(--bg-secondary);
}

.mega-feature-card__eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(201, 169, 89, 0.95);
    margin: 0 0 0.35rem;
}

.mega-feature-card__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.25;
    color: var(--text-primary);
}

.mega-feature-card__text {
    font-size: 0.8125rem;
    line-height: 1.45;
    margin: 0 0 1rem;
    color: var(--text-secondary);
}

.mega-feature-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: linear-gradient(135deg, #fdfcfa 0%, #f0ebe3 100%);
    border: 1px solid rgba(201, 169, 89, 0.4);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: var(--transition-fast);
}

.mega-feature-card__cta:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.mega-feature-card__contacts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(15, 39, 68, 0.08);
}

.mega-feature-card__contact {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.mega-feature-card__contact:hover {
    color: var(--primary-dark);
}

.mega-panel__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(15, 39, 68, 0.08);
    font-size: 0.7rem;
    color: var(--text-light);
}

.mega-panel__footer-sep {
    opacity: 0.6;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1001;
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
}

.menu-toggle span {
    width: 22px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Escritorio: barra horizontal + megamenú */
@media (min-width: 1025px) {
    .menu-toggle {
        display: none;
    }

    .nav-wrapper .logo {
        order: 1;
    }

    .nav-wrapper .nav-menu {
        order: 2;
        flex: 1;
        margin-left: 0;
    }

    .nav-wrapper .nav-search {
        order: 3;
        margin-left: 0;
    }

    .nav-menu {
        position: static;
        transform: none;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        padding: 0;
        max-height: none;
        overflow: visible;
        background: transparent;
        box-shadow: none;
        border: none;
        width: auto;
        max-width: none;
        gap: 0.35rem;
    }

    .nav-link {
        width: auto;
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        min-height: auto;
        display: inline-flex;
    }

    .nav-link:hover {
        transform: translateY(-1px);
    }

    .nav-link.btn-contact {
        margin-top: 0;
        margin-left: 0.35rem;
        padding: 0.625rem 1.35rem;
        font-size: 0.875rem;
        width: auto;
    }

    .nav-mega-trigger {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: auto;
        min-height: auto;
        padding: 0.45rem 0.75rem 0.45rem 0.65rem;
        font-size: 0.8125rem;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: var(--radius-md);
        color: rgba(255, 255, 255, 0.92);
    }

    .nav-mega-trigger__hint {
        display: block;
        color: rgba(255, 255, 255, 0.5);
    }

    .nav-mega-trigger:hover,
    .nav-item--mega:hover .nav-mega-trigger,
    .nav-item--mega:focus-within .nav-mega-trigger {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(201, 169, 89, 0.45);
        box-shadow: 0 0 0 1px rgba(201, 169, 89, 0.15);
    }

    .nav-item--mega {
        position: relative;
    }

    .mega-panel {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        left: auto;
        right: 0;
        top: calc(100% + 0.5rem);
        transform: translateY(0.5rem);
        width: min(1040px, calc(100vw - 2rem));
        padding: 0;
        margin: 0;
        border-radius: var(--radius-xl);
        background: var(--bg-elevated);
        box-shadow: var(--shadow-xl), 0 24px 80px rgba(10, 14, 20, 0.15), 0 0 0 1px rgba(15, 39, 68, 0.06);
        border: 1px solid rgba(201, 169, 89, 0.22);
        border-top: 3px solid var(--accent-bright);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        overflow: hidden;
        border-left: none;
        margin-top: 0;
    }

    .nav-item--mega:hover .mega-panel,
    .nav-item--mega:focus-within .mega-panel {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .mega-panel__header {
        padding: 1.35rem 1.75rem 1.15rem;
        background: linear-gradient(180deg, rgba(15, 39, 68, 0.04) 0%, rgba(15, 39, 68, 0.01) 100%);
        border-bottom: 1px solid rgba(15, 39, 68, 0.07);
    }

    .mega-panel__eyebrow {
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--accent-muted);
        margin: 0 0 0.4rem;
    }

    .mega-panel__title {
        font-family: var(--font-display);
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0 0 0.35rem;
        line-height: 1.2;
    }

    .mega-panel__subtitle {
        font-size: 0.875rem;
        line-height: 1.5;
        color: var(--text-secondary);
        margin: 0;
        max-width: 52ch;
    }

    .mega-panel-inner--grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(220px, 280px);
        gap: 0;
        padding: 1.35rem 1.5rem 1.5rem;
        align-items: stretch;
    }

    .mega-col:not(.mega-col--featured) {
        padding: 0 1.25rem;
        border-right: 1px solid rgba(15, 39, 68, 0.08);
    }

    .mega-col:not(.mega-col--featured):first-child {
        padding-left: 0;
    }

    .mega-col--featured {
        padding: 0 0 0 1.25rem;
        border-right: none;
    }

    .mega-heading {
        color: var(--text-light);
        margin-bottom: 0.65rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(15, 39, 68, 0.08);
    }

    .nav-link.mega-link {
        color: var(--text-primary);
        padding: 0;
        min-height: auto;
        width: 100%;
        justify-content: flex-start;
        border-radius: var(--radius-md);
    }

    .nav-link.mega-link--rich {
        padding: 0.5rem 0.5rem;
        margin: 0 -0.5rem;
    }

    .nav-link.mega-link::before {
        border-radius: var(--radius-md);
        background: rgba(15, 39, 68, 0.06);
    }

    .nav-link.mega-link:hover {
        color: var(--primary-dark);
        transform: none;
    }

    .nav-link.mega-link.active {
        color: var(--primary-dark);
        font-weight: 600;
    }

    .mega-link-icon-wrap {
        background: linear-gradient(145deg, rgba(201, 169, 89, 0.18) 0%, rgba(15, 39, 68, 0.08) 100%);
        border: 1px solid rgba(201, 169, 89, 0.22);
        color: var(--primary-dark);
    }

    .mega-link--rich:hover .mega-link-icon-wrap {
        border-color: rgba(201, 169, 89, 0.45);
    }

    .mega-link-title {
        color: var(--text-primary);
    }

    .mega-link-desc {
        color: var(--text-secondary);
    }

    .mega-feature-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 1.25rem 1.15rem;
        background: linear-gradient(160deg, rgba(15, 39, 68, 0.06) 0%, rgba(201, 169, 89, 0.1) 100%);
        border: 1px solid rgba(201, 169, 89, 0.28);
    }

    .mega-feature-card__title {
        color: var(--text-primary);
    }

    .mega-feature-card__text {
        color: var(--text-secondary);
        flex: 1;
    }

    .mega-feature-card__cta {
        margin-top: auto;
    }

    .mega-feature-card__contact {
        color: var(--text-secondary);
    }

    .mega-feature-card__contact:hover {
        color: var(--primary-dark);
    }

    .mega-panel__footer {
        margin-top: 0;
        padding: 0.85rem 1.75rem;
        border-top: 1px solid rgba(15, 39, 68, 0.08);
        background: rgba(15, 39, 68, 0.03);
        font-size: 0.75rem;
        color: var(--text-light);
    }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: calc(var(--nav-height) + 0.5rem);
    padding-bottom: 4rem;
    overflow: hidden;
    max-width: 100%;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    opacity: 1;
    z-index: -1;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(15, 39, 68, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(201, 169, 89, 0.12) 0%, transparent 45%);
    pointer-events: none;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 0;
    min-height: calc(100vh - var(--nav-height));
}

@media (min-width: 641px) {
    .hero-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3rem;
        padding: 3rem 0;
    }
}

@media (min-width: 1025px) {
    .hero-wrapper {
        gap: 4rem;
    }
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
    min-width: 0;
}

@media (min-width: 641px) {
    .hero-content {
        text-align: left;
    }
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s ease-out 0.3s both;
    width: 100%;
    max-width: 100%;
    order: -1;
}

@media (min-width: 641px) {
    .hero-image {
        order: 0;
    }
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow: visible;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image {
    width: 100%;
    height: auto;
    max-height: 650px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(201, 169, 89, 0.18);
    object-fit: contain;
    object-position: center;
    z-index: 2;
    position: relative;
    background: var(--gradient-primary);
    background-size: cover;
    background-position: center;
    display: block;
}

.profile-image:not([src]),
.profile-image[src=""],
.profile-image[src*="arturo-perfil"]:not([src*=".jpg"]):not([src*=".jpeg"]):not([src*=".png"]):not([src*=".webp"]) {
    background: var(--gradient-primary);
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-xl);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 2rem;
}

.placeholder-initials {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5rem;
    font-family: var(--font-display);
}

.placeholder-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    line-height: 1.4;
}

.image-decoration {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    z-index: 1;
    opacity: 0.3;
    transform: rotate(5deg);
}

.hero-name {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.15;
    font-family: var(--font-display);
    font-style: italic;
    letter-spacing: 0.02em;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(201, 169, 89, 0.12) 0%, rgba(15, 39, 68, 0.08) 100%);
    border: 1px solid rgba(201, 169, 89, 0.35);
    border-radius: 50px;
    margin-bottom: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.hero-badge span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.title-main {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.08;
}

.title-subtitle {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 100%;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

@media (min-width: 641px) {
    .hero-cta {
        justify-content: flex-start;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fafbfc;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.btn-primary > * {
    position: relative;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.12) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary-dark);
    border: 1.5px solid rgba(15, 39, 68, 0.25);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: #fafbfc;
    border-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-full {
    width: 100%;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 4rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.75rem;
    animation: bounce 2s infinite;
}

.scroll-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(180deg, var(--accent-bright), transparent);
    opacity: 0.7;
}

/* ============================================
   Section Styles
   ============================================ */
section {
    padding: 4rem 0;
}

@media (min-width: 1025px) {
    section {
        padding: 6rem 0;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.35rem;
    background: linear-gradient(135deg, rgba(201, 169, 89, 0.14) 0%, rgba(15, 39, 68, 0.06) 100%);
    color: var(--primary-dark);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    border: 1px solid rgba(201, 169, 89, 0.28);
}

.section-title {
    margin-bottom: 1rem;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-description {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.125rem;
}

/* ============================================
   About Section
   ============================================ */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .about-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5rem;
    }
}

@media (min-width: 1025px) {
    .about-content {
        grid-template-columns: 300px 1fr;
        gap: 4rem;
    }
}

.about-image {
    position: relative;
    max-width: 320px;
    margin: 0 auto;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .about-image {
        max-width: none;
        margin: 0;
    }
}

@media (min-width: 1025px) {
    .about-image {
        position: sticky;
        top: 100px;
        max-width: none;
        margin: 0;
    }
}

.about-profile-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    aspect-ratio: 3/4;
    background: var(--gradient-primary);
    background-size: cover;
    background-position: center;
}

.about-profile-image:not([src]),
.about-profile-image[src=""] {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.about-image-placeholder .placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    padding: 1.5rem;
}

.about-image-placeholder .placeholder-initials {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3rem;
    font-family: var(--font-display);
}

.about-image-placeholder .placeholder-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    line-height: 1.3;
}

.about-text {
    flex: 1;
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.credentials-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    width: 100%;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .credentials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .credentials-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2rem;
    }
}

.credential-card {
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 39, 68, 0.06);
    transition: var(--transition);
    text-align: center;
}

.credential-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201, 169, 89, 0.35);
}

.credential-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.credential-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.credential-card p {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.credential-focus {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Services Section
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .services-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2rem;
    }
}

.service-card {
    background: var(--bg-elevated);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(15, 39, 68, 0.07);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: rgba(201, 169, 89, 0.4);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, rgba(201, 169, 89, 0.15) 0%, rgba(15, 39, 68, 0.08) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    border: 1px solid rgba(201, 169, 89, 0.2);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(145deg, rgba(201, 169, 89, 0.28) 0%, rgba(15, 39, 68, 0.12) 100%);
}

.service-icon svg {
    width: 30px;
    height: 30px;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-features li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.service-card--emedia-cluster {
    scroll-margin-top: 96px;
}

@media (min-width: 641px) {
    .service-card--emedia-cluster {
        grid-column: 1 / -1;
    }
}

.emedia-pillars {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

@media (min-width: 641px) {
    .emedia-pillars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .emedia-pillars {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.emedia-pillar {
    scroll-margin-top: 100px;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid rgba(15, 39, 68, 0.08);
}

.emedia-pillar__title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 0.5rem;
}

.emedia-pillar__text {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}

.lineas-trabajo-block {
    width: 100%;
    margin-bottom: 2.5rem;
    scroll-margin-top: 96px;
}

.lineas-trabajo__title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.lineas-trabajo__lead {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    max-width: 72ch;
}

.lineas-trabajo-pillars {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

@media (min-width: 641px) {
    .lineas-trabajo-pillars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .lineas-trabajo-pillars {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.linea-trabajo {
    scroll-margin-top: 100px;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid rgba(15, 39, 68, 0.08);
}

.linea-trabajo__heading {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 0.5rem;
}

.linea-trabajo__text {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   Portfolio Section
   ============================================ */
.portfolio {
    background: var(--bg-secondary);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    font-size: 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    color: #fafbfc;
    border-color: rgba(201, 169, 89, 0.35);
    box-shadow: 0 4px 20px rgba(15, 39, 68, 0.2);
}

.filter-btn:hover {
    transform: translateY(-2px);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .portfolio-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2rem;
    }
}

.portfolio-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 39, 68, 0.06);
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201, 169, 89, 0.25);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    background-color: var(--gradient-primary);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.portfolio-link {
    padding: 0.75rem 1.5rem;
    background: var(--bg-elevated);
    color: var(--primary-dark);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid rgba(201, 169, 89, 0.3);
}

.portfolio-link:hover {
    transform: scale(1.05);
}

/* ============================================
   Projects Section - Institutions Grid
   ============================================ */
.institutions-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .institutions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .institutions-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2rem;
    }
}

.institution-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 39, 68, 0.06);
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.institution-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(201, 169, 89, 0.4);
}

.institution-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: var(--transition);
}

.institution-card:hover .institution-logo {
    background: rgba(15, 39, 68, 0.05);
    transform: scale(1.05);
}

.institution-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.institution-card:hover .institution-logo img {
    filter: grayscale(0%);
    opacity: 1;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.institution-info {
    width: 100%;
}

.institution-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.institution-role {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.institution-year {
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0;
}

/* ============================================
   Achievements Section
   ============================================ */
.achievements {
    background: var(--bg-secondary);
}

.achievements-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .achievements-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .achievements-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2rem;
    }
}

.achievement-card {
    background: var(--bg-elevated);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 39, 68, 0.06);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.achievement-card:hover::before {
    transform: scaleX(1);
}

.achievement-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(201, 169, 89, 0.35);
}

.achievement-card.featured {
    background: var(--gradient-primary);
    color: white;
}

.achievement-card.featured h3,
.achievement-card.featured .achievement-title,
.achievement-card.featured .achievement-description,
.achievement-card.featured .achievement-org {
    color: white;
}

.achievement-badge {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.achievement-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.achievement-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.achievement-description {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.achievement-org {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.achievement-card.featured .achievement-org {
    border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(15, 39, 68, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-item a {
    color: var(--primary-color);
    font-weight: 500;
}

.contact-item p {
    margin: 0;
    color: var(--text-secondary);
}

.contact-form {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 39, 68, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   Ubicación (mapa interactivo, sobre el footer)
   ============================================ */
.location-map {
    padding: 4rem 0 4.5rem;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-top: 1px solid var(--border-color);
}

.location-map .section-description {
    max-width: 42rem;
}

.location-map__frame {
    position: relative;
    width: 80vw;
    max-width: calc(100vw - 2rem);
    margin-left: auto;
    margin-right: auto;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(15, 39, 68, 0.06);
    aspect-ratio: 42 / 9;
    min-height: 150px;
    background: #e8ecf0;
}

.location-map__leaflet {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.location-map__frame .leaflet-container {
    width: 100%;
    height: 100%;
    font-family: var(--font-primary, 'Plus Jakarta Sans', system-ui, sans-serif);
    font-size: 0.8125rem;
    background: #e8ecf0;
}

.location-map__frame .leaflet-control-zoom a {
    color: var(--primary-dark);
}

.location-map__frame .leaflet-popup-content-wrapper {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.location-map__frame .leaflet-control-attribution {
    font-size: 0.6875rem;
    line-height: 1.35;
    max-width: calc(100% - 12px);
    background: rgba(255, 255, 255, 0.92) !important;
}

.location-map__actions {
    text-align: center;
    margin: 1.25rem 0 0;
}

.location-map__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: color 0.2s ease, background 0.2s ease;
}

.location-map__link:hover {
    color: var(--accent-bright);
    background: rgba(15, 39, 68, 0.06);
}

@media (max-width: 768px) {
    .location-map {
        padding: 3rem 0 3.5rem;
    }

    .location-map__frame {
        aspect-ratio: 32 / 9;
        min-height: 120px;
    }
}

/* ============================================
   Footer - Diseño Profesional
   ============================================ */
.footer {
    background: var(--gradient-secondary);
    color: white;
    padding: 5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.footer .icon.icon--sm {
    width: 0.875rem;
    height: 0.875rem;
}

.footer .icon.icon--xs {
    width: 0.7rem;
    height: 0.7rem;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(15, 39, 68, 0.5) 50%, transparent 100%);
}

.footer-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
    position: relative;
    z-index: 1;
    width: 100%;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5rem;
    }

    .footer-newsletter {
        order: 1;
    }

    .footer-contact {
        order: 2;
    }

    .footer-menu-group {
        order: 3;
        grid-column: 1 / -1;
    }

    .social-links {
        order: 4;
    }
}

@media (min-width: 1025px) {
    .footer-content {
        grid-template-columns: 1.15fr minmax(0, 2.55fr) 1.1fr;
        gap: 3rem 2.5rem;
        margin-bottom: 4rem;
    }
}

.footer-brand h3 {
    color: white;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
}

.footer-links h4,
.footer-contact h4,
.footer-menu h4 {
    color: white;
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links h4::after,
.footer-contact h4::after,
.footer-menu h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.footer-links ul,
.footer-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding: 0;
    margin: 0;
}

.footer-links a,
.footer-nav a {
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    position: relative;
}

.footer-links a::before,
.footer-nav a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--accent-bright);
}

.footer-links a:hover,
.footer-nav a:hover {
    color: white;
    padding-left: 0.75rem;
    transform: translateX(5px);
}

.footer-links a:hover::before,
.footer-nav a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-menu {
    width: 100%;
}

.footer-menu-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    min-width: 0;
}

@media (min-width: 700px) {
    .footer-menu-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem 1.5rem;
    }
}

@media (min-width: 1025px) {
    .footer-menu-group {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem 1.25rem;
    }
}

.footer-nav--compact {
    gap: 0.65rem;
}

.footer-nav--compact a {
    padding-left: 0;
}

.footer-nav--compact a:hover {
    padding-left: 0.75rem;
}

.footer-contact {
    width: 100%;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.footer-contact p:last-child {
    margin-bottom: 0;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
}

.footer-contact a:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    line-height: 1.5;
    margin: 0;
}

.footer-newsletter {
    width: 100%;
}

.footer-newsletter h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-newsletter h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.footer-newsletter > p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8125rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.8125rem;
    font-family: var(--font-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.newsletter-form input:focus {
    outline: none;
    border-color: rgba(15, 39, 68, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(15, 39, 68, 0.1);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8125rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(15, 39, 68, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 39, 68, 0.5);
    background: var(--gradient-primary);
}

.newsletter-form button:active {
    transform: translateY(0);
}

.social-links {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    grid-column: 1 / -1;
    text-align: center;
    position: relative;
}

.social-links::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: var(--gradient-primary);
}

.social-links h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.02em;
}

.social-icons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.social-icon:hover::before {
    width: 100%;
    height: 100%;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 20px rgba(15, 39, 68, 0.3);
}

.social-icon svg {
    width: 22px;
    height: 22px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    fill: white;
}

.social-icon:hover svg {
    transform: scale(1.1);
}

/* ============================================
   Credentials Section
   ============================================ */
.credentials {
    background: var(--bg-secondary);
}

.credentials-content {
    max-width: 900px;
    margin: 0 auto;
}

.credentials-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.location-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.location-info h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* ============================================
   Research Section
   ============================================ */
.research {
    background: var(--bg-primary);
}

.research-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.research-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.research-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.research-date {
    min-width: 120px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.research-content h3 {
    font-size: 1.125rem;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ============================================
   Methods Section
   ============================================ */
.methods {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(15, 39, 68, 0.03) 50%, var(--bg-secondary) 100%);
    position: relative;
}

.methods__lead {
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.methods-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .methods-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.15rem;
    }
}

@media (min-width: 1025px) {
    .methods-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

.method-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    min-height: 8.5rem;
    padding: 1.5rem 1.1rem 1.35rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--text-primary);
    box-shadow:
        0 1px 2px rgba(15, 39, 68, 0.04),
        0 8px 24px rgba(15, 39, 68, 0.06);
    border: 1px solid rgba(15, 39, 68, 0.08);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.25s ease;
    overflow: hidden;
}

.method-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 89, 0.85), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.method-item:hover,
.method-item:focus-within {
    transform: translateY(-6px);
    box-shadow:
        0 4px 12px rgba(15, 39, 68, 0.08),
        0 20px 40px rgba(15, 39, 68, 0.1);
    border-color: rgba(201, 169, 89, 0.42);
}

.method-item:hover::before,
.method-item:focus-within::before {
    opacity: 1;
}

.method-item:focus-visible {
    outline: 2px solid rgba(201, 169, 89, 0.55);
    outline-offset: 2px;
}

.method-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 14px;
    flex-shrink: 0;
    color: var(--primary-color);
    background: linear-gradient(145deg, rgba(15, 39, 68, 0.08) 0%, rgba(15, 39, 68, 0.03) 100%);
    border: 1px solid rgba(15, 39, 68, 0.08);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.25s ease,
        box-shadow 0.3s ease;
}

.method-item:hover .method-item__icon,
.method-item:focus-within .method-item__icon {
    transform: scale(1.06);
    color: var(--primary-dark);
    background: linear-gradient(145deg, rgba(201, 169, 89, 0.18) 0%, rgba(15, 39, 68, 0.06) 100%);
    border-color: rgba(201, 169, 89, 0.35);
    box-shadow: 0 4px 14px rgba(201, 169, 89, 0.15);
}

.method-item__icon .icon {
    width: 1.35rem;
    height: 1.35rem;
}

.method-item__label {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

.method-item:hover .method-item__label,
.method-item:focus-within .method-item__label {
    color: var(--primary-dark);
}

/* ============================================
   Presentations Section
   ============================================ */
.presentations {
    background: var(--bg-primary);
}

.presentations-list {
    max-width: 900px;
    margin: 0 auto;
}

.presentation-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.presentation-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.presentation-year {
    min-width: 80px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    padding-top: 0.5rem;
}

.presentation-content {
    flex: 1;
}

.presentation-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.presentation-event {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.presentation-topic {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.presentation-org {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(15, 39, 68, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   Platforms Section
   ============================================ */
.platforms {
    background: var(--bg-secondary);
}

.platforms-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .platforms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .platforms-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2rem;
    }
}

.platform-item {
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(15, 39, 68, 0.07);
}

.platform-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201, 169, 89, 0.35);
}

.platform-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.platform-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.platform-logos {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    margin: 2.5rem auto 0;
    max-width: 1000px;
    width: 100%;
    align-items: center;
    justify-items: center;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .platform-logos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .platform-logos {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.platform-logos img {
    max-width: 140px;
    width: 100%;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.85;
    transition: var(--transition);
}

.platform-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-2px);
}

/* ============================================
   Scroll reveal (clase añadida por JS)
   ============================================ */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: calc(6rem + 10px);
    right: calc(2rem + 5px);
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: #fafbfc;
    border: 1px solid rgba(201, 169, 89, 0.35);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(15, 39, 68, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    background: var(--gradient-primary);
}

.scroll-top:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(15, 39, 68, 0.4);
}

.scroll-top svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.scroll-top:hover svg {
    transform: translateY(-2px);
}

/* ============================================
   Ajustes finos — pantallas ≤640px
   ============================================ */
@media (max-width: 640px) {
    .logo-image {
        height: 35px;
    }

    .logo-text-wrapper {
        display: flex !important;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .hero-stats {
        gap: 2rem;
    }

    .image-wrapper {
        max-width: min(300px, 100%);
        margin: 0 auto;
        min-height: 320px;
    }

    .profile-image {
        max-height: 420px;
    }

    .about-image {
        max-width: 260px;
    }

    .institution-card {
        padding: 1.5rem;
    }

    .institution-logo {
        width: 120px;
        height: 120px;
    }

    .footer-newsletter {
        max-width: 100%;
        order: 1;
    }

    .footer-menu-group {
        order: 2;
    }

    .footer-contact {
        order: 3;
    }

    .social-links {
        order: 4;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
        min-height: 44px;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-content {
        padding: 1rem 0;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .service-card,
    .credential-card,
    .achievement-card {
        padding: 1.5rem;
    }

    .hero-wrapper {
        gap: 1.75rem;
    }

    .scroll-top {
        bottom: calc(5.5rem + 10px);
        right: calc(1rem + 5px);
        width: 46px;
        height: 46px;
    }

    .scroll-top svg {
        width: 20px;
        height: 20px;
    }
}

/* Bloques flex que no deben forzar scroll horizontal en tablet */
@media (max-width: 1024px) {
    .presentation-item,
    .research-item {
        flex-direction: column;
        gap: 1rem;
    }

    .research-date,
    .presentation-year {
        min-width: 0;
    }
}

/* ============================================
   WhatsApp Chat Widget
   ============================================ */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: var(--font-primary);
}

.whatsapp-button {
    position: relative;
    width: 64px;
    height: 64px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    overflow: visible;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
    background: #20BA5A;
}

.whatsapp-button svg {
    width: 36px;
    height: 36px;
    color: white;
    z-index: 2;
    position: relative;
}

.button-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: buttonPulse 2s infinite;
    opacity: 0.6;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 3px solid white;
    animation: badgeBounce 1s infinite;
}

.whatsapp-chat {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: min(520px, calc(100vh - 120px));
    max-height: min(560px, calc(100vh - 120px));
    background: #ece5dd;
    border-radius: 20px;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-chat--bot {
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.whatsapp-widget.active .whatsapp-chat {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.whatsapp-widget.active .whatsapp-button {
    transform: scale(0.95);
}

.chat-header {
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.chat-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-avatar svg {
    width: 28px;
    height: 28px;
    color: white;
}

.avatar-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: avatarPulse 2s infinite;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-info h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    opacity: 0.9;
    margin: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ADE80;
    border-radius: 50%;
    animation: statusBlink 2s infinite;
}

.chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    flex-shrink: 0;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chat-close svg {
    width: 18px;
    height: 18px;
}

.wa-messages {
    flex: 1;
    min-height: 0;
    padding: 0.75rem 0.65rem 0.5rem;
    overflow-y: auto;
    background-color: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='%23d3ccc4' fill-opacity='0.35'%3E%3Cpath d='M0 0h20v20H0zM40 40h20v20H40zM80 0h20v20H80zM120 40h20v20h-20zM160 0h20v20h-20zM200 40h20v20h-20zM240 0h20v20h-20zM0 80h20v20H0zM40 120h20v20H40zM80 80h20v20H80zM120 120h20v20h-20zM160 80h20v20h-20zM200 120h20v20h-20zM240 80h20v20h-20zM0 160h20v20H0zM40 200h20v20H40zM80 160h20v20H80zM120 200h20v20h-20zM160 160h20v20h-20zM200 200h20v20h-20zM240 160h20v20h-20zM0 240h20v20H0zM80 240h20v20H80zM160 240h20v20h-20zM240 240h20v20h-20z'/%3E%3C/g%3E%3C/svg%3E");
}

.wa-messages::-webkit-scrollbar {
    width: 6px;
}

.wa-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* Burbujas: entrante izquierda (asistente), saliente derecha (usuario) */
.wa-msg {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
    max-width: 100%;
    animation: messageSlideIn 0.35s ease-out;
}

.wa-msg--in {
    align-items: flex-start;
}

.wa-msg--out {
    align-items: flex-end;
}

.wa-msg__bubble {
    padding: 0.35rem 0.5rem 0.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
    max-width: 88%;
    font-size: 0.6rem;
    line-height: 1.35;
    color: #111b21;
}

.wa-msg--in .wa-msg__bubble {
    background: #fff;
    border-radius: 0 8px 8px 8px;
}

.wa-msg--out .wa-msg__bubble {
    background: #d9fdd3;
    border-radius: 8px 0 8px 8px;
}

.wa-msg__bubble p {
    margin: 0 0 0.28rem;
}

.wa-msg__bubble p:last-child {
    margin-bottom: 0;
}

.wa-msg__meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.15rem;
    padding: 0 0.35rem;
}

.wa-msg--in .wa-msg__meta {
    align-self: flex-start;
    justify-content: flex-start;
}

.wa-msg--out .wa-msg__meta {
    align-self: flex-end;
    justify-content: flex-end;
}

.wa-msg__time {
    font-size: 0.5rem;
    color: rgba(17, 27, 33, 0.45);
}

.wa-msg__label {
    font-size: 0.48rem;
    color: rgba(17, 27, 33, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wa-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.wa-faq-chip {
    display: inline-block;
    padding: 0.35rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #027eb5;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(2, 126, 181, 0.35);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-align: left;
}

.wa-faq-chip:hover {
    background: #fff;
    transform: translateY(-1px);
}

.wa-chat-footer {
    padding: 0.65rem 0.75rem 0.75rem;
    background: #f0f2f5;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.wa-length-picker {
    margin-bottom: 0.5rem;
}

.wa-length-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    color: #54656f;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}

.wa-length-btns {
    display: flex;
    gap: 0.35rem;
}

.wa-length-btn {
    flex: 1;
    padding: 0.35rem 0.3rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #54656f;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.wa-length-btn:hover {
    background: #f5f6f6;
}

.wa-length-btn.is-active {
    color: #027eb5;
    border-color: rgba(2, 126, 181, 0.45);
    background: rgba(2, 126, 181, 0.08);
}

.wa-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.wa-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.2;
    color: #111b21;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
}

.wa-action-btn:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.wa-action-btn--faq {
    color: #075e54;
}

.wa-action-btn--human {
    color: #027eb5;
}

.wa-human-panel {
    margin-top: 0.5rem;
}

.wa-human-input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    font-family: var(--font-primary);
    font-size: 0.78rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    resize: vertical;
    min-height: 3.25rem;
    margin-bottom: 0.45rem;
    box-sizing: border-box;
}

.wa-send-human {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    background: #25d366;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.wa-send-human:hover {
    background: #20ba5a;
}

.wa-back-btn {
    width: 100%;
    margin-top: 0.45rem;
    padding: 0.35rem;
    font-size: 0.7rem;
    color: #027eb5;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

.wa-panel--hidden {
    display: none !important;
}

.wa-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animations */
@keyframes buttonPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

@keyframes badgeBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes avatarPulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

@keyframes statusBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .whatsapp-widget {
        bottom: 20px;
        right: max(1rem, env(safe-area-inset-right));
    }

    .whatsapp-button {
        width: 60px;
        height: 60px;
    }

    .whatsapp-button svg {
        width: 32px;
        height: 32px;
    }

    .whatsapp-chat {
        width: min(360px, calc(100vw - 2rem));
        max-width: calc(100vw - 2rem);
        bottom: 90px;
    }

    .notification-badge {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
}
