/* ============================================
   DENTAL ROMÁN — ESTILOS PRINCIPALES
   Brutalismo Moderno & Limpio
   ============================================ */

:root {
  --primary: #0A2463;
  --accent: #3A86FF;
  --accent-2: #00C2FF;
  --dark: #040C1E;
  --light: #EDF2FF;
  --white: #FFFFFF;
  --gray-100: #F0F4FF;
  --gray-200: #D8E2FF;
  --gray-600: #6B7A99;
  --border: 3px solid var(--primary);
  --shadow-hard: 6px 6px 0 var(--primary);
  --shadow-hard-accent: 6px 6px 0 var(--accent);
  --shadow-hard-light: 6px 6px 0 rgba(10,36,99,0.3);
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Figtree', sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--light);
  color: var(--dark);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ---- Utility ---- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 2px solid var(--accent);
  display: inline-block;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.25rem;
}

.btn-primary {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--white);
  border: 3px solid var(--primary);
  padding: 0.85rem 2rem;
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
  position: relative;
}

.btn-primary:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--primary);
  background: var(--accent-2);
}

.btn-outline {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
  color: var(--primary);
  border: 3px solid var(--primary);
  padding: 0.85rem 2rem;
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--accent);
}

/* ---- Scroll Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
  background: transparent;
}

#navbar.scrolled {
  background: var(--primary);
  border-bottom: 3px solid var(--accent);
  padding: 0.6rem 0;
  box-shadow: 0 4px 30px rgba(4,12,30,0.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-2);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  flex-shrink: 0;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.4rem;
  border: 2px solid rgba(255,255,255,0.5);
  background: transparent;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dark);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
}

.mobile-menu a:hover {
  color: var(--accent-2);
}

.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  transition: var(--transition);
}

.mobile-menu-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
  min-height: 100vh;
  background-color: var(--dark);
  background-image:
    radial-gradient(ellipse at 10% 80%, rgba(58,134,255,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 20%, rgba(0,194,255,0.08) 0%, transparent 45%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(58,134,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,134,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 4rem 0 5rem;
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 2px solid var(--accent-2);
  display: inline-block;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.hero-title .accent-word {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-title .accent-word::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--accent-2);
  opacity: 0.6;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-2);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-frame {
  position: relative;
  transform: rotate(2deg);
}

.hero-image-frame::before {
  content: '';
  position: absolute;
  inset: -3px;
  border: 3px solid var(--accent);
  z-index: 0;
  transform: translate(10px, 10px);
}

.hero-image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--accent-2);
  transform: translate(-6px, -6px);
  z-index: 0;
}

.hero-doctor-img {
  width: 100%;
  max-width: 420px;
  height: 520px;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--accent);
  box-shadow: 12px 12px 0 var(--primary);
  position: relative;
  z-index: 1;
  display: block;
}

.hero-deco-1 {
  position: absolute;
  top: -20px;
  right: -30px;
  width: 80px;
  height: 80px;
  border: 3px solid var(--accent-2);
  opacity: 0.4;
  z-index: 0;
}

.hero-deco-2 {
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 50px;
  height: 50px;
  background: var(--accent);
  opacity: 0.3;
  z-index: 0;
}

.hero-badge {
  position: absolute;
  bottom: 30px;
  left: -20px;
  background: var(--accent);
  color: var(--white);
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-hard);
  padding: 0.75rem 1rem;
  z-index: 3;
  max-width: 170px;
  transform: rotate(-2deg);
}

.hero-badge-text {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
#servicios {
  background: var(--white);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.services-header {
  max-width: 720px;
  margin-bottom: 4rem;
}

.services-header h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--primary);
  margin-bottom: 1rem;
}

.services-header p {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.8;
}

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

.service-card {
  background: var(--white);
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-hard);
  padding: 2rem 1.75rem;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.service-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0 var(--primary);
}

.service-icon {
  width: 52px;
  height: 52px;
  background: var(--light);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.service-num {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  opacity: 0.6;
}

/* ============================================
   ABOUT / TEAM SECTION
   ============================================ */
#nosotros {
  background: var(--light);
  padding: 6rem 0;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.about-content p {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.about-highlight {
  border: 2px solid var(--accent);
  padding: 1rem;
  background: var(--white);
}

.about-highlight-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.about-highlight-text {
  font-size: 0.85rem;
  color: var(--primary);
}

.team-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.team-card {
  background: var(--white);
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  transition: var(--transition);
}

.team-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0 var(--primary);
}

.team-card-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.team-card-info {
  padding: 1.5rem;
}

.team-card-info h3 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.team-card-info .role {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--light);
  border: 1px solid var(--accent);
  display: inline-block;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.75rem;
}

.team-card-info p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */
#testimonios {
  background: var(--primary);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

#testimonios::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at right, rgba(58,134,255,0.15), transparent 70%);
  pointer-events: none;
}

.testimonials-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.testimonials-header .section-label {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.testimonials-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--white);
  margin-top: 0.5rem;
}

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

.testimonial-card {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.15);
  padding: 2rem;
  position: relative;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.testimonial-card:nth-child(4),
.testimonial-card:nth-child(5) {
  grid-column: span 1;
}

.testimonial-card:hover {
  background: rgba(255,255,255,0.09);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.testimonial-quote {
  font-size: 2.5rem;
  color: var(--accent-2);
  font-family: serif;
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.testimonial-stars {
  color: #FFD700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-size: 0.925rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.testimonial-author {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Center last 2 cards */
.testimonials-row-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 70%;
  margin: 1.5rem auto 0;
}

/* ============================================
   GALLERY SECTION
   ============================================ */
#galeria {
  background: var(--white);
  padding: 6rem 0;
}

.gallery-header {
  margin-bottom: 3rem;
}

.gallery-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 1rem;
}

.gallery-item {
  border: 3px solid var(--primary);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--gray-200);
}

.gallery-item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item:nth-child(5) {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,36,99,0.5);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.gallery-overlay svg {
  width: 40px;
  height: 40px;
  color: var(--white);
}

/* ---- Lightbox Modal ---- */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(4,12,30,0.95);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#lightbox.active {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border: 3px solid var(--accent);
  box-shadow: 12px 12px 0 var(--primary);
  display: block;
}

.lightbox-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  border: 3px solid var(--primary);
  color: var(--white);
  font-size: 1.5rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2001;
}

.lightbox-btn:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

#lightbox-prev { left: 1.5rem; }
#lightbox-next { right: 1.5rem; }

#lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--primary);
  border: 3px solid var(--accent);
  color: var(--white);
  font-size: 1.2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2001;
}

#lightbox-close:hover {
  background: var(--accent);
  transform: rotate(90deg);
}

#lightbox-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.6);
  z-index: 2001;
}

/* ============================================
   FAQ SECTION
   ============================================ */
#faq {
  background: var(--light);
  padding: 6rem 0;
}

.faq-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.faq-left h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--primary);
  margin-bottom: 1rem;
}

.faq-left p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.faq-item {
  border: 3px solid var(--primary);
  background: var(--white);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.open {
  box-shadow: var(--shadow-hard);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.faq-question-text {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 2px solid var(--accent);
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
}

.faq-item.open .faq-icon {
  background: var(--accent);
  color: var(--white);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  padding: 0 1.5rem;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.25rem;
}

.faq-answer p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.8;
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
}

/* ============================================
   CTA SECTION
   ============================================ */
#cta-section {
  background: var(--accent);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

#cta-section::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -40px;
  width: 200px;
  height: 200px;
  border: 3px solid rgba(255,255,255,0.15);
  transform: rotate(15deg);
}

#cta-section::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -20px;
  width: 150px;
  height: 150px;
  background: rgba(255,255,255,0.06);
  transform: rotate(-10deg);
}

.cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.cta-inner h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--white);
  margin-bottom: 0.75rem;
}

.cta-inner p {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
}

.btn-cta-white {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--white);
  color: var(--primary);
  border: 3px solid var(--primary);
  padding: 1rem 2.5rem;
  box-shadow: 6px 6px 0 var(--primary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
  white-space: nowrap;
}

.btn-cta-white:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--primary);
  background: var(--light);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
#contacto {
  background: var(--white);
  padding: 6rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.contact-info p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 2px solid var(--gray-200);
  background: var(--light);
  transition: var(--transition);
}

.contact-item:hover {
  border-color: var(--accent);
}

.contact-item-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}

.contact-item-text strong {
  font-family: var(--font-display);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  display: block;
  margin-bottom: 0.2rem;
}

.contact-item-text span {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--light);
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-hard);
  padding: 2.5rem;
}

.contact-form-wrapper h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.contact-form-wrapper .form-sub {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 1.75rem;
}

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

.form-group label {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  display: block;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--white);
  border: 2px solid var(--primary);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--dark);
  outline: none;
  transition: var(--transition);
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

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

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--dark);
  padding: 4rem 0 0;
  color: rgba(255,255,255,0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand img {
  height: 48px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-icon {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.social-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent-2);
  padding-left: 4px;
}

.footer-hours p {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.footer-hours strong {
  color: var(--white);
}

.footer-map {
  border-top: 3px solid rgba(255,255,255,0.08);
  margin-top: 1rem;
}

.footer-map iframe {
  filter: grayscale(30%) brightness(0.85) contrast(1.1);
  display: block;
}

.footer-bottom {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a {
  color: var(--accent-2);
}

/* ============================================
   CHAT WIDGET — AYUDA ACTIVA
   ============================================ */
#chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.chat-tooltip {
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--accent);
  box-shadow: 4px 4px 0 rgba(10,36,99,0.5);
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.3s ease;
  position: relative;
}

.chat-tooltip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--accent);
}

.chat-tooltip.hidden {
  opacity: 0;
  pointer-events: none;
}

#chat-toggle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--primary);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(58,134,255,0.5);
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

#chat-toggle:hover {
  background: var(--accent-2);
  transform: scale(1.08);
}

/* Pulse animation */
@keyframes chat-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(58,134,255,0.7), 0 4px 20px rgba(58,134,255,0.5);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(58,134,255,0), 0 4px 20px rgba(58,134,255,0.5);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(58,134,255,0), 0 4px 20px rgba(58,134,255,0.5);
  }
}

#chat-toggle.pulsing {
  animation: chat-pulse 2s infinite;
}

#chat-panel {
  display: none;
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  max-height: 520px;
  background: var(--white);
  border: 3px solid var(--primary);
  box-shadow: 8px 8px 0 var(--primary);
  flex-direction: column;
  overflow: hidden;
}

#chat-panel.open {
  display: flex;
}

.chat-header {
  background: var(--primary);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chat-header-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: blink 2s infinite;
  margin-right: 0.5rem;
  display: inline-block;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.chat-header-close {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.chat-header-close:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 300px;
  max-height: 320px;
  background: var(--light);
}

.chat-msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  word-break: break-word;
}

.chat-msg a {
  color: var(--accent);
  text-decoration: underline;
}

.chat-msg.assistant {
  background: var(--white);
  border: 2px solid var(--gray-200);
  align-self: flex-start;
  color: var(--dark);
}

.chat-msg.user {
  background: var(--accent);
  color: var(--white);
  border: 2px solid var(--primary);
  align-self: flex-end;
}

.chat-msg.typing {
  background: var(--white);
  border: 2px solid var(--gray-200);
  align-self: flex-start;
  color: var(--gray-600);
  font-style: italic;
}

.chat-footer {
  display: flex;
  border-top: 2px solid var(--gray-200);
  background: var(--white);
}

.chat-footer input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--dark);
  background: transparent;
}

.chat-footer input::placeholder {
  color: var(--gray-600);
}

.chat-send {
  background: var(--accent);
  border: none;
  border-left: 2px solid var(--gray-200);
  color: var(--white);
  cursor: pointer;
  padding: 0 1.25rem;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.chat-send:hover {
  background: var(--primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .testimonials-row-2 {
    max-width: 100%;
  }

  .about-grid {
    gap: 2.5rem;
  }

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

@media (max-width: 768px) {
  .nav-links, .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 3rem 0 4rem;
  }

  .hero-content {
    order: 2;
  }

  .hero-image-wrapper {
    order: 1;
  }

  .hero-doctor-img {
    max-width: 280px;
    height: 340px;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-sub {
    margin: 0 auto 2rem;
  }

  .hero-badge {
    display: none;
  }

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

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

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

  .testimonials-row-2 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
  }

  .gallery-item:nth-child(5) {
    grid-column: span 2;
  }

  .faq-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cta-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

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

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  #chat-panel {
    width: calc(100vw - 2rem);
    right: -1rem;
  }

  .lightbox-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  #lightbox-prev { left: 0.5rem; }
  #lightbox-next { right: 0.5rem; }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.4rem;
  }

  .btn-primary, .btn-outline {
    padding: 0.75rem 1.5rem;
    font-size: 0.7rem;
  }

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

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(5) {
    grid-column: span 1;
  }
}
