/* ============================================
   Santamira Clínica Dentária — Design System
   Porcelain / Ink Navy / Coral / Sea Mint
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --porcelain: #F5F7F5;
  --porcelain-deep: #ECF1EE;
  --ink: #16233D;
  --navy: #1F3A5F;
  --navy-deep: #14263F;
  --coral: #E15241;
  --coral-deep: #C43F30;
  --mint: #D9ECE3;
  --mint-deep: #C3E0D3;
  --slate: #5B6B75;
  --white: #FFFFFF;

  --display: 'Fraunces', serif;
  --body: 'Inter', system-ui, sans-serif;

  --container: 1120px;
  --radius: 18px;
  --radius-sm: 10px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--porcelain);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }

html, body{ overflow-x: hidden; max-width: 100%; }
.contact-list a, .footer-col a{ overflow-wrap: anywhere; word-break: break-word; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3{
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1{ font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2{ font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3{ font-size: 1.25rem; font-weight: 600; }

p{ margin: 0 0 1em; color: var(--slate); }

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--body);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1em;
}
.eyebrow::before{
  content: '';
  width: 22px; height: 2px;
  background: var(--coral);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .85em 1.6em;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn-coral{
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 8px 20px -8px rgba(225,82,65,.55);
}
.btn-coral:hover{ background: var(--coral-deep); transform: translateY(-2px); }

.btn-ghost{
  background: transparent;
  color: var(--porcelain);
  border-color: rgba(245,247,245,.4);
}
.btn-ghost:hover{ border-color: var(--porcelain); transform: translateY(-2px); }

.btn-ghost-navy{
  background: transparent;
  color: var(--navy);
  border-color: rgba(22,35,61,.25);
}
.btn-ghost-navy:hover{ border-color: var(--navy); transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,247,245,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(22,35,61,.08);
}
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.nav-brand{
  display: flex;
  align-items: center;
  gap: .7em;
}
.nav-brand img{ height: 46px; width: auto; }

.nav-links{
  display: flex;
  gap: 2.2em;
  list-style: none;
  margin: 0; padding: 0;
  font-weight: 600;
  font-size: .95rem;
}
.nav-links a{
  position: relative;
  padding: 6px 0;
  color: var(--navy);
}
.nav-links a::after{
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 2px;
  background: var(--coral);
  transition: width .22s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after{ width: 100%; }
.nav-links a.active{ color: var(--coral); }

.nav-cta{ display: flex; align-items: center; gap: 1em; }

.nav-cta-mobile{ display: none; }
.nav-phone{
  display: flex; align-items: center; gap: .5em;
  font-weight: 600; font-size: .92rem; color: var(--navy);
}

.nav-toggle{
  display: none;
  background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 6px;
}
.nav-toggle span{
  width: 24px; height: 2px; background: var(--navy); display: block;
  transition: transform .25s ease, opacity .25s ease;
}
.site-header.open .nav-toggle span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.site-header.open .nav-toggle span:nth-child(2){ opacity: 0; }
.site-header.open .nav-toggle span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero{
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--porcelain);
  position: relative;
  overflow: hidden;
}
.hero .container{
  padding-top: 88px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero h1{ color: var(--white); }
.hero h1 em{
  font-style: italic;
  color: var(--coral);
}
.hero p.lead{
  color: rgba(245,247,245,.78);
  font-size: 1.08rem;
  max-width: 46ch;
}
.hero-actions{ display: flex; gap: 14px; margin-top: 1.6em; flex-wrap: wrap; }

.hero-tooth{
  position: absolute;
  right: -60px; top: -40px;
  width: 420px; opacity: .1;
  z-index: 1;
  pointer-events: none;
}

.hero-card{
  background: rgba(245,247,245,.06);
  border: 1px solid rgba(245,247,245,.16);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(6px);
}
.hero-card ul{ list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hero-card li{ display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: rgba(245,247,245,.92); }
.hero-card .ic{ color: var(--coral); flex-shrink: 0; margin-top: 2px; }

/* ---------- Smile divider (signature element) ---------- */
.smile-divider{ display: block; width: 100%; height: 46px; margin: 0; }
.smile-divider path{ fill: var(--porcelain); }
.smile-divider.flip path{ fill: var(--navy-deep); }
.smile-divider.to-mint path{ fill: var(--mint); }
.smile-divider.to-porcelain path{ fill: var(--porcelain); }
.smile-divider.to-navy path{ fill: var(--navy-deep); }

/* ---------- Sections ---------- */
section{ padding: 88px 0; }
.section-tight{ padding: 64px 0; }
.section-header{ max-width: 640px; margin-bottom: 3em; }
.section-header.center{ margin-left: auto; margin-right: auto; text-align: center; }

.bg-mint{ background: var(--mint); }
.bg-navy{ background: var(--navy-deep); color: var(--porcelain); }
.bg-navy h2, .bg-navy h3{ color: var(--white); }
.bg-navy p{ color: rgba(245,247,245,.75); }

/* ---------- Services grid ---------- */
.services-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service-card{
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 26px 22px;
  border: 1px solid rgba(22,35,61,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -18px rgba(22,35,61,.25);
}
.service-card .num{
  font-family: var(--display);
  font-style: italic;
  color: var(--coral);
  font-size: 1rem;
  margin-bottom: .6em;
  display: block;
}
.service-card h3{ font-size: 1.02rem; margin-bottom: .4em; }
.service-card p{ font-size: .88rem; margin: 0; }

/* ---------- Trust bar ---------- */
.trust-bar{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: -64px;
  position: relative;
  z-index: 5;
  box-shadow: 0 24px 50px -30px rgba(22,35,61,.35);
}
.trust-item{ display: flex; gap: 14px; align-items: flex-start; }
.trust-item .ic{ color: var(--coral); flex-shrink: 0; }
.trust-item h3{ font-size: .98rem; margin-bottom: .2em; }
.trust-item p{ font-size: .87rem; margin: 0; }

/* ---------- Gallery placeholders ---------- */
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 160px 160px;
  gap: 14px;
}
.gallery-grid .g1{ grid-column: span 3; grid-row: span 2; }
.gallery-grid .g2{ grid-column: span 3; grid-row: span 1; }
.gallery-grid .g3{ grid-column: span 2; grid-row: span 1; }
.gallery-grid .g4{ grid-column: span 1; grid-row: span 1; }

.photo-slot{
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(135deg, rgba(31,58,95,.06) 0 2px, transparent 2px 14px),
    var(--mint-deep);
  border: 1.5px dashed rgba(31,58,95,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  color: var(--navy);
  font-size: .8rem;
  font-weight: 600;
}
.photo-slot span{ opacity: .7; max-width: 18ch; }

.photo-slot.has-photo{
  background: none;
  border: none;
  padding: 0;
  overflow: hidden;
}
.photo-slot.has-photo img{
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.photo-slot.has-photo:hover img{ transform: scale(1.04); }

/* ---------- Cards / Values ---------- */
.values-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.value-card{
  padding: 28px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(22,35,61,.06);
}
.value-card .ic{ color: var(--coral); margin-bottom: .8em; }

/* ---------- Team Slider ---------- */
.team-slider{
  display: flex;
  align-items: center;
  gap: 18px;
}
.slider-viewport{
  overflow: hidden;
  flex: 1;
}
.slider-track{
  display: flex;
  transition: transform .5s cubic-bezier(.65,0,.35,1);
}
.team-slide{
  flex: 0 0 33.333%;
  max-width: 33.333%;
  padding: 0 14px;
  box-sizing: border-box;
}
.team-card{
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(22,35,61,.06);
  height: 100%;
}
.team-photo{
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, var(--mint) 0%, var(--mint-deep) 100%);
  overflow: hidden;
}
.team-photo img{
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
}
.team-body{ padding: 22px 24px 26px; text-align: center; }
.team-role{
  display: block;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--coral); margin-bottom: .5em;
}
.team-body h3{ margin: 0; font-size: 1.15rem; }
.team-omd{
  display: block;
  margin-top: .4em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: .02em;
}
.slider-arrow{
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(31,58,95,.18);
  background: var(--white);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.slider-arrow:hover{ background: var(--navy); color: var(--white); border-color: var(--navy); }
.slider-arrow[disabled]{ opacity: .35; cursor: default; }
.slider-arrow[disabled]:hover{ background: var(--white); color: var(--navy); border-color: rgba(31,58,95,.18); }
.slider-dots{
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 26px;
}
.slider-dots button{
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(31,58,95,.22);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.slider-dots button.active{ background: var(--coral); transform: scale(1.2); }

@media (max-width: 900px){
  .team-slide{ flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 620px){
  .team-slide{ flex: 0 0 100%; max-width: 100%; }
  .slider-arrow{ width: 40px; height: 40px; }
}

/* ---------- Contact ---------- */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact-list li{ display: flex; gap: 16px; align-items: flex-start; }
.contact-list .ic{
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--mint); color: var(--navy);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-list h3{ font-size: .95rem; margin-bottom: .2em; }
.contact-list p{ margin: 0; font-size: .92rem; }
.contact-list a{ color: var(--navy); font-weight: 600; }
.contact-list a:hover{ color: var(--coral); }

.hours-table{ width: 100%; border-collapse: collapse; font-size: .92rem; }
.hours-table td{ padding: 10px 0; border-bottom: 1px solid rgba(22,35,61,.08); }
.hours-table td:first-child{ font-weight: 600; color: var(--navy); }
.hours-table td:last-child{ text-align: right; color: var(--slate); }

.map-frame{
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(22,35,61,.1);
  height: 100%;
  min-height: 340px;
}
.map-frame iframe{ width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* ---------- CTA band ---------- */
.cta-band{
  background: var(--coral);
  color: var(--white);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2{ color: var(--white); margin: 0; }
.cta-band .btn-ghost{ border-color: rgba(255,255,255,.5); }
.cta-band .btn-ghost:hover{ border-color: #fff; background: rgba(255,255,255,.12); }

.cta-actions{ display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer{
  background: var(--navy-deep);
  color: rgba(245,247,245,.7);
  padding: 56px 0 28px;
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(245,247,245,.12);
}
.footer-brand img{ height: 40px; margin-bottom: 14px; }
.footer-brand p{ color: rgba(245,247,245,.6); font-size: .9rem; max-width: 32ch; }
.footer-social{
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.footer-social a{
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(245,247,245,.22);
  display: flex; align-items: center; justify-content: center;
  color: rgba(245,247,245,.75);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.footer-social a:hover{ background: var(--coral); border-color: var(--coral); color: var(--white); }
.footer-col h3{ color: var(--white); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1em; }
.footer-col ul{ list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer-col a:hover{ color: var(--coral); }
.footer-bottom{
  padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .82rem; color: rgba(245,247,245,.45);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero{
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 76px 0 64px;
}
.page-hero p{ color: rgba(245,247,245,.75); max-width: 56ch; }

/* ---------- Story layout ---------- */
.story-grid{
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.story-photo{
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, rgba(31,58,95,.06) 0 2px, transparent 2px 14px),
    var(--mint-deep);
  border: 1.5px dashed rgba(31,58,95,.28);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-weight: 600; text-align: center; padding: 24px;
  overflow: hidden;
}
.story-photo.has-photo{
  background: none;
  border: none;
  padding: 0;
}
.story-photo.has-photo img{
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .nav-links, .nav-cta .nav-phone{ display: none; }
  .nav-toggle{ display: flex; }
  .site-header.open .nav-links{
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--porcelain);
    padding: 20px 28px 26px; gap: 1.1em; border-bottom: 1px solid rgba(22,35,61,.08);
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .nav-links a{ display: block; font-size: 1.05rem; }
  .nav-cta-mobile{
    display: block; margin-top: .6em; padding-top: 1em;
    border-top: 1px solid rgba(22,35,61,.1);
  }
  .nav-cta-mobile a{
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; padding: .85em 1.2em; border-radius: 999px;
    background: var(--coral); color: var(--white); font-weight: 600; font-size: .95rem;
  }

  .hero .container{ grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; gap: 32px; }
  .hero-tooth{ display: none; }
  .hero-actions .btn{ flex: 1 1 auto; justify-content: center; }

  section{ padding: 60px 0; }
  .section-tight{ padding: 44px 0; }
  .section-header{ margin-bottom: 2.2em; }

  .trust-bar{ grid-template-columns: 1fr; margin-top: -28px; padding: 24px; gap: 18px; }
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
  .values-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; gap: 32px; }
  .story-grid{ grid-template-columns: 1fr; gap: 28px; }
  .story-photo{ aspect-ratio: 16/10; }
  .footer-grid{ grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom{ flex-direction: column; }

  .gallery-grid{ grid-template-columns: repeat(2, 1fr); grid-template-rows: 140px 140px 140px; }
  .gallery-grid .g1{ grid-column: span 2; grid-row: span 1; }
  .gallery-grid .g2{ grid-column: span 2; grid-row: span 1; }
  .gallery-grid .g3{ grid-column: span 1; }
  .gallery-grid .g4{ grid-column: span 1; }

  .cta-band{ flex-direction: column; text-align: center; padding: 36px 26px; }
  .cta-actions{ justify-content: center; width: 100%; }
  .cta-actions .btn{ flex: 1 1 auto; justify-content: center; }

  .map-frame{ min-height: 280px; }
  .map-frame iframe{ min-height: 280px; }
}

@media (max-width: 640px){
  .container{ padding: 0 20px; }
  .services-grid{ grid-template-columns: 1fr; }
  h1{ font-size: 2.05rem; }
  h2{ font-size: 1.5rem; }
  .hero-card{ padding: 20px; }
  .hero-card li{ font-size: .9rem; }
  .nav-brand img{ height: 40px; }
  .gallery-grid{ grid-template-columns: 1fr; grid-template-rows: repeat(4, 130px); }
  .gallery-grid .g1, .gallery-grid .g2, .gallery-grid .g3, .gallery-grid .g4{ grid-column: span 1; grid-row: span 1; }
  .cta-actions{ flex-direction: column; }
  .cta-actions .btn{ width: 100%; }
  .trust-item{ align-items: flex-start; }
}

@media (max-width: 480px){
  .nav-cta .btn{ display: none; }
}

@media (max-width: 400px){
  .nav-brand img{ height: 34px; }
  h1{ font-size: 1.8rem; }
  .hero-actions{ flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; scroll-behavior: auto !important; }
}
