/* Pediatric GI of El Paso: site styles
   Recreates the original Divi design (purple header, angled section edges, orange/purple blocks,
   playful headings) with lightweight hand-written CSS. */

:root {
  --purple: #422e80;
  --orange: #f89015;
  --orange-light: #fcaf3c;
  --orange-red: #f15a28;
  --teal: #22b88d;
  --magenta: #b72ae9;
  --gray: #efefef;
  --dark: #222;
  --white: #fff;
  --wrap: 1080px;
  --font: "Montserrat", system-ui, sans-serif;
  --fun: "Comic Neue", "Comic Sans MS", cursive; /* the playful heading font */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  color: var(--purple);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); }
a:hover { color: var(--purple); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 400; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .2em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 200; background: var(--white); padding: 8px 14px; border-radius: 8px; }

/* Headings */
.fun { font-family: var(--fun); font-weight: 700; font-size: clamp(2rem, 4vw, 3.1rem); color: var(--orange); }
.fun--white { color: var(--white); }
.sub { font-size: clamp(1.3rem, 2.2vw, 1.6rem); color: var(--orange); }

/* Buttons (orange, rounded, soft shadow, like the original) */
.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  padding: .45em 1.1em;
  border-radius: 10px;
  border: 0;
  box-shadow: 0 4px 4px rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { background: #e47f08; color: var(--white); transform: translateY(-2px); }
.btn--lg { font-size: 1.25rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--purple);
  transition: box-shadow .2s ease;
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1400px; margin: 0 auto; padding: 0 30px; height: 104px; transition: height .25s ease; }
.site-header.is-scrolled { box-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.site-header.is-scrolled .bar { height: 76px; }
.logo img { width: 220px; transition: width .25s ease; }
.site-header.is-scrolled .logo img { width: 180px; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--white); text-decoration: none; text-transform: uppercase; font-size: 1rem; letter-spacing: .01em; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--orange); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--orange); cursor: pointer; }
.nav-toggle svg { width: 32px; height: 32px; }

@media (max-width: 1100px) {
  .site-header .bar { height: 80px; padding: 0 20px; }
  .logo img, .site-header.is-scrolled .logo img { width: 170px; }
  .site-header.is-scrolled .bar { height: 70px; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-top: 3px solid var(--orange);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
    padding: 10px 0;
  }
  .nav.is-open { display: flex; }
  .nav a { color: var(--purple); padding: 12px 28px; font-weight: 600; }
}

/* Angled / curved section edges (the original "dividers") */
.section { position: relative; }
.edge { position: absolute; left: 0; width: 100%; height: 100px; pointer-events: none; z-index: 1; }
.edge svg { display: block; width: 100%; height: 100%; }
.edge--bottom { bottom: -1px; }
.edge--top { top: -1px; }
.has-bottom-edge { padding-bottom: 120px !important; }
.has-top-edge { padding-top: 140px !important; }

.bg-gray { background: var(--gray); }
.bg-purple { background: var(--purple); color: var(--white); }
.bg-orange { background: var(--orange-light); }
.pad { padding: 70px 0; }

/* Home hero: full-screen photo, text on the right */
.hero {
  min-height: calc(100vh - 104px);
  min-height: calc(100svh - 104px);
  display: flex;
  align-items: flex-start;
  background: #f3e9dc url("/images/hero.webp") 30% center / cover no-repeat;
}
.hero .wrap { max-width: 1400px; display: flex; justify-content: flex-end; padding-top: 7vh; }
.hero__text { max-width: 560px; }
.hero h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); font-weight: 700; color: var(--teal); line-height: 1.15; margin-bottom: .2em; }
.hero p { font-size: clamp(1.15rem, 1.8vw, 1.5rem); color: var(--teal); margin-bottom: .8em; }
@media (max-width: 760px) {
  .hero { min-height: 0; background-image: none; background-color: var(--white); display: block; }
  .hero::before { content: ""; display: block; height: 62vw; background: url("/images/hero-sm.webp") 30% center / cover no-repeat; }
  .hero .wrap { padding-top: 26px; padding-bottom: 20px; justify-content: center; text-align: center; }
  .hero .btn-row { justify-content: center; }
}

/* Inner page banner: photo with title and button on the right */
.banner {
  min-height: 520px;
  display: flex;
  align-items: flex-start;
  background-color: #ccc;
  background-position: center;
  background-size: cover;
}
.banner .wrap { max-width: 1400px; text-align: right; padding-top: 70px; }
.banner h1 { font-size: 1.9rem; color: var(--white); text-shadow: 0 2px 10px rgba(0, 0, 0, .35); margin-bottom: .4em; }
@media (max-width: 760px) {
  .banner { min-height: 300px; }
  .banner .wrap { padding-top: 40px; }
}

/* Welcome block with the orange address card pinned to the right edge */
.welcome { display: grid; grid-template-columns: 1fr 420px; gap: 60px; align-items: center; }
.welcome__text { text-align: center; }
.info-card { background: var(--orange); color: var(--white); border-radius: 20px 0 0 20px; box-shadow: 0 12px 18px rgba(104, 104, 104, .29); margin-right: calc(-1 * max(20px, (100vw - var(--wrap)) / 2 + 20px)); }
.info-card__item { display: flex; gap: 14px; padding: 22px 26px; }
.info-card__item + .info-card__item { border-top: 1px solid rgba(255, 255, 255, .25); }
.info-card svg { flex: none; width: 26px; height: 26px; margin-top: 2px; }
.info-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .2em; }
.info-card p { font-size: .95rem; margin: 0 0 .7em; }
.info-card p:last-child { margin: 0; }
.info-card a { color: var(--white); text-decoration: none; }
@media (max-width: 900px) {
  .welcome { grid-template-columns: 1fr; gap: 36px; }
  .info-card { margin-right: 0; border-radius: 20px; }
}

/* Purple section with the three colored blocks */
.splash { background: var(--purple) url("/images/splash-bg.webp") center / cover no-repeat; }
.blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; align-items: start; position: relative; z-index: 2; }
.block { color: var(--white); text-align: center; padding: 50px 32px 44px; box-shadow: 0 12px 18px -6px rgba(0, 0, 0, .3); }
.block--1 { background: var(--orange-light); }
.block--2 { background: var(--orange); }
.block--3 { background: var(--orange-red); }
.block img { width: 72px; margin: 0 auto 26px; }
.block h2 { font-size: 1.75rem; }
.block p { font-size: 1rem; margin: 0; }
@media (max-width: 900px) { .blocks { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

/* Orange feature columns (About page) */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; text-align: center; color: var(--white); position: relative; z-index: 2; }
.features img, .features svg { width: 110px; height: 110px; margin: 0 auto 24px; }
.features h2 { font-size: 1.6rem; color: var(--white); }
.features p { color: var(--white); font-size: 1rem; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }

/* Reviews slider */
.reviews { background: var(--orange); border-radius: 20px; padding: 46px 60px; position: relative; }
.reviews__track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px; }
.reviews__track::-webkit-scrollbar { display: none; }
.review {
  flex: 0 0 calc((100% - 40px) / 3);
  scroll-snap-align: start;
  background: #f4f4f4;
  border-radius: 10px;
  padding: 18px 20px 16px;
  text-align: center;
  color: #333;
  font-size: .95rem;
  margin: 0;
}
.review__avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--white); font-weight: 700; font-size: 1.25rem; margin: 0 auto 8px; }
.review__name { font-weight: 700; font-size: 1rem; color: #222; }
.review__stars { color: #f6bb06; letter-spacing: 2px; margin: 4px 0 8px; }
.review blockquote { margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.review.is-open blockquote { -webkit-line-clamp: unset; }
.review__more { background: none; border: 0; color: #777; font: inherit; font-size: .85rem; cursor: pointer; padding: 0; }
.review__source { font-size: .75rem; color: #888; margin-top: 6px; }
.reviews__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--white);
  color: var(--orange);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}
.reviews__arrow--prev { left: 12px; }
.reviews__arrow--next { right: 12px; }
@media (max-width: 900px) { .review { flex-basis: calc((100% - 20px) / 2); } .reviews { padding: 36px 50px; } }
@media (max-width: 600px) { .review { flex-basis: 100%; } .reviews { padding: 30px 44px; } }

/* "We can't wait to meet you" */
.meet { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
.meet img { width: 100%; }
.meet__text { text-align: center; padding-right: 20px; }
.meet-section { padding: 60px 0 120px; overflow: hidden; }
.meet-section .meet { max-width: 1440px; margin: 0 auto; }
@media (max-width: 860px) { .meet { grid-template-columns: 1fr; } .meet__text { padding: 0 20px; } }

/* Two-column rows: photo + text (team), text + video, etc. */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; padding: 40px 0; }
.row--photo { grid-template-columns: 396px 1fr; }
.row--center { align-items: center; }
.row img { width: 100%; }
.row h2.fun { font-size: clamp(2rem, 4vw, 3.1rem); }
.row h3 { font-size: 1.6rem; color: var(--orange); margin-top: .8em; }
.bg-orange .row h3 { color: var(--white); }
.row .role { font-size: 1.3rem; color: #333; margin: -.2em 0 .8em; }
@media (max-width: 860px) {
  .row, .row--photo { grid-template-columns: 1fr; gap: 26px; }
  .row--photo img { max-width: 380px; }
}

.lists { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
@media (max-width: 760px) { .lists { grid-template-columns: 1fr; gap: 10px; } }

/* Video (thumbnail first, YouTube loads on click) */
.video { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video button { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; }
.video button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  background: #f00 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 30px no-repeat;
}

/* Contact card */
.contact-card { background: var(--white); display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 50px; max-width: 1140px; margin: 30px auto 0; box-shadow: 0 6px 24px rgba(0, 0, 0, .06); }
.contact-card h2 { font-size: 1.6rem; color: var(--orange); }
.contact-card p { margin-bottom: .6em; }
.contact-card .hours p { margin: 0; }
@media (max-width: 860px) { .contact-card { grid-template-columns: 1fr; padding: 30px 22px; } }

.form label { display: block; font-weight: 600; font-size: .95rem; margin: 14px 0 6px; }
.form label span { color: #d33; }
.form input, .form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: #333;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: var(--white);
}
.form textarea { min-height: 140px; resize: vertical; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .hp { position: absolute; left: -9999px; }
.form .btn { margin-top: 18px; }
.form small { display: block; color: #666; margin-top: 10px; font-size: .82rem; }
.form-msg { padding: 14px 18px; border-radius: 6px; margin-bottom: 16px; font-weight: 600; }
.form-msg--ok { background: #e3f6ee; color: #146c4e; }
.form-msg--err { background: #fde8e4; color: #a33a1d; }

.map { display: block; width: 100%; height: 420px; border: 0; }

/* Footer */
.site-footer { background: var(--dark); color: var(--white); font-style: italic; font-size: .95rem; padding: 28px 0; }
.site-footer .wrap { max-width: 1400px; padding: 0 100px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
@media (max-width: 760px) { .site-footer .wrap { padding: 0 20px; text-align: center; } }

/* Floating left menu: phone, pay your bill, patient portal */
.float-menu { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; }
.float-menu a { display: flex; align-items: center; height: 50px; color: var(--white); text-decoration: none; }
.float-menu .ico { width: 50px; height: 50px; display: grid; place-items: center; flex: none; }
.float-menu svg { width: 22px; height: 22px; fill: currentColor; }
.float-menu .lbl {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  height: 50px;
  line-height: 50px;
  font-size: .95rem;
  transition: max-width .4s ease, padding .4s ease;
}
.float-menu a:hover .lbl, .float-menu a:focus .lbl { max-width: 220px; padding-right: 18px; }
.float-menu .fm-phone, .float-menu .fm-phone .lbl { background: var(--teal); }
.float-menu .fm-pay, .float-menu .fm-pay .lbl { background: var(--magenta); }
.float-menu .fm-portal, .float-menu .fm-portal .lbl { background: var(--orange); }
.float-menu a:hover { color: var(--white); }
@media (max-width: 760px) {
  .float-menu a, .float-menu .ico { height: 38px; }
  .float-menu .ico { width: 36px; }
  .float-menu svg { width: 18px; height: 18px; }
  .float-menu .lbl { height: 38px; line-height: 38px; }
}

/* Gentle fade-up as sections scroll into view (like the original) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Phones: shallower section edges and less padding */
@media (max-width: 760px) {
  .edge { height: 44px; }
  .has-bottom-edge { padding-bottom: 70px !important; }
  .has-top-edge { padding-top: 70px !important; }
  .pad { padding: 44px 0; }
  .meet-section { padding: 0 0 70px; }
}
