/* ============================================================
   TECNIAIRES DE LA COSTA — Hoja de estilos principal
   Versión 1.0 | Avanza Digital | 2026
============================================================ */

/* ── VARIABLES ─────────────────────────────────────────── */
:root {
  --navy:   #0D1F6B;
  --blue:   #1E90FF;
  --lblue:  #E8F2FF;
  --white:  #FFFFFF;
  --gray:   #6B7280;
  --lgray:  #F3F6FB;
  --black:  #111827;
  --shadow: 0 4px 24px rgba(13,31,107,.10);
  --radius: 12px;
  --font:   'Inter', 'Segoe UI', sans-serif;
}

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--black); background: #fff; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── UTILIDADES ────────────────────────────────────────── */
.container    { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section      { padding: 80px 0; }
.section-alt  { background: var(--lgray); }
.section-dark { background: var(--navy); color: var(--white); }
.tag          { font-size: 12px; font-weight: 600; letter-spacing: .06em;
                text-transform: uppercase; color: var(--blue); margin-bottom: 8px; display: block; }
.section-title { font-size: clamp(24px,3vw,34px); font-weight: 700;
                 color: var(--navy); margin-bottom: 12px; line-height: 1.25; }
.section-sub  { font-size: 15px; color: var(--gray); max-width: 580px; line-height: 1.7; }
.dark .section-title { color: var(--white); }
.dark .section-sub   { color: rgba(255,255,255,.55); }
.text-center  { text-align: center; }
.text-center .section-sub { margin: 0 auto; }

/* ── BOTONES ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 8px; font-size: 14px;
  font-weight: 600; cursor: pointer; border: none; transition: all .2s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1270d6; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30,144,255,.35); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-outline-blue { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline-blue:hover { background: var(--blue); color: #fff; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: var(--lblue); }

/* ── NAVBAR ────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--navy); height: 64px;
  display: flex; align-items: center;
  transition: box-shadow .3s;
}
#navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.25); }
#navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 38px; }
.nav-logo span { color: #fff; font-size: 15px; font-weight: 700; }
.nav-logo span em { color: var(--blue); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: rgba(255,255,255,.7); font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-links .btn { padding: 9px 20px; font-size: 13px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }

/* ── HERO ──────────────────────────────────────────────── */
#hero {
  background: var(--navy); padding-top: 140px; padding-bottom: 80px;
  position: relative; overflow: hidden;
}
.hero-rings { position: absolute; right: -80px; top: -80px; pointer-events: none; }
.hero-rings circle { fill: none; stroke: rgba(30,144,255,.1); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(30,144,255,.15); border: 1px solid rgba(30,144,255,.4);
  padding: 5px 14px; border-radius: 20px; font-size: 12px; color: #5BB8FF;
  font-weight: 500; margin-bottom: 20px;
}
.hero-badge span { width: 7px; height: 7px; background: var(--blue); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.3)} }
.hero h1 { font-size: clamp(30px,4vw,48px); font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 18px; }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-sub { font-size: 16px; color: rgba(255,255,255,.65); line-height: 1.75; margin-bottom: 32px; max-width: 480px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
  padding: 5px 12px; border-radius: 20px; font-size: 12px; color: rgba(255,255,255,.7);
}
.chip i { color: var(--blue); }
.hero-visual {
  background: rgba(30,144,255,.08); border: 1px solid rgba(30,144,255,.2);
  border-radius: 20px; padding: 32px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.hero-icon-big { font-size: 80px; line-height: 1; }
.hero-visual h3 { color: #fff; font-size: 20px; font-weight: 700; }
.hero-visual p { color: rgba(255,255,255,.55); font-size: 14px; }
.hero-stat-row { display: flex; gap: 20px; }
.hero-stat { text-align: center; }
.hero-stat .val { font-size: 26px; font-weight: 800; color: var(--blue); }
.hero-stat .lbl { font-size: 11px; color: rgba(255,255,255,.5); }

/* ── STATS BAR ─────────────────────────────────────────── */
#stats { background: var(--lblue); padding: 0; border-bottom: 1px solid #BDD8FF; }
.stats-bar { display: grid; grid-template-columns: repeat(4,1fr); }
.stat-item { padding: 28px 20px; text-align: center; border-right: 1px solid #BDD8FF; }
.stat-item:last-child { border-right: none; }
.stat-val { font-size: 32px; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 13px; color: var(--blue); font-weight: 500; margin-top: 4px; }

/* ── SERVICIOS ─────────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; margin-top: 48px; }
.svc-card {
  background: #fff; border: 1px solid #D9E9FF; border-radius: var(--radius);
  padding: 28px; transition: all .25s; box-shadow: var(--shadow);
}
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(13,31,107,.14); border-color: var(--blue); }
.svc-icon {
  width: 50px; height: 50px; background: var(--navy); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
  font-size: 22px;
}
.svc-card h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.svc-card p { font-size: 14px; color: var(--gray); line-height: 1.65; margin-bottom: 14px; }
.svc-price { font-size: 14px; color: var(--blue); font-weight: 600; }

/* ── POR QUÉ ───────────────────────────────────────────── */
.why-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-top: 48px; }
.why-item {
  background: rgba(255,255,255,.05); border: 1px solid rgba(30,144,255,.2);
  border-radius: var(--radius); padding: 24px; display: flex; gap: 16px; align-items: flex-start;
  transition: background .2s;
}
.why-item:hover { background: rgba(30,144,255,.08); }
.why-num { font-size: 13px; color: var(--blue); font-weight: 700; min-width: 28px; padding-top: 2px; }
.why-item h4 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.why-item p { font-size: 13px; color: rgba(255,255,255,.5); line-height: 1.6; }

/* ── PLANES ────────────────────────────────────────────── */
.plans-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 48px; }
.plan {
  background: #fff; border: 1px solid #D9E9FF; border-radius: var(--radius);
  padding: 28px; transition: all .25s; position: relative;
}
.plan.featured {
  background: var(--navy); border-color: var(--blue);
  box-shadow: 0 12px 40px rgba(13,31,107,.25); transform: translateY(-8px);
}
.plan-badge {
  font-size: 11px; background: var(--blue); color: #fff;
  padding: 3px 10px; border-radius: 20px; font-weight: 600;
  display: inline-block; margin-bottom: 16px;
}
.plan h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.plan.featured h3 { color: #fff; }
.plan-price { font-size: 32px; font-weight: 800; color: var(--navy); margin: 8px 0 2px; }
.plan.featured .plan-price { color: var(--blue); }
.plan-period { font-size: 12px; color: var(--gray); margin-bottom: 20px; }
.plan.featured .plan-period { color: rgba(255,255,255,.45); }
.plan-features { margin-bottom: 24px; }
.plan-features li { font-size: 13px; color: var(--gray); padding: 5px 0; border-bottom: 1px solid #EFF4FF; display: flex; align-items: center; gap: 8px; }
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before { content: "✓"; color: var(--blue); font-weight: 700; }
.plan.featured .plan-features li { color: rgba(255,255,255,.6); border-color: rgba(255,255,255,.08); }
.plan .btn { width: 100%; justify-content: center; }

/* ── PROCESO ───────────────────────────────────────────── */
.process-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 48px; position: relative; }
.process-steps::before {
  content: ''; position: absolute; top: 28px; left: 10%; right: 10%; height: 2px;
  background: linear-gradient(90deg, var(--blue) 0%, rgba(30,144,255,.2) 100%);
  z-index: 0;
}
.step { text-align: center; position: relative; z-index: 1; }
.step-num {
  width: 56px; height: 56px; background: var(--blue); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
  font-size: 20px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 16px rgba(30,144,255,.4);
}
.step h4 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--gray); line-height: 1.6; }

/* ── TESTIMONIOS ───────────────────────────────────────── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 48px; }
.testi {
  background: #fff; border: 1px solid #D9E9FF; border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.testi-stars { color: #F59E0B; font-size: 14px; margin-bottom: 14px; letter-spacing: 2px; }
.testi-text { font-size: 14px; color: var(--gray); line-height: 1.7; margin-bottom: 18px; font-style: italic; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--blue);
}
.testi-name { font-size: 13px; font-weight: 700; color: var(--navy); }
.testi-role { font-size: 12px; color: var(--gray); }

/* ── CONTACTO ──────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px; align-items: start; }
.contact-info h3 { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 20px; }
.contact-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.contact-icon {
  width: 42px; height: 42px; min-width: 42px; background: var(--lblue);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.contact-item h4 { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.contact-item p, .contact-item a { font-size: 13px; color: var(--gray); }
.contact-item a:hover { color: var(--blue); }
.contact-form { background: #fff; border: 1px solid #D9E9FF; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid #D9E9FF; border-radius: 8px;
  font-size: 14px; color: var(--black); font-family: var(--font);
  transition: border-color .2s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--blue); }
.form-group textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-success { display: none; background: #EAF7EF; border: 1px solid #6EE7B7; border-radius: 8px; padding: 14px 18px; color: #065F46; font-size: 14px; margin-top: 12px; }

/* ── CTA BAR ───────────────────────────────────────────── */
#cta-bar {
  background: linear-gradient(135deg, var(--blue) 0%, #0D5EBF 100%);
  padding: 60px 0;
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(20px,2.5vw,28px); font-weight: 800; color: #fff; margin-bottom: 6px; }
.cta-inner p { font-size: 14px; color: rgba(255,255,255,.8); }

/* ── FOOTER ────────────────────────────────────────────── */
footer { background: #060F3A; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand img { height: 44px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,.4); line-height: 1.7; margin-bottom: 20px; }
.footer-socials { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  color: rgba(255,255,255,.5); transition: all .2s;
}
.social-btn:hover { background: var(--blue); color: #fff; }
.footer-col h4 { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase;
                  letter-spacing: .06em; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,.4); margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding: 20px 0; display: flex;
                  justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,.3); }

/* ── WHATSAPP FLOTANTE ─────────────────────────────────── */
.wa-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 200;
  width: 58px; height: 58px; background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,.4); font-size: 28px;
  transition: transform .2s; animation: wa-bounce 2s ease infinite;
}
.wa-float:hover { transform: scale(1.1); }
@keyframes wa-bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }

/* ── REVEAL ────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── TABLET ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .plan.featured { transform: none; }
  .process-steps { grid-template-columns: repeat(2,1fr); }
  .process-steps::before { display: none; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2,1fr); }
  .stat-item:nth-child(2) { border-right: none; }
}

/* ── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* General */
  .section { padding: 48px 0; }
  .container { padding: 0 16px; }

  /* Navbar */
  .nav-logo span { font-size: 13px; }
  .nav-logo img { height: 30px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: fixed;
    top: 64px; left: 0; right: 0; background: var(--navy);
    padding: 20px 20px; gap: 16px;
    border-top: 1px solid rgba(255,255,255,.1);
    z-index: 99; box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }
  .nav-links.open a { font-size: 14px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-links.open .btn { margin-top: 4px; justify-content: center; }
  .nav-toggle { display: block; }

  /* Hero / Banner */
  #hero { padding-top: 80px; padding-bottom: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 26px; }
  .hero-sub { font-size: 14px; }
  .hero-btns { flex-direction: column; gap: 10px; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .hero-chips { gap: 6px; }
  .chip { font-size: 11px; padding: 4px 10px; }

  /* Banner slider */
  .banner-slide { height: 420px !important; }
  .banner-content { padding: 0 20px !important; max-width: 100% !important; }
  .banner-content h2 { font-size: 22px !important; }
  .banner-content p { font-size: 12px !important; }
  .b-btns { flex-direction: column; gap: 8px; }
  .b-btns .btn, .b-btns button { width: 100% !important; justify-content: center; text-align: center; }
  .banner-badge { display: none; }
  .b-prev-btn { left: 6px !important; }
  .b-next-btn { right: 6px !important; }

  /* Stats */
  .stats-bar { grid-template-columns: repeat(2,1fr); }
  .stat-val { font-size: 24px; }
  .stat-label { font-size: 11px; }
  .stat-item { padding: 16px 8px; }

  /* Section titles */
  .section-title { font-size: 22px; }
  .section-sub { font-size: 13px; }

  /* Servicios */
  .services-grid { grid-template-columns: 1fr; gap: 12px; }
  .svc-card { padding: 20px; }

  /* Galería */
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* Por qué */
  .why-grid { grid-template-columns: 1fr; gap: 10px; }
  .why-item { padding: 16px; }

  /* Proceso */
  .process-steps { grid-template-columns: 1fr 1fr; gap: 16px; }
  .process-steps::before { display: none; }

  /* Planes */
  .plans-grid { grid-template-columns: 1fr; }
  .plan.featured { transform: none; }
  .plan { padding: 20px; }

  /* Testimonios */
  .testimonials-grid { grid-template-columns: 1fr; }

  /* Contacto */
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 20px; }

  /* CTA bar */
  .cta-inner { text-align: center; justify-content: center; flex-direction: column; }
  .cta-inner h2 { font-size: 18px; }
  .cta-inner > div:last-child { width: 100%; }
  .cta-inner > div:last-child .btn { flex: 1; justify-content: center; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand p { font-size: 12px; }

  /* Popups */
  #popup-agenda .modal, 
  #popup-convenios .popup-box,
  #popup-hogares > div,
  #popup-empresas > div,
  #popup-industrias > div,
  #popup-hospitalario > div { 
    width: 96% !important; 
    max-height: 92vh !important;
    border-radius: 16px !important;
  }
  .convenios-grid { grid-template-columns: repeat(2,1fr) !important; }

  /* WhatsApp btn */
  .wa-float { width: 50px; height: 50px; bottom: 20px; right: 16px; font-size: 24px; }

  /* Botones flotantes */
  .float-btns { bottom: 20px; right: 16px; gap: 8px; }
  .float-btns .wa-btn, .float-btns .ai-btn { width: 48px; height: 48px; font-size: 20px; }
}

/* ── MOBILE XS (< 380px) ───────────────────────────────── */
@media (max-width: 380px) {
  .banner-slide { height: 480px !important; }
  .banner-content h2 { font-size: 19px !important; }
  .hero h1 { font-size: 22px; }
  .stats-bar { grid-template-columns: repeat(2,1fr); }
  .stat-val { font-size: 20px; }
}
