/* Layout B – One-Page Clean with responsive hero image (local) */
:root{--ink:#0f172a;--muted:#64748b;--line:#e2e8f0;--accent:#0ea5e9;--bg:#fff}
*{box-sizing:border-box}html,body{margin:0;padding:0}
body{font-family:Inter,system-ui,Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.6}
a{text-decoration:none;color:inherit}
.container{max-width:1100px;margin:0 auto;padding:0 16px}
.btn{display:inline-block;padding:12px 18px;border-radius:14px;border:1px solid var(--ink);background:var(--ink);color:#fff;font-weight:600}
.btn:hover{opacity:.9}
.badge{border:1px solid var(--line);border-radius:14px;padding:8px 12px;background:#fff;display:inline-block;margin:6px 6px 0 0}
.logo-img{width:84px;height:84px;border-radius:14px;object-fit:cover}
header{padding:14px 0;border-bottom:1px solid var(--line)}
header .wrap{display:flex;gap:12px;align-items:center;justify-content:center}
.note{font-size:12px;color:var(--muted)}
/* HERO responsive with image */
.hero{position:relative;display:grid;place-items:center;text-align:center;min-height:52vh}
.hero-media{position:absolute;inset:0;overflow:hidden}
.hero-media img{width:100%;height:100%;object-fit:cover;display:block;filter:brightness(.78)}
.hero-content{position:relative;z-index:1;padding:56px 16px;color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.35)}
.hero h1{margin:0 0 10px 0;font-size:clamp(28px,4.2vw,44px);line-height:1.1}
.hero .lead{max-width:70ch;margin:0 auto 14px auto;font-size:clamp(15px,2.2vw,18px)}
.hero .cta{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.hero .cta .btn{border-color:#fff;background:#ffffff; color:#0f172a}
.hero .cta .btn-outline{background:transparent;border:1px solid #fff;color:#fff}
/* Sections */
.section{padding:48px 0}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.card{border:1px solid var(--line);border-radius:18px;padding:18px;background:#fff;text-align:left}
@media(max-width:900px){.grid3{grid-template-columns:1fr} .logo-img{width:72px;height:72px}}
/* Footer */
footer{border-top:1px solid var(--line);margin-top:40px}
footer .inner{display:flex;justify-content:space-between;gap:12px;padding:24px 0;flex-wrap:wrap}

/* Social icons */
.social{
  display:flex; gap:12px; align-items:center; justify-content:center;
}
.icon{
  width:28px; height:28px; display:inline-grid; place-items:center;
  color:#0f172a;
}
.icon:hover{opacity:.85}
/* Floating WhatsApp button */
.fab-wa{
  position:fixed; right:16px; bottom:16px; z-index:60;
  width:64px; height:64px; border-radius:50%;
  display:grid; place-items:center; background:#ffffff; color:#0f172a;
  border:1px solid rgba(2,6,23,.08); box-shadow:0 6px 24px rgba(0,0,0,.18);
}
.fab-wa svg{width:30px;height:30px;color:#fff}
@media (prefers-reduced-motion:no-preference){
  .fab-wa{
  position:fixed; right:16px; bottom:16px; z-index:60;
  width:64px; height:64px; border-radius:50%;
  display:grid; place-items:center; background:#ffffff; color:#0f172a;
  border:1px solid rgba(2,6,23,.08); box-shadow:0 6px 24px rgba(0,0,0,.18);
}
  .fab-wa:hover{transform:translateY(-2px)}
}

/* Sucursales */
.branches{padding:48px 0;background:#f8fafc;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.branch-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.branch{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px}
.branch h3{margin:0 0 6px 0}
.branch .actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.branch iframe{width:100%;height:260px;border:0;border-radius:14px;margin-top:10px}
@media(max-width:900px){.branch-grid{grid-template-columns:1fr}}


/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  .hero p {
    font-size: 1rem;
  }
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  nav ul li {
    margin: 8px 0;
  }
  .services-grid {
    grid-template-columns: 1fr !important;
  }
  .service-card {
    padding: 16px;
  }
  .branch-card {
    padding: 16px;
  }
}


/* ===== Mobile Optimization ===== */
@media (max-width: 768px){
  .container{padding:0 14px}
  header .wrap{flex-wrap:wrap; gap:8px}
  .logo-img{width:64px;height:64px}
  .hero{min-height:48vh}
  .hero-content{padding:36px 14px}
  .hero .lead{font-size:clamp(14px,3.6vw,17px)}
  .hero .cta{gap:10px}
  .btn{padding:12px 16px; min-height:44px}
  .section{padding:36px 0}
  .services-grid{grid-template-columns:1fr; gap:16px}
  .service-card{padding:16px}
  .branch-grid{grid-template-columns:1fr; gap:16px}
  .branch iframe{height:240px}
  footer .inner{gap:8px}
}
@media (max-width: 420px){
  .logo-img{width:56px;height:56px}
  .btn{width:100%; text-align:center}
}


/* Hero full screen optimization */
.hero {
  min-height: 100vh !important;
  height: 100vh;
  background-size: cover;
  background-position: center;
}


/* Hero full screen width & height */
.hero {
  width: 100vw !important;
  min-width: 100%;
  max-width: 100%;
  min-height: 100vh !important;
  height: 100vh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}


/* Hero responsive adjustments */
@media (max-width: 768px){
  .hero {
    background-size: contain !important;
    background-repeat: no-repeat;
    background-position: top center;
    height: auto;
    min-height: auto;
  }
}


/* Hero image as <img> for mobile full display */
.hero {
  width: 100%;
  min-height: auto !important;
  height: auto !important;
  padding: 0;
  margin: 0;
}
.hero-img {
  display: block;
  width: 100%;
  height: auto;
}


/* === Mobile hero: show full image (no crop) === */
@media (max-width: 768px){
  .hero{height:auto !important; min-height:auto !important}
  .hero-media{position:relative; overflow:visible}
  .hero-media img{
    width:100%;
    height:auto !important;
    object-fit:contain !important;
    filter:none;
    display:block;
  }
}

.fab-wa img{width:36px;height:36px;display:block}
@media (prefers-reduced-motion:no-preference){
  .fab-wa{transition:transform .15s ease}
  .fab-wa:hover{transform:translateY(-2px)}
}

/* Floating WhatsApp menu */
.fab-menu{
  position:fixed; right:16px; bottom:88px; z-index:61;
  display:flex; flex-direction:column; gap:8px;
}
.fab-item{
  background:#ffffff; color:#0f172a; border:1px solid rgba(2,6,23,.12);
  padding:10px 14px; border-radius:12px; font-weight:600;
  box-shadow:0 6px 24px rgba(0,0,0,.12);
}
.fab-item:hover{opacity:.9}
@media (max-width: 480px){
  .fab-item{padding:12px 14px}
}

/* Compact sections */
section, .section {
  padding-top: 40px;
  padding-bottom: 40px;
}
h1, h2, h3, h4 {
  margin-top: 10px;
  margin-bottom: 20px;
}
p {
  margin-bottom: 12px;
}
.container {
  padding-top: 20px;
  padding-bottom: 20px;
}

/* Extra compact mobile */
@media (max-width: 768px){
  section, .section {
    padding-top: 24px;
    padding-bottom: 24px;
  }
  h1, h2, h3, h4 {
    margin-top: 8px;
    margin-bottom: 14px;
  }
  p {
    margin-bottom: 8px;
  }
  .container {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}


/* ===== Extra-compact mobile tweaks ===== */
@media (max-width: 768px){
  section, .section{padding-top:24px; padding-bottom:24px}
  .container{padding-top:12px; padding-bottom:12px; padding-left:12px; padding-right:12px}
  h1,h2,h3,h4{margin-top:8px; margin-bottom:14px}
  p{margin-bottom:10px}
  .services-grid{gap:12px}
  .service-card{padding:12px}
  .branch-grid{gap:12px}
  .branch{padding:12px}
  .branch iframe{height:200px}
  footer .inner{padding:12px 0}
  .btn{padding:10px 14px; min-height:40px}
}


/* Google Maps styled button */
.btn-maps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #34A853;
  color: white !important;
  font-weight: bold;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
}
.btn-maps:hover {
  background-color: #2c8c46;
}
.btn-maps img {
  width: 20px;
  height: 20px;
}

.navbar .brand {
    font-size: 2em !important; /* doubled size */
    font-weight: bold;
}

.navbar .brand {
    font-size: 1.6em; /* sized to approximately match logo width */
    font-weight: bold;
    margin-left: 10px;
    vertical-align: middle;
    display: inline-block;
}
.navbar img.logo {
    height: 50px;
    vertical-align: middle;
}

/* Header brand visual balance */
.brand-text{
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}
@media (max-width: 900px){
  .brand-text{ font-size: 22px; }
}


/* Mobile spacing optimization */
@media (max-width: 768px){

  /* 1. Reduce space between hero and "Nuestros Servicios" */
  section#services {
    margin-top: 20px !important;
  }

  /* 2. Reduce space between "Nuestros Servicios" title and first card */
  #services h2 {
    margin-bottom: 15px !important;
  }

  /* 3. Service cards: reduce padding/height */
  .service-card {
    padding: 15px !important;
    margin-bottom: 15px !important;
  }

  /* 4. Reduce space after last service before "Nuestras Sucursales" */
  #services {
    margin-bottom: 25px !important;
  }
}


/* === Mobile spacing refinements (<=768px) === */
@media (max-width: 768px){
  /* 1) Gap between hero and "Nuestros Servicios" */
  #nuestros-servicios{ padding-top: 18px; }

  /* 2) Gap between "Nuestros Servicios" title and first card */
  #nuestros-servicios h2{ margin-bottom: 12px; }

  /* 3) Shrink all service cards */
  .services-grid{ gap: 12px; }
  .service-card{ padding: 12px 14px; }

  /* Optionally reduce font sizes a touch to help compactness */
  .service-card h3{ margin: 0 0 6px 0; font-size: 1rem; }
  .service-card p{ margin: 0 0 8px 0; font-size: .95rem; line-height: 1.45; }

  /* 4) Space between last service (Prótesis y rehabilitación oral) and Sucursales */
  #sucursales.branches{ padding-top: 24px; }
}


/* === Ultra-compact adjustments for very small phones (<=420px) === */
@media (max-width: 420px){
  #nuestros-servicios{ padding-top: 12px; }
  #nuestros-servicios h2{ margin-bottom: 8px; font-size: 1.2rem; }

  .services-grid{ gap: 8px; }
  .service-card{ padding: 10px 12px; }
  .service-card h3{ font-size: 0.95rem; margin-bottom: 4px; }
  .service-card p{ font-size: 0.9rem; line-height: 1.4; margin-bottom: 6px; }

  #sucursales.branches{ padding-top: 18px; }
}


/* === Strong mobile compact overrides (force) === */
@media (max-width: 768px){
  .hero{ margin-bottom: 0 !important; }
  section, .section{ padding-top: 20px !important; padding-bottom: 20px !important; }
  .container{ padding-top: 8px !important; padding-bottom: 8px !important; }
  #nuestros-servicios{ padding-top: 10px !important; }
  #nuestros-servicios h2{ margin: 6px 0 10px 0 !important; }
  .services-grid{ gap: 10px !important; }
  .service-card{ padding: 10px 12px !important; }
  .service-card h3{ margin: 0 0 6px 0 !important; font-size: 1rem !important; }
  .service-card p{ margin: 0 0 6px 0 !important; font-size: .95rem !important; line-height: 1.42 !important; }
  #sucursales.branches{ padding-top: 20px !important; }
}
@media (max-width: 420px){
  #nuestros-servicios{ padding-top: 8px !important; }
  #nuestros-servicios h2{ margin-bottom: 6px !important; font-size: 1.15rem !important; }
  .services-grid{ gap: 8px !important; }
  .service-card{ padding: 8px 10px !important; }
  .service-card h3{ font-size: .95rem !important; margin-bottom: 4px !important; }
  .service-card p{ font-size: .9rem !important; line-height: 1.38 !important; margin-bottom: 4px !important; }
  #sucursales.branches{ padding-top: 16px !important; }
}


/* === Emphasize service titles === */
.service-card h3{
  font-size: 1.4rem !important;
  font-weight: 700 !important;
}
@media (max-width: 768px){
  .service-card h3{
    font-size: 1.25rem !important;
  }
}
@media (max-width: 420px){
  .service-card h3{
    font-size: 1.15rem !important;
  }
}


/* Apply same font as sucursales to Nuestros Servicios */
#nuestros-servicios h2{ padding-top: 24px; }

/* === Unified Title Styling === */
#nuestros-servicios h2,
#sucursales h2 {
  font-family: 'Arial', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  margin: 0 auto 20px auto;
  text-align: center;
}
@media (max-width: 768px){
  #nuestros-servicios h2,
  #sucursales h2 {
    font-size: 1.6rem;
    margin-bottom: 16px;
  }
}
@media (max-width: 420px){
  #nuestros-servicios h2,
  #sucursales h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
  }
}


/* === Larger Nuestros Servicios Title === */
#nuestros-servicios h2{
  font-size: 2.4rem !important;
}
@media (max-width: 768px){
  #nuestros-servicios h2{ font-size: 1.8rem !important; }
}
@media (max-width: 420px){
  #nuestros-servicios h2{ font-size: 1.6rem !important; }
}


/* === Decorative underline and color for main titles === */
#nuestros-servicios h2,
#sucursales h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 3px solid #2a8c82; /* Accent color (teal/greenish) */
  color: #2a8c82;
}


/* === Equal font size for both titles === */
#nuestros-servicios h2,
#sucursales h2 {
  font-size: 2.4rem !important;
}
@media (max-width: 768px){
  #nuestros-servicios h2,
  #sucursales h2 {
    font-size: 1.8rem !important;
  }
}
@media (max-width: 420px){
  #nuestros-servicios h2,
  #sucursales h2 {
    font-size: 1.6rem !important;
  }
}

/* Footer maps section */
.maps-footer{ padding:40px 0; border-top:1px solid var(--line); background:#f8fafc; }
.maps-footer h2{ text-align:center; margin-bottom:20px; }
.maps-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.map-card{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:12px; }
.map-card h3{ margin:0 0 10px 0; }
.map-card iframe{ width:100%; height:320px; border:0; border-radius:12px; }
@media (max-width: 900px){
  .maps-grid{ grid-template-columns:1fr; }
  .maps-footer{ padding:28px 0; }
  .map-card iframe{ height:260px; }
}

.footer { background-color:#f8f9fa; padding:15px 0; margin-top:20px; font-size:14px; color:#333; }
