/* ===========================
   MEDIGROUP TAPATÍO – STYLE.CSS
   Salud · Confianza · Limpio
=========================== */

:root {
  --blue: #3B5FAD;
  --blue-light: #7B96D4;
  --blue-pale: #EEF2FB;
  --blue-dark: #1E3A7A;
  --white: #FFFFFF;
  --off-white: #F7F9FC;
  --light: #E8EDF8;
  --gray: #6B7A9A;
  --dark: #1A2340;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(59,95,173,0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--off-white);
  color: var(--dark);
  line-height: 1.7;
  overflow-x: hidden;
}
h1,h2 { font-family: 'Fraunces', serif; line-height: 1.15; }
h3,h4 { font-family: 'Inter', sans-serif; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
}
.btn--primary { background: var(--blue); color: white; }
.btn--primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,95,173,0.3); }
.btn--soft { background: var(--blue-pale); color: var(--blue); }
.btn--soft:hover { background: var(--light); }

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-pale);
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}

/* ======= HEADER ======= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--light);
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 2px 20px rgba(59,95,173,0.1); }
.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.header__logo { display: flex; align-items: center; gap: 12px; }

/* CSS logo for medigroup */
.med-logo {
  position: relative;
  width: 40px;
  height: 40px;
}
.med-logo__house {
  position: absolute;
  bottom: 2px; left: 2px;
  width: 26px; height: 26px;
  border: 4px solid var(--blue-light);
  border-top: none;
}
.med-logo__house::before {
  content: '';
  position: absolute;
  top: -16px; left: -4px;
  width: 0; height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-bottom: 14px solid var(--blue);
}
.med-logo__plus {
  position: absolute;
  bottom: 4px; right: 0;
  width: 18px; height: 18px;
  background: var(--blue);
  border-radius: 50%;
}
.med-logo__plus::before, .med-logo__plus::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 2px;
}
.med-logo__plus::before { width: 2px; height: 10px; top: 4px; left: 8px; }
.med-logo__plus::after { width: 10px; height: 2px; top: 8px; left: 4px; }
.med-logo--sm { width: 30px; height: 30px; }
.med-logo--sm .med-logo__house { width: 20px; height: 20px; border-width: 3px; }
.med-logo--sm .med-logo__house::before { border-left-width: 13px; border-right-width: 13px; border-bottom-width: 11px; top: -12px; left: -3px; }
.med-logo--sm .med-logo__plus { width: 14px; height: 14px; }

.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-brand { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 700; color: var(--blue-dark); }
.logo-sub { font-family: 'Inter', sans-serif; font-size: 0.65rem; font-weight: 500; color: var(--blue-light); letter-spacing: 0.05em; }
.header__nav { display: flex; gap: 28px; margin-left: auto; }
.header__nav a { font-size: 0.85rem; font-weight: 500; color: var(--gray); transition: color 0.2s; }
.header__nav a:hover { color: var(--blue); }
.header__cta { white-space: nowrap; padding: 10px 22px; font-size: 0.85rem; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; margin-left: auto; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: all 0.3s; }

/* ======= HERO ======= */
.hero {
  padding-top: 90px;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.hero__stripe {
  position: absolute;
  top: 0; right: 0;
  width: 40%;
  height: 100%;
  background: var(--blue-pale);
  clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0 0;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray);
  background: var(--blue-pale);
  padding: 8px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}
.badge-dot { width: 8px; height: 8px; background: #22C55E; border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.hero__title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
}
.hero__desc {
  font-size: 1rem;
  color: var(--gray);
  max-width: 440px;
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.hero__card {
  padding: 24px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero__card:first-child { grid-column: 1 / -1; }
.hero__card--blue { background: var(--blue); color: white; }
.hero__card--white { background: white; color: var(--dark); box-shadow: var(--shadow); }
.hero__card--sm { }
.hc-icon { font-size: 1.8rem; }
.hero__card strong { font-size: 1rem; font-weight: 600; }
.hero__card span { font-size: 0.82rem; opacity: 0.75; }

.hero__stats-bar { background: var(--dark); color: white; margin-top: 60px; }
.stats-row { display: flex; align-items: center; padding: 28px 0; flex-wrap: wrap; gap: 0; }
.hstat { flex: 1; text-align: center; padding: 8px 0; min-width: 120px; }
.hstat__num { display: block; font-family: 'Fraunces', serif; font-size: 2.2rem; font-weight: 700; color: var(--blue-light); }
.hstat__label { font-size: 0.8rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; }
.hstat__sep { width: 1px; height: 48px; background: rgba(255,255,255,0.1); }

/* ======= NOSOTROS ======= */
.nosotros { padding: 80px 0; background: var(--off-white); }
.nosotros__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.nosotros__text h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 20px; }
.nosotros__text p { color: var(--gray); margin-bottom: 16px; font-size: 0.95rem; }
.nosotros__values { display: flex; flex-direction: column; gap: 24px; }
.value-item { display: flex; gap: 20px; align-items: flex-start; background: white; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.value-item__color { width: 4px; height: 48px; border-radius: 4px; flex-shrink: 0; }
.value-item h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }
.value-item p { font-size: 0.88rem; color: var(--gray); }

/* ======= SERVICIOS ======= */
.servicios { padding: 80px 0; background: white; }
.section-header { margin-bottom: 48px; }
.section-header h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 12px; }
.section-header p { color: var(--gray); font-size: 0.95rem; }
.servicios__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.svc-card {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 32px 24px;
  border: 1px solid var(--light);
  transition: all 0.3s;
}
.svc-card:hover { background: var(--blue); color: white; transform: translateY(-4px); box-shadow: 0 12px 40px rgba(59,95,173,0.2); }
.svc-card:hover p { color: rgba(255,255,255,0.8); }
.svc-card__icon { font-size: 2rem; margin-bottom: 16px; }
.svc-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.svc-card p { font-size: 0.88rem; color: var(--gray); transition: color 0.3s; }

/* ======= DIFERENCIADORES ======= */
.diferenciadores { padding: 80px 0; background: var(--off-white); }
.dif__header { margin-bottom: 48px; }
.dif__header h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.dif__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.dif__item {
  display: flex;
  gap: 24px;
  background: white;
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}
.dif__item:hover { transform: translateX(4px); }
.dif__num {
  font-family: 'Fraunces', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--blue-pale);
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
}
.dif__body h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.dif__body p { font-size: 0.88rem; color: var(--gray); }

/* ======= COBERTURA ======= */
.cobertura { }
.cobertura__inner { display: grid; grid-template-columns: 1fr 1fr; min-height: 400px; }
.cobertura__block { padding: 64px 48px; display: flex; flex-direction: column; justify-content: center; }
.cobertura__block--blue { background: var(--blue); color: white; }
.cobertura__block--blue h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 20px; }
.cobertura__block--blue p { color: rgba(255,255,255,0.75); font-size: 0.95rem; }
.cobertura__block--white { background: white; }
.cob-list { display: flex; flex-direction: column; gap: 20px; }
.cob-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--light);
}
.cob-item__icon { font-size: 1.4rem; }
.cob-item strong { display: block; font-size: 0.95rem; font-weight: 700; }
.cob-item span { font-size: 0.8rem; color: var(--gray); }

/* ======= REDES ======= */
.redes { padding: 64px 0; background: var(--off-white); border-top: 1px solid var(--light); }
.redes__inner { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.redes__text { flex: 1; min-width: 240px; }
.redes__text h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 12px; }
.redes__text p { color: var(--gray); font-size: 0.9rem; }
.redes__links { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }
.red-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--blue);
  color: white;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.25s;
}
.red-link:hover { background: var(--blue-dark); transform: translateY(-2px); }

/* ======= CONTACTO ======= */
.contacto { padding: 80px 0; background: white; }
.contacto h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 48px; }
.contacto__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.contacto__card {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--light);
  transition: all 0.3s;
}
.contacto__card:hover { border-color: var(--blue); box-shadow: 0 8px 32px rgba(59,95,173,0.12); transform: translateY(-4px); }
.contacto__card--wa { background: #F0FDF4; border-color: #BBF7D0; }
.contacto__card__icon { font-size: 2.5rem; margin-bottom: 12px; }
.contacto__card h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray); margin-bottom: 8px; }
.contacto__card a { font-size: 0.92rem; font-weight: 600; color: var(--blue); }
.contacto__card a:hover { text-decoration: underline; }

/* ======= FOOTER ======= */
.footer { background: var(--dark); color: white; padding: 40px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand .logo-brand { color: white; }
.footer__brand .logo-sub { color: var(--blue-light); }
.footer__copy { font-size: 0.82rem; color: rgba(255,255,255,0.4); }
.footer__links { display: flex; gap: 20px; }
.footer__links a { font-size: 0.82rem; color: rgba(255,255,255,0.4); transition: color 0.2s; }
.footer__links a:hover { color: white; }

/* ======= RESPONSIVE ======= */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; padding-top: 40px; }
  .hero__stripe { width: 100%; clip-path: none; height: 50%; top: auto; bottom: 0; opacity: 0.3; }
  .hero__cards { display: none; }
  .nosotros__grid { grid-template-columns: 1fr; }
  .cobertura__inner { grid-template-columns: 1fr; }
  .cobertura__block { padding: 40px 24px; }
  .redes__inner { flex-direction: column; align-items: flex-start; }
  .header__nav { display: none; }
  .header__nav.open { display: flex; flex-direction: column; position: fixed; top: 72px; left: 0; right: 0; background: white; padding: 20px 24px; border-bottom: 1px solid var(--light); gap: 16px; z-index: 99; }
  .header__cta { display: none; }
  .hamburger { display: flex; }
  .stats-row { justify-content: center; }
  .hstat__sep { display: none; }
  .footer__inner { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
  .dif__grid { grid-template-columns: 1fr; }
}
