/* ===================================================
   AGATA DENTAL — Estilos principales
   Art Deco geométrico · Verde claro · Cálido y familiar
   =================================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Karla:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --primary:       #5b9080;
  --primary-dark:  #2d5a4a;
  --primary-light: #8fc4b2;
  --primary-pale:  #e8f4f0;
  --accent:        #c9a84c;
  --accent-light:  #e4c87a;
  --accent-dark:   #a07830;
  --bg:            #f7f4ef;
  --bg-alt:        #f0ede8;
  --dark:          #1a2e26;
  --text:          #2d4a3e;
  --text-muted:    #6b8b7e;
  --white:         #ffffff;
  --shadow:        0 8px 32px rgba(45,90,74,0.15);
  --shadow-lg:     0 20px 60px rgba(45,90,74,0.2);
  --border-gold:   1px solid rgba(201,168,76,0.4);
  --radius:        4px;
  --radius-lg:     8px;
}

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

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

body {
  font-family: 'Karla', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
}

h1, h2, h3, h4, h5 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--dark);
}

a { color: inherit; text-decoration: none; transition: color 0.3s; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: 'Karla', sans-serif; }
ul { list-style: none; }

/* ── Art Deco Decorative Elements ── */
.deco-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}
.deco-line::before,
.deco-line::after {
  content: '';
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  flex: 1;
}
.deco-line span {
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: 'Karla', sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.deco-diamond {
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
  display: inline-block;
  flex-shrink: 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header .deco-line { justify-content: center; }
.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Art Deco corner decoration */
.art-frame {
  position: relative;
}
.art-frame::before,
.art-frame::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.6;
}
.art-frame::before {
  top: -6px; left: -6px;
  border-width: 2px 0 0 2px;
}
.art-frame::after {
  bottom: -6px; right: -6px;
  border-width: 0 2px 2px 0;
}

/* ── Navigation ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all 0.4s ease;
}
#navbar.scrolled {
  background: rgba(26, 46, 38, 0.97);
  backdrop-filter: blur(12px);
  padding: 0.75rem 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo img {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
}
.nav-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.05em;
}
.nav-logo-text span {
  color: var(--accent-light);
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-family: 'Karla', sans-serif;
  font-weight: 400;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--accent);
  color: var(--dark) !important;
  padding: 0.6rem 1.4rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  transition: all 0.3s !important;
  white-space: nowrap;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--accent-light) !important; transform: translateY(-1px); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: rgba(26, 46, 38, 0.98);
  padding: 1.5rem 2rem;
  flex-direction: column;
  gap: 1.25rem;
  border-top: var(--border-gold);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ── Hero Section ── */
#hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--dark);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 59px,
      rgba(201,168,76,0.12) 59px,
      rgba(201,168,76,0.12) 60px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 59px,
      rgba(201,168,76,0.12) 59px,
      rgba(201,168,76,0.12) 60px
    ),
    repeating-linear-gradient(
      45deg,
      transparent 0px,
      transparent 42px,
      rgba(201,168,76,0.04) 42px,
      rgba(201,168,76,0.04) 43px
    );
  animation: patternShift 20s linear infinite;
}
@keyframes patternShift {
  0%   { background-position: 0 0, 0 0, 0 0; }
  100% { background-position: 60px 60px, 60px 60px, 43px 43px; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(91,144,128,0.25) 0%, transparent 70%),
              radial-gradient(ellipse at 20% 80%, rgba(201,168,76,0.1) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,168,76,0.15);
  border: var(--border-gold);
  padding: 0.4rem 1.2rem;
  border-radius: 2px;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-family: 'Karla', sans-serif;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.hero-title span {
  color: var(--accent-light);
  font-style: italic;
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255,255,255,0.75);
  font-style: italic;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hero-desc {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--dark);
  padding: 0.9rem 2.2rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  padding: 0.9rem 2.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,0.35);
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.stat-card {
  background: rgba(255,255,255,0.06);
  border: var(--border-gold);
  backdrop-filter: blur(8px);
  padding: 1.25rem 2rem;
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  min-width: 120px;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-mouse {
  width: 22px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 11px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel {
  width: 3px;
  height: 6px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 2s ease-in-out infinite;
}
@keyframes scrollWheel {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(8px); opacity: 0.3; }
}

/* ── Sections Common ── */
section {
  padding: 6rem 0;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── Services Section ── */
#servicios {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
#servicios::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--primary), var(--accent), transparent);
}

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

.service-card {
  background: var(--white);
  border: 1px solid rgba(91,144,128,0.15);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  bottom: 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 {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(91,144,128,0.3);
}
.service-card:hover::after { transform: scaleX(1); }

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-pale);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: all 0.3s;
  color: var(--primary);
}
.service-card:hover .service-icon {
  background: var(--primary);
  color: var(--white);
}
.service-icon svg {
  width: 28px;
  height: 28px;
  transition: transform 0.3s;
}
.service-card:hover .service-icon svg {
  transform: scale(1.1);
}
.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── About Section ── */
#nosotros {
  background: var(--bg-alt);
  position: relative;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-images {
  position: relative;
}
.about-img-main {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
}
.about-img-accent {
  position: absolute;
  bottom: -2rem;
  right: -2rem;
  width: 55%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 4px solid var(--white);
  box-shadow: var(--shadow);
}
.about-badge-years {
  position: absolute;
  top: 2rem;
  left: -2rem;
  background: var(--accent);
  color: var(--dark);
  padding: 1.25rem 1.5rem;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about-badge-years .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  display: block;
}
.about-badge-years .txt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
}
.about-content h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 1.5rem;
}
.about-content > p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}
.about-features {
  margin: 2rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.about-feature .icon {
  width: 36px;
  height: 36px;
  background: var(--primary-pale);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}
.about-feature p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
}
.about-feature strong { color: var(--dark); display: block; font-size: 0.9rem; }

/* Doctor card */
.doctor-card {
  margin-top: 2.5rem;
  background: var(--white);
  border: var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}
.doctor-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid var(--accent);
  flex-shrink: 0;
}
.doctor-info h4 {
  font-size: 1.05rem;
  color: var(--dark);
  margin-bottom: 2px;
}
.doctor-info p { font-size: 0.85rem; color: var(--text-muted); }
.doctor-info .role {
  font-size: 0.75rem;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* Team section */
.team-section {
  margin-top: 5rem;
}
.team-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.team-text {
  text-align: center;
  max-width: 680px;
  margin: 2.5rem auto 0;
}
.team-text p { color: var(--text-muted); line-height: 1.8; }

/* ── Testimonials ── */
#testimonios {
  background: var(--dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
#testimonios::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 79px,
      rgba(201,168,76,0.06) 79px,
      rgba(201,168,76,0.06) 80px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 79px,
      rgba(201,168,76,0.06) 79px,
      rgba(201,168,76,0.06) 80px
    );
}
#testimonios .section-header h2 { color: var(--white); }
#testimonios .section-header p { color: rgba(255,255,255,0.6); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}
.testimonial-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transition: all 0.3s;
}
.testimonial-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(201,168,76,0.4);
  transform: translateY(-4px);
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 1.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 6rem;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
}
.stars {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  letter-spacing: 2px;
}
.testimonial-text {
  color: rgba(255,255,255,0.8);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  flex-shrink: 0;
}
.testimonial-author h5 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.testimonial-author p {
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Gallery Section ── */
#galeria {
  background: var(--bg);
}
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.gallery-tab {
  background: none;
  border: 1px solid rgba(91,144,128,0.3);
  color: var(--text-muted);
  padding: 0.5rem 1.2rem;
  border-radius: 2px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s;
}
.gallery-tab:hover,
.gallery-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.gallery-grid {
  columns: 3;
  column-gap: 1rem;
}
@media (max-width: 768px) { .gallery-grid { columns: 2; } }
@media (max-width: 480px) { .gallery-grid { columns: 1; } }

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,46,38,0.85), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.gallery-zoom-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition: all 0.3s;
  background: rgba(201,168,76,0.9);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
}
.gallery-item:hover .gallery-zoom-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
#lightbox.open {
  display: flex;
}
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 0 80px rgba(0,0,0,0.8);
}
.lightbox-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s;
  cursor: pointer;
}
.lightbox-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--dark); }
#lightbox-prev { left: 1.5rem; }
#lightbox-next { right: 1.5rem; }
#lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s;
  cursor: pointer;
}
#lightbox-close:hover { background: #e74c3c; border-color: #e74c3c; }
#lightbox-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
}

/* ── Contact Section ── */
#contacto {
  background: var(--bg-alt);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.contact-info > p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-item-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-pale);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.contact-item h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-dark);
  margin-bottom: 3px;
}
.contact-item p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}
.contact-item a:hover { color: var(--primary); }

.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: var(--border-gold);
}
.contact-form h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.contact-form > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(91,144,128,0.25);
  border-radius: var(--radius);
  font-family: 'Karla', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,144,128,0.12);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn-whatsapp {
  width: 100%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: var(--white);
  padding: 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
}

/* ── CTA Section ── */
#cta {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--dark) 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 5rem 0;
}
#cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent 0px,
      transparent 30px,
      rgba(201,168,76,0.06) 30px,
      rgba(201,168,76,0.06) 31px
    );
}
#cta .container { position: relative; z-index: 1; }
#cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 1rem;
}
#cta h2 span { color: var(--accent-light); font-style: italic; }
#cta p {
  color: rgba(255,255,255,0.65);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}
.cta-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Footer ── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
}
.footer-brand .nav-logo-text {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}
.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  margin: 1rem 0 1.5rem;
}
.footer-logo {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
}
.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.social-btn {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s;
  font-size: 0.9rem;
}
.social-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--dark);
  transform: translateY(-2px);
}
.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-family: 'Karla', sans-serif;
  font-weight: 700;
}
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-links a::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.footer-links a:hover { color: var(--accent-light); }

.footer-hours { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-hours li {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.footer-hours li span:last-child { color: var(--primary-light); }

.footer-map {
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
}
.footer-map iframe {
  width: 100%;
  height: 160px;
  display: block;
  filter: grayscale(20%) contrast(1.1);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a:hover { color: var(--accent); }

/* ── AI Chat Widget ── */
#chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.chat-tooltip {
  background: var(--white);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: 20px 20px 4px 20px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  border: var(--border-gold);
  white-space: nowrap;
  transition: opacity 0.3s, transform 0.3s;
  transform-origin: bottom right;
}
.chat-tooltip.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.chat-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: 3px solid var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 20px rgba(91,144,128,0.5);
  transition: all 0.3s;
  animation: chatPulse 2.5s ease-in-out infinite;
  position: relative;
}
.chat-toggle-btn.open { animation: none; }
.chat-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(91,144,128,0.6);
}
@keyframes chatPulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(91,144,128,0.5),
                0 0 0 0 rgba(91,144,128,0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(91,144,128,0.5),
                0 0 0 14px rgba(91,144,128,0);
  }
}

.chat-panel {
  position: fixed;
  bottom: 100px;
  right: 2rem;
  width: 360px;
  max-height: 520px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  border: var(--border-gold);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--dark));
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 2px solid var(--accent);
}
.chat-header-icon {
  width: 36px;
  height: 36px;
  background: rgba(201,168,76,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid rgba(201,168,76,0.4);
}
.chat-header-text { flex: 1; }
.chat-header-text h4 {
  color: var(--white);
  font-size: 1rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
}
.chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
}
.chat-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: statusBlink 2s ease-in-out infinite;
}
@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.chat-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.1rem;
  padding: 4px;
  transition: color 0.2s;
}
.chat-close-btn:hover { color: var(--white); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 340px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(91,144,128,0.3); border-radius: 2px; }

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg.assistant { align-self: flex-start; }

.chat-bubble {
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg.user .chat-bubble {
  background: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant .chat-bubble {
  background: var(--bg-alt);
  color: var(--text);
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(91,144,128,0.15);
}
.chat-bubble a {
  color: var(--accent-dark);
  text-decoration: underline;
}
.chat-bubble a:hover { color: var(--primary); }

.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0.75rem;
}
.chat-typing span {
  width: 7px;
  height: 7px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: typingDot 1.4s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40%            { transform: scale(1.1); opacity: 1; }
}

.chat-input-area {
  padding: 0.75rem;
  border-top: 1px solid rgba(91,144,128,0.15);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.chat-input-area input {
  flex: 1;
  border: 1px solid rgba(91,144,128,0.25);
  border-radius: 24px;
  padding: 0.6rem 1rem;
  font-family: 'Karla', sans-serif;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.3s;
}
.chat-input-area input:focus { border-color: var(--primary); }
.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--primary-dark); transform: scale(1.05); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-images { max-width: 600px; margin: 0 auto; }
  .about-img-accent { display: none; }
  .about-badge-years { top: 1rem; left: 1rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  section { padding: 4rem 0; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero-stats { gap: 0.75rem; }
  .stat-card { padding: 1rem 1.25rem; min-width: 100px; }
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .chat-panel { width: calc(100vw - 2rem); right: 1rem; }
  #chat-widget { right: 1rem; bottom: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.5rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-stats { flex-wrap: wrap; justify-content: center; }
  .stat-number { font-size: 1.8rem; }
}
