/* =================================================================
   ProPhysio Xela — Design System
   Rebuild: arquitectura limpia, BEM, sin !important innecesario.
   ================================================================= */

:root {
    /* Marca */
    --teal:        #00A9C8;
    --teal-600:    #0090AB;
    --teal-700:    #007C93;
    --teal-50:     #E6F7FB;
    --teal-100:    #C7EEF6;

    /* Neutros */
    --ink:         #0E1A23;   /* títulos */
    --body:        #4A5963;   /* texto */
    --muted:       #7A8A94;
    --line:        #E6EBEF;
    --bg:          #FFFFFF;
    --bg-alt:      #F5F9FB;
    --dark:        #0E1A23;

    --success:     #16A34A;

    /* Sombras */
    --shadow-sm:   0 1px 2px rgba(14,26,35,.06), 0 1px 1px rgba(14,26,35,.04);
    --shadow:      0 12px 30px -14px rgba(14,26,35,.22);
    --shadow-lg:   0 28px 60px -24px rgba(14,26,35,.35);
    --shadow-teal: 0 14px 30px -12px rgba(0,169,200,.45);

    /* Forma */
    --radius:      18px;
    --radius-sm:   12px;
    --radius-pill: 999px;

    /* Layout */
    --container:   1200px;
    --gutter:      clamp(1.1rem, 4vw, 2.2rem);

    /* Movimiento */
    --ease:        cubic-bezier(.22,.61,.36,1);
    --t-fast:      .2s;
    --t:           .35s;

    --header-h:    76px;
    --font:        'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
    font-family: var(--font);
    color: var(--body);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.18; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

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

#mainPage section[id] { scroll-margin-top: calc(var(--header-h) + 14px); }

/* ---------- Layout utils ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.section--alt { background: var(--bg-alt); }

.section__head { max-width: 720px; margin: 0 auto clamp(2.2rem, 5vw, 3.5rem); text-align: center; }
.section__subtitle { color: var(--muted); font-size: 1.05rem; margin-top: .7rem; }

.eyebrow, .hero__eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--teal-700);
    background: var(--teal-50);
    padding: .4rem .9rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}

.text-accent { color: var(--teal); }

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
    transition-delay: var(--d, 0s);
    will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    * { animation-duration: .001ms !important; }
}

/* ---------- Buttons ---------- */
.btn {
    --bg-btn: var(--teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    padding: .95rem 1.7rem;
    border-radius: var(--radius-pill);
    transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
    white-space: nowrap;
    text-align: center;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--sm { padding: .7rem 1.25rem; font-size: .92rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--teal); color: #fff; box-shadow: var(--shadow-teal); }
.btn--primary:hover { background: var(--teal-600); transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(0,169,200,.55); }

.btn--ghost { background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.55); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: #fff; color: var(--teal-700); border-color: #fff; transform: translateY(-2px); }

.btn--light { background: #fff; color: var(--teal-700); box-shadow: var(--shadow); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn--whatsapp { background: #25D366; color: #fff; }
.btn--whatsapp:hover { background: #1ebe5a; transform: translateY(-2px); }

/* ---------- Loader ---------- */
.loader {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4rem;
    background: #fff;
    transition: opacity .5s ease, visibility .5s ease;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader__logo { width: clamp(120px, 30vw, 180px); height: auto; animation: floatPulse 1.8s ease-in-out infinite; }
.loader__bar { width: 140px; height: 3px; border-radius: 3px; background: var(--teal-50); overflow: hidden; position: relative; }
.loader__bar::after { content: ''; position: absolute; inset: 0; width: 40%; border-radius: 3px; background: var(--teal); animation: loadSlide 1.1s var(--ease) infinite; }
@keyframes loadSlide { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes floatPulse { 0%,100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-8px); opacity: .85; } }

/* ---------- Particles (sutil) ---------- */
#particles-js {
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none;
    opacity: .35;
}

/* Asegura que el contenido quede por encima de partículas */
.header, #mainPage, #appointmentPage, .footer { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    height: var(--header-h);
    display: flex; align-items: center;
    transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease), height var(--t) var(--ease);
}
.header.is-scrolled {
    background: rgba(255,255,255,.88);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 0 var(--line), 0 8px 30px -22px rgba(14,26,35,.4);
}
.nav { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.logo { display: flex; align-items: center; gap: .7rem; }
.logo__img { height: 42px; width: auto; transition: transform var(--t) var(--ease); }
.logo:hover .logo__img { transform: scale(1.06) rotate(-3deg); }
.logo__text { font-weight: 700; font-size: 1.15rem; color: #fff; letter-spacing: -.01em; transition: color var(--t) var(--ease); }
.logo__text strong { color: var(--teal); font-weight: 800; }
.header.is-scrolled .logo__text { color: var(--ink); }

.nav__menu { display: flex; align-items: center; gap: 2rem; }
.nav__link {
    color: rgba(255,255,255,.92); font-weight: 600; font-size: .98rem; position: relative; padding: .3rem 0;
    transition: color var(--t-fast) var(--ease);
}
.nav__link::after {
    content: ''; position: absolute; left: 0; bottom: -3px; height: 2px; width: 100%;
    background: var(--teal); border-radius: 2px;
    transform: scaleX(0); transform-origin: right; transition: transform var(--t) var(--ease);
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.header.is-scrolled .nav__link { color: var(--body); }
.header.is-scrolled .nav__link:hover { color: var(--teal-700); }

.nav__contact { display: flex; align-items: center; gap: 1.3rem; }
.nav__phone { color: #fff; font-weight: 700; font-size: .98rem; transition: color var(--t-fast) var(--ease); }
.nav__phone i { color: var(--teal); margin-right: .3rem; }
.header.is-scrolled .nav__phone { color: var(--ink); }
.nav__phone:hover { color: var(--teal); }

/* Hamburger */
.hamburger { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 6px; align-items: center; }
.hamburger span { display: block; width: 26px; height: 2.5px; border-radius: 3px; background: #fff; transition: transform var(--t) var(--ease), opacity var(--t) var(--ease), background var(--t) var(--ease); }
.header.is-scrolled .hamburger span { background: var(--ink); }
.hamburger.is-active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; }
.hero__slider { position: absolute; inset: 0; }
.hero__slide {
    position: absolute; inset: 0;
    display: flex; align-items: center;
    opacity: 0; visibility: hidden;
    transition: opacity 1s var(--ease), visibility 1s var(--ease);
}
/* Capa de imagen: es lo ÚNICO que se mueve. El texto queda fijo. */
.hero__bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
    transform: scale(1.12);
    will-change: transform;
}
.hero__slide::before {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(100deg, rgba(8,18,25,.82) 0%, rgba(8,18,25,.5) 45%, rgba(8,18,25,.15) 100%);
}
.hero__slide.is-active { opacity: 1; visibility: visible; }

/* Movimiento continuo de la imagen: ken-burns + paneo lateral.
   Cada slide se mueve distinto para dar dinamismo profesional. */
.hero__slide:nth-child(1).is-active .hero__bg { animation: kbZoomRight 16s ease-in-out infinite alternate; }
.hero__slide:nth-child(2).is-active .hero__bg { animation: kbPanSide   18s ease-in-out infinite alternate; }
.hero__slide:nth-child(3).is-active .hero__bg { animation: kbZoomLeft  16s ease-in-out infinite alternate; }

@keyframes kbZoomRight {
    0%   { transform: scale(1.18) translate(-4%, 1.5%); }
    100% { transform: scale(1.06) translate(4%, -2.5%); }
}
@keyframes kbPanSide {
    0%   { transform: scale(1.2) translateX(-6%); }
    100% { transform: scale(1.2) translateX(6%); }
}
@keyframes kbZoomLeft {
    0%   { transform: scale(1.18) translate(4%, 1.5%); }
    100% { transform: scale(1.06) translate(-4%, -2.5%); }
}

.hero__content {
    position: relative; z-index: 2; max-width: 680px;
    /* Panel oscuro translúcido con desenfoque: hace legible el texto sin tapar la imagen */
    padding: clamp(1.5rem, 2.6vw, 2.3rem) clamp(1.6rem, 2.8vw, 2.6rem);
    background: rgba(8, 16, 22, .3);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    border-radius: 22px;
}
.hero__content > * { opacity: 0; transform: translateY(40px); }
.hero__slide.is-active .hero__content > * { animation: heroIn .9s var(--ease) forwards; }
.hero__slide.is-active .hero__content > *:nth-child(1) { animation-delay: .2s; }
.hero__slide.is-active .hero__content > *:nth-child(2) { animation-delay: .35s; }
.hero__slide.is-active .hero__content > *:nth-child(3) { animation-delay: .5s; }
.hero__slide.is-active .hero__content > *:nth-child(4) { animation-delay: .65s; }
@keyframes heroIn {
    0%   { opacity: 0; transform: translateY(40px) scale(.98); }
    100% { opacity: 1; transform: none; }
}

.hero__eyebrow { background: rgba(0,169,200,.2); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.2vw, 4rem); font-weight: 800; margin-bottom: 1.1rem; }
.hero__subtitle { color: rgba(255,255,255,.9); font-size: clamp(1rem, 1.6vw, 1.22rem); max-width: 560px; margin-bottom: 1.8rem; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero__arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(255,255,255,.14); color: #fff; font-size: 1.1rem;
    border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.hero__arrow:hover { background: var(--teal); transform: translateY(-50%) scale(1.08); border-color: var(--teal); }
.hero__arrow--prev { left: 1.4rem; }
.hero__arrow--next { right: 1.4rem; }

.hero__dots { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: .6rem; }
.hero__dots .dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; transition: all var(--t-fast) var(--ease); }
.hero__dots .dot.is-active { background: var(--teal); width: 30px; border-radius: 6px; }

.hero__scroll { position: absolute; bottom: 1.8rem; right: 2rem; z-index: 3; width: 26px; height: 44px; border: 2px solid rgba(255,255,255,.6); border-radius: 14px; display: none; }
.hero__scroll span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; border-radius: 4px; background: #fff; animation: scrollDot 1.6s var(--ease) infinite; }
@keyframes scrollDot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 22px; } 100% { opacity: 0; } }
@media (min-width: 992px) { .hero__scroll { display: block; } }

/* ---------- Stats ---------- */
.stats { background: var(--ink); padding: clamp(2.2rem, 5vw, 3.2rem) 0; position: relative; z-index: 2; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat { display: flex; flex-direction: column; gap: .3rem; }
.stat__num { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; color: #fff; letter-spacing: -.02em; line-height: 1; }
.stat__num i { color: var(--teal); font-size: .8em; }
.stat__label { color: rgba(255,255,255,.66); font-size: .92rem; font-weight: 500; }
.stat + .stat { position: relative; }
.stat:not(:first-child)::before { content: ''; position: absolute; left: -.75rem; top: 50%; transform: translateY(-50%); width: 1px; height: 60%; background: rgba(255,255,255,.12); }

/* ---------- About ---------- */
.about__content { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.about__text h3 { margin-bottom: 1rem; }
.about__text p { margin-bottom: 1.6rem; }
.about__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about__gallery img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3/4; object-fit: cover; }
.about__gallery img:nth-child(2) { margin-top: 2.5rem; }
.typewriter { min-height: 1px; }
.typewriter .caret { display: inline-block; width: 2px; background: var(--teal); margin-left: 2px; animation: blink .9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.value {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.value:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.value__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.value__body { padding: 1.2rem 1.3rem 1.5rem; }
.value__body h4 { margin-bottom: .5rem; }
.value__body p { font-size: .95rem; color: var(--muted); }

/* ---------- Services ---------- */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service-card {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2rem 1.7rem; cursor: pointer; position: relative; overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--teal), var(--teal-100));
    transform: scaleX(0); transform-origin: left; transition: transform var(--t) var(--ease);
}
.service-card:hover, .service-card:focus-visible { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--teal-100); outline: none; }
.service-card:hover::before, .service-card:focus-visible::before { transform: scaleX(1); }
.service-card__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 58px; height: 58px; border-radius: 16px;
    background: var(--teal-50); color: var(--teal-700); font-size: 1.5rem;
    margin-bottom: 1.1rem; transition: background var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
.service-card:hover .service-card__icon { background: var(--teal); color: #fff; transform: rotate(-6deg) scale(1.06); }
.service-card h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.service-card p { font-size: .96rem; color: var(--body); }
.service-card__more { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1rem; color: var(--teal-700); font-weight: 700; font-size: .92rem; }
.service-card__more i { transition: transform var(--t-fast) var(--ease); }
.service-card:hover .service-card__more i { transform: translateX(4px); }

/* ---------- Facilities / Tech ---------- */
.tech { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.tech--reverse .tech__text { order: 2; }
.tech__text h3 { margin-bottom: 1rem; }
.tech__text > p { margin-bottom: 1.4rem; }
.tech__features { display: flex; flex-direction: column; gap: .9rem; }
.tech__features li { display: flex; gap: .75rem; align-items: flex-start; font-size: .98rem; }
.tech__features i { color: var(--teal); margin-top: .25rem; flex-shrink: 0; }
.tech__features b { color: var(--ink); }
.tech__media { display: flex; justify-content: center; }
.tech__media video {
    width: auto; max-width: 100%;
    height: auto; max-height: min(680px, 80vh);
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    background: var(--ink);
}

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.gallery__item {
    width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-sm);
    background-size: cover; background-position: center;
    box-shadow: var(--shadow-sm); overflow: hidden; position: relative;
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.gallery__item::after { content: '\f00e'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem; background: rgba(0,169,200,.55); opacity: 0; transition: opacity var(--t) var(--ease); }
.gallery__item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery__item:hover::after { opacity: 1; }

/* ---------- Team ---------- */
.team__viewport { overflow: hidden; }
.team__track { display: flex; gap: 1.4rem; }
.team-card {
    flex: 0 0 calc((100% - 2.8rem) / 3); min-width: calc((100% - 2.8rem) / 3);
    position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    aspect-ratio: 3/4;
}
.team-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.team-card:hover img { transform: scale(1.06); }
.team-card__caption { position: absolute; inset: auto 0 0 0; padding: 1.4rem 1.3rem; color: #fff; background: linear-gradient(to top, rgba(8,18,25,.92), rgba(8,18,25,.2) 70%, transparent); }
.team-card__caption h3 { color: #fff; font-size: 1.15rem; margin-bottom: .25rem; }
.team-card__caption p { font-size: .9rem; color: rgba(255,255,255,.8); }

/* ---------- Testimonials ---------- */
.testi__viewport { overflow: hidden; border-radius: var(--radius); }
.testi__track { display: flex; transition: transform .6s var(--ease); }
.testi-card {
    flex: 0 0 100%; padding: clamp(2rem, 5vw, 3.5rem); text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
}
.testi-card__img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow); }
.testi-card blockquote { font-size: clamp(1.05rem, 2vw, 1.4rem); color: var(--ink); font-weight: 500; max-width: 760px; line-height: 1.6; font-style: italic; }
.testi-card__meta { display: inline-flex; align-items: center; gap: .5rem; color: var(--teal-700); font-weight: 700; }
.testi { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding-bottom: 1.6rem; }
.testi__dots { display: flex; justify-content: center; gap: .5rem; }
.testi__dots .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); cursor: pointer; transition: all var(--t-fast) var(--ease); }
.testi__dots .dot.is-active { background: var(--teal); width: 26px; border-radius: 5px; }

/* ---------- Blog ---------- */
.blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.blog-card { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); aspect-ratio: 4/5; transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.blog-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.blog-card:hover img { transform: scale(1.06); }
.blog-card__play {
    position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
    background: rgba(255,255,255,.9); color: var(--teal-700); font-size: 1.3rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow); transition: transform var(--t) var(--ease), background var(--t) var(--ease);
}
.blog-card__play i { margin-left: 3px; }
.blog-card:hover .blog-card__play { transform: scale(1.12); background: #fff; }

/* ---------- FAQ ---------- */
.faq__list { display: flex; flex-direction: column; gap: .85rem; }
.faq-item { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease); }
.faq-item.is-open { box-shadow: var(--shadow); border-color: var(--teal-100); }
.faq-item__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; text-align: left; font-weight: 700; color: var(--ink); font-size: 1.03rem; }
.faq-item__arrow { color: var(--teal); transition: transform var(--t) var(--ease); flex-shrink: 0; }
.faq-item.is-open .faq-item__arrow { transform: rotate(180deg); }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height var(--t) var(--ease); }
.faq-item__a p { padding: 0 1.4rem 1.3rem; color: var(--body); }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact__item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.contact__ic { flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; background: var(--teal-50); color: var(--teal-700); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.contact__item h4 { margin-bottom: .2rem; }
.contact__item p { color: var(--muted); font-size: .96rem; }
.contact__item a:hover { color: var(--teal-700); }

.contact__form { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.contact__form h3 { margin-bottom: 1.4rem; }

/* ---------- Form fields ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: .45rem; }
.field input, .field textarea, .field select {
    width: 100%; padding: .85rem 1rem; font: inherit; font-size: .98rem;
    color: var(--ink); background: var(--bg-alt);
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #9fb0b9; }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--teal); background: #fff;
    box-shadow: 0 0 0 4px rgba(0,169,200,.13);
}
.field--row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.field--row label { margin: 0; }
.checkbox { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--body); cursor: pointer; }
.checkbox input { width: auto; }

/* ---------- CTA ---------- */
.cta { padding: clamp(3rem, 7vw, 5rem) 0; background: linear-gradient(120deg, var(--teal-700), var(--teal) 70%); position: relative; z-index: 2; overflow: hidden; }
.cta::before { content: ''; position: absolute; top: -40%; right: -10%; width: 500px; height: 500px; border-radius: 50%; background: rgba(255,255,255,.08); }
.cta__inner { text-align: center; max-width: 760px; margin: 0 auto; position: relative; }
.cta h2 { color: #fff; margin-bottom: 1rem; }
.cta p { color: rgba(255,255,255,.92); font-size: 1.1rem; margin-bottom: 1.8rem; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.72); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer__brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.footer__brand img { height: 38px; width: auto; }
.footer__brand span { color: #fff; font-weight: 700; font-size: 1.1rem; }
.footer__brand strong { color: var(--teal); }
.footer__col h4 { color: #fff; margin-bottom: 1.1rem; font-size: 1rem; }
.footer__col ul li { margin-bottom: .65rem; font-size: .95rem; }
.footer__col a:hover { color: var(--teal); }
.footer__contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer__contact i { color: var(--teal); margin-top: .25rem; }
.footer__social { display: flex; gap: .7rem; margin-top: 1.2rem; }
.footer__social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: #fff; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.footer__social a:hover { background: var(--teal); transform: translateY(-3px); }
.footer__seo { padding: 2rem 0; border-top: 1px solid rgba(255,255,255,.08); font-size: .82rem; color: rgba(255,255,255,.5); line-height: 1.6; }
.footer__seo p { margin-bottom: .6rem; }
.footer__seo strong { color: rgba(255,255,255,.7); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1.5rem var(--gutter); text-align: center; font-size: .85rem; }
.footer__bottom a { color: #fff; font-weight: 600; }
.footer__bottom a:hover { color: var(--teal); }
.footer__tags { margin-top: .6rem; font-size: .72rem; color: rgba(255,255,255,.35); }

/* ---------- WhatsApp Float ---------- */
.wa-float {
    position: fixed; bottom: 1.6rem; right: 1.6rem; z-index: 900;
    width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
    box-shadow: 0 10px 26px -8px rgba(37,211,102,.7);
    transition: transform var(--t) var(--ease);
    animation: waPulse 2.4s ease-in-out infinite;
}
.wa-float:hover { transform: scale(1.1); }
@keyframes waPulse { 0%,100% { box-shadow: 0 10px 26px -8px rgba(37,211,102,.7), 0 0 0 0 rgba(37,211,102,.5); } 50% { box-shadow: 0 10px 26px -8px rgba(37,211,102,.7), 0 0 0 14px rgba(37,211,102,0); } }

/* ---------- Modals (login / service) ---------- */
.modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 1.2rem; background: rgba(8,18,25,.6); backdrop-filter: blur(4px); }
.modal.is-open { display: flex; animation: fadeIn .25s ease; }
.modal__box { position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 2.6rem); box-shadow: var(--shadow-lg); animation: popIn .3s var(--ease); }
.modal__box--service { max-width: 520px; padding: 0; overflow: hidden; }
.modal__title { text-align: center; margin-bottom: 1.5rem; }
.modal__close { position: absolute; top: 1rem; right: 1.1rem; z-index: 2; width: 38px; height: 38px; border-radius: 50%; font-size: 1.6rem; line-height: 1; color: var(--ink); background: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; transition: background var(--t-fast) var(--ease); }
.modal__close:hover { background: var(--line); }
.modal__foot { text-align: center; margin-top: 1.4rem; color: var(--muted); font-size: .92rem; }
.modal__foot a, .field--row a { color: var(--teal-700); font-weight: 600; }

.modal__box--service img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.modal__service-body { padding: 1.6rem 1.8rem 1.9rem; }
.modal__service-body h3 { margin-bottom: .6rem; }
.modal__service-body p { color: var(--body); margin-bottom: 1.4rem; }
.modal__actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.btn-action { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem; border-radius: var(--radius-pill); font-weight: 700; font-size: .92rem; background: var(--bg-alt); color: var(--ink); border: 1.5px solid var(--line); transition: all var(--t-fast) var(--ease); }
.btn-action:hover { transform: translateY(-2px); }
.btn-action--wa { background: #25D366; color: #fff; border-color: #25D366; }
.btn-action--primary { background: var(--teal); color: #fff; border-color: var(--teal); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 2100; display: none; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(8,18,25,.92); }
.lightbox.is-open { display: flex; animation: fadeIn .25s ease; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 88vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.lightbox--video video { width: min(900px, 92vw); background: #000; }
.lightbox__close { position: absolute; top: 1.4rem; right: 1.6rem; width: 46px; height: 46px; border-radius: 50%; font-size: 2rem; line-height: 1; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; transition: background var(--t-fast) var(--ease); }
.lightbox__close:hover { background: var(--teal); }

/* ---------- Appointment page ---------- */
.appointment-page { display: none; padding: calc(var(--header-h) + 2rem) 0 4rem; background: var(--bg-alt); min-height: 100vh; }
.appointment-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow); }
.appointment-card h2 { margin-bottom: 1.6rem; }
.appointment-back { display: inline-flex; align-items: center; gap: .5rem; color: var(--teal-700); font-weight: 600; margin-bottom: 1.2rem; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; }
.calendar > div { text-align: center; padding: .55rem 0; font-size: .9rem; border-radius: 10px; }
.calendar-day { cursor: pointer; border: 1.5px solid var(--line); font-weight: 600; color: var(--ink); transition: all var(--t-fast) var(--ease); }
.calendar-day:hover { border-color: var(--teal); color: var(--teal-700); }
.calendar-day.selected { background: var(--teal); color: #fff; border-color: var(--teal); }
.calendar-day.occupied { background: var(--bg-alt); color: #b9c4cb; cursor: not-allowed; border-color: transparent; text-decoration: line-through; }
.time-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .55rem; }
.time-slot { text-align: center; padding: .6rem .4rem; border: 1.5px solid var(--line); border-radius: 10px; font-size: .9rem; font-weight: 600; cursor: pointer; color: var(--ink); transition: all var(--t-fast) var(--ease); }
.time-slot:hover { border-color: var(--teal); color: var(--teal-700); }
.time-slot.selected { background: var(--teal); color: #fff; border-color: var(--teal); }
.time-slot.occupied { background: var(--bg-alt); color: #b9c4cb; cursor: not-allowed; border-color: transparent; text-decoration: line-through; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%) translateY(20px); z-index: 3000; background: var(--ink); color: #fff; padding: .9rem 1.4rem; border-radius: var(--radius-pill); box-shadow: var(--shadow-lg); font-weight: 600; font-size: .95rem; opacity: 0; transition: opacity .3s ease, transform .3s var(--ease); display: flex; align-items: center; gap: .6rem; max-width: 90vw; }
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast i { color: var(--teal); }

/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 992px) {
    .about__content, .tech, .tech--reverse .tech__text, .contact__grid { grid-template-columns: 1fr; }
    .tech--reverse .tech__text { order: 0; }
    .values, .services__grid, .blog__grid { grid-template-columns: repeat(2, 1fr); }
    .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
    .stat:nth-child(3)::before { display: none; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .team-card { flex-basis: calc((100% - 1.4rem) / 2); min-width: calc((100% - 1.4rem) / 2); }
    .about__gallery img:nth-child(2) { margin-top: 0; }
}

@media (max-width: 768px) {
    :root { --header-h: 64px; }

    .section { padding: clamp(2.6rem, 9vw, 3.6rem) 0; }
    .section__head { margin-bottom: 2rem; }
    .section__subtitle { font-size: .98rem; }

    /* Nav / menú móvil */
    .nav__menu {
        position: fixed; inset: 0 0 0 auto; width: min(330px, 86vw); height: 100vh; height: 100svh;
        flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.3rem;
        background: #fff; padding: 5rem 2rem 2rem; box-shadow: var(--shadow-lg);
        transform: translateX(105%); transition: transform var(--t) var(--ease);
    }
    .nav__menu.is-open { transform: translateX(0); }
    .nav__link { color: var(--ink); font-size: 1.2rem; }
    .header.is-scrolled .nav__link { color: var(--ink); }
    .logo__text { color: #fff; }
    .header.is-scrolled .logo__text { color: var(--ink); }
    .hamburger { display: flex; z-index: 1001; }
    .hamburger.is-active span { background: var(--ink); }   /* X oscura sobre el drawer blanco */
    .nav__contact .nav__phone { display: none; }
    .nav__contact { gap: .6rem; }
    .nav__contact .btn { padding: .6rem 1.05rem; font-size: .85rem; }
    body.menu-open { overflow: hidden; }

    /* Hero: texto más compacto, sin flechas (swipe + dots) */
    .hero { min-height: 540px; }
    .hero__content { margin-inline: clamp(.9rem, 4vw, 1.4rem); padding: 1.4rem 1.4rem; }
    .hero h1 { font-size: clamp(1.85rem, 7.4vw, 2.5rem); }
    .hero__subtitle { font-size: 1rem; margin-bottom: 1.5rem; }
    .hero__arrow { display: none; }
    .hero__dots { bottom: 1.3rem; }
    #particles-js { display: none; }

    /* Stats sin divisores */
    .stat::before { display: none !important; }

    /* Video de tecnología acotado en alto */
    .tech__media video { max-height: 64vh; }

    /* Testimonios */
    .testi-card { padding: 2rem 1.3rem; }
    .testi-card blockquote { font-size: 1.05rem; }
    .testi-card__img { width: 78px; height: 78px; }

    /* Footer */
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 1.6rem 1.4rem; }
    .about__gallery img:nth-child(2) { margin-top: 0; }

    /* WhatsApp flotante */
    .wa-float { width: 52px; height: 52px; bottom: 1rem; right: 1rem; font-size: 1.5rem; }
}

@media (max-width: 600px) {
    .values, .services__grid, .blog__grid, .footer__grid { grid-template-columns: 1fr; }
    .gallery, .about__gallery { grid-template-columns: 1fr 1fr; }
    .stats__grid { grid-template-columns: repeat(2, 1fr); column-gap: .8rem; }
    .team-card { flex-basis: 100%; min-width: 100%; }
    .modal__actions { flex-direction: column; }
    .btn-action { width: 100%; justify-content: center; }

    /* Botones del hero apilados a todo el ancho */
    .hero__buttons { flex-direction: column; align-items: stretch; }
    .hero__buttons .btn { width: 100%; }

    .contact__form { padding: 1.5rem 1.3rem; }
    .footer__seo { font-size: .78rem; }
}

@media (max-width: 400px) {
    body { font-size: 15px; }
    .container { padding-inline: 1.05rem; }
    .hero h1 { font-size: clamp(1.65rem, 8.2vw, 2.05rem); }
    .hero__eyebrow, .eyebrow { font-size: .72rem; }
    .stat__num { font-size: clamp(1.55rem, 9vw, 1.95rem); }
    .service-card { padding: 1.6rem 1.3rem; }
    .nav__contact .btn { padding: .55rem .85rem; }
    .logo__text { display: none; }   /* solo el ícono para no saturar el header */
}
