/* ==========================================================
   FUNDACIÓN TERAPÉUTICA REHABILITA — REDISEÑO 2026
   Capa visual compartida. No altera la lógica JavaScript.
========================================================== */

:root {
    --rehab-forest: #123b2d;
    --rehab-forest-deep: #0b2d23;
    --rehab-green: #2f684f;
    --rehab-sage: #7f9f8b;
    --rehab-mist: #eaf1ec;
    --rehab-mist-2: #f1f6f2;
    --rehab-cream: #f7f3ea;
    --rehab-warm: #fcfaf5;
    --rehab-white: #ffffff;
    --rehab-gold: #c3a35a;
    --rehab-gold-soft: #e7d7aa;
    --rehab-ink: #203029;
    --rehab-muted: #65716b;
    --rehab-line: rgba(18, 59, 45, .12);
    --rehab-shadow: 0 18px 55px rgba(20, 48, 38, .09);
    --rehab-shadow-lg: 0 30px 85px rgba(20, 48, 38, .13);
    --rehab-radius: 24px;
    --rehab-radius-sm: 16px;
}

html { background: var(--rehab-warm); }
body {
    background: var(--rehab-warm) !important;
    color: var(--rehab-ink);
    font-family: "DM Sans", sans-serif;
}

::selection { background: var(--rehab-gold-soft); color: var(--rehab-forest-deep); }

.container { width: min(1180px, calc(100% - 48px)); }

h1, h2, h3, h4 {
    color: var(--rehab-forest-deep);
    letter-spacing: -.025em;
}

h1, h2 { font-family: "Playfair Display", serif; }

p { color: var(--rehab-muted); line-height: 1.75; }

a { transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease; }

/* ---------- HEADER ---------- */
.site-header {
    background: rgba(255,255,255,.94) !important;
    border-bottom: 1px solid rgba(18,59,45,.08) !important;
    box-shadow: 0 10px 35px rgba(17,51,40,.05) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-wrap { min-height: 86px; }
.brand-logo {
    width: auto !important;
    max-width: 190px !important;
    height: 58px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}

.main-nav { gap: 27px; }
.main-nav > a:not(.nav-cta) {
    color: #33473f !important;
    font-size: .91rem;
    font-weight: 600;
    position: relative;
}
.main-nav > a:not(.nav-cta)::after {
    content: "";
    position: absolute;
    left: 50%; bottom: -9px;
    width: 0; height: 2px;
    background: var(--rehab-gold);
    transform: translateX(-50%);
    transition: width .25s ease;
}
.main-nav > a:not(.nav-cta):hover { color: var(--rehab-forest) !important; }
.main-nav > a:not(.nav-cta):hover::after { width: 24px; }

.nav-cta,
.hero-btn-primary,
.support-strip-button,
.community-hero-button,
.community-final-button,
.team-hero-button {
    background: var(--rehab-forest) !important;
    color: white !important;
    border: 1px solid var(--rehab-forest) !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 25px rgba(18,59,45,.16) !important;
}
.nav-cta:hover,
.hero-btn-primary:hover,
.support-strip-button:hover,
.community-hero-button:hover,
.community-final-button:hover,
.team-hero-button:hover {
    background: var(--rehab-green) !important;
    border-color: var(--rehab-green) !important;
    transform: translateY(-2px);
    box-shadow: 0 15px 32px rgba(18,59,45,.22) !important;
}
.menu-toggle { color: var(--rehab-forest) !important; }

/* ---------- HOME HERO ---------- */
.hero-premium,
.hero-carousel { min-height: 690px !important; background: var(--rehab-cream) !important; }
.hero-slide { min-height: 690px !important; }
.hero-premium-image { filter: saturate(.82) contrast(.96) brightness(1.05); }
.hero-premium-overlay {
    background: linear-gradient(90deg,
        rgba(249,246,237,.98) 0%,
        rgba(249,246,237,.91) 34%,
        rgba(249,246,237,.51) 57%,
        rgba(16,48,37,.13) 78%,
        rgba(16,48,37,.26) 100%) !important;
}
.hero-premium-content { min-height: 690px !important; align-items: center !important; }
.hero-premium-text { max-width: 650px !important; padding-top: 32px; }
.hero-premium-eyebrow {
    color: var(--rehab-green) !important;
    font-size: .77rem !important;
    font-weight: 800 !important;
    letter-spacing: .19em !important;
}
.hero-premium-line { background: var(--rehab-gold) !important; width: 54px !important; }
.hero-premium-text h1,
.hero-carousel-subtitle {
    color: var(--rehab-forest-deep) !important;
    font-size: clamp(3.25rem, 5.5vw, 5.7rem) !important;
    line-height: .99 !important;
    letter-spacing: -.045em !important;
    text-shadow: none !important;
    max-width: 720px !important;
}
.hero-premium-text h1 em { color: var(--rehab-green) !important; font-weight: 500; }
.hero-premium-text p {
    color: #43534c !important;
    max-width: 585px !important;
    font-size: 1.02rem !important;
    line-height: 1.72 !important;
    text-shadow: none !important;
}
.hero-premium-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px !important; }
.hero-btn { min-height: 50px; padding: 0 23px !important; font-weight: 700 !important; }
.hero-btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    padding: 0 23px;
    color: var(--rehab-forest) !important;
    background: rgba(255,255,255,.72) !important;
    border: 1px solid rgba(18,59,45,.18) !important;
    backdrop-filter: blur(7px);
}
.hero-btn-secondary:hover { background: white !important; border-color: var(--rehab-forest) !important; transform: translateY(-2px); }
.hero-premium-note {
    color: var(--rehab-forest) !important;
    background: rgba(255,255,255,.6) !important;
    border: 1px solid rgba(18,59,45,.09) !important;
    border-radius: 999px !important;
    padding: 9px 14px !important;
    width: fit-content;
    backdrop-filter: blur(8px);
}
.hero-carousel-arrow {
    background: rgba(255,255,255,.92) !important;
    color: var(--rehab-forest) !important;
    border-color: rgba(18,59,45,.12) !important;
    box-shadow: 0 8px 22px rgba(18,59,45,.08) !important;
}
.hero-carousel-arrow:hover { background: var(--rehab-forest) !important; color: white !important; }
.hero-dot { background: rgba(18,59,45,.25) !important; }
.hero-dot.active { background: var(--rehab-gold) !important; transform: scale(1.25); }

/* ---------- FLOATING PILLARS ---------- */
.hero-pillars {
    background: transparent !important;
    position: relative;
    z-index: 8;
    margin-top: -54px !important;
    padding-bottom: 70px !important;
}
.hero-pillars-grid {
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(18,59,45,.08);
    border-radius: 24px;
    box-shadow: var(--rehab-shadow-lg);
    overflow: hidden;
    gap: 0 !important;
}
.hero-pillar {
    background: white !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 34px 32px !important;
    position: relative;
}
.hero-pillar + .hero-pillar::before {
    content: ""; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: var(--rehab-line);
}
.hero-pillar-number { color: var(--rehab-gold) !important; }
.hero-pillar h3 { color: var(--rehab-forest-deep) !important; }
.hero-pillar p { color: var(--rehab-muted) !important; }
.hero-pillar:hover { background: var(--rehab-mist-2) !important; transform: none !important; }

/* ---------- SUPPORT STRIP ---------- */
.support-strip { background: var(--rehab-mist); border-top: 1px solid var(--rehab-line); border-bottom: 1px solid var(--rehab-line); }
.support-strip-inner { min-height: 116px; display: grid; grid-template-columns: 52px 1fr auto; gap: 20px; align-items: center; }
.support-strip-icon { width: 50px; height: 50px; border: 1px solid rgba(195,163,90,.45); border-radius: 50%; display: grid; place-items: center; color: var(--rehab-gold); font-size: 1.35rem; background: rgba(255,255,255,.65); }
.support-strip-copy { display: grid; gap: 4px; }
.support-strip-copy strong { color: var(--rehab-forest-deep); font-family: "Playfair Display", serif; font-size: 1.25rem; font-weight: 600; }
.support-strip-copy span { color: var(--rehab-muted); font-size: .93rem; }
.support-strip-button { display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; text-decoration: none; font-weight: 700; white-space: nowrap; }

/* ---------- STATS ---------- */
.stats-section {
    background: linear-gradient(135deg, var(--rehab-forest) 0%, #174b38 60%, #1f5942 100%) !important;
    position: relative; overflow: hidden;
}
.stats-section::after { content:""; position:absolute; inset:0; background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.09), transparent 32%); pointer-events:none; }
.stats-heading h2, .stats-section h2, .stats-section h3, .stats-section .stat-number { color: white !important; }
.stats-heading p, .stats-section p { color: rgba(255,255,255,.73) !important; }
.stats-section .eyebrow { color: var(--rehab-gold-soft) !important; }
.stat-item, .stat-card {
    background: rgba(255,255,255,.045) !important;
    border-color: rgba(255,255,255,.1) !important;
    border-radius: 18px !important;
}

/* ---------- GENERIC SECTIONS ---------- */
.section { padding-top: 104px !important; padding-bottom: 104px !important; }
.intro, .intro-after-hero, .therapies { background: var(--rehab-warm) !important; }
.programs, .professional-team, .community-gallery-section { background: var(--rehab-mist-2) !important; }
.eyebrow { color: var(--rehab-green) !important; font-weight: 800 !important; letter-spacing: .16em; }
.intro h2, .programs h2, .therapies h2, .faq h2, .testimonials h2 { color: var(--rehab-forest-deep) !important; }
.intro h2 em, .programs h2 em, .therapies h2 em, .faq h2 em { color: var(--rehab-green) !important; }

/* Cards used across programs/therapies */
.program-card, .therapy-card, .program-item, .therapy-item {
    background: white !important;
    border: 1px solid rgba(18,59,45,.08) !important;
    border-radius: var(--rehab-radius) !important;
    box-shadow: var(--rehab-shadow) !important;
    overflow: hidden;
}
.program-card:hover, .therapy-card:hover, .program-item:hover, .therapy-item:hover { transform: translateY(-6px) !important; box-shadow: var(--rehab-shadow-lg) !important; }
.program-card h3, .therapy-card h3, .program-item h3, .therapy-item h3 { color: var(--rehab-forest-deep) !important; }
.program-card p, .therapy-card p, .program-item p, .therapy-item p { color: var(--rehab-muted) !important; }
.program-icon, .therapy-icon { color: var(--rehab-green) !important; }

/* ---------- FAQ ---------- */
.faq { background: var(--rehab-forest-deep) !important; }
.faq h2, .faq h3 { color: white !important; }
.faq p { color: rgba(255,255,255,.72) !important; }
.faq .eyebrow { color: var(--rehab-gold-soft) !important; }
.faq-item {
    background: rgba(255,255,255,.055) !important;
    border: 1px solid rgba(255,255,255,.1) !important;
    border-radius: 17px !important;
}
.faq-question { color: white !important; }
.faq-answer, .faq-answer p { color: rgba(255,255,255,.74) !important; }

/* ---------- TESTIMONIALS ---------- */
.testimonials { background: var(--rehab-cream) !important; }
.testimonials-heading h2, .testimonial h3, .testimonial strong { color: var(--rehab-forest-deep) !important; }
.testimonials-intro, .testimonial p, .testimonial span { color: var(--rehab-muted) !important; }
.testimonial {
    background: rgba(255,255,255,.9) !important;
    border: 1px solid rgba(18,59,45,.08) !important;
    border-radius: var(--rehab-radius) !important;
    box-shadow: var(--rehab-shadow) !important;
}
.testimonial-number { color: var(--rehab-gold) !important; }
.person-avatar { background: var(--rehab-mist) !important; color: var(--rehab-forest) !important; }
.testimonial-arrow { background: white !important; color: var(--rehab-forest) !important; border-color: var(--rehab-line) !important; }
.testimonial-arrow:hover { background: var(--rehab-forest) !important; color: white !important; }

/* ---------- LOCATION ---------- */
.location-section { background: white !important; }
.location-map { border-radius: 26px !important; overflow: hidden; box-shadow: var(--rehab-shadow-lg) !important; border: 1px solid var(--rehab-line) !important; }
.map-label { background: var(--rehab-forest) !important; color: white !important; }

/* ---------- INNER PAGE HEROES ---------- */
.about-page-hero, .team-hero, .community-hero {
    min-height: 590px !important;
    background: var(--rehab-cream) !important;
}
.about-page-hero::before,
.team-hero-overlay,
.community-hero-overlay {
    background: linear-gradient(90deg, rgba(10,40,31,.79) 0%, rgba(12,47,36,.60) 46%, rgba(12,47,36,.18) 100%) !important;
}
.about-page-hero h1, .team-hero h1, .community-hero h1 { color: white !important; font-size: clamp(3.2rem, 6vw, 5.7rem) !important; line-height: 1.02 !important; }
.about-page-hero p, .team-hero p, .community-hero p { color: rgba(255,255,255,.84) !important; }
.team-hero .eyebrow, .community-hero .eyebrow, .about-page-hero .eyebrow { color: var(--rehab-gold-soft) !important; }
.team-hero-detail, .team-hero-scroll, .community-hero-scroll { color: rgba(255,255,255,.76) !important; }

/* ---------- NOSOTROS ---------- */
.about-page { background: var(--rehab-warm) !important; }
.about-page h2, .about-page h3, .about-standards-page h2, .about-standards-page h3 { color: var(--rehab-forest-deep) !important; }
.about-standards-page { background: var(--rehab-mist-2) !important; }
.about-card, .about-value, .about-standard, .standard-card {
    background: white !important;
    border: 1px solid var(--rehab-line) !important;
    border-radius: var(--rehab-radius) !important;
    box-shadow: var(--rehab-shadow) !important;
}

/* ---------- EQUIPO ---------- */
.team-intro { background: white !important; }
.professional-team { background: var(--rehab-mist-2) !important; }
.workshop-team { background: var(--rehab-cream) !important; }
.professional-team h2, .professional-team h3, .team-intro h2, .workshop-team h2, .workshop-team h3 { color: var(--rehab-forest-deep) !important; }
.team-member, .team-card, .professional-card, .workshop-card {
    background: white !important;
    border: 1px solid var(--rehab-line) !important;
    border-radius: var(--rehab-radius) !important;
    box-shadow: var(--rehab-shadow) !important;
    overflow: hidden;
}
.team-member:hover, .team-card:hover, .professional-card:hover, .workshop-card:hover { transform: translateY(-5px) !important; box-shadow: var(--rehab-shadow-lg) !important; }

/* ---------- COMUNIDAD ---------- */
.community-intro { background: var(--rehab-warm) !important; }
.community-intro h2, .community-gallery-heading h2 { color: var(--rehab-forest-deep) !important; }
.community-photo { border-radius: 22px !important; overflow: hidden; box-shadow: var(--rehab-shadow) !important; }
.community-photo img { transition: transform .55s ease, filter .55s ease !important; filter: saturate(.92) contrast(.98); }
.community-photo:hover img { transform: scale(1.035) !important; filter: saturate(1) contrast(1); }
.community-final { background: var(--rehab-forest-deep) !important; }
.community-final-overlay { background: linear-gradient(90deg, rgba(9,43,32,.88), rgba(9,43,32,.50)) !important; }
.community-final h2 { color: white !important; }
.community-final p { color: rgba(255,255,255,.8) !important; }

/* ---------- MODAL ---------- */
.program-modal-box { background: var(--rehab-white) !important; color: var(--rehab-ink) !important; border-radius: 24px !important; box-shadow: 0 35px 110px rgba(7,29,24,.26) !important; }
.program-modal-box h2 { color: var(--rehab-forest-deep) !important; }
.program-modal-icon { background: var(--rehab-mist) !important; color: var(--rehab-green) !important; }
.program-modal-category { color: var(--rehab-gold) !important; }

/* ---------- FOOTER ---------- */
.footer-premium {
    background: linear-gradient(135deg, #0b2d23 0%, #123b2d 100%) !important;
    color: rgba(255,255,255,.78) !important;
    border-top: 1px solid rgba(255,255,255,.06);
}
.footer-premium h3, .footer-premium strong { color: white !important; }
.footer-premium p, .footer-premium a, .footer-premium span { color: rgba(255,255,255,.72) !important; }
.footer-premium a:hover { color: var(--rehab-gold-soft) !important; }
.footer-premium .footer-logo, .footer-premium img { filter: none !important; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
    .container { width: min(100% - 34px, 1180px); }
    .main-nav {
        background: rgba(255,255,255,.98) !important;
        border-top: 1px solid var(--rehab-line) !important;
        box-shadow: 0 25px 45px rgba(18,59,45,.1) !important;
    }
    .main-nav > a:not(.nav-cta) { color: var(--rehab-forest-deep) !important; }
    .hero-premium-overlay {
        background: linear-gradient(90deg, rgba(249,246,237,.96) 0%, rgba(249,246,237,.88) 55%, rgba(249,246,237,.5) 100%) !important;
    }
    .hero-pillars { margin-top: -30px !important; }
    .hero-pillars-grid { grid-template-columns: 1fr !important; }
    .hero-pillar + .hero-pillar::before { left: 28px; right: 28px; top: 0; bottom: auto; width: auto; height: 1px; }
    .support-strip-inner { grid-template-columns: 44px 1fr; padding: 24px 0; }
    .support-strip-button { grid-column: 1 / -1; width: fit-content; margin-left: 64px; }
}

@media (max-width: 700px) {
    .container { width: min(100% - 28px, 1180px); }
    .nav-wrap { min-height: 72px; }
    .brand-logo { height: 48px !important; max-width: 160px !important; }
    .section { padding-top: 76px !important; padding-bottom: 76px !important; }
    .hero-premium, .hero-carousel, .hero-slide, .hero-premium-content { min-height: 680px !important; }
    .hero-premium-image { background-position: 67% center !important; }
    .hero-premium-overlay {
        background: linear-gradient(180deg, rgba(249,246,237,.82) 0%, rgba(249,246,237,.94) 45%, rgba(249,246,237,.99) 100%) !important;
    }
    .hero-premium-text { padding-top: 55px; max-width: 100% !important; }
    .hero-premium-text h1, .hero-carousel-subtitle { font-size: clamp(2.65rem, 12vw, 4rem) !important; }
    .hero-premium-text p { font-size: .95rem !important; line-height: 1.62 !important; }
    .hero-premium-note { border-radius: 14px !important; }
    .hero-carousel-arrow { width: 42px !important; height: 42px !important; top: auto !important; bottom: 20px !important; }
    .hero-carousel-prev { left: 16px !important; }
    .hero-carousel-next { right: 16px !important; }
    .hero-carousel-dots { bottom: 31px !important; }
    .hero-pillars { margin-top: 0 !important; padding-top: 18px !important; }
    .hero-pillars-grid { border-radius: 19px; }
    .hero-pillar { padding: 28px 24px !important; }
    .support-strip-inner { display: flex; flex-direction: column; text-align: center; padding: 32px 0; }
    .support-strip-button { margin-left: 0; width: 100%; justify-content: center; }
    .about-page-hero, .team-hero, .community-hero { min-height: 520px !important; }
    .about-page-hero h1, .team-hero h1, .community-hero h1 { font-size: clamp(2.8rem, 13vw, 4rem) !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
