/* ============================================================
   Centro Canino Badajoz — Clínica Veterinaria
   CSS Principal v2026 | Mobile-First | Premium Design
   Colores corporativos: #6F81D7 (azul) | #37A850 (verde)
   ============================================================ */

/* ─── VARIABLES ─────────────────────────────────────────────── */
:root {
  --blue:        #6F81D7;
  --blue-dark:   #4A5AAB;
  --blue-light:  #E8ECF9;
  --blue-ultra:  #F0F3FC;
  --green:       #37A850;
  --green-dark:  #2A8040;
  --green-light: #E8F5EC;
  --white:       #FFFFFF;
  --gray-50:     #F8F9FA;
  --gray-100:    #F1F3F5;
  --gray-200:    #E9ECEF;
  --gray-400:    #ADB5BD;
  --gray-600:    #6C757D;
  --gray-800:    #343A40;
  --text-dark:   #1E2433;
  --text-body:   #4A5568;
  --shadow-sm:   0 2px 8px rgba(111,129,215,.12);
  --shadow-md:   0 8px 24px rgba(111,129,215,.18);
  --shadow-lg:   0 16px 48px rgba(111,129,215,.22);
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --transition:  all .3s cubic-bezier(.4,0,.2,1);
  --font-head:   'Nunito', 'Segoe UI', sans-serif;
  --font-body:   'Open Sans', 'Segoe UI', sans-serif;
}

/* ─── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-dark); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

/* ─── UTILITIES ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-pad { padding: 5rem 0; }
.section-pad-sm { padding: 3rem 0; }

.text-center { text-align: center; }
.text-blue  { color: var(--blue); }
.text-green { color: var(--green); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 2rem;
  border-radius: 50px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(111,129,215,.35);
}
.btn-primary:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(111,129,215,.45);
}

.btn-green {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(55,168,80,.35);
}
.btn-green:hover {
  background: var(--green-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(55,168,80,.45);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.7);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--blue);
}

.section-label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-light);
  padding: .3rem .9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ─── TOP BAR ────────────────────────────────────────────────── */
.topbar {
  background: var(--blue-dark);
  color: rgba(255,255,255,.85);
  font-size: .83rem;
  padding: .5rem 0;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

.topbar a {
  color: rgba(255,255,255,.85);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.topbar a:hover { color: var(--white); }

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ─── HEADER / NAV ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.site-logo img {
  height: 65px;
  width: auto;
}

/* Nav */
.site-nav {
  display: none;
  align-items: center;
  gap: .25rem;
}

.site-nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .92rem;
  color: var(--text-dark);
  padding: .5rem .8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--blue);
  background: var(--blue-ultra);
}

.nav-cta {
  margin-left: .5rem;
  background: var(--blue) !important;
  color: var(--white) !important;
  padding: .5rem 1.2rem !important;
  border-radius: 50px !important;
  box-shadow: 0 3px 10px rgba(111,129,215,.3);
}
.nav-cta:hover {
  background: var(--blue-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(111,129,215,.4) !important;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30,36,51,.6);
  z-index: 999;
  backdrop-filter: blur(4px);
}

.mobile-nav.open { display: block; }

.mobile-nav-inner {
  position: absolute;
  top: 0; right: 0;
  width: min(320px, 90vw);
  height: 100%;
  background: var(--white);
  padding: 5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0,0,0,.15);
}

.mobile-nav-inner a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-dark);
  padding: .75rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.mobile-nav-inner a:hover,
.mobile-nav-inner a.active {
  color: var(--blue);
  background: var(--blue-ultra);
  border-left-color: var(--blue);
}

.mobile-nav-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--gray-100);
  font-size: 1.2rem;
  color: var(--text-dark);
}

/* ─── HERO ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(90vh, 700px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--text-dark);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(30,36,51,.78) 0%,
    rgba(74,90,171,.45) 60%,
    rgba(111,129,215,.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 3rem 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(55,168,80,.2);
  border: 1px solid rgba(55,168,80,.4);
  color: #6FD98A;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.hero h1 span { color: #A8B8F0; }

.hero-desc {
  color: rgba(255,255,255,.88);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.2);
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.hero-stat {
  color: var(--white);
  text-align: center;
}

.hero-stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.hero-stat span {
  font-size: .8rem;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Hero slider dots */
.hero-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 3;
}

.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  transition: var(--transition);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--white);
  width: 24px;
  border-radius: 4px;
}

/* ─── FEATURES STRIP ──────────────────────────────────────────── */
.features-strip {
  background: var(--white);
  box-shadow: 0 -4px 0 var(--blue-ultra), 0 4px 24px rgba(0,0,0,.06);
  position: relative;
  z-index: 10;
}

.features-strip .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
  border-right: 1px solid var(--gray-200);
  transition: var(--transition);
}

.feature-item:last-child { border-right: none; }
.feature-item:hover { background: var(--blue-ultra); }

.feature-icon {
  width: 48px; height: 48px;
  min-width: 48px;
  border-radius: var(--radius-md);
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}

.feature-text strong {
  display: block;
  font-family: var(--font-head);
  font-size: .95rem;
  color: var(--text-dark);
}

.feature-text span {
  font-size: .8rem;
  color: var(--gray-600);
}

/* ─── SERVICIOS ──────────────────────────────────────────────── */
.servicios { background: var(--gray-50); }

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.servicio-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid transparent;
}

.servicio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-light);
}

.servicio-img {
  height: 200px;
  overflow: hidden;
}

.servicio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.servicio-card:hover .servicio-img img {
  transform: scale(1.06);
}

.servicio-body {
  padding: 1.5rem;
}

.servicio-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.servicio-body h3 {
  font-size: 1.15rem;
  margin-bottom: .5rem;
}

.servicio-body p {
  font-size: .9rem;
  color: var(--gray-600);
  margin: 0;
}

/* ─── LA CLÍNICA ─────────────────────────────────────────────── */
.clinica { background: var(--white); }

.clinica-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.clinica-images {
  position: relative;
}

.clinica-img-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.clinica-img-main img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.clinica-img-badge {
  position: absolute;
  bottom: -1.5rem;
  right: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.badge-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}

.badge-text strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--text-dark);
}

.badge-text span {
  font-size: .8rem;
  color: var(--gray-600);
}

.clinica-content h2 { margin-bottom: 1.25rem; }
.clinica-content p { color: var(--text-body); }

.clinica-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: 1.5rem 0;
}

.clinica-feature {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.clinica-feature::before {
  content: '✓';
  width: 22px; height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  font-weight: 800;
}

/* Instalaciones tabs */
.instalaciones-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 2rem 0 1.5rem;
}

.inst-tab {
  padding: .45rem 1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.inst-tab.active,
.inst-tab:hover {
  background: var(--blue);
  color: var(--white);
}

.inst-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.inst-gallery img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  cursor: pointer;
  transition: var(--transition);
}

.inst-gallery img:hover { opacity: .85; transform: scale(1.02); }

/* ─── PORTAFOLIO ──────────────────────────────────────────────── */
.portafolio { background: var(--text-dark); }

.portafolio .section-label { background: rgba(55,168,80,.15); }
.portafolio .section-title { color: var(--white); }
.portafolio .section-subtitle { color: rgba(255,255,255,.65); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
  margin-bottom: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--gray-200);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30,36,51,.6) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-zoom {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-left: auto;
}

.gallery-load-more {
  text-align: center;
  margin-top: 1.5rem;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ─── CONSEJOS FAQ ────────────────────────────────────────────── */
.consejos { background: var(--blue-ultra); }

.faq-categories {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.faq-cat-btn {
  padding: .5rem 1.25rem;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 700;
  background: var(--white);
  color: var(--gray-600);
  border: 2px solid var(--gray-200);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.faq-cat-btn.active,
.faq-cat-btn:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.faq-item.open {
  border-color: var(--blue-light);
  box-shadow: var(--shadow-md);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .97rem;
  color: var(--text-dark);
  user-select: none;
}

.faq-question:hover { color: var(--blue); }

.faq-number {
  min-width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  font-weight: 800;
}

.faq-q-text { flex: 1; }

.faq-arrow {
  min-width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  font-size: .9rem;
}

.faq-item.open .faq-arrow {
  background: var(--blue);
  color: var(--white);
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-body);
  font-size: .95rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
}

/* ─── CONTACTO ────────────────────────────────────────────────── */
.contacto { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-info h2 { margin-bottom: 1.25rem; }
.contact-info p { color: var(--text-body); }

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 48px; height: 48px;
  min-width: 48px;
  border-radius: var(--radius-md);
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: var(--blue);
}

.contact-detail strong {
  display: block;
  font-family: var(--font-head);
  font-size: .9rem;
  color: var(--text-dark);
  margin-bottom: .15rem;
}

.contact-detail a,
.contact-detail span {
  color: var(--text-body);
  font-size: .92rem;
}

.contact-detail a:hover { color: var(--blue); }

.horario-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin-top: .5rem;
}

.horario-table td {
  padding: .4rem 0;
  color: var(--text-body);
}

.horario-table td:first-child {
  font-weight: 600;
  color: var(--text-dark);
  width: 55%;
}

/* Contact form */
.contact-form-wrap {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--gray-200);
}

.contact-form-wrap h3 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: .4rem;
  font-family: var(--font-head);
}

.form-control {
  width: 100%;
  padding: .8rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text-dark);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(111,129,215,.15);
}

.form-control:invalid:not(:placeholder-shown) {
  border-color: #E53E3E;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  min-width: 18px;
  margin-top: .15rem;
  accent-color: var(--blue);
  cursor: pointer;
}

.form-check label {
  font-size: .85rem;
  color: var(--gray-600);
  cursor: pointer;
}

.form-check a { color: var(--blue); text-decoration: underline; }

.captcha-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: .8rem 1rem;
}

.captcha-group label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.captcha-group input {
  width: 80px;
  padding: .4rem .75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  text-align: center;
}

.form-status {
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: none;
}

.form-status.success {
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid rgba(55,168,80,.2);
  display: block;
}

.form-status.error {
  background: #FFF5F5;
  color: #C53030;
  border: 1px solid rgba(197,48,48,.2);
  display: block;
}

/* Map */
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 300px;
  border: 1px solid var(--gray-200);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,.7);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand img {
  height: 57px;
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
  opacity: .9;
}

.footer-brand p {
  font-size: .88rem;
  margin-bottom: 1.25rem;
}

.footer-social {
  display: flex;
  gap: .6rem;
}

.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: 1rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--blue);
  color: var(--white);
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--blue);
  display: inline-block;
}

.footer-col ul li {
  margin-bottom: .6rem;
}

.footer-col ul a {
  font-size: .88rem;
  color: rgba(255,255,255,.65);
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: var(--transition);
}

.footer-col ul a:hover {
  color: var(--white);
  transform: translateX(3px);
}

.footer-col ul a::before {
  content: '›';
  color: var(--blue);
  font-size: 1.1rem;
}

.footer-contact-item {
  display: flex;
  gap: .75rem;
  font-size: .88rem;
  color: rgba(255,255,255,.65);
  margin-bottom: .75rem;
}

.footer-contact-item .fc-icon {
  color: var(--blue);
  font-size: 1rem;
  margin-top: .15rem;
}

.footer-contact-item a {
  color: rgba(255,255,255,.65);
}
.footer-contact-item a:hover { color: var(--white); }

.footer-bottom {
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}

.footer-bottom p {
  font-size: .8rem;
  margin: 0;
}

.footer-legal {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}

.footer-legal a:hover { color: var(--white); }

/* ─── BACK TO TOP ─────────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(111,129,215,.4);
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 500;
  pointer-events: none;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#back-to-top:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

/* ─── WHATSAPP FLOATING ───────────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 500;
}

.wa-float a {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 14px rgba(37,211,102,.4);
  transition: var(--transition);
}

.wa-float a:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,.55);
}

/* ─── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE — TABLET (≥768px) ───────────────────────────── */
@media (min-width: 768px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }

  .clinica-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-content { padding: 4rem 0; }
}

/* ─── RESPONSIVE — DESKTOP (≥1024px) ─────────────────────────── */
@media (min-width: 1024px) {
  .clinica-grid { gap: 5rem; }

  .inst-gallery img { height: 160px; }
}

/* ─── MOBILE TWEAKS ───────────────────────────────────────────── */
@media (max-width: 767px) {
  .section-pad { padding: 3.5rem 0; }

  .topbar-left span { display: none; }

  .form-row { grid-template-columns: 1fr; }

  .clinica-features { grid-template-columns: 1fr; }

  .inst-gallery { grid-template-columns: repeat(2, 1fr); }

  .hero-stats { gap: 1.25rem; }
  .hero-stat strong { font-size: 1.5rem; }

  .features-strip .container { grid-template-columns: 1fr 1fr; }
  .feature-item { border-right: none; border-bottom: 1px solid var(--gray-200); }
  .feature-item:nth-child(odd) { border-right: 1px solid var(--gray-200); }

  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-btns { flex-direction: column; }
  .btn { justify-content: center; }
}

/* ─── CLINICA GALLERY (instalaciones reales) ─────────────────── */
.clinica-gallery {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--gray-200);
}

.cg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cg-header h3 {
  font-size: 1.4rem;
  color: var(--text-dark);
  margin: 0;
}

.cg-tabs {
  display: flex;
  gap: .5rem;
}

.cg-tab {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1.1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.cg-tab.active,
.cg-tab:hover {
  background: var(--blue);
  color: var(--white);
}

.cg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

.cg-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 820px;
  margin: 0 auto;
}

.clinica-lb-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  aspect-ratio: 3 / 2;
  background: var(--gray-100);
}

.clinica-lb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
  display: block;
}

.clinica-lb-item:hover img { transform: scale(1.06); }

.cg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: .75rem;
  gap: .3rem;
  opacity: 0;
  transition: opacity .3s ease;
  color: var(--white);
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
}

.cg-overlay i { font-size: 1.3rem; }

.clinica-lb-item:hover .cg-overlay { opacity: 1; }

/* Lightbox caption */
.lightbox-caption {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  text-align: center;
  color: var(--white);
  font-size: .9rem;
  padding: .6rem 1rem;
  background: rgba(0,0,0,.5);
  margin: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  .cg-grid { grid-template-columns: repeat(2, 1fr); }
  .cg-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .cg-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .cg-grid,
  .cg-grid-2 { grid-template-columns: 1fr; }
}
