/* ================================================================
   SOLUSALUD — Landing Page v3
   ================================================================ */

/* ── Variables ───────────────────────────────────────────────── */
:root {
    --blue:       #1F3A70;
    --blue-dark:  #162a52;
    --blue-mid:   #2d5a9e;
    --red:        #E63946;
    --red-dark:   #c1121f;
    --green:      #4CAF50;
    --green-dark: #388E3C;
    --gray-bg:    #F4F6F9;
    --gray-text:  #555;
    --white:      #fff;
    --radius:     12px;
    --shadow:     0 4px 24px rgba(0,0,0,.1);
    --font-head:  'Poppins', sans-serif;
    --font-body:  'Inter', sans-serif;
    --header-h:   80px;
}

/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    color: #333;
    background: var(--white);
    line-height: 1.65;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ── Container ──────────────────────────────────────────────── */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Sections ───────────────────────────────────────────────── */
.section-light { padding: 80px 0; background: var(--gray-bg); }
.section-white { padding: 80px 0; background: var(--white); }

/* ── Section headings ───────────────────────────────────────── */
.section-title {
    font-family: var(--font-head);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--blue);
    text-align: center;
    margin-bottom: 12px;
}
.section-title.white { color: var(--white); }
.section-sub {
    font-size: 1rem;
    color: var(--gray-text);
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}
.section-sub.white { color: rgba(255,255,255,.88); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 8px;
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 600;
    transition: all .2s;
    cursor: pointer;
    border: none;
}
.btn-accent  { background: var(--red); color: var(--white); }
.btn-accent:hover  { background: var(--red-dark); transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn-ghost   { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.15); }
.btn-green   { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn-full    { display: block; width: 100%; text-align: center; }
.btn-wa {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #25D366;
    color: var(--white);
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    transition: background .2s;
}
.btn-wa:hover { background: #1da855; }
.mt20 { margin-top: 20px; }


/* ================================================================
   HEADER
   ================================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--blue-dark);
    box-shadow: 0 2px 16px rgba(0,0,0,.25);
    height: var(--header-h);
    display: flex;
    align-items: center;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Logo — more prominent in header */
.logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Nav links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.nav-link {
    padding: 7px 11px;
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 500;
    color: rgba(255,255,255,.85);
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,.12); color: var(--white); }
.nav-comedal {
    background: rgba(76,175,80,.15);
    color: #6eef72 !important;
    border: 1px solid rgba(76,175,80,.35);
}
.nav-comedal:hover { background: rgba(76,175,80,.28) !important; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}


/* ================================================================
   HERO
   ================================================================ */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(22,42,82,.92) 0%, rgba(31,58,112,.78) 60%, rgba(31,58,112,.55) 100%);
    z-index: 1;
}
.hero-deco-circle {
    position: absolute;
    width: 600px;
    height: 600px;
    border: 80px solid rgba(255,255,255,.04);
    border-radius: 50%;
    right: -120px;
    top: -120px;
    z-index: 2;
    animation: rotateSlow 30s linear infinite;
}
@keyframes rotateSlow { to { transform: rotate(360deg); } }

.hero .container { position: relative; z-index: 3; }
.hero-inner {
    max-width: 680px;
    padding: 80px 0;
}
.hero-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.9);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: .5px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,.2);
}
.hero-title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.18;
    margin-bottom: 20px;
}
.hero-subtitle {
    font-size: clamp(.95rem, 2vw, 1.05rem);
    color: rgba(255,255,255,.85);
    margin-bottom: 36px;
    max-width: 580px;
}
.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}


/* ================================================================
   CARDS GRID — Soluciones y Servicios
   ================================================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.14); }
.card-icon { font-size: 2rem; display: block; margin-bottom: 14px; }
.card h3 {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 10px;
}
.card p { font-size: .9rem; color: var(--gray-text); }

.card-sol { border-top: 3px solid var(--blue); }
.card-serv { border-top: 3px solid var(--red); }

/* ── Scroll reveal ──────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }


/* ================================================================
   SPLIT SECTIONS — imagen estructurada junto a texto
   ================================================================ */
.split-section { padding: 80px 0; }
.split-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.split-inner.reverse { direction: rtl; }
.split-inner.reverse > * { direction: ltr; }

.split-img {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.15);
    aspect-ratio: 4/3;
}
.split-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.split-img:hover img { transform: scale(1.03); }

.split-eyebrow {
    display: inline-block;
    background: rgba(31,58,112,.1);
    color: var(--blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.split-title {
    font-family: var(--font-head);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 16px;
    line-height: 1.25;
}
.split-text p {
    color: var(--gray-text);
    margin-bottom: 14px;
    font-size: .97rem;
}
.split-list {
    margin-bottom: 24px;
}
.split-list li {
    padding: 5px 0;
    font-size: .93rem;
    color: var(--gray-text);
}


/* ================================================================
   VIDEO CORPORATIVO
   ================================================================ */
.video-section { text-align: center; }
.video-outer {
    display: flex;
    justify-content: center;
    padding-top: 16px;
}
.video-phone {
    width: 300px;
    border-radius: 28px;
    aspect-ratio: 9 / 16;
    background: #000;
    overflow: hidden;
    position: relative;
    box-shadow: 0 16px 56px rgba(0,0,0,.35);
}
.video-phone video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-controls {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.video-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.28);
    transition: opacity .25s;
    cursor: pointer;
}
.video-cover-overlay.hidden { opacity: 0; pointer-events: none; }
.play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(31,58,112,.85);
    border: 3px solid rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .2s, background .2s;
}
.play-btn:hover { transform: scale(1.1); background: var(--blue); }
.video-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,.3);
    cursor: pointer;
    z-index: 10;
}
.video-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--red);
    transition: width .4s linear;
}


/* ================================================================
   ÁREAS — Accordion
   ================================================================ */
.accordion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.acc-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border-left: 4px solid var(--blue-mid);
}
.acc-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 600;
    color: var(--blue);
    transition: background .15s;
    text-align: left;
}
.acc-header:hover { background: rgba(31,58,112,.05); }
.acc-icon {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--blue-mid);
    transition: transform .3s;
    flex-shrink: 0;
}
.acc-card.open .acc-icon { transform: rotate(45deg); }
.acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
}
.acc-card.open .acc-body { max-height: 400px; }
.acc-body ul { padding: 6px 22px 22px; }
.acc-body li {
    padding: 5px 0;
    color: var(--gray-text);
    font-size: .9rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.acc-body li:last-child { border: none; }


/* ================================================================
   NOSOTROS — fondo de imagen + overlay
   ================================================================ */
.nosotros-section {
    position: relative;
    padding: 90px 0;
    overflow: hidden;
}
.nosotros-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.nosotros-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.nosotros-overlay {
    position: absolute;
    inset: 0;
    background: rgba(22,42,82,.88);
    z-index: 1;
}
.nosotros-section .container { position: relative; z-index: 2; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.stat-card {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: transform .25s, background .25s;
}
.stat-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.16); }
.stat-icon { font-size: 2rem; margin-bottom: 12px; }
.stat-card h3 {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}
.stat-card p { font-size: .88rem; color: rgba(255,255,255,.75); }


/* ================================================================
   COMEDAL
   ================================================================ */
.comedal-section {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
    padding: 80px 0;
}
.comedal-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
}
.badge-green {
    display: inline-block;
    background: var(--green);
    color: var(--white);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.comedal-title {
    font-family: var(--font-head);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
}
.comedal-desc {
    color: rgba(255,255,255,.88);
    font-size: 1rem;
    margin-bottom: 20px;
}
.rate-highlight {
    color: #6eef72;
    font-size: 1.2em;
}
.benefit-list { margin-bottom: 28px; }
.benefit-list li {
    color: rgba(255,255,255,.85);
    padding: 7px 0;
    font-size: .93rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.benefit-list li:last-child { border: none; }

.comedal-logo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-width: 200px;
}
.comedal-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.rate-box {
    background: rgba(255,255,255,.12);
    border: 2px solid rgba(76,175,80,.6);
    border-radius: 14px;
    padding: 20px 28px;
    text-align: center;
}
.rate-num {
    display: block;
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 800;
    color: #6eef72;
    line-height: 1;
}
.rate-aiu {
    display: block;
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin: 4px 0;
}
.rate-sub {
    display: block;
    font-size: .75rem;
    color: rgba(255,255,255,.65);
}


/* ================================================================
   CONTACTO
   ================================================================ */
.contacto-wrap {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 48px;
    align-items: start;
}
.contact-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--blue);
}
.form-field input,
.form-field textarea {
    padding: 11px 14px;
    border: 1.5px solid #dde2ee;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: .93rem;
    transition: border-color .2s;
    outline: none;
    background: #fafbff;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--blue-mid); }
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .85rem;
    color: var(--gray-text);
    flex-wrap: wrap;
}
.form-check input[type="checkbox"] { margin-top: 2px; accent-color: var(--blue); }
.field-error { color: var(--red); font-size: .78rem; min-height: 1em; }
.form-msg {
    font-size: .9rem;
    border-radius: 6px;
    padding: 0;
}
.form-msg.ok  { background: #eafaf1; color: #1a7a3e; padding: 10px 14px; }
.form-msg.err { background: #fdecea; color: #c0392b; padding: 10px 14px; }

.contact-info {
    background: var(--blue-dark);
    border-radius: var(--radius);
    padding: 36px 30px;
    color: var(--white);
}
.contact-info h3 {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--white);
}
.info-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}
.info-ico { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.info-lbl {
    font-size: .75rem;
    color: rgba(255,255,255,.55);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 3px;
}
.contact-info a { color: rgba(255,255,255,.85); transition: color .2s; }
.contact-info a:hover { color: var(--white); text-decoration: underline; }
.contact-info p { color: rgba(255,255,255,.82); font-size: .9rem; }


/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    background: var(--blue-dark);
    color: rgba(255,255,255,.75);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand p {
    font-size: .88rem;
    margin-bottom: 20px;
}

/* Solusalud logo: fondo blanco para que se vean los colores originales */
.footer-logo-wrap {
    display: inline-flex;
    background: var(--white);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
}
.footer-logo-solusalud {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* MaxEmpleos logo: también en píldora blanca */
.footer-powered {
    margin-top: 8px;
}
.footer-powered > span {
    display: block;
    font-size: .78rem;
    color: rgba(255,255,255,.5);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 500;
}
.footer-logo-max-wrap {
    display: inline-flex;
    background: var(--white);
    border-radius: 8px;
    padding: 7px 14px;
}
.footer-logo-max {
    height: 32px;
    width: auto;
    object-fit: contain;
    display: block;
}

.footer h4 {
    font-family: var(--font-head);
    font-size: .9rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.footer ul li {
    margin-bottom: 10px;
}
.footer ul li a,
.footer a {
    font-size: .88rem;
    color: rgba(255,255,255,.7);
    transition: color .2s;
}
.footer ul li a:hover,
.footer a:hover { color: var(--white); }
.footer-grid > div:nth-child(3) p {
    font-size: .88rem;
    margin-bottom: 10px;
    color: rgba(255,255,255,.7);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: .8rem;
    color: rgba(255,255,255,.45);
}


/* ================================================================
   WHATSAPP FLOTANTE
   ================================================================ */
.wa-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,.5);
    animation: waPulse 2.5s ease-in-out infinite;
    transition: transform .2s;
}
.wa-float:hover { transform: scale(1.1); animation: none; }
@keyframes waPulse {
    0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.45); }
    50%      { box-shadow: 0 4px 32px rgba(37,211,102,.75), 0 0 0 10px rgba(37,211,102,.12); }
}

.wa-tooltip {
    position: absolute;
    right: 70px;
    background: var(--blue-dark);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.wa-float:hover .wa-tooltip { opacity: 1; }
.wa-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--blue-dark);
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1024px) {
    .split-inner { grid-template-columns: 1fr; gap: 36px; }
    .split-inner.reverse { direction: ltr; }
    .split-img { max-width: 520px; margin: 0 auto; }
    .comedal-inner { grid-template-columns: 1fr; }
    .comedal-logo-box { flex-direction: row; justify-content: center; }
    .contacto-wrap { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

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

    .nav-menu {
        display: none;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--blue-dark);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 0;
        box-shadow: 0 8px 24px rgba(0,0,0,.3);
        z-index: 899;
    }
    .nav-menu.open { display: flex; }
    .nav-link { padding: 13px 24px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.08); }

    .hamburger { display: flex; }

    .logo-img { height: 52px; }

    .btn-wa span { display: none; }
    .btn-wa { padding: 8px; border-radius: 50%; }
    .btn-wa svg { margin: 0; }

    .hero-inner { padding: 60px 0; }

    .section-light,
    .section-white,
    .split-section { padding: 60px 0; }
    .nosotros-section { padding: 64px 0; }

    .cards-grid { grid-template-columns: 1fr; }
    .stats-grid  { grid-template-columns: 1fr 1fr; }

    .contact-form { padding: 28px 20px; }

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

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .accordion-grid { grid-template-columns: 1fr; }
    .hero-btns { flex-direction: column; }
    .comedal-logo-box { flex-direction: column; }
}
