/* =========================================
   DENTAL CÓSMICO — Custom Styles
   Azul moderno y minimalista con toque orgánico
   ========================================= */

/* ===== CSS Custom Properties ===== */
:root {
  --primary:        #1B4F8A;
  --primary-light:  #2563EB;
  --primary-dark:   #0D2E52;
  --accent:         #38BDF8;
  --accent-gold:    #F59E0B;
  --bg:             #F8FBFF;
  --bg-alt:         #EEF5FF;
  --bg-dark:        #0F2540;
  --text:           #1A2840;
  --text-muted:     #5A6A82;
  --white:          #FFFFFF;
  --border:         #CBE0F8;
  --border-light:   #E8F1FC;

  --shadow-xs:  0 1px 4px rgba(27, 79, 138, 0.07);
  --shadow-sm:  0 2px 12px rgba(27, 79, 138, 0.10);
  --shadow-md:  0 6px 28px rgba(27, 79, 138, 0.14);
  --shadow-lg:  0 12px 50px rgba(27, 79, 138, 0.20);
  --shadow-xl:  0 24px 80px rgba(27, 79, 138, 0.28);

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  40px;
  --radius-full: 9999px;

  --transition:       all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:  all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-heading: 'Lora', Georgia, serif;
  --font-body:    'Rubik', system-ui, sans-serif;

  --container-max: 1200px;
  --container-pad: clamp(1rem, 5vw, 2.5rem);
}

/* ===== 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);
  background-color: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
address { font-style: normal; }

/* ===== Container ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ===== Blob Shapes ===== */
.blob {
  position: absolute;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  pointer-events: none;
  z-index: 0;
  animation: blobMorph 10s ease-in-out infinite;
}
@keyframes blobMorph {
  0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25%  { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
  50%  { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
  75%  { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: var(--delay, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-2 { --delay: 0.15s; }
.reveal-delay-3 { --delay: 0.3s; }

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: var(--transition-bounce);
  box-shadow: 0 4px 16px rgba(27, 79, 138, 0.35);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,0.3);
  transition: var(--transition);
}
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.08); }

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.5);
  transition: var(--transition);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.8); }

.btn-large { padding: 16px 36px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-cta-header {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: var(--white);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.btn-cta-header:hover { background: var(--primary-light); transform: translateY(-1px); }

.btn-cta-mobile {
  display: inline-flex;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  margin-top: 8px;
}

/* ===== Section Header ===== */
.section-tag {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.section-tag--light {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.2);
}
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}
.section-header h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 16px; color: var(--text); }
.section-header p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; }

/* ===== Typography ===== */
.font-heading { font-family: var(--font-heading) !important; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; color: var(--text); }
h2 em, h1 em { color: var(--primary-light); font-style: italic; }


/* =============================
   HEADER
   ============================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  transition: var(--transition);
}
.site-header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 18px var(--container-pad);
  display: flex;
  align-items: center;
  gap: 32px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-img { width: 42px; height: 42px; object-fit: contain; border-radius: var(--radius-sm); }
.logo-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  transition: color 0.3s;
  line-height: 1.2;
}
.logo-text em { color: var(--accent); font-style: normal; }
.site-header.scrolled .logo-text { color: var(--text); }
.site-header.scrolled .logo-text em { color: var(--primary-light); }

.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav ul { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}
.site-header.scrolled .main-nav a { color: var(--text-muted); }
.site-header.scrolled .main-nav a:hover,
.site-header.scrolled .main-nav a.active {
  color: var(--primary);
  background: var(--bg-alt);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.site-header.scrolled .nav-toggle span { background: var(--text); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px var(--container-pad) 24px;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}
.mobile-menu.open { display: flex; }
.mobile-menu ul { display: flex; flex-direction: column; }
.mobile-menu a {
  display: block;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.mobile-menu a:hover { background: var(--bg-alt); color: var(--primary); }


/* =============================
   HERO
   ============================= */
.hero-section {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1E6BB3 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: 80px;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.13) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  animation: patternMove 20s linear infinite;
  pointer-events: none;
}
@keyframes patternMove {
  0%   { background-position: 0 0; }
  100% { background-position: 28px 28px; }
}

.hero-blob-1 {
  width: 500px;
  height: 500px;
  background: rgba(56, 189, 248, 0.12);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}
.hero-blob-2 {
  width: 350px;
  height: 350px;
  background: rgba(255,255,255,0.05);
  bottom: 80px;
  left: -80px;
  animation-delay: -4s;
}

.hero-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(48px, 8vh, 96px) var(--container-pad) 40px;
  width: 100%;
}

.hero-content { color: var(--white); }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.hero-headline {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero-headline em {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}
.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: rgba(255,255,255,0.78);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 460px;
}
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.hero-visual { position: relative; }
.hero-image-frame {
  position: relative;
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 80px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4/3;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.hero-image-frame:hover .hero-img { transform: scale(1.03); }
.hero-image-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(13, 46, 82, 0.4));
  z-index: 1;
}
.hero-image-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  color: var(--primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

/* Stat cards floating at bottom */
.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.12);
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
  border-right: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
}
.stat-card:last-child { border-right: none; }
.stat-card:hover { background: rgba(255,255,255,0.06); }
.stat-num {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-lbl {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}


/* =============================
   SERVICIOS
   ============================= */
.section-services {
  position: relative;
  padding: clamp(64px, 10vw, 100px) 0;
  background: var(--white);
  overflow: hidden;
}
.services-blob-1 {
  width: 400px; height: 400px;
  background: var(--bg-alt);
  top: -80px; right: -120px;
  animation-delay: -2s;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 1;
}
.service-card {
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  cursor: default;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.service-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card--accent {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-color: transparent;
  color: var(--white);
}
.service-card--accent h3, .service-card--accent p { color: rgba(255,255,255,0.9); }
.service-card--accent .service-icon-wrap { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.15); }
.service-card--accent .service-icon { color: var(--accent); }
.service-card--accent::before { background: var(--accent); }

.service-icon-wrap {
  width: 52px; height: 52px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: var(--transition);
}
.service-card:hover .service-icon-wrap {
  background: var(--primary);
  border-color: var(--primary);
}
.service-card:hover .service-icon { color: var(--white) !important; }
.service-card--accent:hover .service-icon-wrap { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.25); }

.service-icon {
  width: 26px; height: 26px;
  color: var(--primary);
  transition: var(--transition);
}
.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
  transition: var(--transition);
}
.service-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  transition: var(--transition);
}
.service-urgency-badge {
  display: inline-block;
  margin-top: 16px;
  background: rgba(245, 158, 11, 0.2);
  color: #F59E0B;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 158, 11, 0.3);
}


/* =============================
   SOBRE NOSOTROS
   ============================= */
.section-about {
  position: relative;
  padding: clamp(64px, 10vw, 100px) 0;
  background: var(--bg);
  overflow: hidden;
}
.about-blob-1 {
  width: 450px; height: 450px;
  background: var(--bg-alt);
  bottom: -100px; left: -120px;
  animation-delay: -6s;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 72px;
  position: relative;
  z-index: 1;
}
.about-images { position: relative; height: 480px; }
.about-img-main-wrap {
  position: absolute;
  top: 0; left: 0;
  width: 72%;
  height: 80%;
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 60px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-img-main { width: 100%; height: 100%; object-fit: cover; }
.about-img-secondary-wrap {
  position: absolute;
  bottom: 0; right: 0;
  width: 52%;
  height: 55%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--white);
}
.about-img-secondary { width: 100%; height: 100%; object-fit: cover; }
.about-experience-badge {
  position: absolute;
  top: 50%;
  right: -16px;
  transform: translateY(-50%);
  background: var(--primary);
  color: var(--white);
  padding: 20px 16px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-lg);
  z-index: 2;
}
.exp-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.exp-txt {
  display: block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  line-height: 1.4;
  margin-top: 4px;
}

.about-content { padding-left: 16px; }
.about-content .section-tag { margin-bottom: 16px; }
.about-content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 20px;
}
.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 1rem;
}
.about-content p strong { color: var(--text); font-weight: 600; }
.about-features {
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.about-features svg { color: var(--primary); flex-shrink: 0; }

/* Team Cards */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  position: relative;
  z-index: 1;
}
.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.team-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.team-img-wrap {
  height: 260px;
  overflow: hidden;
}
.team-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.team-card:hover .team-img-wrap img { transform: scale(1.04); }
.team-info { padding: 24px 28px; }
.team-info h3 { font-size: 1.2rem; margin-bottom: 4px; }
.team-role {
  display: block;
  color: var(--primary-light);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.team-info p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; }


/* =============================
   TESTIMONIOS
   ============================= */
.section-testimonials {
  position: relative;
  padding: clamp(64px, 10vw, 100px) 0;
  background: var(--bg-dark);
  overflow: hidden;
}
.testimonials-blob-1 {
  width: 500px; height: 500px;
  background: rgba(27, 79, 138, 0.3);
  top: -120px; right: -80px;
  animation-delay: -3s;
}
.section-testimonials .section-header h2 { color: var(--white); }
.section-testimonials .section-header p { color: rgba(255,255,255,0.55); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 1;
}
.testimonial-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}
.testimonial-card:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-3px);
}
.stars {
  color: var(--accent-gold);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
  display: block;
}
.testimonial-card p {
  color: rgba(255,255,255,0.8);
  font-size: 0.925rem;
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 20px;
}
.testimonial-card footer {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.testimonial-name {
  display: block;
  font-weight: 600;
  color: var(--white);
  font-size: 0.9rem;
  font-style: normal;
}
.testimonial-service {
  display: block;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 2px;
}


/* =============================
   GALERÍA
   ============================= */
.section-gallery {
  padding: clamp(64px, 10vw, 100px) 0;
  background: var(--white);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 12px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: block;
  padding: 0;
  background: var(--bg-alt);
}
.gallery-item--tall { grid-row: span 2; }
.gallery-item--wide { grid-column: span 2; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,46,82,0.6) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.gallery-tag-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 20, 40, 0.95);
  backdrop-filter: blur(6px);
}
.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 900px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: block;
}
.lightbox-caption {
  margin-top: 12px;
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); color: var(--white); }
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.lightbox-arrow:hover { background: var(--primary); color: var(--white); }
.lightbox-arrow--prev { left: 16px; }
.lightbox-arrow--next { right: 16px; }
.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  z-index: 2;
}


/* =============================
   CTA SECTION
   ============================= */
.section-cta {
  position: relative;
  padding: clamp(64px, 10vw, 100px) 0;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #1E6BB3 100%);
  overflow: hidden;
}
.cta-blob-1 {
  width: 600px; height: 600px;
  background: rgba(56, 189, 248, 0.08);
  top: -150px; right: -150px;
  animation-delay: -5s;
}
.cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.cta-inner h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--white);
  margin-bottom: 16px;
}
.cta-inner p {
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
  font-size: 1.05rem;
  line-height: 1.7;
}
.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-actions .btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.cta-actions .btn-primary:hover { background: var(--bg-alt); transform: translateY(-2px); }


/* =============================
   CONTACTO
   ============================= */
.section-contact {
  padding: clamp(64px, 10vw, 100px) 0;
  background: var(--bg);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border-light);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group label span { color: var(--primary-light); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.925rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(27, 79, 138, 0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #A0AFBF; }
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235A6A82' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-align: center;
}
.form-group.error input,
.form-group.error select { border-color: #EF4444; }
.form-group .error-msg {
  display: none;
  font-size: 0.78rem;
  color: #EF4444;
  margin-top: 4px;
}
.form-group.error .error-msg { display: block; }

.contact-info { display: flex; flex-direction: column; gap: 0; }
.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border-light);
}
.contact-card h3 { font-size: 1.3rem; margin-bottom: 24px; }
.contact-list { display: flex; flex-direction: column; gap: 0; }
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.contact-list li:last-child { border-bottom: none; padding-bottom: 0; }
.contact-icon {
  width: 40px; height: 40px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}
.contact-list li > div:last-child { flex: 1; }
.contact-list span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.contact-list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
}
.contact-list a:hover { color: var(--primary); }
.contact-list p, .contact-list address { font-size: 0.925rem; color: var(--text); line-height: 1.5; }


/* =============================
   FOOTER
   ============================= */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,0.75); }
.footer-top { padding: clamp(48px, 8vw, 80px) 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 48px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.footer-logo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }
.footer-logo span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--white);
}
.footer-brand p { font-size: 0.875rem; line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 8px; }
.social-link {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  transition: var(--transition);
}
.social-link:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }

.footer-links h4, .footer-hours h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

.footer-hours ul { display: flex; flex-direction: column; gap: 0; margin-bottom: 20px; }
.footer-hours li {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-hours li:last-child { border-bottom: none; }
.footer-hours li span:first-child { color: rgba(255,255,255,0.6); }
.footer-hours li span:last-child { color: var(--white); font-weight: 500; }

.btn-footer-tel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn-footer-tel:hover { background: var(--primary-light); }

.footer-map { width: 100%; overflow: hidden; }
.footer-map iframe { display: block; filter: grayscale(20%) contrast(1.05); }
.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--accent); }


/* =============================
   CHAT WIDGET — AYUDA ACTIVA
   ============================= */
.chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 8000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.chat-tooltip {
  background: var(--white);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px 20px 4px 20px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: 1px solid var(--border);
  order: 1;
}
.chat-tooltip.hidden { opacity: 0; transform: translateY(6px); }

.chat-toggle-btn {
  width: 58px; height: 58px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(27, 79, 138, 0.45);
  transition: var(--transition-bounce);
  order: 2;
  position: relative;
}
.chat-toggle-btn.pulse-active {
  animation: chatPulse 2.2s ease-in-out infinite;
}
@keyframes chatPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(27,79,138,0.45), 0 0 0 0 rgba(37,99,235,0.5); }
  50% { box-shadow: 0 4px 20px rgba(27,79,138,0.45), 0 0 0 14px rgba(37,99,235,0); }
}
.chat-toggle-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(27, 79, 138, 0.55); }
.chat-icon-open, .chat-icon-close {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.chat-icon-close { opacity: 0; transform: rotate(-90deg) scale(0.7); }
.chat-toggle-btn.open .chat-icon-open { opacity: 0; transform: rotate(90deg) scale(0.7); }
.chat-toggle-btn.open .chat-icon-close { opacity: 1; transform: rotate(0deg) scale(1); }

.chat-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: min(360px, calc(100vw - 40px));
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  max-height: min(520px, calc(100vh - 140px));
}
.chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}
.chat-header h3 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
  line-height: 1;
}
.chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  margin-top: 3px;
}
.chat-status-dot {
  width: 6px; height: 6px;
  background: #4ADE80;
  border-radius: 50%;
  animation: statusBlink 2s ease-in-out infinite;
}
@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.chat-close-btn {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.chat-close-btn:hover { background: rgba(255,255,255,0.2); color: var(--white); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.chat-bubble {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.6;
  animation: bubbleIn 0.25s ease;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-bubble--bot {
  background: var(--bg-alt);
  color: var(--text);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.chat-bubble--bot a { color: var(--primary-light); text-decoration: underline; }
.chat-bubble--user {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: var(--white);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.chat-bubble--typing {
  background: var(--bg-alt);
  align-self: flex-start;
  display: flex;
  gap: 5px;
  padding: 12px 16px;
}
.typing-dot {
  width: 7px; height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
  background: var(--white);
}
.chat-input {
  flex: 1;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  outline: none;
  transition: var(--transition);
}
.chat-input:focus { border-color: var(--primary); background: var(--white); }
.chat-input::placeholder { color: #A0AFBF; }
.chat-send-btn {
  width: 38px; height: 38px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.chat-send-btn:hover { background: var(--primary-light); transform: scale(1.08); }
.chat-send-btn:disabled { background: var(--border); cursor: not-allowed; transform: none; }


/* =============================
   RESPONSIVE — TABLET
   ============================= */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-visual { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(2) { border-right: none; }
  .stat-card { border-bottom: 1px solid rgba(255,255,255,0.1); }
  .stat-card:nth-child(3), .stat-card:nth-child(4) { border-bottom: none; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-images { height: 360px; }
  .about-experience-badge { right: 20px; }
  .about-content { padding-left: 0; }
  .team-grid { grid-template-columns: 1fr; }

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

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

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

/* =============================
   RESPONSIVE — MOBILE
   ============================= */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .btn-cta-header { display: none; }
  .nav-toggle { display: flex; }

  .hero-stats { grid-template-columns: 1fr 1fr; }

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

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

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
  .gallery-item--wide { grid-column: span 1; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom .container { flex-direction: column; text-align: center; gap: 8px; }

  .lightbox-arrow { display: none; }

  .contact-form { padding: 24px 20px; }

  .cta-actions { flex-direction: column; align-items: center; }
  .cta-actions .btn-primary, .cta-actions .btn-outline-light { width: 100%; max-width: 320px; justify-content: center; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .gallery-item--tall { grid-row: span 1; }
  .about-images { height: 280px; }
  .about-experience-badge { display: none; }
}

/* ===== Focus Styles for Accessibility ===== */
:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}
