/* ===================================================
   Sitio Web Dr. Paul Ricardo Vivas Estrada — Estilos
   =================================================== */

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

:root {
  --primary:   #1a6fa8;
  --primary-dk:#145a8c;
  --accent:    #4db8a0;
  --light-bg:  #f4f9fd;
  --white:     #ffffff;
  --text:      #2c3e50;
  --muted:     #6c7a89;
  --border:    #d6e8f5;
  --radius:    10px;
  --radius-lg: 18px;
  --shadow:    0 4px 18px rgba(0,0,0,.10);
  --shadow-lg: 0 14px 36px rgba(20, 90, 140, .16);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 560px at 10% -10%, rgba(77,184,160,.12), transparent 55%),
    radial-gradient(850px 500px at 100% -5%, rgba(26,111,168,.12), transparent 58%),
    var(--light-bg);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---------- Utility ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.section   { padding: 4.5rem 0; }
.section--alt { background: var(--light-bg); }
.section .container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}
.section-lead {
  margin-bottom: 1.5rem;
  color: var(--muted);
  max-width: 760px;
}

h2.section-title {
  font-size: 1.95rem;
  color: var(--primary);
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: .5rem;
}
h2.section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 50px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- Header / Hero ---------- */
header {
  background: linear-gradient(130deg, var(--primary) 0%, var(--primary-dk) 70%);
  color: var(--white);
  padding: 4.2rem 0 3.3rem;
  position: relative;
  overflow: hidden;
}
header::before,
header::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  opacity: .25;
  pointer-events: none;
}
header::before {
  width: 420px;
  height: 420px;
  background: var(--accent);
  right: -140px;
  top: -180px;
}
header::after {
  width: 260px;
  height: 260px;
  background: rgba(255,255,255,.25);
  left: -80px;
  bottom: -130px;
}
header .hero-layout {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
header .hero-copy {
  text-align: left;
}
header .avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  border: 4px solid rgba(255,255,255,.35);
}
header .hero-banner-image {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  background: var(--white);
  border-radius: var(--radius-lg);
  display: block;
  margin: 0;
  border: 4px solid rgba(255,255,255,.35);
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
header .hero-media {
  display: flex;
  justify-content: flex-end;
}
header h1 { font-size: 2.45rem; font-weight: 800; line-height: 1.15; }
header .subtitle {
  font-size: 1.08rem;
  opacity: .9;
  margin-top: .65rem;
  max-width: 38ch;
}
header .badges {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: flex-start;
  margin-top: 1.2rem;
}
header .badge {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px;
  padding: .3rem .85rem;
  font-size: .85rem;
}
header .hero-cta {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-start;
}

/* ---------- Nav ---------- */
nav {
  background: rgba(20, 90, 140, .78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-brand {
  color: var(--white) !important;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
}
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .2rem;
  width: 100%;
}
nav ul li a {
  display: block;
  color: rgba(255,255,255,.85);
  padding: .68rem .95rem;
  font-size: .92rem;
  font-weight: 600;
  border-radius: 999px;
  transition: background .2s, color .2s, transform .2s;
}
nav ul li a:hover {
  background: rgba(255,255,255,.16);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---------- Profile ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.intro-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.intro-text {
  margin-bottom: .8rem;
  color: var(--muted);
}
.intro-points {
  list-style: none;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.intro-points li {
  margin-bottom: .45rem;
  font-size: .95rem;
}
.intro-points li:last-child {
  margin-bottom: 0;
}
.profile-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 24px rgba(20, 90, 140, .10);
}
.profile-item .label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: .3rem;
}
.profile-item .value { font-weight: 600; font-size: 1rem; }

/* ---------- Locations ---------- */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.location-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 10px 28px rgba(20, 90, 140, .11);
}
.location-card h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.location-card p { margin-bottom: .5rem; font-size: .95rem; }
.location-card .services-list {
  margin: .75rem 0 1.25rem 1.1rem;
  font-size: .92rem;
  color: var(--muted);
}
.location-card .services-list li { margin-bottom: .25rem; }
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #25d366;
  color: var(--white) !important;
  padding: .6rem 1.2rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none !important;
  transition: background .2s, transform .15s;
}
.wa-btn:hover { background: #1ebe5b; transform: translateY(-2px); }
.wa-btn svg { flex-shrink: 0; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 10px 28px rgba(20, 90, 140, .11);
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(20, 90, 140, .18);
}
.service-card .icon {
  font-size: 2.2rem;
  margin-bottom: .75rem;
}
.service-card h3 { font-size: 1rem; color: var(--primary); margin-bottom: .5rem; }
.service-card p  { font-size: .88rem; color: var(--muted); }

/* ---------- Appointments ---------- */
.appt-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: .5rem;
}
.appt-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--primary);
  color: var(--white) !important;
  padding: .75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none !important;
  transition: background .2s, transform .15s;
}
.appt-btn:hover { background: var(--primary-dk); transform: translateY(-2px); }
.appt-btn--outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary) !important;
}
.appt-btn--outline:hover { background: var(--primary); color: var(--white) !important; }

/* ---------- Insurance & Payment ---------- */
.pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.pay-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 10px 28px rgba(20, 90, 140, .11);
}
.pay-card h3 { font-size: 1rem; color: var(--primary); margin-bottom: .75rem; }
.pay-card ul { padding-left: 1.1rem; font-size: .92rem; color: var(--muted); }
.pay-card ul li { margin-bottom: .35rem; }

/* ---------- Social / Digital ---------- */
.social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: .75rem 1.2rem;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text) !important;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(20, 90, 140, .1);
  transition: border-color .2s, transform .15s;
  text-decoration: none !important;
}
.social-link:hover {
  border-color: var(--primary);
  color: var(--primary) !important;
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
footer {
  background: linear-gradient(130deg, var(--primary-dk), var(--primary));
  color: rgba(255,255,255,.75);
  text-align: center;
  padding: 2rem 1.25rem;
  font-size: .87rem;
}
footer a { color: rgba(255,255,255,.85); }
footer a:hover { color: var(--white); }

/* ---------- Mobile Nav (hamburger) ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .85rem 1.1rem;
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
}
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,.9);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
/* Animate bars into an X when open.
   bar height = 2px, gap between bars = 5px → translateY = gap + height = 7px */
.nav--open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav--open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Footer phone row ---------- */
.footer-phones {
  margin-top: .5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem .75rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  /* --- Sections --- */
  .section { padding: 2.5rem 0; }
  .section .container { padding: 1.3rem; border-radius: 14px; }
  .intro-grid { grid-template-columns: 1fr; }

  /* --- Header --- */
  header { padding: 2.7rem 0 2.2rem; }
  header .hero-layout { grid-template-columns: 1fr; }
  header .hero-copy { text-align: center; }
  header .hero-media { justify-content: center; }
  header .hero-banner-image { max-width: 420px; }
  header h1 { font-size: 1.8rem; }
  header .badges,
  header .hero-cta { justify-content: center; }
  h2.section-title { font-size: 1.4rem; }

  /* --- Nav: hamburger --- */
  .nav-toggle { display: flex; }
  .nav-brand { font-size: .98rem; }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,.15);
    margin-top: .35rem;
  }
  nav.nav--open ul { display: flex; }

  nav ul li { width: 100%; }
  nav ul li a {
    padding: .9rem 1.25rem;
    font-size: .95rem;
    min-height: 44px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  /* --- Appointment buttons: full-width stack --- */
  .appt-grid { flex-direction: column; }
  .appt-btn,
  .appt-grid .wa-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    font-size: 1rem;
  }

  /* --- Social links: full-width --- */
  .social-grid { flex-direction: column; }
  .social-link {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* --- Location WhatsApp button: full-width --- */
  .location-card .wa-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* --- Footer phones: stacked --- */
  .footer-phones { flex-direction: column; gap: .3rem; }
}

@media (max-width: 400px) {
  header .avatar { width: 88px; height: 88px; font-size: 2.2rem; }
  header .hero-banner-image { max-height: 230px; }
  header h1 { font-size: 1.3rem; }
}
