/* =========================================
   Coopemprendedor - Design System
   ========================================= */

:root {
    /* Colors - Green/White Corporate Theme */
    --primary: #0d7f46;      /* Corporate Green, dark enough for 4.5:1 text on white and --bg-soft */
    --primary-light: #18a85f;
    --primary-dark: #0a6336;
    --primary-soft: rgba(15, 139, 77, 0.08); /* Tinted surface behind icons and notes */
    --secondary: #004d26;    /* Dark Green */
    --accent: #f2a900;

    --bg-main: #ffffff;
    --bg-light: #ffffff;
    --bg-dark: #12261a;      /* Deep dark green for footer */
    --bg-card: #ffffff;      /* Cards, forms and other raised surfaces */
    --bg-soft: #f5f8f6;      /* Tinted band behind card grids */
    --border-color: #e2e8f0;

    --text-main: #2b3b32;    /* Dark text, slightly green tinted instead of pure black */
    --text-muted: #647369;   /* Keeps 4.5:1 on --bg-soft */
    --text-light: #ffffff;

    /* Typography */
    --font-heading: 'Source Serif 4', Georgia, serif;
    --font-display: 'Outfit', sans-serif; /* Solo la rifa */
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-section: clamp(4rem, 9vw, 7.5rem); /* Vertical rhythm between sections */

    /* Shadows - neutral, one elevation scale */
    --shadow-sm: 0 1px 2px rgba(16, 24, 20, 0.05);
    --shadow-md: 0 4px 12px rgba(16, 24, 20, 0.06);
    --shadow-lg: 0 12px 32px rgba(16, 24, 20, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: 1px solid var(--border-color);

    /* Border Radius - single scale used everywhere */
    --br-sm: 8px;
    --br-md: 12px;
    --br-lg: 20px;
    --br-pill: 999px;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --trans-fast: 0.2s ease;
    --trans-normal: 0.35s var(--ease-out);

    --nav-h: 80px;
}

/* Dark Mode Support (set on <html> before first paint by the script in _Layout) */
[data-theme="dark"] {
    --bg-main: #121212;
    --bg-light: #1e1e1e;
    --bg-dark: #0f1a14;
    --bg-card: #1e1e1e;
    --bg-soft: #181818;
    --border-color: #333a36;
    --primary-soft: rgba(30, 181, 104, 0.12);
    --text-main: #f0f0f0;
    --text-muted: #a0aab2;
    --glass-bg: rgba(18, 18, 18, 0.9);
}

/* The logo has a black tagline; dark mode swaps in the variant with a white tagline */
.logo .logo-dark,
[data-theme="dark"] .logo .logo-light {
    display: none;
}

[data-theme="dark"] .logo .logo-dark {
    display: block;
}

/* =========================================
   Reset & Base
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Keeps anchored sections clear of the fixed navbar */
    scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    text-wrap: balance;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--trans-fast);
}

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

/* Text for screen readers and crawlers only */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Line icons from the SVG sprite in _Layout */
.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.container {
    width: 100%;
    max-width: 1232px;
    margin: 0 auto;
    /* 16 px on the phone, up to 32 px on tablets and laptops */
    padding: 0 clamp(var(--space-md), 4vw, var(--space-lg));
}

.section-padding {
    padding: var(--space-section) 0;
}

.section-soft {
    background: var(--bg-soft);
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--bg-light);
}

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

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--br-sm);
    cursor: pointer;
    transition: background-color var(--trans-fast), color var(--trans-fast), border-color var(--trans-fast), transform var(--trans-fast);
    border: 1px solid transparent;
    text-align: center;
}

.btn:active {
    transform: scale(0.98);
}

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

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

.btn-primary-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

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

.btn-secondary {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--text-main);
}

/* =========================================
   Navbar
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--trans-fast);
}

.navbar.scrolled {
    border-bottom-color: var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-h);
    transition: height var(--trans-normal);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 52px;
    width: auto;
    transition: height var(--trans-normal);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-links a:not(.btn) {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--trans-normal);
}

.nav-links a:not(.btn):hover::after,
.nav-links a.active:not(.btn)::after {
    transform: scaleX(1);
}

.nav-cta {
    padding: 10px 18px;
    font-size: 0.95rem;
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: var(--br-sm);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    cursor: pointer;
    transition: background-color var(--trans-fast);
}

.icon-btn:hover {
    background: var(--primary-soft);
}

.lang-btn {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
}

.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}

/* Amplía la zona táctil a 48 px sin cambiar el tamaño visible del icono */
.mobile-menu-toggle::after {
    content: "";
    position: absolute;
    inset: -14px -9px;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: var(--trans-normal);
}

/* The bar only shrinks on desktop; the mobile menu is anchored to its full height */
@media screen and (min-width: 1024px) {
    .navbar.scrolled .nav-container {
        height: 64px;
    }

    .navbar.scrolled .logo img {
        height: 42px;
    }
}

/* Small laptops (1024-1279): tighter nav so every link fits on one line */
@media screen and (min-width: 1024px) and (max-width: 1279px) {
    .nav-links {
        gap: 1.1rem;
    }

    .nav-links a:not(.btn) {
        font-size: 0.9rem;
    }

    .nav-cta {
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    .logo img {
        height: 44px;
    }
}

/* Scroll progress, scaled by main.js */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 100%;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    padding-top: calc(var(--nav-h) + var(--space-xl));
    padding-bottom: var(--space-xl);
    min-height: min(100vh, 900px);
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.1rem, 6vw, 3.75rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
}

.hero-image {
    width: 100%;
    border-radius: var(--br-lg);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: var(--br-md);
    box-shadow: var(--shadow-md);
}

/* =========================================
   Stats
   ========================================= */
.stats-counter-section {
    padding: 3.5rem 0;
    background: var(--bg-soft);
}

/* One raised panel, split into columns by hairlines */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--br-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.stat-box {
    padding: 2rem 1rem;
    border-left: 1px solid var(--border-color);
    transition: background var(--trans-fast);
}

.stat-box:first-child {
    border-left: 0;
}

.stat-box:hover {
    background: var(--primary-soft);
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    font-size: 1.35rem;
}

.counter-number {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 3.2vw, 2.6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--primary);
}

.stat-label {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* =========================================
   About Section
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: var(--br-lg);
}

.about-text .subtitle {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.features-list {
    list-style: none;
    margin-top: var(--space-lg);
}

.features-list li {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.icon-box {
    width: 36px;
    height: 36px;
    background-color: var(--primary-soft);
    color: var(--primary);
    border-radius: var(--br-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.features-list h3,
.features-list h4 {
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.features-list p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   Services Section
   ========================================= */
.section-header {
    max-width: 640px;
    margin: 0 auto 3.5rem;
}

.section-header p {
    color: var(--text-muted);
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
    letter-spacing: -0.02em;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.service-card {
    padding: var(--space-lg);
    border-radius: var(--br-md);
    transition: var(--trans-normal);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    display: inline-block;
    padding: 15px;
    background: var(--primary-soft);
    border-radius: var(--br-md);
}

.service-card h3 {
    margin-bottom: var(--space-sm);
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* Public service cards (Home and the "other services" list in Servicio) */
.card-dynamic-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: var(--space-lg);
}

.service-card-animated {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--br-lg);
    transition: transform var(--trans-normal), border-color var(--trans-fast);
    overflow: hidden;
    container-type: inline-size;
}

.service-card-animated:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

/* Cover photo: bleeds to the card edges, cancelling the card padding */
.service-card-media {
    margin: -2rem -2rem 1.5rem;
    aspect-ratio: 16 / 10;
    background: var(--primary-soft);
    overflow: hidden;
}

.service-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--trans-normal);
}

/* En el teléfono las tarjetas van una debajo de otra: ilustración más baja para no alargar tanto la lista */
@media screen and (max-width: 575px) {
    .service-card-media {
        aspect-ratio: 2 / 1;
    }
}

.service-card-animated:hover .service-card-media img {
    transform: scale(1.04);
}

.service-icon-animated {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: var(--br-md);
    font-size: 1.4rem;
}

.service-title {
    color: var(--text-main);
    /* Se ajusta al ancho de la tarjeta para que el título quepa en una línea */
    font-size: min(1.3rem, 6.4cqi);
    white-space: nowrap;
    margin-bottom: 0.6rem;
}

.service-desc {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.65;
}

.card-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.card-link-btn .icon,
.card-link-btn span {
    transition: transform var(--trans-normal);
}

.card-link-btn:hover .icon,
.card-link-btn:hover span {
    transform: translateX(4px);
}

/* =========================================
   Loan & Investment Calculator
   ========================================= */
.calc-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto 2.5rem;
    max-width: 480px;
    background: var(--bg-soft);
    padding: 6px;
    border-radius: var(--br-pill);
    border: 1px solid var(--border-color);
}

.calc-tab {
    flex: 1;
    padding: 10px 18px;
    border: 0;
    border-radius: var(--br-pill);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--trans-fast);
}

.calc-tab:hover {
    color: var(--text-main);
}

.calc-tab.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.calc-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--br-lg);
}

.slider-container {
    margin-bottom: 2rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.slider-value {
    color: var(--primary);
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

.slider-input {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: var(--br-pill);
    background: var(--border-color);
    cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    transition: transform var(--trans-fast);
}

.slider-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    transition: transform var(--trans-fast);
}

.slider-input::-moz-range-track {
    height: 6px;
    border-radius: var(--br-pill);
    background: var(--border-color);
}

.slider-input:hover::-webkit-slider-thumb,
.slider-input:active::-webkit-slider-thumb {
    transform: scale(1.15);
}

.slider-input:hover::-moz-range-thumb,
.slider-input:active::-moz-range-thumb {
    transform: scale(1.15);
}

.slider-range {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.calc-rate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 12px 20px;
    background: var(--primary-soft);
    border-radius: var(--br-md);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.calc-rate[hidden] { display: none; }
.calc-rate strong {
    color: var(--primary);
}

.calc-result-box {
    padding: 2.5rem;
    background: var(--primary-dark);
    color: var(--text-light);
    border-radius: var(--br-lg);
    text-align: center;
}

.calc-result-label {
    opacity: 0.85;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.calc-total {
    margin: 10px 0 20px;
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.calc-row:first-of-type {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.calc-cta {
    width: 100%;
    margin-top: 1.5rem;
    background: #ffffff;
    color: var(--primary-dark);
}

.calc-cta:hover {
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary-dark);
}

/* =========================================
   FAQ
   ========================================= */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-heading {
    margin: 0;
    font-family: var(--font-body);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    padding: 1.4rem 0;
    background: none;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.08rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color var(--trans-fast);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    font-size: 1.25rem;
    color: var(--primary);
    transition: transform var(--trans-normal);
}

.faq-item.is-open .faq-icon {
    transform: rotate(45deg);
}

/* Animating the grid row lets the answer open to its real height */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--trans-normal);
}

.faq-item.is-open .faq-answer {
    grid-template-rows: 1fr;
}

.faq-answer-inner {
    min-height: 0;
    overflow: hidden;
    visibility: hidden;
    color: var(--text-muted);
    transition: visibility 0s 0.35s;
}

.faq-item.is-open .faq-answer-inner {
    visibility: visible;
    transition-delay: 0s;
}

.faq-answer-inner p {
    padding-bottom: 1.4rem;
    max-width: 65ch;
}

/* =========================================
   Trust strip
   ========================================= */
.trust-badges {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
}

.trust-label {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trust-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem 3rem;
    list-style: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

/* =========================================
   Forms
   ========================================= */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--br-sm);
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.9);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--trans-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 171, 0, 0.3);
}

/* =========================================
   Home contact section
   ========================================= */
.contact-section {
    background: var(--primary-dark);
    padding: var(--space-section) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Sin esto, un correo largo ensancha la columna más que la pantalla en teléfonos angostos */
.contact-grid > * {
    min-width: 0;
}

.contact-intro {
    color: var(--text-light);
    padding-right: 2rem;
}

.contact-intro .eyebrow {
    color: rgba(255, 255, 255, 0.75);
}

.contact-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.contact-lead {
    margin-bottom: 2.5rem;
    font-size: 1.15rem;
    opacity: 0.85;
}

.contact-channels {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    list-style: none;
}

.contact-channel {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.contact-channel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--br-md);
    font-size: 1.25rem;
}

.contact-channel small {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
}

.contact-channel > div {
    min-width: 0;
}

.contact-channel a {
    color: var(--text-light);
    font-size: clamp(0.85rem, 4.3vw, 1.15rem);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-channel a:hover {
    text-decoration: underline;
}

.contact-card {
    background: var(--bg-card);
    border-radius: var(--br-lg);
    padding: 2rem;
    width: 100%;
    max-width: 430px;
    margin-inline: auto;
}

.contact-card h3 {
    color: var(--text-main);
    margin-bottom: 1.25rem;
    font-size: 1.35rem;
}

.contact-card .form-group {
    margin-bottom: 1rem;
}

.contact-card .form-group label {
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact-card .form-group input,
.contact-card .form-group select,
.contact-card .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--br-md);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--trans-fast);
}

.contact-card .form-group textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

.contact-card .form-group input:focus,
.contact-card .form-group select:focus,
.contact-card .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 139, 77, 0.2);
}

.contact-submit {
    width: 100%;
    padding: 13px;
    margin-top: 0.25rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--br-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background-color var(--trans-fast), transform var(--trans-fast);
}

.contact-submit:hover {
    background: var(--primary-dark);
}

.contact-submit:active {
    transform: scale(0.98);
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background-color: var(--bg-light);
    color: var(--text-muted);
    padding: var(--space-xl) 0 var(--space-lg);
    border-top: var(--glass-border);
}

.footer-logo {
    max-height: 45px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.footer-col h2,
.footer-col h4 {
    color: var(--text-main);
    margin-bottom: var(--space-md);
    font-size: 1rem;
}

.footer-col a {
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: var(--glass-border);
    font-size: 0.9rem;
}

/* WhatsApp floating button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    transition: transform var(--trans-normal), background-color var(--trans-fast);
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #ffffff;
    transform: scale(1.08);
}

/* =========================================
   Motion
   ========================================= */
/* Load-in for above-the-fold content */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.7s var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}

/* Stagger steps, shared by .fade-in-up and .reveal */
.delay-1 {
    --i: 2;
}

.delay-2 {
    --i: 4;
}

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

/* Scroll reveal. Hidden only when JS is running, so content never stays invisible without it.
   The animation fills backwards only, leaving transform free for hover states afterwards. */
.js .reveal {
    opacity: 0;
}

.js .reveal.active {
    opacity: 1;
    animation: revealUp 0.7s var(--ease-out) backwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    /* Cross-fade between pages */
    @view-transition {
        navigation: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}

/* =========================================
   Responsive Media Queries
   ========================================= */
/* The nav collapses below laptop width; between 1024 and 1279 it is compacted so the links never wrap */
@media screen and (max-width: 1023px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--nav-h));
        height: calc(100dvh - var(--nav-h));
        background: var(--bg-main);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 1.25rem 1.25rem 3rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform var(--trans-normal), visibility 0s 0.35s;
        gap: 0.35rem;
    }

    .nav-links.open {
        transform: translateX(0);
        visibility: visible;
        transition-delay: 0s;
    }

    .nav-links a:not(.btn) {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.9rem 1rem;
        font-size: 1.05rem;
        font-weight: 600;
        color: var(--text-main);
        border-radius: 12px;
        border-bottom: 1px solid var(--border-color);
        text-decoration: none;
        transition: background-color var(--trans-fast), color var(--trans-fast);
    }

    .nav-links a:not(.btn):hover,
    .nav-links a:not(.btn):active {
        background: var(--primary-soft);
        color: var(--primary);
    }

    .nav-links a:not(.btn)::after {
        content: '›';
        font-size: 1.35rem;
        line-height: 1;
        color: var(--text-muted);
        position: static;
        transform: none;
        width: auto;
        height: auto;
        background: none;
    }

    .nav-cta {
        width: 100%;
        margin-top: 1.15rem;
        padding: 0.85rem 1.25rem;
        font-size: 1rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-radius: 12px;
        box-shadow: 0 4px 14px rgba(13, 127, 70, 0.25);
    }

    .nav-tools {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        width: 100%;
        margin-top: 1.25rem;
        padding-top: 1.25rem;
        border-top: 1px solid var(--border-color);
    }

    .nav-tools .icon-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem 1rem;
        border-radius: 999px;
        background: var(--bg-soft);
        border: 1px solid var(--border-color);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 0.85rem;
    }

    /* Hamburger animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

@media screen and (max-width: 992px) {
    .hero-content,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: calc(var(--nav-h) + var(--space-lg));
        text-align: center;
        min-height: auto;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

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

    .stat-box {
        padding: 1.5rem 0.5rem;
    }

    .stat-box:nth-child(odd) {
        border-left: 0;
    }

    .stat-box:nth-child(n + 3) {
        border-top: 1px solid var(--border-color);
    }

    .calc-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .contact-intro {
        padding-right: 0;
    }

    .contact-card {
        padding: 2rem 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }

    .btn {
        width: 100%;
    }

    /* Full width on the phone, but not stretched across a tablet */
    .hero-actions .btn {
        max-width: 420px;
    }

    .calc-card,
    .calc-result-box {
        padding: 1.5rem;
    }
}

/* =========================================
   Page hero (páginas interiores)
   Insignia y título con acento corporativo.
   ========================================= */
:root {
    --honey-soft: color-mix(in srgb, var(--accent) 14%, var(--bg-main));
    --honey-line: color-mix(in srgb, var(--accent) 45%, var(--border-color));
    --hex-shape: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}

.page-hero {
    padding: clamp(7.5rem, 13vw, 10rem) 0 clamp(2.5rem, 6vw, 4.5rem);
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-main) 100%);
}

.page-hero--compact {
    padding-bottom: clamp(1.25rem, 3vw, 2rem);
}

.page-hero--compact + .page-body {
    padding-top: clamp(0.75rem, 2vw, 1.25rem);
}

.page-hero-inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.page-hero-inner--wide {
    max-width: 1000px;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 14px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--honey-line);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.page-badge::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--accent);
    clip-path: var(--hex-shape);
}

.page-hero h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.page-hero h1 em {
    font-style: normal;
    color: var(--primary);
}

.page-lead {
    max-width: 60ch;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.12rem;
    line-height: 1.65;
}

.page-lead--wide {
    max-width: none;
}

.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 2rem;
}

.btn-pill {
    border-radius: 999px;
    padding: 12px 26px;
}

.page-body {
    padding: clamp(2rem, 5vw, 3.5rem) 0 var(--space-section);
    min-height: 40vh;
}

/* Tarjeta de superficie común: bordes suaves y sombra discreta */
.surface-card {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.hex-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 58px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #ffd75e, #f2a900);
    clip-path: var(--hex-shape);
    color: #3b2a1a;
    font-size: 1.6rem;
}

.hex-icon.is-green {
    background: linear-gradient(160deg, var(--primary-light), var(--primary-dark));
    color: #ffffff;
}

.empty-state {
    max-width: 520px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state .hex-icon {
    margin: 0 auto 1.25rem;
}

.empty-state h2 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

/* ---------- Blog ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform var(--trans-normal), box-shadow var(--trans-normal), border-color var(--trans-normal);
}

.news-card:hover,
.job-card:hover {
    transform: translateY(-6px);
    border-color: var(--honey-line);
    box-shadow: var(--shadow-lg);
}

.news-card-media {
    aspect-ratio: 16 / 10;
    background: var(--honeycomb), var(--honey-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.date-pill {
    align-self: flex-start;
    padding: 4px 12px;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    background: rgba(15, 139, 77, 0.1);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.news-card h2 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.6rem;
    overflow-wrap: anywhere;
}

.news-card p {
    flex: 1;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    overflow-wrap: anywhere;
}

/* ---------- Artículo y páginas legales ---------- */
.article-card {
    max-width: 860px;
    margin: 0 auto;
    overflow: hidden;
}

.article-card > img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
}

.article-content {
    padding: clamp(1.5rem, 5vw, 3.5rem);
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    color: var(--text-main);
    margin: 2rem 0 1rem;
}

.article-back {
    margin-top: 2.5rem;
    text-align: center;
}

/* ---------- Vacantes ---------- */
.job-list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.job-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
    transition: transform var(--trans-normal), box-shadow var(--trans-normal), border-color var(--trans-normal);
}

.job-card-text {
    flex: 1;
    min-width: 0;
}

.job-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

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

.job-cta {
    margin-top: 1rem;
    padding: 2rem;
    border: 1px solid var(--honey-line);
    border-radius: 20px;
    background: var(--honey-soft);
    text-align: center;
}

.job-cta h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

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

/* ---------- Acceso al panel ---------- */
.auth-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-bottom: var(--space-section);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 2.5rem;
    border: 1px solid var(--honey-line);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.auth-card .hex-icon {
    margin: 0 auto 1rem;
}

.auth-card h1 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 0.4rem;
}

.auth-card .auth-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.auth-error {
    padding: 10px 14px;
    margin-bottom: 1.25rem;
    border-radius: var(--br-md);
    background: rgba(220, 53, 69, 0.12);
    color: #b02a37;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

[data-theme="dark"] .auth-error {
    color: #ff8b94;
}

@media screen and (max-width: 640px) {
    .job-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }
}

/* ---------- Accesibilidad: saltar al contenido ---------- */
.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: var(--br-md);
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    transition: top var(--trans-fast);
}

.skip-link:focus {
    top: 12px;
    color: #ffffff;
}

/* ---------- Consentimiento en formularios ---------- */
.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
}

.form-consent input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.form-consent a {
    color: var(--primary);
    text-decoration: underline;
}

/* ---------- Aviso de cookies ---------- */
.cookie-notice {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: min(560px, calc(100vw - 48px));
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    color: var(--text-main);
    font-size: 0.88rem;
    line-height: 1.5;
}

.cookie-notice[hidden] {
    display: none;
}

.cookie-notice p {
    margin: 0;
}

.cookie-notice a {
    color: var(--primary);
    text-decoration: underline;
}

/* En tableta los botones pasan a ancho completo; aquí aplastaría el texto del aviso */
.cookie-notice .btn {
    flex-shrink: 0;
    width: auto;
}

/* ---------- Sucursales ---------- */
.branch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    justify-content: center;
    gap: 1.75rem;
}

/* En el teléfono cabe una sola columna: que use todo el ancho, como el resto de tarjetas */
@media screen and (max-width: 575px) {
    .branch-grid {
        grid-template-columns: 1fr;
    }
}

.branch-card {
    display: flex;
    flex-direction: column;
    padding: 2.25rem;
}

.branch-card .hex-icon {
    margin-bottom: 1rem;
}

.branch-card h3,
.branch-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.branch-address {
    flex: 1;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.branch-details {
    flex: 1;
}

.branch-card > .btn,
.branch-actions {
    margin-top: auto;
    align-self: flex-start;
}

.branch-hours {
    white-space: pre-line;
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.branch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

/* ---------- Paginación del blog ---------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
}

.pager-status {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.job-card .job-card-desc {
    margin-top: 0.6rem;
    white-space: pre-line;
}

/* ---------- Acceso al panel: avisos y enlaces ---------- */
.auth-info {
    padding: 10px 14px;
    margin-bottom: 1.25rem;
    border-radius: var(--br-md);
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-link {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-link a {
    color: var(--primary);
    text-decoration: underline;
}

@media screen and (max-width: 640px) {
    .cookie-notice {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* ---------- Misión, visión y valores ---------- */
.identity {
    padding-top: 0;
}

.identity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.identity-card {
    padding: 1.75rem;
}

.identity-card .hex-icon {
    margin-bottom: 1rem;
}

.identity-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.identity-card p {
    color: var(--text-muted);
}

.identity-values {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: var(--text-muted);
}

.identity-values li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.identity-values .icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

/* ---------- Página de sucursales ---------- */
.branch-card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.branch-card .btn {
    padding: 10px 22px;
    font-size: 0.92rem;
}

.branch-details {
    margin-bottom: 1.25rem;
}

.branch-details dt {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.branch-details dd {
    margin: 0.15rem 0 0.9rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.branch-details dd a {
    color: var(--primary);
    font-weight: 600;
}

.branch-details .branch-hours {
    font-size: 1rem;
}

.job-cta .page-hero-actions {
    justify-content: center;
}

/* Foto (o ilustración) de la sucursal, a sangre en la parte superior de la tarjeta */
.branch-card {
    overflow: hidden;
}

.branch-photo {
    margin: -2.25rem -2.25rem 1.5rem;
    aspect-ratio: 16 / 9;
    background: var(--honey-soft);
}

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

/* ---------- Portada: hero ---------- */
.hero {
    min-height: 0;
    padding-top: calc(var(--nav-h) + clamp(2rem, 5vw, 3.5rem));
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-main) 100%);
}

.hero-image {
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    background: var(--primary-soft);
    color: var(--primary);
}

.section-honey {
    background: var(--bg-soft);
}

@media screen and (max-width: 992px) {
    .hero-content {
        gap: var(--space-lg);
    }

    /* La imagen acompaña al texto sin ocupar una pantalla entera */
    .hero-image-container {
        max-width: 340px;
        margin: 0 auto;
    }
}

/* ---------- Pestañas de servicios ---------- */
.card-dynamic-container {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    justify-content: center;
}

.service-card-animated[hidden] {
    display: none;
}

/* Solo con JavaScript: sin él se muestran todas las tarjetas y no hay nada que filtrar */
.service-tabs {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin: -1.5rem auto 2.5rem;
}

.js .service-tabs {
    display: flex;
}

.service-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--br-pill);
    background: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--trans-fast), border-color var(--trans-fast), color var(--trans-fast);
}

.service-tab:hover {
    border-color: var(--primary);
}

.service-tab[aria-pressed="true"] {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.service-tab-count {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: var(--br-pill);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.service-tab[aria-pressed="true"] .service-tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ---------- Entidades aliadas y reguladores ---------- */
.trust-list {
    gap: 1rem;
    font-size: 1.05rem;
}

.trust-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 8px 20px 8px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--br-pill);
    background: var(--bg-card);
    color: var(--text-main);
}

.trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.1rem;
}

/* ---------- Testimonios ---------- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 380px));
    justify-content: center;
    gap: 1.5rem;
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 1.75rem;
}

.testimonial-card .hex-icon {
    margin-bottom: 1rem;
    padding-top: 0.6rem;
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
}

.testimonial-card blockquote {
    flex: 1;
    margin-bottom: 1.25rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.testimonial-card figcaption strong {
    display: block;
    font-family: var(--font-heading);
}

.testimonial-card figcaption span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- Mapas de sucursales ---------- */
.branch-maps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.branch-map {
    margin: 0;
    overflow: hidden;
}

.branch-map iframe {
    display: block;
    width: 100%;
    height: 360px;
    border: 0;
}

.branch-map figcaption {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.branch-map figcaption .icon {
    margin-top: 4px;
    color: var(--primary);
}

.branch-map figcaption strong {
    color: var(--text-main);
}

/* ---------- Pie de página oscuro ---------- */
.site-footer {
    background: var(--bg-dark);
    border-top: 0;
    color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
    grid-template-columns: 1.4fr 1.2fr 0.9fr 1.6fr;
}

.footer-col h2,
.footer-col h4 {
    color: #ffffff;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.72);
}

.footer-col a:hover {
    color: #ffffff;
}

/* El pie siempre es oscuro: usa la variante del logo con el lema en blanco */
.footer-logo {
    height: 45px;
    max-height: none;
}

.footer-brand p {
    max-width: 32ch;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
    list-style: none;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: var(--primary);
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.footer-contact .icon {
    margin-top: 4px;
    color: var(--accent);
}

.footer-contact a {
    display: inline;
    margin: 0;
    overflow-wrap: anywhere;
}

.footer-hours {
    white-space: pre-line;
}

/* Cada línea del horario sin cortes en escritorio */
@media screen and (min-width: 993px) {
    .horario-footer span {
        white-space: nowrap;
    }
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media screen and (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-brand p {
        margin: 0 auto;
    }

    .footer-social,
    .footer-contact li {
        justify-content: center;
    }
}

/* ---------- Página de testimonios en video ---------- */
.tv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 370px));
    justify-content: center;
    gap: 1.5rem;
}

.tv-card {
    overflow: hidden;
}

.tv-video {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0b1f14;
}

.tv-video video,
.tv-video iframe,
.tv-video img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.tv-play {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.tv-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translate(-50%, -50%);
    transition: transform var(--trans-fast);
}

.tv-play-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #ffffff;
    transform: translate(-50%, -50%);
}

.tv-play:hover .tv-play-icon,
.tv-play:focus-visible .tv-play-icon {
    transform: translate(-50%, -50%) scale(1.1);
}

.tv-body {
    padding: 1.4rem 1.5rem 1.6rem;
}

.tv-body blockquote {
    margin: 0 0 1rem;
    color: var(--text-main);
    font-style: italic;
    line-height: 1.6;
}

.tv-name {
    font-weight: 700;
    color: var(--text-main);
}

.tv-role {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Video dentro de la tarjeta de testimonio de la portada: sangra hasta los bordes */
.testimonial-card {
    overflow: hidden;
}

.testimonial-video {
    margin: -1.75rem -1.75rem 1.25rem;
    aspect-ratio: 16 / 9;
    background: #0b1f14;
}

.testimonial-video video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Ajustes táctiles y de tableta ---------- */
/* En pantallas táctiles los enlaces sueltos alcanzan los 44 px de alto recomendados */
@media (pointer: coarse) {
    .card-link-btn {
        min-height: 44px;
    }

    .footer-col a {
        padding: 0.55rem 0;
        margin-bottom: 0;
    }

    .footer-social a,
    .footer-contact a {
        padding: 0;
    }
}

/* Deja sitio para desplazar el menú móvil por encima del aviso de cookies */
@media screen and (max-width: 1023px) {
    .nav-links {
        padding-bottom: 12rem;
    }
}

/* Con dos columnas, la tercera tarjeta (Valores) ocupa la fila completa en vez de quedar suelta */
@media screen and (min-width: 576px) and (max-width: 859px) {
    .identity-card:nth-child(3):last-child {
        grid-column: 1 / -1;
    }

    .identity-card:nth-child(3):last-child .identity-values {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem 1.5rem;
    }
}

/* Aviso de cookies más compacto en el teléfono, para tapar menos contenido */
@media screen and (max-width: 640px) {
    .cookie-notice {
        gap: 0.6rem;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .cookie-notice .btn {
        min-height: 40px;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }
}

/* ---------- Avisos de confianza ---------- */
/* Nota bajo el botón de los formularios: se envían por WhatsApp */
.form-note {
    margin: 0.6rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* La calculadora es orientativa */
.calc-disclaimer {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Aviso de seguridad en el pie de todas las páginas */
.footer-security {
    margin: 0 auto 0.75rem;
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.footer-legal-notice {
    max-width: 820px;
    margin: 0 auto 0.65rem;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
}

.footer-security .icon {
    width: 1em;
    height: 1em;
    margin-right: 0.3rem;
    vertical-align: -0.15em;
    color: var(--accent);
}

.footer-security strong {
    color: #ffffff;
}

/* Testimonios: estado mientras no hay videos publicados */
.tv-empty {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
}

.tv-empty .hex-icon {
    margin: 0 auto 1rem;
}

.tv-empty h2 {
    margin-bottom: 0.5rem;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
}

.tv-empty p {
    color: var(--text-muted);
}

.tv-empty .page-hero-actions {
    justify-content: center;
    margin-top: 1.25rem;
}

@media (pointer: coarse) {
    .footer-social a {
        width: 44px;
        height: 44px;
    }
}

/* En el teléfono la ilustración principal se adapta al ancho disponible */
@media screen and (max-width: 575px) {
    .hero-image-container {
        max-width: min(100%, 420px);
    }
}

/* Descripción en las páginas de servicio: tarjeta ancha con acento ejecutivo */
.ah-intro.sv-rich {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.06rem;
    line-height: 1.85;
}

.ah-intro.sv-rich > p {
    max-width: none;
}

.ah-intro.sv-rich > p:first-child {
    color: var(--text-main);
    font-size: clamp(1.12rem, 1.7vw, 1.25rem);
    line-height: 1.75;
}

.ah-intro.sv-rich > p:last-child {
    margin-bottom: 0;
}

.ah-intro.sv-rich + .ah-intro.sv-rich {
    margin-top: 1.5rem;
}

#conoce .section-header {
    max-width: none;
    margin-bottom: 2rem;
}

#conoce .section-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin: 1.1rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
}

@media (min-width: 992px) {
    #conoce .section-title {
        white-space: nowrap;
    }
}

/* ==== Anuncio de la rifa ==== */
.promo-dialog {
    /* El ancho respeta la proporción del arte para que quepa también en pantallas bajas */
    width: min(900px, 92vw, calc(90vh * 1104 / 737));
    width: min(900px, 92vw, calc(90dvh * 1104 / 737));
    max-width: none;
    margin: auto;
    padding: 0;
    border: none;
    border-radius: var(--br-lg);
    overflow: hidden;
    background: transparent;
    box-shadow: var(--shadow-lg);
}

.promo-dialog[open] {
    animation: fadeInUp 0.3s var(--ease-out);
}

.promo-dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
}

.promo-dialog a {
    display: block;
}

.promo-dialog img {
    display: block;
    width: 100%;
    height: auto;
}

.promo-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    cursor: pointer;
    transition: background var(--trans-fast);
}

.promo-close:hover {
    background: rgba(0, 0, 0, 0.85);
}

.promo-close:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

body:has(.promo-dialog[open]) {
    overflow: hidden;
}

/* ==== Carrusel de la portada ==== */
.hero-carousel {
    width: 100%;
    min-width: 0;
}

/* Los controles ya dan aire: se recorta el espacio inferior solo cuando existen */
.hero:has(.hero-carousel-controls) {
    padding-bottom: 1.5rem;
}

/* Las diapositivas comparten celda: la altura no cambia al rotar y la página no salta.
   Sin JavaScript se ven una debajo de otra. */
.js .hero-slides {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.js .hero-slide {
    grid-area: 1 / 1;
    align-self: center;
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}

.js .hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

/* Diapositiva de la rifa: el texto es real para que se pueda leer, traducir y encontrar */
.rifa-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    min-height: 540px;
    overflow: hidden;
    border-radius: var(--br-lg);
    background: radial-gradient(circle at 50% 35%, #15854c, var(--primary-dark) 75%);
    box-shadow: var(--shadow-lg);
    color: #fff;
}

.rifa-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 1.75rem 2.25rem;
    text-align: center;
}

.rifa-logo {
    width: 230px;
    height: auto;
}

.rifa-badge {
    padding: 0.25rem 0.875rem;
    border-radius: var(--br-sm);
    background: #ffc72c;
    color: #1d2a22;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rifa-title {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 3.6vw, 3.1rem);
    font-weight: 800;
    line-height: 1.05;
}

.rifa-value {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    line-height: 1.2;
}

.rifa-value strong {
    display: block;
    color: #ffc72c;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.6vw, 3.9rem);
    font-weight: 800;
    line-height: 1.1;
}

.rifa-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    margin: 0;
}

.rifa-facts > div {
    padding: 0.625rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--br-md);
    background: rgba(255, 255, 255, 0.08);
}

.rifa-facts dt {
    color: #ffc72c;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rifa-facts dd {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.3;
}

.rifa-facts dd strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
}

.rifa-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 52px;
    border-radius: var(--br-md);
    background: #ffc72c;
    color: #1d2a22;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    transition: background var(--trans-fast);
}

.rifa-cta:hover,
.rifa-card:hover .rifa-cta {
    background: #ffd65c;
    color: #1d2a22;
}

/* Toda la tarjeta lleva al mismo enlace */
.rifa-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
}

.rifa-cta:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.rifa-note {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
}

.rifa-note .icon {
    flex: none;
    width: 16px;
    height: 16px;
    color: #ffc72c;
}

.rifa-photo {
    position: relative;
    min-width: 0;
    min-height: 240px;
}

.rifa-house {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 45% 30%;
}

.rifa-mama {
    position: absolute;
    bottom: 0;
    left: -4%;
    width: 82%;
    height: auto;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35));
}

.rifa-seal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 128px;
    height: 128px;
    padding: 0.5rem;
    border: 2px dashed #1d2a22;
    border-radius: 50%;
    outline: 5px solid #ffc72c;
    background: #ffc72c;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    color: #1d2a22;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(-8deg);
}

.rifa-seal strong {
    font-size: 1.4rem;
    font-weight: 800;
}

.rifa-seal small {
    margin-top: 0.125rem;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: none;
}

.rifa-ribbon {
    position: absolute;
    right: -0.5rem;
    bottom: 1rem;
    padding: 0.5rem 1.25rem;
    background: #d3202a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    transform: rotate(-4deg);
}

@media screen and (max-width: 992px) {
    .rifa-card {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .rifa-photo {
        order: -1;
        height: 280px;
    }

    .rifa-mama {
        left: 2%;
        width: auto;
        height: 92%;
    }

    .rifa-info {
        padding: 1.5rem 1.25rem;
    }

    .rifa-title {
        font-size: clamp(1.9rem, 8vw, 3rem);
    }

    .rifa-value strong {
        font-size: clamp(2.3rem, 11vw, 4rem);
    }
}

@media screen and (max-width: 480px) {
    .rifa-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    /* La mamá más pequeña para que también se vea la casa */
    .rifa-photo {
        height: 300px;
    }

    .rifa-mama {
        left: -3%;
        height: 64%;
    }

    .rifa-value strong {
        font-size: 2.2rem;
    }

    .rifa-seal {
        top: 0.625rem;
        right: 0.625rem;
        width: 104px;
        height: 104px;
        font-size: 0.7rem;
    }

    .rifa-seal strong {
        font-size: 1.15rem;
    }

    .rifa-seal small {
        font-size: 0.5rem;
    }

    .rifa-ribbon {
        font-size: 0.85rem;
    }
}

.hero-carousel-controls {
    display: none;
}

.js .hero-carousel-controls {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    width: fit-content;
    margin: 1.25rem auto 0;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--br-pill);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.hero-carousel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--trans-fast), color var(--trans-fast);
}

.hero-carousel-btn:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.hero-carousel-prev .icon {
    transform: rotate(180deg);
}

.hero-carousel-toggle .icon-play,
.is-paused .hero-carousel-toggle .icon-pause {
    display: none;
}

.is-paused .hero-carousel-toggle .icon-play {
    display: block;
}

.hero-dots {
    display: flex;
    align-items: center;
    padding: 0 0.25rem;
}

.hero-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 36px;
    padding: 0 3px;
    border: none;
    background: none;
    cursor: pointer;
}

.hero-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: var(--br-pill);
    background: var(--text-muted);
    opacity: 0.5;
    transition: width var(--trans-fast), background var(--trans-fast), opacity var(--trans-fast);
}

.hero-dot:hover::before {
    opacity: 1;
}

.hero-dot[aria-current="true"]::before {
    width: 22px;
    background: var(--primary);
    opacity: 1;
}

.hero-carousel-btn:focus-visible,
.hero-dot:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Portada apilada: es mucho más alta que la rifa, así que cada diapositiva usa su propia
   altura, los controles van arriba para no moverse y solo se cambia a mano (ver main.js) */
@media screen and (max-width: 992px) {
    .hero-carousel {
        display: flex;
        flex-direction: column;
    }

    .js .hero-slide:not(.is-active) {
        display: none;
    }

    .js .hero-carousel-controls {
        order: 2;
        margin: 1.25rem auto 0;
    }

    .hero-carousel-btn {
        width: 44px;
        height: 44px;
    }

    .hero-dot {
        height: 44px;
    }

    .hero-carousel-toggle {
        display: none;
    }
}

/* ==== Barra de navegación ==== */
.navbar {
    border-bottom-color: var(--border-color);
    transition: box-shadow var(--trans-fast);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

/* El archivo del logo tiene mucho margen transparente: se recorta para que la marca se vea
   a su tamaño real sin afectar al logo del pie de página */
.logo img {
    width: 200px;
    height: 38px;
    object-fit: cover;
    object-position: 50% 70%;
    transition: width var(--trans-normal), height var(--trans-normal);
}

/* El verde de la marca y del botón de idioma pierden contraste sobre el fondo oscuro */
[data-theme="dark"] .logo img {
    filter: brightness(1.45);
}

[data-theme="dark"] .lang-btn {
    color: var(--primary-light);
}

@media screen and (min-width: 1024px) {
    .navbar.scrolled .logo img {
        width: 168px;
        height: 32px;
    }

    .nav-links {
        gap: 0.25rem;
    }

    .nav-links a:not(.btn) {
        padding: 0.5rem 0.75rem;
        border-radius: var(--br-sm);
        font-weight: 500;
        white-space: nowrap;
        transition: background-color var(--trans-fast), color var(--trans-fast);
    }

    .nav-links a:not(.btn)::after {
        display: none;
    }

    .nav-links a:not(.btn):hover {
        background: var(--primary-soft);
        color: var(--primary);
    }

    .nav-cta {
        margin-left: 0.5rem;
        white-space: nowrap;
    }

    .nav-tools {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
        border-left: 1px solid var(--border-color);
    }
}

/* Laptops pequeñas: más ajustado para que todo quepa en una línea */
@media screen and (min-width: 1024px) and (max-width: 1279px) {
    .logo img {
        width: 168px;
        height: 32px;
    }

    .nav-links {
        gap: 0;
    }

    .nav-links a:not(.btn) {
        padding: 0.5rem 0.55rem;
    }
}

/* =========================================
   Tono propio: menos adornos de plantilla
   ========================================= */

/* Texto sobre el título de portada, sin píldora ni punto */
.page-badge {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--primary);
    font-weight: 600;
}

.page-badge::before {
    display: none;
}

/* Títulos en serif: sin el interletraje apretado de la sans */
h1,
h2,
.section-title {
    letter-spacing: -0.01em;
}

/* Datos de la cooperativa en "Quiénes somos" (hasta tener foto real del equipo) */
.about-facts dl {
    display: grid;
    gap: 1.75rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary);
}

.about-facts dt {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-main);
}

.about-facts dd {
    margin-top: 0.2rem;
    color: var(--text-muted);
}

/* Requisitos de cada servicio: una lista simple, no son pasos */
.sv-req-list {
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    columns: 2;
    column-gap: 3rem;
}

.sv-req-list li {
    position: relative;
    padding: 0.55rem 0 0.55rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    break-inside: avoid;
    color: var(--text-main);
}

.sv-req-list li::before {
    content: "";
    position: absolute;
    top: 1.15em;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
}

@media screen and (max-width: 720px) {
    .sv-req-list {
        columns: 1;
    }
}

/* ==========================================================================
   WORLD-CLASS TIER-1 BANKING & PRIVATE WEALTH DESIGN UPGRADE
   ========================================================================== */

:root {
    --bank-emerald-deep: #072917;
    --bank-emerald-darker: #04190e;
    --bank-gold: #d49b17;
    --bank-gold-bright: #f5b925;
    --bank-gold-soft: rgba(212, 155, 23, 0.14);
    --bank-border-lux: rgba(13, 127, 70, 0.16);
    --bank-shadow-elevated: 0 20px 50px -12px rgba(7, 41, 23, 0.12), 0 4px 16px -2px rgba(7, 41, 23, 0.05);
    --bank-shadow-card-hover: 0 24px 48px -12px rgba(13, 127, 70, 0.16), 0 8px 20px -4px rgba(7, 41, 23, 0.06);
}

[data-theme="dark"] {
    --bank-border-lux: rgba(30, 181, 104, 0.24);
    --bank-shadow-elevated: 0 20px 50px -12px rgba(0, 0, 0, 0.55);
    --bank-shadow-card-hover: 0 24px 48px -12px rgba(0, 0, 0, 0.65);
}

/* 1. Barra Superior Institucional Ejecutiva (Top Banking Bar) */
.bank-topbar {
    background: linear-gradient(90deg, var(--bank-emerald-darker) 0%, var(--bank-emerald-deep) 55%, #0b3b22 100%);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.79rem;
    border-bottom: 1px solid rgba(245, 185, 37, 0.22);
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
    max-height: 44px;
    overflow: hidden;
}

.navbar.scrolled .bank-topbar {
    max-height: 0;
    opacity: 0;
    border-bottom-width: 0;
}

.bank-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 36px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.bank-topbar-left,
.bank-topbar-right {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.bank-topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 500;
}

.bank-topbar-item .icon {
    color: var(--bank-gold-bright);
    width: 14px;
    height: 14px;
}

.bank-topbar-item a {
    color: #ffffff;
    font-weight: 600;
}

.bank-topbar-item a:hover {
    color: var(--bank-gold-bright);
}

.bank-rate-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 2px 10px;
    border-radius: var(--br-pill);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(245, 185, 37, 0.28);
    color: #ffffff;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.bank-rate-pill strong {
    color: var(--bank-gold-bright);
    font-weight: 700;
}

.bank-topbar-divider {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.18);
}

@media screen and (max-width: 992px) {
    .bank-topbar-right .bank-rate-pill:nth-child(n+2),
    .bank-topbar-divider {
        display: none;
    }
}

@media screen and (max-width: 640px) {
    .bank-topbar {
        display: none;
    }
}

/* Ajuste de compensación del hero cuando está la barra ejecutiva */
@media screen and (min-width: 641px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-h) + 36px + clamp(1.15rem, 2.2vw, 2rem));
        padding-bottom: 1.25rem;
    }
    .page-hero {
        padding-top: clamp(8.5rem, 14vw, 11.5rem);
    }
}

/* Botón CTA de Banca en Línea con sello de seguridad y acabado ejecutivo */
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 14px rgba(13, 127, 70, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
}

.nav-cta:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13, 127, 70, 0.36);
}

/* 2. Hero Monumental Nivel Banca Privada */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(13, 127, 70, 0.09) 0%, transparent 42%),
        radial-gradient(circle at 88% 22%, rgba(242, 169, 0, 0.08) 0%, transparent 38%),
        linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-main) 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(13, 127, 70, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(13, 127, 70, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, transparent 75%);
    pointer-events: none;
}

.hero-content {
    grid-template-columns: 1.04fr 0.96fr;
    gap: clamp(1.75rem, 3.5vw, 3.25rem);
    align-items: center;
}

.hero .page-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 7px 16px;
    margin-bottom: 1.15rem;
    border-radius: var(--br-pill);
    background: var(--bg-card);
    border: 1px solid var(--bank-border-lux);
    box-shadow: 0 2px 10px rgba(13, 127, 70, 0.07);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero .page-badge::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(242, 169, 0, 0.22);
    clip-path: none;
}

.hero-text h1 {
    font-size: clamp(2.05rem, 3.45vw, 3.05rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 1.1rem;
    max-width: 19ch;
}

.hero-text p {
    font-size: 1.06rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    max-width: 54ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.hero-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
}

.hero-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 20px -4px rgba(13, 127, 70, 0.35);
    border-color: transparent;
}

.hero-actions .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -4px rgba(13, 127, 70, 0.42);
}

.hero-actions .btn-secondary {
    background: var(--bg-card);
    border: 1.5px solid var(--bank-border-lux);
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(7, 41, 23, 0.05);
}

.hero-actions .btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 127, 70, 0.12);
}

.hero-actions .btn-primary-outline {
    background: rgba(13, 127, 70, 0.08);
    border: 1.5px solid rgba(13, 127, 70, 0.35);
    color: var(--primary);
}

.hero-actions .btn-primary-outline:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-1px);
}

.hero-trust-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.65rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--bank-border-lux);
    border-radius: 16px;
    box-shadow: 0 10px 28px -10px rgba(7, 41, 23, 0.08);
    max-width: 560px;
}

.hero-trust-metric:not(:first-child) {
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
}

.hero-trust-metric strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.hero-trust-metric span {
    display: block;
    margin-top: 3px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin-left: auto;
}

/* ==========================================================================
   Hero Institucional Panorámico (Opción 1 - Ancho Completo sin tarjeta SVG)
   ========================================================================== */
.hero-panoramic {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(0.75rem, 2vw, 1.75rem) 0 clamp(1.25rem, 2.5vw, 2.25rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-panoramic-header {
    max-width: 940px;
    margin: 0 auto 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-panoramic-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.42rem 1.15rem;
    border-radius: 999px;
    background: rgba(13, 127, 70, 0.08);
    border: 1px solid rgba(13, 127, 70, 0.22);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 1.15rem;
    box-shadow: 0 2px 6px rgba(13, 127, 70, 0.05);
}

.hero-panoramic-badge .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f2a900;
    box-shadow: 0 0 0 3px rgba(242, 169, 0, 0.25);
    flex-shrink: 0;
}

.hero-panoramic-header h1 {
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--text-main);
    margin: 0 0 1.1rem;
    max-width: 900px;
}

.hero-panoramic-lead {
    font-size: clamp(1rem, 1.3vw, 1.16rem);
    line-height: 1.68;
    color: var(--text-muted);
    margin: 0 0 1.65rem;
    max-width: 800px;
}

.hero-panoramic-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-bottom: 0.25rem;
}

/* 4-Pillar Panoramic Stats Grid */
.hero-panoramic-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 0.5rem;
    text-align: left;
}

.panoramic-stat-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.4rem 1.35rem 1.35rem;
    box-shadow: 0 8px 24px -6px rgba(7, 41, 23, 0.06), 0 2px 6px rgba(7, 41, 23, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

.panoramic-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 127, 70, 0.35);
    box-shadow: 0 16px 36px -8px rgba(7, 41, 23, 0.12), 0 4px 12px rgba(7, 41, 23, 0.04);
}

.panoramic-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.panoramic-stat-label {
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.panoramic-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 127, 70, 0.08);
    color: var(--primary);
    flex-shrink: 0;
}

.panoramic-stat-card:nth-child(2) .panoramic-stat-icon,
.panoramic-stat-card:nth-child(4) .panoramic-stat-icon {
    background: rgba(242, 169, 0, 0.12);
    color: #b87b00;
}

.panoramic-stat-icon .icon {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
}

.panoramic-stat-number {
    font-size: clamp(1.5rem, 2.1vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--primary);
    line-height: 1.15;
    margin-bottom: 0.35rem;
}

.panoramic-stat-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.panoramic-stat-desc {
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-muted);
    margin: 0;
    margin-top: auto;
}

/* Responsiveness */
@media screen and (max-width: 992px) {
    .hero-panoramic-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .hero-panoramic-header {
        margin-bottom: 1.75rem;
    }
}

@media screen and (max-width: 575px) {
    .hero-panoramic {
        padding: 0.5rem 0 1rem;
    }
    .hero-panoramic-header {
        margin-bottom: 1.15rem;
    }
    .hero-panoramic-badge {
        font-size: 0.72rem;
        padding: 0.3rem 0.75rem;
        margin-bottom: 0.75rem;
        gap: 0.45rem;
        max-width: 100%;
        line-height: 1.35;
    }
    .hero-panoramic-header h1 {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
        line-height: 1.22;
        letter-spacing: -0.02em;
        margin-bottom: 0.65rem;
    }
    .hero-panoramic-lead {
        font-size: 0.88rem;
        line-height: 1.5;
        margin-bottom: 1.15rem;
    }
    .hero-panoramic-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
    }
    .hero-panoramic-actions .btn {
        width: 100%;
        padding: 0.7rem 0.5rem;
        font-size: 0.86rem;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }
    .hero-panoramic-actions .btn:last-child {
        grid-column: 1 / -1;
        background: var(--bg-card);
        border: 1.5px solid var(--border-color);
        color: var(--text-main);
    }
    .hero-panoramic-actions .btn:last-child:hover {
        background: var(--primary);
        color: #ffffff;
    }

    /* 2x2 Grid for the 4 Stat Cards */
    .hero-panoramic-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        margin-top: 1rem;
    }
    .panoramic-stat-card {
        padding: 0.85rem 0.75rem;
        border-radius: 14px;
    }
    .panoramic-stat-top {
        margin-bottom: 0.35rem;
    }
    .panoramic-stat-label {
        font-size: 0.65rem;
        letter-spacing: 0.04em;
    }
    .panoramic-stat-icon {
        width: 24px;
        height: 24px;
        border-radius: 7px;
    }
    .panoramic-stat-icon .icon {
        width: 13px;
        height: 13px;
    }
    .panoramic-stat-number {
        font-size: 1.25rem;
        margin-bottom: 0.15rem;
    }
    .panoramic-stat-title {
        font-size: 0.78rem;
        margin-bottom: 0.15rem;
        line-height: 1.25;
    }
    .panoramic-stat-desc {
        display: none;
    }
}

/* Dark mode */
[data-theme="dark"] .hero-panoramic-badge {
    background: rgba(20, 150, 84, 0.16);
    border-color: rgba(20, 150, 84, 0.35);
    color: #4ade80;
}

[data-theme="dark"] .panoramic-stat-card {
    background: rgba(18, 28, 22, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .panoramic-stat-number {
    color: #4ade80;
}

[data-theme="dark"] .panoramic-stat-card:nth-child(2) .panoramic-stat-icon,
[data-theme="dark"] .panoramic-stat-card:nth-child(4) .panoramic-stat-icon {
    color: #f7c331;
}

[data-theme="dark"] .hero-panoramic-actions .btn-primary-outline,
[data-theme="dark"] .btn-primary-outline {
    background: rgba(20, 150, 84, 0.14);
    border-color: rgba(74, 222, 128, 0.45);
    color: #4ade80;
}

[data-theme="dark"] .hero-panoramic-actions .btn-primary-outline:hover,
[data-theme="dark"] .btn-primary-outline:hover {
    background: #149654;
    border-color: #149654;
    color: #ffffff;
}

.hero-content.hero-content-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1.25rem 0 1.75rem;
}

.hero-content-centered .hero-image-container {
    max-width: 780px;
    margin: 0 auto;
}

@media screen and (max-width: 992px) {
    .hero-content-centered .hero-image-container {
        max-width: 640px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 575px) {
    .hero-content-centered {
        padding: 0.5rem 0 1rem;
    }
    .hero-content-centered .hero-image-container {
        max-width: 100%;
        margin: 0 auto;
    }
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    border: 0;
}

@media screen and (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    .hero-text h1 {
        max-width: none;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-trust-metrics {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-image-container {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 480px) {
    .hero-trust-metrics {
        gap: 0.5rem;
        padding: 0.85rem;
    }
    .hero-trust-metric:not(:first-child) {
        padding-left: 0.5rem;
    }
    .hero-trust-metric strong {
        font-size: 1.05rem;
    }
}

/* 3. Dock Ejecutivo de Accesos Rápidos Bancarios */
.bank-quick-dock {
    position: relative;
    z-index: 10;
    margin-top: 0;
    padding: 1.5rem 0 0.5rem;
    background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-soft) 100%);
}

.bank-dock-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.bank-dock-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.15rem;
    padding: 1.5rem 1.45rem;
    background: var(--bg-card);
    border: 1px solid var(--bank-border-lux);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    color: var(--text-main);
    transition: transform var(--trans-normal), border-color var(--trans-fast), box-shadow var(--trans-normal);
    text-align: left;
    overflow: hidden;
}

.bank-dock-card::before,
.bank-dock-card:hover::before,
.service-card-animated::before,
.identity-card::before,
.branch-card::before,
.stats-grid::before {
    content: none !important;
    display: none !important;
}

.bank-dock-card:hover {
    transform: translateY(-5px);
    border-color: var(--bank-border-lux);
    box-shadow: var(--bank-shadow-card-hover);
    color: var(--text-main);
}

.bank-dock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(242, 169, 0, 0.12) 100%);
    color: var(--primary);
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: background var(--trans-fast), color var(--trans-fast), transform var(--trans-fast);
}

.bank-dock-card:hover .bank-dock-icon {
    background: var(--primary);
    color: #ffffff;
    transform: scale(1.05);
}

.bank-dock-text {
    width: 100%;
    min-width: 0;
}

.bank-dock-text strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    margin-bottom: 0.3rem;
}

.bank-dock-text span {
    display: block;
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.45;
    white-space: normal;
    overflow: visible;
}

.bank-dock-arrow {
    position: absolute;
    top: 1.35rem;
    right: 1.35rem;
    width: 32px;
    height: 32px;
    padding: 7px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text-muted);
    transition: transform var(--trans-fast), background var(--trans-fast), color var(--trans-fast);
}

.bank-dock-card:hover .bank-dock-arrow {
    transform: translateX(3px);
    background: var(--primary-soft);
    color: var(--primary);
}

@media screen and (max-width: 1024px) {
    .bank-dock-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 575px) {
    .bank-quick-dock {
        padding-top: 1rem;
    }
    .bank-dock-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
}

/* 4. Panel de Cifras Institucionales (Stats) con Acabado de Banca Privada */
.stats-grid {
    position: relative;
    border: 1px solid var(--bank-border-lux);
    box-shadow: var(--bank-shadow-elevated);
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-soft) 100%);
}

.stat-box {
    padding: 2.35rem 1.25rem;
}

.counter-number {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .counter-number {
    background: linear-gradient(135deg, #25d366 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 5. Tarjetas de Servicios e Identidad de Nivel Bancario */
.service-card-animated,
.identity-card,
.branch-card {
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform var(--trans-normal), box-shadow var(--trans-normal), border-color var(--trans-fast);
}

.service-card-animated:hover,
.identity-card:hover,
.branch-card:hover {
    transform: translateY(-6px);
    border-color: var(--bank-border-lux);
    box-shadow: var(--bank-shadow-card-hover);
}

/* Rediseño Ejecutivo de Misión, Visión y Valores (.identity) */
.identity-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 1.75rem;
    align-items: stretch;
}

.identity-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.85rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.identity-card .hex-icon {
    clip-path: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    margin-bottom: 1.15rem;
    font-size: 1.3rem;
}

.identity-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.65rem;
    letter-spacing: -0.015em;
}

.identity-card p {
    font-size: 0.98rem;
    line-height: 1.72;
    color: var(--text-muted);
    margin: 0;
}

.identity-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.25rem;
    padding: 0;
    list-style: none;
}

.identity-values li {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    padding: 0.58rem 0.75rem;
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
}

.identity-values li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.identity-values .icon {
    width: 18px;
    height: 18px;
    padding: 3px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    flex-shrink: 0;
}

/* Etiqueta ejecutiva de categoría y centrado de mascota en tarjetas de servicio */
.service-card-animated .service-card-media {
    position: relative;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(13, 127, 70, 0.10);
}

.service-card-animated .service-card-media.is-centered-mascot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    background:
        radial-gradient(circle at 50% 48%, rgba(242, 169, 0, 0.16) 0%, rgba(24, 168, 95, 0.08) 52%, transparent 75%),
        linear-gradient(135deg, #f2faf5 0%, #e3f4ec 55%, #d2ebe0 100%);
}

[data-theme="dark"] .service-card-animated .service-card-media.is-centered-mascot {
    background:
        radial-gradient(circle at 50% 48%, rgba(242, 169, 0, 0.18) 0%, rgba(24, 168, 95, 0.12) 52%, transparent 75%),
        linear-gradient(135deg, #0b2919 0%, #071f13 100%);
}

.service-card-animated .service-card-media.is-centered-mascot img {
    width: auto;
    height: 86%;
    max-width: 82%;
    margin: auto;
    object-fit: contain;
}

/* Quitar el cuadrito redundante de ícono cuando la tarjeta tiene ilustración o etiqueta ejecutiva */
.service-card-animated .service-card-media ~ .service-icon-animated,
.service-card-animated .service-category-tag ~ .service-icon-animated {
    display: none;
}

.service-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-bottom: 0.55rem;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    background: var(--primary-soft);
    border: 1px solid rgba(13, 127, 70, 0.16);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
}

.service-category-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent, #f2a900);
    box-shadow: 0 0 0 2px rgba(242, 169, 0, 0.22);
}

/* 6. Simulador Financiero Avanzado (Presets + Desglose Gráfico Interactivo) */
.calc-card {
    box-shadow: var(--bank-shadow-elevated);
    border: 1px solid var(--bank-border-lux);
    position: relative;
    overflow: hidden;
}

.calc-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.calc-preset-btn {
    padding: 5px 11px;
    border: 1px solid var(--border-color);
    border-radius: var(--br-pill);
    background: var(--bg-soft);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: all var(--trans-fast);
}

.calc-preset-btn:hover,
.calc-preset-btn.is-active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.calc-result-box {
    position: relative;
    background: radial-gradient(circle at 85% 15%, #146c3c 0%, var(--bank-emerald-deep) 85%);
    border: 1px solid rgba(245, 185, 37, 0.28);
    box-shadow: 0 18px 40px rgba(4, 25, 14, 0.28);
}

.calc-breakdown-chart {
    margin: 1.15rem 0 1.35rem;
    text-align: left;
}

.calc-bar-track {
    display: flex;
    width: 100%;
    height: 10px;
    border-radius: var(--br-pill);
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
    gap: 2px;
}

.calc-bar-principal {
    height: 100%;
    background: #ffffff;
    border-radius: var(--br-pill) 0 0 var(--br-pill);
    transition: width 0.25s ease;
}

.calc-bar-secondary {
    height: 100%;
    background: var(--bank-gold-bright);
    border-radius: 0 var(--br-pill) var(--br-pill) 0;
    transition: width 0.25s ease;
}

.calc-bar-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.82);
    font-variant-numeric: tabular-nums;
}

.calc-bar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.calc-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.calc-legend-dot--principal {
    background: #ffffff;
}

.calc-legend-dot--secondary {
    background: var(--bank-gold-bright);
}

.calc-cta {
    background: linear-gradient(135deg, var(--bank-gold-bright) 0%, #e09f00 100%);
    color: #162219;
    font-weight: 700;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.calc-cta:hover {
    background: linear-gradient(135deg, #ffd24c 0%, var(--bank-gold-bright) 100%);
    color: #162219;
    transform: translateY(-1px);
}

/* 7. Sección de Contacto e Ingreso de Socios con Sello de Confianza Bancaria */
.contact-section {
    position: relative;
    background: radial-gradient(circle at 15% 20%, #115e34 0%, var(--bank-emerald-deep) 75%);
    overflow: hidden;
}

.contact-card {
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Sello de Sujeto Obligado Registrado (UAF) */
.footer-col a.footer-uaf {
    display: inline-block;
    margin-top: 0.75rem;
    margin-bottom: 0;
    padding: 0;
    line-height: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

.footer-col a.footer-uaf:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.footer-uaf img {
    display: block;
    width: 87px;
    height: 108px;
}

.trust-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    transition: color var(--trans-fast);
}

.trust-list a:hover {
    color: var(--primary);
}

/* 8. Hitos Institucionales en "Quiénes Somos" (.about-facts) */
.about-facts dl {
    counter-reset: coop-fact;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding-left: 0;
    border-left: none;
    margin: 0;
}

.about-facts dl > div {
    counter-increment: coop-fact;
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 1.1rem;
    align-items: center;
    padding: 1.35rem 1.5rem;
    border-radius: 18px;
    border: 1px solid var(--bank-border-lux);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-soft) 100%);
    box-shadow: 0 10px 28px -10px rgba(7, 41, 23, 0.08);
    transition: transform var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.about-facts dl > div:hover {
    transform: translateX(4px);
    border-color: var(--primary);
    box-shadow: 0 14px 32px -10px rgba(13, 127, 70, 0.14);
}

.about-facts dl > div::before {
    content: "0" counter(coop-fact);
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--primary-soft);
    border: 1px solid rgba(13, 127, 70, 0.18);
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.about-facts dl > div:nth-child(2)::before {
    background: rgba(242, 169, 0, 0.14);
    border-color: rgba(242, 169, 0, 0.30);
    color: #b87d00;
}

[data-theme="dark"] .about-facts dl > div:nth-child(2)::before {
    color: var(--bank-gold-bright);
}

.about-facts dt {
    grid-column: 2;
    font-family: var(--font-heading);
    font-size: clamp(1.18rem, 2vw, 1.42rem);
    font-weight: 700;
    line-height: 1.22;
    color: var(--text-main);
    margin: 0;
}

.about-facts dd {
    grid-column: 2;
    margin: 0.2rem 0 0;
    font-size: 0.94rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* 9. Selector de Modalidad de Préstamo en la Calculadora */
.calc-type-selector {
    margin-bottom: 1.65rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--border-color);
}

.calc-type-label {
    display: block;
    margin-bottom: 0.65rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.calc-type-pills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

@media screen and (max-width: 575px) {
    .calc-type-pills {
        grid-template-columns: 1fr;
    }
}

.calc-type-btn {
    padding: 0.62rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-soft);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--trans-fast);
}

.calc-type-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.calc-type-btn.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 6px 16px -4px rgba(13, 127, 70, 0.35);
}

/* 10. Tarjetas Ejecutivas de Sucursales (#sucursales) */
.branch-card {
    border-radius: 22px;
    border: 1px solid var(--bank-border-lux);
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-soft) 100%);
    padding: 2rem 1.85rem;
}

.branch-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    margin-bottom: 0.7rem;
    padding: 0.25rem 0.72rem;
    border-radius: 999px;
    background: var(--primary-soft);
    border: 1px solid rgba(13, 127, 70, 0.16);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.branch-card h3 {
    font-size: 1.32rem;
    margin-bottom: 0.55rem;
}

.branch-address {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.85rem;
}

.branch-hours {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 1.25rem;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.branch-hours .icon {
    width: 16px;
    height: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.branch-actions {
    width: 100%;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    justify-content: space-between;
    align-items: center;
}

/* 11. Sección "Cómo funciona" (#conoce / .ah-intro.sv-rich) y Plan de Solidaridad Familiar */
.ah-intro.sv-rich {
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(2rem, 3.5vw, 2.75rem);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    color: var(--text-muted);
    font-size: 1.06rem;
    line-height: 1.8;
}

.ah-intro.sv-rich > p:first-of-type {
    color: var(--text-main);
    font-size: clamp(1.06rem, 1.4vw, 1.16rem);
    line-height: 1.8;
}

.ah-intro.sv-rich h3 {
    font-size: 1.18rem;
    color: var(--text-main);
    margin-top: 1.65rem;
    margin-bottom: 0.75rem;
}

.sv-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 1.75rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sv-summary-strip dt {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.sv-summary-strip dd {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
}

@media screen and (max-width: 720px) {
    .sv-summary-strip {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}



