@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --color-primary: #0A2E5A;
  --color-primary-light: #1A4E8A;
  --color-accent: #F5A623;
  --color-accent-hover: #E09410;
  --color-white: #FFFFFF;
  --color-off-white: #F8F9FA;
  --color-text-dark: #1A1A2E;
  --color-text-muted: #6B7A8D;
  --color-border: rgba(10, 46, 90, 0.12);
  --color-hero-overlay: rgba(10, 46, 90, 0.82);
  --gradient-hero: linear-gradient(135deg, #0A2E5A 0%, #1A4E8A 50%, #0D3D6E 100%);
  --gradient-accent: linear-gradient(135deg, #F5A623, #E09410);
  --shadow-card: 0 8px 32px rgba(10, 46, 90, 0.12);
  --shadow-card-hover: 0 16px 48px rgba(10, 46, 90, 0.22);
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  color: var(--color-text-dark);
  background: var(--color-white);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.2; }

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

img { max-width: 100%; height: auto; }

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.navbar.scrolled {
  background: rgba(10, 46, 90, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(10, 46, 90, 0.25);
}

.navbar-logo img {
  height: 72px;
  width: auto;
  object-fit: contain;
  filter:
    drop-shadow(0.5px 0 0 rgba(255,255,255,0.3))
    drop-shadow(-0.5px 0 0 rgba(255,255,255,0.3))
    drop-shadow(0 0.5px 0 rgba(255,255,255,0.3))
    drop-shadow(0 -0.5px 0 rgba(255,255,255,0.3));
  opacity: 0;
  transform: translateY(-10px) scale(0.88);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.48, 0.64, 1);
}

.navbar.scrolled .navbar-logo img {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.navbar-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  display: none;
}

.navbar-logo-text.fallback { display: block; }

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

.navbar-nav a {
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
  transition: var(--transition);
}

.navbar-nav a:hover { opacity: 1; color: var(--color-accent); }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-lang {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-white);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.05em;
}

.btn-lang:hover { background: rgba(255,255,255,0.25); }

.btn-call {
  background: var(--gradient-accent);
  color: var(--color-text-dark);
  padding: 0.5rem 1.25rem;
  border-radius: 24px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.4);
}

.btn-call:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 166, 35, 0.5);
}

.btn-call svg { width: 14px; height: 14px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

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

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-drawer {
  display: none;
  position: fixed;
  top: 0; right: 0;
  width: 280px;
  height: 100vh;
  background: var(--color-primary);
  z-index: 999;
  padding: 6rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.3);
}

.mobile-drawer.open { transform: translateX(0); }

.mobile-drawer ul { list-style: none; }

.mobile-drawer ul li { border-bottom: 1px solid rgba(255,255,255,0.1); }

.mobile-drawer ul li a {
  display: block;
  padding: 1rem 0;
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mobile-drawer-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}

.drawer-overlay.open { display: block; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--gradient-accent);
  color: var(--color-text-dark);
  padding: 0.85rem 2rem;
  border-radius: 28px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: var(--transition);
  display: inline-block;
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.45);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.55);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  padding: 0.85rem 2rem;
  border-radius: 28px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid rgba(255,255,255,0.7);
  transition: var(--transition);
  display: inline-block;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 66vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding: calc(88px + 1.5rem) 2rem 3rem;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: contrast(1.2) brightness(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(140, 60, 5, 0.60) 0%,
    rgba(20, 40, 85, 0.48) 55%,
    rgba(8, 25, 60, 0.55) 100%
  );
  z-index: 1;
}

#tsparticles {
  position: absolute;
  inset: 0;
  z-index: 2;
}

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

.hero-logo {
  width: clamp(300px, 42vw, 560px);
  height: auto;
  margin-bottom: -0.75rem;
  opacity: 0;
  animation: logoReveal 1s cubic-bezier(0.34, 1.48, 0.64, 1) forwards 0.1s;
  filter:
    drop-shadow(0 0 1px rgba(255,255,255,0.4))
    drop-shadow(0 6px 32px rgba(0,0,0,0.35));
}

.hero-logo-fallback {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: logoReveal 1s cubic-bezier(0.34, 1.48, 0.64, 1) forwards 0.1s;
  display: none;
}

.hero-logo-fallback.show { display: block; }

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  color: var(--color-white);
  margin-bottom: 1rem;
  opacity: 0;
  animation: titleReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.7s;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
  font-weight: 300;
  opacity: 0;
  animation: subtitleReveal 0.8s ease forwards 1.2s;
}

.hero-services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 2rem;
}

.hero-service-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(26, 78, 138, 0.55);
  border: 1px solid rgba(100, 160, 230, 0.45);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.38rem 0.9rem;
  border-radius: 20px;
  transition: var(--transition);
  opacity: 0;
  animation: chipPop 0.5s cubic-bezier(0.34, 1.5, 0.64, 1) forwards;
}

.hero-services .hero-service-chip:nth-child(1) { animation-delay: 1.5s; }
.hero-services .hero-service-chip:nth-child(2) { animation-delay: 1.62s; }
.hero-services .hero-service-chip:nth-child(3) { animation-delay: 1.74s; }
.hero-services .hero-service-chip:nth-child(4) { animation-delay: 1.86s; }
.hero-services .hero-service-chip:nth-child(5) { animation-delay: 1.98s; }
.hero-services .hero-service-chip:nth-child(6) { animation-delay: 2.1s; }

.hero-service-chip:hover {
  background: rgba(26, 78, 138, 0.8);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.hero-service-chip svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: btnReveal 0.7s cubic-bezier(0.34, 1.3, 0.64, 1) forwards 2.2s;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  color: rgba(255,255,255,0.6);
  width: 28px;
  height: 28px;
}

@keyframes logoReveal {
  0%   { opacity: 0; transform: scale(0.6) translateY(-24px); }
  65%  { opacity: 1; transform: scale(1.05) translateY(3px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes titleReveal {
  0%   { opacity: 0; transform: translateY(50px); letter-spacing: 0.12em; }
  100% { opacity: 1; transform: translateY(0); letter-spacing: normal; }
}

@keyframes subtitleReveal {
  0%   { opacity: 0; transform: translateY(22px); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes chipPop {
  0%   { opacity: 0; transform: translateY(20px) scale(0.75); }
  65%  { transform: translateY(-4px) scale(1.08); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes btnReveal {
  0%   { opacity: 0; transform: translateY(28px) scale(0.88); }
  65%  { transform: translateY(-3px) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo, .hero h1, .hero-subtitle, .hero-service-chip, .hero-ctas {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ── SECTION SHARED ── */
section { padding: 6rem 2rem; }

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

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  background: rgba(245, 166, 35, 0.12);
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.container { max-width: 1200px; margin: 0 auto; }

/* ── SCROLL REVEAL ── */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.stagger-children .reveal-on-scroll:nth-child(1) { transition-delay: 0ms; }
.stagger-children .reveal-on-scroll:nth-child(2) { transition-delay: 100ms; }
.stagger-children .reveal-on-scroll:nth-child(3) { transition-delay: 200ms; }
.stagger-children .reveal-on-scroll:nth-child(4) { transition-delay: 300ms; }
.stagger-children .reveal-on-scroll:nth-child(5) { transition-delay: 400ms; }
.stagger-children .reveal-on-scroll:nth-child(6) { transition-delay: 500ms; }
.stagger-children .reveal-on-scroll:nth-child(7) { transition-delay: 600ms; }

/* ── SERVICES ── */
#servicios { background: var(--color-off-white); padding-bottom: 10rem; }

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

/* Standard card */
.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before { transform: scaleX(1); }

.service-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-5px);
}

.service-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(245,166,35,0.14), rgba(245,166,35,0.04));
  border: 1px solid rgba(245,166,35,0.22);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, rgba(245,166,35,0.24), rgba(245,166,35,0.1));
  transform: scale(1.06);
}

.service-icon svg { color: var(--color-accent); width: 30px; height: 30px; stroke-width: 1.75; }

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
  color: var(--color-primary);
  line-height: 1.3;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.service-expand {
  display: none;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  animation: expandIn 0.25s ease;
}

@keyframes expandIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.service-expand.open { display: block; }

.btn-expand {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.6rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
  letter-spacing: 0.02em;
}

.btn-expand svg { width: 14px; height: 14px; transition: transform 0.25s ease; }
.btn-expand.expanded svg { transform: rotate(180deg); }
.btn-expand:hover { color: var(--color-accent-hover); }

/* ── FEATURED CARD — Dental & Visión ── */
.service-card--featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1A4E8A 100%);
  border-color: transparent;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.75rem 3rem;
  cursor: default;
}

.service-card--featured::before { display: none; }

.service-card--featured:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 64px rgba(10, 46, 90, 0.35);
}

.service-card--featured .service-icon {
  width: 96px;
  height: 96px;
  background: rgba(245, 166, 35, 0.15);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 28px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.service-card--featured:hover .service-icon {
  background: rgba(245, 166, 35, 0.25);
  transform: scale(1.06);
}

.service-card--featured .service-icon svg {
  width: 48px;
  height: 48px;
  color: var(--color-accent);
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 166, 35, 0.18);
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(245, 166, 35, 0.3);
  margin-bottom: 0.85rem;
}

.service-badge svg { width: 12px; height: 12px; }

.service-card--featured h3 {
  font-size: 2rem;
  color: var(--color-white);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.service-card--featured .service-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.service-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.service-feature-tag {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  transition: var(--transition);
}

.service-card--featured:hover .service-feature-tag {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
}

/* ── WHY US ── */
#nosotros { background: var(--color-white); color: var(--color-text-dark); }

#nosotros .section-header h2 { color: var(--color-primary); }
#nosotros .section-header p { color: var(--color-text-muted); }
#nosotros .section-tag { background: rgba(10,46,90,0.07); color: var(--color-primary); border-color: rgba(10,46,90,0.15); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.why-card {
  text-align: center;
  padding: 2.5rem 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-off-white);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.why-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.why-card:hover::after { transform: scaleX(1); }

.why-card:hover {
  background: var(--color-white);
  border-color: rgba(245,166,35,0.45);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

.why-icon {
  width: 76px;
  height: 76px;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: var(--transition);
}

.why-card:hover .why-icon {
  background: rgba(245, 166, 35, 0.22);
  transform: scale(1.07) rotate(-3deg);
}

.why-icon svg { color: var(--color-accent); width: 36px; height: 36px; stroke-width: 1.5; }

.why-number {
  font-family: 'Playfair Display', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(245, 166, 35, 0.5);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.why-card h3 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.why-card p { color: var(--color-text-muted); font-size: 1rem; line-height: 1.7; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 3rem;
}

.stat-item { text-align: center; }

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}

.stat-suffix {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

/* ── COMPANIES MARQUEE ── */
#companias { background: var(--color-off-white); overflow: hidden; }

.marquee-wrapper { overflow: hidden; position: relative; }

.marquee-wrapper::before,
.marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
}

.marquee-wrapper::before { left: 0; background: linear-gradient(to right, var(--color-off-white), transparent); }
.marquee-wrapper::after { right: 0; background: linear-gradient(to left, var(--color-off-white), transparent); }

.marquee-track {
  display: flex;
  gap: 2rem;
  animation: marquee 28s linear infinite;
  width: max-content;
}

.marquee-wrapper:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.company-badge {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 72px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  filter: grayscale(1);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.company-badge:hover {
  filter: grayscale(0);
  color: var(--color-primary);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card);
}

.company-badge img {
  max-height: 44px;
  max-width: 140px;
  width: auto;
  object-fit: contain;
}

/* ── QUOTE FORM ── */
#cotizacion { background: var(--color-white); }

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

/* Quote image panel */
.quote-image-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.quote-image-panel img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card-hover);
}

.quote-image-caption h3 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}


.quote-bullets { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }

.quote-bullets li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--color-text-dark);
}

.quote-bullets li::before {
  content: '';
  width: 20px;
  height: 20px;
  background: var(--gradient-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A2E' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--color-accent);
}

.quote-form-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  padding: 2.5rem;
  border: 1px solid var(--color-border);
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--color-border);
  padding: 0.75rem 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--color-text-dark);
  transition: var(--transition);
  outline: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: var(--color-accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--color-text-muted); }

.form-group select { cursor: pointer; color: var(--color-text-muted); }
.form-group select:valid { color: var(--color-text-dark); }

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

.btn-submit {
  width: 100%;
  background: var(--gradient-accent);
  color: var(--color-text-dark);
  border: none;
  padding: 1rem;
  border-radius: 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.4);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.55);
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
  background: rgba(245, 166, 35, 0.08);
  border-radius: var(--border-radius);
  border: 1px solid rgba(245, 166, 35, 0.3);
}

.form-success.show { display: block; }
.form-success h4 { color: var(--color-primary); margin-bottom: 0.5rem; }
.form-success p { color: var(--color-text-muted); font-size: 0.9rem; }

/* ── CONTACT ── */
#contacto { background: var(--color-primary); color: var(--color-white); position: relative; overflow: visible; }

.contact-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
}

.contact-col h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--color-white);
  margin-bottom: 1.25rem;
}

.contact-col p {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.social-links { display: flex; gap: 0.75rem; }

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--color-white);
}

.social-link:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-text-dark); }
.social-link svg { width: 18px; height: 18px; }

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

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

.contact-detail svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--color-accent); }

.btn-whatsapp-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25D366;
  color: var(--color-white);
  padding: 0.65rem 1.25rem;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: var(--transition);
}

.btn-whatsapp-contact:hover { background: #1da851; transform: translateY(-1px); }
.btn-whatsapp-contact svg { width: 18px; height: 18px; }

.contact-map iframe {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  border: none;
  filter: brightness(0.85) contrast(1.1);
}

.contact-logo {
  height: 100px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  opacity: 0.9;
  filter:
    drop-shadow(1px 0 0 rgba(255,255,255,0.5))
    drop-shadow(-1px 0 0 rgba(255,255,255,0.5))
    drop-shadow(0 1px 0 rgba(255,255,255,0.5))
    drop-shadow(0 -1px 0 rgba(255,255,255,0.5));
}

.contact-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 1rem;
  display: none;
}

.contact-logo-text.fallback { display: block; }

/* ── FOOTER ── */
footer {
  background: #050F1E;
  padding: 1.75rem 2rem;
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
}

footer a { color: rgba(255,255,255,0.6); transition: var(--transition); }
footer a:hover { color: var(--color-accent); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ── WHATSAPP FLOAT ── */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  animation: pulse-wa 2.5s infinite;
  transition: transform 0.2s ease;
}

.whatsapp-float:hover { transform: scale(1.1); animation: none; }
.whatsapp-float svg { color: white; width: 30px; height: 30px; }

.whatsapp-float .tooltip {
  position: absolute;
  right: 66px;
  background: var(--color-text-dark);
  color: var(--color-white);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.whatsapp-float:hover .tooltip { opacity: 1; }

@keyframes pulse-wa {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 4px 32px rgba(37, 211, 102, 0.8), 0 0 0 12px rgba(37, 211, 102, 0.1); }
}

/* ── HOW IT WORKS ── */
.section-how {
  background: var(--color-primary);
  padding: 5rem 0;
  position: relative;
  z-index: 4; /* sits above wave-divider z-index:2, covers bottom of sun */
}

.section-how .section-tag {
  background: rgba(245, 166, 35, 0.2);
  color: var(--color-accent);
  border-color: rgba(245, 166, 35, 0.3);
}

.section-how .section-header h2 {
  color: var(--color-white);
}

.section-how .section-header p {
  color: rgba(255,255,255,0.7);
}

.how-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 3.5rem;
}

.how-step {
  flex: 1;
  text-align: center;
  padding: 0 1.5rem;
  position: relative;
}

.how-step-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(245, 166, 35, 0.15);
  border: 2px solid rgba(245, 166, 35, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: var(--transition);
}

.how-step:hover .how-step-icon {
  background: rgba(245, 166, 35, 0.28);
  border-color: var(--color-accent);
  transform: scale(1.07);
}

.how-step-icon svg {
  width: 34px;
  height: 34px;
  color: var(--color-accent);
  stroke-width: 1.75;
}

.how-step-number {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.how-step h3 {
  font-size: 1.25rem;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.how-step p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 240px;
  margin: 0 auto;
}

.how-connector {
  flex-shrink: 0;
  width: 80px;
  color: rgba(245, 166, 35, 0.45);
  margin-top: 40px;
}

.how-connector svg {
  width: 100%;
  height: 24px;
}

.how-cta {
  text-align: center;
  margin-top: 3.5rem;
}

@media (max-width: 767px) {
  .how-steps {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .how-step {
    padding: 1.5rem 1rem;
    max-width: 340px;
  }

  .how-connector {
    transform: rotate(90deg);
    margin: 0;
    width: 60px;
  }
}

/* ── WAVE DIVIDERS ── */
.wave-divider {
  position: relative;
  height: 72px;
  overflow: hidden;
  background: var(--color-primary);
  line-height: 0;
}

.wave-divider--navy {
  background: var(--color-off-white);
}

/* Wave-divider that holds the sun: overflow visible so sun peeks above */
.wave-divider--with-sun {
  overflow: visible;
  z-index: 2;
  /* Allow sun to peek above but block horizontal bleed from 200%-wide wave SVGs */
  clip-path: inset(-160px 0px 0px 0px);
}

.wave-sun {
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 240px;
  z-index: 1; /* behind wave SVGs (z-index 2) */
  animation: waveSunSpin 16s linear infinite;
  clip-path: circle(47%);
  filter:
    drop-shadow(0 0 8px rgba(245, 166, 35, 0.8))
    drop-shadow(0 0 20px rgba(245, 166, 35, 0.4));
  pointer-events: none;
}

.wave-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  z-index: 2; /* above the sun */
}

@keyframes waveSunSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 767px) {
  .wave-sun { width: 110px; height: 110px; }
}

.wave-svg--back {
  animation: waveScroll 9s linear infinite;
}

.wave-svg--front {
  animation: waveScroll 5.5s linear infinite;
}

@keyframes waveScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .wave-svg--back,
  .wave-svg--front { animation: none; }
}

/* ── TESTIMONIALS ── */
.section-testimonials {
  background: var(--color-off-white);
  padding: 5rem 0;
}

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

.testimonial-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  padding: 2.25rem 2rem 2rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: var(--transition);
  overflow: hidden;
}

.testimonial-card::before {
  content: '\201C';
  font-family: 'Playfair Display', serif;
  font-size: 7rem;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.15;
  position: absolute;
  top: -0.75rem;
  left: 1.25rem;
  pointer-events: none;
}

.testimonial-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.testimonial-card:hover::after {
  transform: scaleX(1);
}

.testimonial-stars {
  display: flex;
  gap: 3px;
  color: var(--color-accent);
}

.testimonial-stars svg {
  width: 18px;
  height: 18px;
}

.testimonial-card blockquote {
  font-size: 1rem;
  color: var(--color-text-dark);
  line-height: 1.75;
  font-style: italic;
  flex: 1;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.testimonial-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient-hero);
  color: var(--color-white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.testimonial-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.testimonial-info strong {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
}

.testimonial-info span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

@media (max-width: 1023px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }
}


/* ── FAQ ── */
#faq { background: var(--color-off-white); }

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

.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.faq-item:has(.faq-question[aria-expanded="true"]) {
  box-shadow: var(--shadow-card);
  border-color: rgba(10, 46, 90, 0.25);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-dark);
  transition: color 0.2s ease;
}

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

.faq-question[aria-expanded="true"] { color: var(--color-primary); }

.faq-icon {
  flex-shrink: 0;
  color: var(--color-accent);
  transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

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

.faq-answer.open {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

/* ── PRIVACY PAGE ── */
.privacy-nav {
  position: sticky;
  top: 0;
  background: var(--color-primary);
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  box-shadow: 0 4px 24px rgba(10, 46, 90, 0.35);
}

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

.btn-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-white);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  opacity: 0.85;
}

.btn-back:hover { opacity: 1; color: var(--color-accent); }
.btn-back svg { width: 16px; height: 16px; }

.privacy-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
}

.privacy-sidebar {
  position: sticky;
  top: 88px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.privacy-sidebar h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.toc-list { list-style: none; }

.toc-list li a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.toc-list li a:hover { color: var(--color-primary); }

.privacy-content h1 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.privacy-content .last-updated {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin-bottom: 2.5rem;
}

.privacy-section { margin-bottom: 2.5rem; }

.privacy-section h2 {
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.privacy-section p,
.privacy-section li {
  font-size: 0.93rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 0.5rem;
}

.privacy-section ul { padding-left: 1.5rem; }

/* ── RESPONSIVE ── */
@media (max-width: 1023px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-map { display: none; }
  .privacy-layout { grid-template-columns: 1fr; }
  .privacy-sidebar { position: static; max-height: none; }
}

@media (max-width: 767px) {
  .navbar-nav { display: none; }
  .btn-call { display: none; }
  .hamburger { display: flex; }
  .mobile-drawer { display: block; }

  section { padding: 4rem 1.25rem; }

  /* Services */
  #servicios { padding-bottom: 6rem; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card--featured { grid-template-columns: 1fr; text-align: center; padding: 2rem; gap: 1.5rem; }
  .service-card--featured .service-icon { margin: 0 auto; }
  .service-features { justify-content: center; }

  /* How It Works */
  .how-steps { flex-direction: column; align-items: center; gap: 2rem; }
  .how-step { width: 100%; max-width: 320px; padding: 0 1rem; }
  .how-connector { display: none; }

  /* Why Us */
  .why-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* FAQ */
  .faq-question { padding: 1rem 1.25rem; font-size: 0.95rem; }
  .faq-answer p { padding: 0 1.25rem 1rem; }

  /* Quote */
  .quote-layout { grid-template-columns: 1fr; gap: 2rem; }
  .quote-image-panel img { height: 260px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-map { display: none; }

  /* Hero */
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary { width: 100%; max-width: 280px; text-align: center; }
  .hero-service-chip { font-size: 0.8rem; padding: 0.32rem 0.75rem; }
  .whatsapp-float svg { width: 32px; height: 32px; }

  .footer-links { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .how-step { max-width: 100%; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
