/* ==========================================================================
   RC Omnia — Hoja de estilos principal
   --------------------------------------------------------------------------
   Comercializadora de luz y gas.
   Build: 2025  ·  Stack: HTML + CSS + JS vanilla (sin frameworks)
   --------------------------------------------------------------------------
   Estructura:
     1.  Variables y tokens
     2.  Reset y base
     3.  Tipografía
     4.  Utilidades (container, reveal, botones)
     5.  Cookie banner
     6.  Header
     7.  Hero (con canvas de partículas)
     8.  Franja de logos (carrusel infinito)
     9.  Sección "¿Por qué RC Omnia?"
    10.  Sección Conócenos
    11.  Bloque de citas inspiracionales
    12.  Sección Luz
    13.  Sección Gas
    14.  Franja de contadores
    15.  Sección Comparador
    16.  Sección Trabaja con nosotros
    17.  Sección Contacto
    18.  Footer
    19.  Wrappers Elfsight
    20.  Responsive (1024 / 768 / 480)
    21.  Reduced motion
   ========================================================================== */


/* ==========================================================================
   1. Variables y tokens
   ========================================================================== */
:root {
    /* Colores de marca */
    --color-primary:        #00CFA7;
    --color-primary-hover:  #007C64;
    --color-primary-soft:   rgba(0, 207, 167, 0.12);
    --color-primary-glow:   rgba(0, 207, 167, 0.45);
    --color-logo:           #4DCAD0;

    /* Fondos */
    --color-bg:             #FFFFFF;
    --color-bg-alt:         #f8f9fa;
    --color-bg-cream:       #EDE8E1;
    --color-bg-dark:        #0a0a0f;
    --color-bg-dark-alt:    #111118;

    /* Texto */
    --color-text:           #222222;
    --color-text-secondary: #6b7280;
    --color-text-light:     rgba(255, 255, 255, 0.92);
    --color-text-light-2:   rgba(255, 255, 255, 0.65);

    /* Líneas */
    --color-border:         rgba(0, 0, 0, 0.08);
    --color-border-dark:    rgba(255, 255, 255, 0.08);

    /* Tipografía */
    --font-main:    'Raleway', system-ui, -apple-system, sans-serif;
    --font-serif:   'Lora', Georgia, serif;

    /* Layout */
    --container:    1200px;
    --container-wide: 1400px;
    --radius-sm:    8px;
    --radius:       16px;
    --radius-lg:    24px;

    /* Sombras */
    --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow:       0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg:    0 25px 60px rgba(0, 0, 0, 0.15);
    --shadow-glow:  0 0 40px var(--color-primary-glow);

    /* Transiciones */
    --ease:         cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast:       180ms var(--ease);
    --t-base:       320ms var(--ease);
    --t-slow:       600ms var(--ease);
}


/* ==========================================================================
   2. Reset y base
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-main);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

::selection {
    background: var(--color-primary);
    color: #fff;
}


/* ==========================================================================
   3. Tipografía
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: inherit;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { font-size: 1rem; }

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-title {
    position: relative;
    margin-bottom: 1.5rem;
}

.section-title::before {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    margin-bottom: 1.25rem;
    border-radius: 2px;
}

.section-title.is-centered {
    text-align: center;
}
.section-title.is-centered::before {
    margin-left: auto;
    margin-right: auto;
}


/* ==========================================================================
   4. Utilidades
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
}

.section {
    padding: clamp(4rem, 9vw, 7rem) 0;
}

/* Animación reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 800ms var(--ease), transform 800ms var(--ease);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="300"] { transition-delay: 300ms; }
.reveal[data-delay="400"] { transition-delay: 400ms; }

/* Botón principal */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.25rem;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    transition: transform var(--t-fast), box-shadow var(--t-base), background var(--t-base), color var(--t-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 207, 167, 0.3);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 207, 167, 0.45), var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-glow {
    position: relative;
    background: var(--color-primary);
    color: #fff;
    box-shadow:
        0 8px 24px rgba(0, 207, 167, 0.35),
        0 0 0 0 rgba(0, 207, 167, 0);
    animation: pulseGlow 3s ease-in-out infinite;
}

.btn-glow:hover {
    background: var(--color-primary-hover);
    transform: translateY(-3px);
    animation: none;
    box-shadow: 0 15px 40px rgba(0, 207, 167, 0.5), 0 0 60px rgba(0, 207, 167, 0.4);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 8px 24px rgba(0, 207, 167, 0.35), 0 0 0 0 rgba(0, 207, 167, 0.4); }
    50%      { box-shadow: 0 8px 24px rgba(0, 207, 167, 0.35), 0 0 0 20px rgba(0, 207, 167, 0); }
}


/* ==========================================================================
   5. Cookie banner
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    max-width: 380px;
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    transform: translateY(120%);
    opacity: 0;
    transition: transform 500ms var(--ease), opacity 500ms var(--ease);
}

.cookie-banner.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-banner h4 {
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.cookie-banner p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

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

.cookie-actions {
    display: flex;
    gap: 0.5rem;
}

.cookie-actions button {
    flex: 1;
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 999px;
    transition: all var(--t-fast);
}

.cookie-accept {
    background: var(--color-primary);
    color: #fff;
}
.cookie-accept:hover {
    background: var(--color-primary-hover);
}

.cookie-reject {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}
.cookie-reject:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}


/* ==========================================================================
   6. Header
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: background var(--t-base), padding var(--t-base), box-shadow var(--t-base);
}

.header.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.8rem 0;
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    transition: color var(--t-base);
}

.logo span {
    color: var(--color-logo);
}

.header.is-scrolled .logo {
    color: var(--color-text);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    position: relative;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    padding: 0.5rem 0;
    transition: color var(--t-fast);
}

.header.is-scrolled .nav a {
    color: var(--color-text);
}

.nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--t-base);
}

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

.nav a:hover::after {
    width: 100%;
}

/* Hamburger */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 1100;
}

.nav-toggle span {
    width: 28px;
    height: 2px;
    background: #fff;
    transition: transform var(--t-base), background var(--t-base), opacity var(--t-base);
    border-radius: 2px;
}

.header.is-scrolled .nav-toggle span {
    background: var(--color-text);
}

.nav-toggle.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* ==========================================================================
   7. Hero
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-dark);
    overflow: hidden;
    color: #fff;
    isolation: isolate;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}

.hero::before {
    /* Vignette suave en los bordes */
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 880px;
    padding: 0 24px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.75rem;
    animation: fadeInUp 1s var(--ease) 0.2s both;
}

.hero-title {
    font-size: clamp(3.5rem, 11vw, 8rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    background: linear-gradient(120deg,
        #00CFA7 0%,
        #4DCAD0 35%,
        #80E5D4 55%,
        #4DCAD0 75%,
        #00CFA7 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation:
        fadeInUp 1s var(--ease) 0.4s both,
        gradientShift 8s ease-in-out infinite 1s;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.82);
    max-width: 620px;
    margin: 0 auto 2.75rem;
    line-height: 1.55;
    animation: fadeInUp 1s var(--ease) 0.6s both;
}

.hero-cta {
    animation: fadeInUp 1s var(--ease) 0.8s both;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    animation: fadeIn 1.5s ease 1.2s both, bounce 2.5s ease-in-out infinite 2s;
}

.hero-scroll::after {
    content: '';
    display: block;
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0.75rem auto 0;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, -8px); }
}


/* ==========================================================================
   Partner strip (Securitas Direct)
   ========================================================================== */
.partner {
    background: var(--color-bg-dark);
    padding: clamp(2.75rem, 5vw, 4rem) 0;
}

.partner-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.partner-eyebrow {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-light-2);
    opacity: 0.85;
}

.partner-logo {
    height: clamp(110px, 16vw, 180px);
    width: auto;
    max-width: 90%;
    object-fit: contain;
}


/* ==========================================================================
   8. Franja de logos (carrusel infinito)
   ========================================================================== */
.logos-strip {
    background: #fff;
    padding: 3rem 0;
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.logos-strip h3 {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
}

.logos-track-wrap {
    position: relative;
    overflow: hidden;
    /* Difuminado lateral suave */
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.logos-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    align-items: center;
    animation: scrollLogos 50s linear infinite;
}

.logos-track:hover {
    animation-play-state: paused;
}

.logos-track img {
    height: 70px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    opacity: 0.85;
    filter: grayscale(10%);
    transition: opacity var(--t-base), filter var(--t-base);
    user-select: none;
    -webkit-user-drag: none;
}

.logos-track img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

@keyframes scrollLogos {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}


/* ==========================================================================
   9. Sección "¿Por qué RC Omnia?"
   ========================================================================== */
.porque {
    background: var(--color-bg-dark-alt);
    color: var(--color-text-light);
    position: relative;
    overflow: hidden;
}

.porque::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--color-primary-soft) 0%, transparent 70%);
    pointer-events: none;
}

.porque .container {
    position: relative;
    z-index: 1;
}

.porque .section-title {
    color: #fff;
}

.porque .section-intro {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 4rem;
}

.porque-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.porque-card {
    position: relative;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(0, 207, 167, 0.18);
    border-radius: var(--radius);
    transition: transform var(--t-base), border-color var(--t-base), background var(--t-base), box-shadow var(--t-base);
    overflow: hidden;
}

.porque-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary-soft) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--t-base);
    pointer-events: none;
}

.porque-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-primary);
    background: rgba(0, 207, 167, 0.04);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 207, 167, 0.15);
}

.porque-card:hover::before {
    opacity: 1;
}

.porque-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(0, 207, 167, 0.1);
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    position: relative;
}

.porque-card-icon svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
}

.porque-card h3 {
    color: #fff;
    margin-bottom: 0.85rem;
    font-size: 1.2rem;
}

.porque-card p {
    color: var(--color-text-light-2);
    font-size: 0.95rem;
    line-height: 1.65;
    position: relative;
}


/* ==========================================================================
   10. Sección Conócenos
   ========================================================================== */
.conocenos {
    background: var(--color-bg);
}

.conocenos-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 4.5rem;
    align-items: center;
}

.conocenos-img {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 5;
}

.conocenos-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

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

.conocenos-img::after {
    /* Borde decorativo turquesa flotante */
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: calc(var(--radius-lg) - 8px);
    pointer-events: none;
}

.conocenos-text p {
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1.02rem;
}

.conocenos-text p:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   11. Bloque de citas inspiracionales
   ========================================================================== */
.quotes {
    background: var(--color-bg-alt);
    padding: clamp(4rem, 8vw, 6rem) 0;
    position: relative;
    overflow: hidden;
}

.quotes::before,
.quotes::after {
    /* Comillas decorativas gigantes */
    content: '\201C';
    position: absolute;
    font-family: var(--font-serif);
    font-size: 24rem;
    line-height: 1;
    color: var(--color-primary-soft);
    pointer-events: none;
    user-select: none;
}

.quotes::before {
    top: -3rem;
    left: -2rem;
}

.quotes::after {
    bottom: -16rem;
    right: -2rem;
    transform: rotate(180deg);
}

.quotes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.quote {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-base), box-shadow var(--t-base);
}

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

.quote blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 1.25rem;
}

.quote cite {
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-primary);
}


/* ==========================================================================
   12. Sección Luz
   ========================================================================== */
.luz {
    position: relative;
    background: var(--color-bg-dark);
    color: var(--color-text-light);
    overflow: hidden;
    isolation: isolate;
}

.luz::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/farola-2.jpg') center/cover no-repeat;
    opacity: 0.25;
    z-index: -2;
}

.luz::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(10, 10, 15, 0.85) 0%,
        rgba(10, 10, 15, 0.92) 100%);
    z-index: -1;
}

.luz .section-title { color: #fff; }

.luz .section-intro {
    max-width: 720px;
    margin-bottom: 3.5rem;
    color: var(--color-text-light);
    font-size: 1.05rem;
}

.luz-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.luz-card {
    padding: 2.25rem 1.75rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    transition: transform var(--t-base), background var(--t-base), border-color var(--t-base);
}

.luz-card:hover {
    transform: translateY(-6px);
    background: rgba(0, 207, 167, 0.08);
    border-color: var(--color-primary);
}

.luz-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    margin-bottom: 1.25rem;
}

.luz-card-icon svg {
    width: 30px;
    height: 30px;
}

.luz-card h4 {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 0;
    line-height: 1.4;
}


/* ==========================================================================
   13. Sección Gas
   ========================================================================== */
.gas {
    background: var(--color-bg);
}

.gas-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 4.5rem;
    align-items: center;
}

.gas-text p {
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1.02rem;
}

.gas-img {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 5;
}

.gas-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

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


/* ==========================================================================
   14. Franja de contadores
   ========================================================================== */
.counters {
    background: linear-gradient(135deg, #007C64 0%, #00CFA7 100%);
    color: #fff;
    padding: clamp(3.5rem, 7vw, 5rem) 0;
    position: relative;
    overflow: hidden;
}

.counters::before {
    /* Patrón geométrico sutil */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.counters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
    text-align: center;
}

.counter-item .counter-value {
    display: block;
    font-size: clamp(2.8rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.counter-item .counter-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}


/* ==========================================================================
   15. Sección Comparador
   ========================================================================== */
.comparador {
    background: var(--color-bg-alt);
    text-align: center;
}

.comparador .section-title {
    margin-inline: auto;
}

.comparador .section-intro {
    max-width: 720px;
    margin: 0 auto 3rem;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
}

.comparador-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem 3rem;
    margin-bottom: 3.5rem;
    padding: 2.5rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.comparador-logos img {
    flex: 0 0 auto;
    height: 42px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    opacity: 0.75;
    filter: grayscale(20%);
    transition: opacity var(--t-base), filter var(--t-base), transform var(--t-base);
}

.comparador-logos img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.08);
}


/* ==========================================================================
   16. Sección Trabaja con nosotros
   ========================================================================== */
.trabaja {
    background: var(--color-bg-cream);
    position: relative;
}

.trabaja .section-title {
    margin-inline: auto;
}

.trabaja-intro {
    max-width: 720px;
    margin: 0 auto 3rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
}

.trabaja-form-wrap {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius);
    padding: clamp(1.5rem, 4vw, 3rem);
    box-shadow: var(--shadow);
}


/* ==========================================================================
   17. Sección Contacto
   ========================================================================== */
.contacto {
    background: var(--color-bg);
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.contacto-info {
    position: sticky;
    top: 100px;
}

.contacto-info > p {
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.contacto-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.contacto-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.contacto-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contacto-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.contacto-list .contacto-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 0.25rem;
}

.contacto-list .contacto-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    transition: color var(--t-fast);
    line-height: 1.5;
}

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

.contacto-form-wrap {
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 4vw, 3rem);
    box-shadow: var(--shadow-sm);
}


/* ==========================================================================
   18. Footer
   ========================================================================== */
.footer {
    background: var(--color-bg-dark);
    color: var(--color-text-light);
    padding: 4.5rem 0 0;
    position: relative;
}

.footer::before {
    /* Línea superior degradada turquesa */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-primary) 25%,
        var(--color-logo) 50%,
        var(--color-primary) 75%,
        transparent 100%);
}

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

.footer .logo {
    color: #fff;
    font-size: 1.75rem;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.footer-about p {
    color: var(--color-text-light-2);
    font-size: 0.95rem;
    line-height: 1.65;
}

.footer h5 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-links a {
    color: var(--color-text-light-2);
    font-size: 0.95rem;
    transition: color var(--t-fast), padding-left var(--t-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
    padding-left: 6px;
}

.footer-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-contact li {
    color: var(--color-text-light-2);
    font-size: 0.95rem;
    line-height: 1.55;
}

.footer-contact a {
    color: inherit;
    transition: color var(--t-fast);
}

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

.footer-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2.5rem 0 2rem;
    border-top: 1px solid var(--color-border-dark);
}

.footer-partner-text {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-light-2);
    opacity: 0.75;
}

.footer-partner img {
    height: clamp(70px, 9vw, 95px);
    width: auto;
    max-width: 90%;
    object-fit: contain;
    opacity: 0.95;
    transition: opacity var(--t-fast);
}

.footer-partner img:hover {
    opacity: 1;
}

.footer-bottom {
    padding: 1.25rem 0 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-light-2);
}


/* ==========================================================================
   19. Wrappers Elfsight
   --------------------------------------------------------------------------
   Los widgets de Elfsight traen su propio CSS. Encapsulamos para que no
   rompan el flujo, y forzamos algunos overrides suaves.
   ========================================================================== */
.elfsight-wrapper {
    width: 100%;
}

.elfsight-wrapper [class*="elfsight-app-"] {
    min-height: 200px;
}


/* ==========================================================================
   20. Responsive
   ========================================================================== */

/* — Tablet landscape — */
@media (max-width: 1024px) {

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

    .conocenos-grid,
    .gas-grid,
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .conocenos-img,
    .gas-img {
        max-width: 520px;
        margin: 0 auto;
        aspect-ratio: 5 / 4;
    }

    .contacto-info {
        position: static;
    }

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

    .footer-about {
        grid-column: 1 / -1;
    }
}

/* Tablet — centrar el 3er elemento huérfano cuando son 2 columnas */
@media (min-width: 769px) and (max-width: 1024px) {

    .porque-grid > .porque-card:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: calc(50% - 0.875rem);   /* mitad del ancho menos mitad del gap (1.75rem) */
        width: 100%;
    }

    .luz-cards > .luz-card:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: calc(50% - 0.75rem);    /* mitad del ancho menos mitad del gap (1.5rem) */
        width: 100%;
    }
}

/* — Tablet portrait / móvil grande — */
@media (max-width: 768px) {

    .nav-toggle {
        display: inline-flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(82%, 360px);
        background: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 6rem 2.5rem 2.5rem;
        box-shadow: -20px 0 40px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform var(--t-base);
        z-index: 1050;
    }

    .nav.is-open {
        transform: translateX(0);
    }

    .nav a {
        color: var(--color-text);
        font-size: 1rem;
    }

    .header.is-scrolled .nav a,
    .nav a {
        color: var(--color-text);
    }

    body.no-scroll {
        overflow: hidden;
    }

    .porque-grid,
    .luz-cards,
    .quotes-grid {
        grid-template-columns: 1fr;
    }

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

    .comparador-logos {
        gap: 2rem 1.5rem;
        padding: 1.75rem;
    }

    .comparador-logos img {
        height: 36px;
    }

    .cookie-banner {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }

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

    .footer-about {
        grid-column: auto;
    }

    .quotes::before,
    .quotes::after {
        font-size: 14rem;
    }
}

/* — Móvil pequeño — */
@media (max-width: 480px) {

    .container {
        padding-inline: 18px;
    }

    .hero-title {
        font-size: clamp(2.8rem, 18vw, 4.5rem);
    }

    .hero-eyebrow {
        font-size: 0.72rem;
        letter-spacing: 0.25em;
    }

    .btn {
        padding: 0.9rem 1.75rem;
        font-size: 0.85rem;
    }

    .comparador-logos {
        gap: 1.5rem 1rem;
    }

    .quote {
        padding: 1.75rem 1.5rem;
    }

    .quote blockquote {
        font-size: 1.05rem;
    }

    .logos-track {
        gap: 2.5rem;
    }

    .logos-track img {
        height: 52px;
        max-width: 170px;
    }
}


/* ==========================================================================
   21. Reduced motion — accesibilidad
   ========================================================================== */
/* ==========================================================================
   22. Páginas de comercial (mikel.html / sonia.html)
   --------------------------------------------------------------------------
   Reutilizan todo el resto del CSS (variables, footer, partner, etc.).
   Solo necesitan estos estilos extra:
   ========================================================================== */

/* Link "Volver" flotante en esquina superior izquierda */
.back-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--t-fast);
}

.back-link::before {
    content: '←';
    font-size: 1rem;
    transition: transform var(--t-fast);
}

.back-link:hover {
    background: rgba(0, 207, 167, 0.15);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.back-link:hover::before {
    transform: translateX(-3px);
}

/* Hero del agente */
.agent-hero {
    position: relative;
    background: var(--color-bg-dark);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(5rem, 10vw, 7rem) 0 clamp(3.5rem, 7vw, 5rem);
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.agent-hero::before {
    /* Vignette suave */
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
    pointer-events: none;
}

.agent-hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.agent-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}

.agent-photo {
    position: relative;
    width: clamp(150px, 20vw, 210px);
    height: clamp(150px, 20vw, 210px);
    margin: 0 auto 2rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(0, 207, 167, 0.55);
    box-shadow:
        0 0 0 6px rgba(0, 207, 167, 0.08),
        0 20px 50px rgba(0, 0, 0, 0.45),
        0 0 80px rgba(0, 207, 167, 0.28);
    animation: photoFadeIn 1s var(--ease) 0.2s both;
}

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

@keyframes photoFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.agent-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.25rem;
    animation: fadeInUp 1s var(--ease) 0.4s both;
}

.agent-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(120deg,
        #00CFA7 0%,
        #4DCAD0 35%,
        #80E5D4 55%,
        #4DCAD0 75%,
        #00CFA7 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation:
        fadeInUp 1s var(--ease) 0.5s both,
        gradientShift 8s ease-in-out infinite 1.5s;
}

.agent-bio {
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.82);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeInUp 1s var(--ease) 0.7s both;
}

/* Sección del calendario */
.calendar-section {
    background: var(--color-bg);
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.calendar-section .section-title {
    text-align: center;
    margin-bottom: 0.65rem;
}

.calendar-section .section-title::before {
    margin-left: auto;
    margin-right: auto;
}

.calendar-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    font-size: 1rem;
}

.calendar-wrap {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.calendar-iframe {
    display: block;
    width: 100%;
    height: 780px;
    border: 0;
}

/* Responsive específico */
@media (max-width: 768px) {
    .calendar-iframe { height: 720px; }
    .back-link      { font-size: 0.76rem; padding: 0.4rem 0.85rem; top: 1rem; left: 1rem; }
    .agent-hero     { min-height: auto; }
}

@media (max-width: 480px) {
    .calendar-iframe { height: 680px; }
}


/* ==========================================================================
   23. Páginas legales (privacidad.html y similares)
   --------------------------------------------------------------------------
   Diseño funcional, optimizado para lectura de textos legales densos.
   ========================================================================== */

/* Mini hero compacto para páginas legales */
.page-hero {
    background: var(--color-bg-dark);
    color: #fff;
    padding: clamp(7rem, 14vw, 9rem) 0 clamp(3rem, 5vw, 4rem);
    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.page-hero::before {
    /* Sutil resplandor turquesa al fondo */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 207, 167, 0.12) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.75rem;
    color: #fff;
}

.page-hero .page-meta {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-light-2);
}

/* Contenedor principal del contenido legal */
.legal {
    background: var(--color-bg);
    padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(4rem, 8vw, 6rem);
}

.legal-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Tabla de contenidos */
.legal-toc {
    background: var(--color-bg-alt);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-sm);
    padding: 1.5rem 1.75rem;
    margin-bottom: 3rem;
}

.legal-toc-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.legal-toc ol {
    list-style: none;
    counter-reset: toc;
    padding: 0;
    margin: 0;
}

.legal-toc li {
    counter-increment: toc;
    padding: 0.3rem 0;
    line-height: 1.4;
}

.legal-toc li::before {
    content: counter(toc) ".";
    color: var(--color-primary);
    font-weight: 700;
    margin-right: 0.5rem;
}

.legal-toc a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--t-fast);
}

.legal-toc a:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Contenido del cuerpo legal */
.legal-content {
    font-size: 1.0625rem;       /* 17px */
    line-height: 1.75;
    color: var(--color-text);
}

.legal-content p {
    margin-bottom: 1.25rem;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text);
    margin: 3rem 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary);
    /* Que no quede oculto bajo el header fijo al hacer click en TOC */
    scroll-margin-top: 100px;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 2rem 0 0.75rem;
    scroll-margin-top: 100px;
}

.legal-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-word;
}

.legal-content a:hover {
    color: var(--color-primary-hover);
}

.legal-content strong {
    font-weight: 700;
}

/* Bloque de contacto destacado al inicio o final */
.legal-contact-box {
    background: var(--color-primary-soft);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.legal-contact-box strong {
    color: var(--color-primary-hover);
}

/* Botón "Volver arriba" flotante */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 10px 30px rgba(0, 207, 167, 0.35);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--t-base);
    z-index: 900;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-hover);
    transform: translateY(-3px);
}

@media (max-width: 480px) {
    .legal-toc { padding: 1.25rem 1.4rem; }
    .legal-content { font-size: 1rem; }
    .legal-content h2 { font-size: 1.1rem; }
    .back-to-top { bottom: 16px; right: 16px; }
}


/* ==========================================================================
   24. Reduced motion — accesibilidad
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .logos-track {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .hero-canvas,
    .agent-canvas {
        display: none;
    }
}
