/* ============================================================
   XANDAR ABOGADOS — Estilos Principales (Responsive Mejorado)
   Autor: Xandar Legal Studio
   ============================================================ */

/* ---------- Variables de Diseño Responsivas ---------- */
:root {
  /* Colores */
  --color-navy:       #0d1b2a;
  --color-navy-mid:   #1a2e42;
  --color-blue:       #1a56db;
  --color-blue-hover: #1648c0;
  --color-gold:       #c8960c;
  --color-gold-light: #f0c040;
  --color-white:      #ffffff;
  --color-light:      #f5f7fa;
  --color-gray:       #6b7280;
  --color-gray-light: #e5e9ef;
  --color-text:       #1a2030;

  /* Tipografía */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'DM Sans', 'Segoe UI', sans-serif;

  /* Radios de borde */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm:  0 2px 8px rgba(13,27,42,.08);
  --shadow-md:  0 8px 28px rgba(13,27,42,.14);
  --shadow-lg:  0 20px 60px rgba(13,27,42,.20);

  /* Transiciones */
  --transition: .3s cubic-bezier(.4,0,.2,1);

  /* Altura de navegación responsiva */
  --nav-height: clamp(64px, 8vw, 80px);

  /* Spacing responsivo */
  --spacing-xs:  clamp(0.5rem, 2vw, 1rem);
  --spacing-sm:  clamp(1rem, 3vw, 1.5rem);
  --spacing-md:  clamp(1.5rem, 4vw, 2.5rem);
  --spacing-lg:  clamp(2.5rem, 6vw, 4rem);
  --spacing-xl:  clamp(3.5rem, 8vw, 6rem);

  /* Ancho máximo del contenedor responsivo */
  --container-width: clamp(320px, 95vw, 1400px);
}

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

html {
  scroll-behavior: smooth;
  /* Tamaño de fuente responsivo */
  font-size: clamp(14px, 2vw, 18px);
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

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

ul, ol { list-style: none; }

button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ---------- Utilidades ---------- */
.container {
  width: var(--container-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.section-label {
  display: inline-block;
  font-size: clamp(0.65rem, 1.5vw, 0.85rem);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: var(--spacing-xs);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.section-subtitle {
  color: var(--color-gray);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 400;
  max-width: 560px;
  margin: var(--spacing-xs) auto 0;
}

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: clamp(0.6rem, 1.5vw, 0.85rem) clamp(1.25rem, 3vw, 1.95rem);
  border-radius: var(--radius-full);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-navy);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-navy-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

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

.btn-gold {
  background: var(--color-gold);
  color: var(--color-navy);
  font-weight: 700;
}
.btn-gold:hover {
  background: var(--color-gold-light);
  box-shadow: 0 8px 24px rgba(200,150,12,.35);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-blue);
  border: 1.5px solid var(--color-blue);
}
.btn-ghost:hover {
  background: var(--color-blue);
  color: var(--color-white);
}

.btn svg { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* ---------- NAVBAR ---------- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--color-gray-light);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow var(--transition), background var(--transition);
}
#navbar.scrolled {
  box-shadow: 0 4px 24px rgba(13,27,42,.10);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}
.nav-logo svg { width: clamp(1.5rem, 4vw, 2.2rem); height: auto; color: var(--color-blue); }
.nav-logo-text {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: .04em;
}
.nav-logo-sub {
  font-size: clamp(0.6rem, 1.5vw, 0.8rem);
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-gray);
  display: none;
}
@media (min-width: 480px) { .nav-logo-sub { display: inline; } }

/* Desktop links */
.nav-links {
  display: none;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.5rem);
}
@media (min-width: 1024px) { .nav-links { display: flex; } }

.nav-links a {
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  font-weight: 500;
  color: var(--color-gray);
  transition: color var(--transition);
  position: relative;
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--color-blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}
.nav-links a:hover { color: var(--color-blue); }
.nav-links a:hover::after { transform: scaleX(1); }



/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px;
}
@media (min-width: 1024px) { .nav-hamburger { display: none; } }

.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all var(--transition);
}
.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 menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-height); left: 0; right: 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-light);
  padding: clamp(1rem, 3vw, 1.75rem);
  transform: translateY(-110%);
  transition: transform var(--transition);
  z-index: 999;
  box-shadow: var(--shadow-md);
  max-height: 80vh;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateY(0); }

.mobile-menu a {
  display: block;
  padding: clamp(0.6rem, 1.5vw, 0.9rem) 0;
  font-weight: 500;
  color: var(--color-gray);
  border-bottom: 1px solid var(--color-gray-light);
  transition: color var(--transition);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
}
.mobile-menu a:hover { color: var(--color-blue); }
.mobile-menu a:last-child { border-bottom: none; }

.mobile-menu-footer {
  padding-top: var(--spacing-xs);
}

/* ---------- HERO ---------- */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-navy);
  padding-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .35;
  animation: kenburns 22s ease-in-out infinite alternate;
  transform-origin: center;
}
@keyframes kenburns {
  0%   { transform: scale(1) translateX(0); }
  100% { transform: scale(1.12) translateX(-2%); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(13,27,42,.92) 0%,
    rgba(13,27,42,.65) 55%,
    rgba(13,27,42,.2) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: clamp(0.3rem, 0.8vw, 0.45rem) clamp(0.7rem, 1.5vw, 1.1rem);
  border-radius: var(--radius-full);
  background: rgba(26,86,219,.18);
  border: 1px solid rgba(26,86,219,.3);
  color: #a3c4fd;
  font-size: clamp(0.65rem, 1.2vw, 0.85rem);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
  animation: fadeUp .8s ease both .1s;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin-bottom: clamp(0.9rem, 2vw, 1.5rem);
  animation: fadeUp .8s ease both .25s;
}
.hero-title em {
  font-style: italic;
  color: var(--color-gold-light);
}

.hero-desc {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.7);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  animation: fadeUp .8s ease both .4s;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  animation: fadeUp .8s ease both .55s;
}

/* Decoraciones laterales del hero */
.hero-ornament {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 45%;
  z-index: 2;
  pointer-events: none;
  display: none;
}
@media (min-width: 900px) { .hero-ornament { display: block; } }

.hero-ornament-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-circle {
  width: 480px; height: 480px;
  border-radius: 50%;
  border: 1px solid rgba(200,150,12,.15);
  position: absolute;
  animation: rotateSlow 40s linear infinite;
}
.hero-circle:nth-child(2) {
  width: 360px; height: 360px;
  border-color: rgba(26,86,219,.15);
  animation-duration: 30s;
  animation-direction: reverse;
}
@keyframes rotateSlow { to { transform: rotate(360deg); } }

/* ---------- ÁREAS DE PRÁCTICA ---------- */
#que-hacemos {
  padding: var(--spacing-xl) 0;
  background: var(--color-white);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 40vw, 280px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.practice-card {
  background: var(--color-light);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.practice-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,86,219,.04), rgba(200,150,12,.04));
  opacity: 0;
  transition: opacity var(--transition);
}
.practice-card:hover { 
  box-shadow: var(--shadow-md);
  background: var(--color-white);
  border-color: rgba(26,86,219,.2);
  transform: translateY(-3px);
}
.practice-card:hover::before { opacity: 1; }

.practice-card-icon {
  width: clamp(44px, 8vw, 56px);
  height: clamp(44px, 8vw, 56px);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: clamp(0.8rem, 2vw, 1.5rem);
  transition: transform var(--transition);
  color: var(--color-blue);
}
.practice-card-icon svg { width: 70%; height: 70%; }
.practice-card:hover .practice-card-icon { transform: scale(1.1); }

.practice-card h4 {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: .4rem;
  line-height: 1.3;
}
.practice-card p {
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  color: var(--color-gray);
  font-weight: 400;
  line-height: 1.6;
  flex-grow: 1;
}



/* ---------- PLATAFORMA DE SERVICIOS ---------- */
#plataforma {
  padding: var(--spacing-xl) 0;
  background: #f0f4fb;
}

.platform-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  justify-content: center;
  align-items: center;
}
@media (min-width: 768px) {
  .platform-grid {
    flex-wrap: wrap;
    flex-direction: row;
  }
  .platform-card-featured { margin-top: clamp(-0.5rem, -2vw, -1.5rem); margin-bottom: clamp(-0.5rem, -2vw, -1.5rem); }
}

.platform-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow var(--transition);
  width: 100%;
  max-width: 360px;
}
@media (min-width: 768px) {
  .platform-card { 
    flex: 1;
    min-width: 200px;
  }
  .platform-card-featured {
    flex-basis: 100%;
    max-width: none;
    width: 100%;
  }
}
.platform-card:hover { box-shadow: var(--shadow-md); }

.platform-card-icon {
  width: clamp(56px, 10vw, 72px);
  height: clamp(56px, 10vw, 72px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: clamp(1rem, 2vw, 1.75rem);
}
.platform-card-icon.blue { background: #dbeafe; color: var(--color-blue); }
.platform-card-icon svg { width: 60%; height: 60%; }

.platform-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: .6rem;
}
.platform-card p {
  color: var(--color-gray);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 300;
  margin-bottom: clamp(1rem, 2vw, 1.75rem);
}

.card-actions { width: 100%; display: flex; flex-direction: column; gap: .6rem; margin-top: auto; }
.card-btn {
  width: 100%;
  padding: clamp(0.6rem, 1.5vw, 0.85rem) clamp(0.8rem, 2vw, 1.2rem);
  border-radius: var(--radius-md);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  gap: .4rem;
  transition: all var(--transition);
}
.card-btn svg { width: 1rem; height: 1rem; }
.card-btn-outline {
  border: 1.5px solid var(--color-gray-light);
  color: var(--color-navy);
}
.card-btn-outline:hover { background: var(--color-light); }
.card-btn-dark {
  background: var(--color-navy);
  color: var(--color-white);
}
.card-btn-dark:hover { background: var(--color-navy-mid); }

/* Featured platform card */
.platform-card-featured {
  background: var(--color-navy);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.platform-card-featured::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(26,86,219,.18);
}
.platform-card-featured .badge-tag {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  background: rgba(200,150,12,.15);
  color: var(--color-gold);
  border: 1px solid rgba(200,150,12,.3);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: var(--radius-full);
}
.platform-card-featured .platform-card-icon {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--color-gold);
}
.platform-card-featured h3 { color: var(--color-white); }
.platform-card-featured p { color: rgba(255,255,255,.65); }

/* ---------- EQUIPO & ACTUALIDAD ---------- */
#equipo-noticias {
  padding: var(--spacing-xl) 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-gray-light);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (min-width: 768px) { .two-col { grid-template-columns: 1fr 1fr; } }

.sub-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.sub-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-gray-light);
}

/* Equipo */
.team-list { display: flex; flex-direction: column; gap: clamp(0.8rem, 2vw, 1.5rem); }
.team-member {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.25rem);
  padding: clamp(0.75rem, 1.5vw, 1.25rem);
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.team-member:hover { background: var(--color-light); }
.team-member img {
  width: clamp(50px, 10vw, 70px);
  height: clamp(50px, 10vw, 70px);
  border-radius: 50%;
  border: 2px solid var(--color-gray-light);
  object-fit: cover;
  flex-shrink: 0;
}
.team-member-info h4 {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 700;
  color: var(--color-navy);
}
.team-member-info p {
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  color: var(--color-blue);
  font-weight: 500;
}

/* Noticias */
.news-list { display: flex; flex-direction: column; gap: clamp(0.75rem, 2vw, 1.25rem); }
.news-item {
  display: block;
  padding: clamp(0.75rem, 1.5vw, 1.25rem) 0;
  border-bottom: 1px solid var(--color-gray-light);
  transition: color var(--transition);
}
.news-item:last-child { border-bottom: none; }
.news-item h4 {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.4;
  margin-bottom: .35rem;
  transition: color var(--transition);
}
.news-item:hover h4 { color: var(--color-blue); }
.news-item p { font-size: clamp(0.75rem, 1.2vw, 0.9rem); color: var(--color-gray); }

/* ---------- BANNER CTA PREMIUM ---------- */
#cta-premium {
  background: linear-gradient(130deg, var(--color-navy) 0%, var(--color-navy-mid) 100%);
  padding: var(--spacing-lg) 0;
  position: relative;
  overflow: hidden;
}
#cta-premium::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(26,86,219,.07);
  pointer-events: none;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
@media (min-width: 768px) {
  .cta-inner {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }
}

.cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.cta-text h2 svg { width: clamp(1.4rem, 3vw, 2rem); height: auto; color: var(--color-gold); flex-shrink: 0; }
.cta-text p {
  color: rgba(255,255,255,.65);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 300;
  max-width: 560px;
}

/* ---------- FOOTER ---------- */
#footer {
  background: #0a141f;
  padding: clamp(2.5rem, 4vw, 4rem) 0 clamp(1.5rem, 2vw, 2.5rem);
  border-top: 1px solid rgba(255,255,255,.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
@media (min-width: 480px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px)  { .footer-grid { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 3vw, 2.5rem); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

.footer-brand p {
  color: rgba(255,255,255,.45);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  line-height: 1.7;
  margin: clamp(0.75rem, 1.5vw, 1rem) 0 clamp(1rem, 2vw, 1.5rem);
}
.footer-social { display: flex; gap: clamp(0.5rem, 1vw, 0.85rem); }
.footer-social a {
  width: clamp(32px, 5vw, 42px);
  height: clamp(32px, 5vw, 42px);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.45);
  transition: all var(--transition);
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
}
.footer-social a:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: rgba(200,150,12,.08);
}
.footer-social a svg { width: 70%; height: 70%; }

.footer-col h4 {
  color: var(--color-white);
  font-size: clamp(0.7rem, 1.2vw, 0.9rem);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: clamp(0.9rem, 1.5vw, 1.25rem);
}
.footer-col ul { display: flex; flex-direction: column; gap: clamp(0.4rem, 1vw, 0.75rem); }
.footer-col ul li a {
  color: rgba(255,255,255,.45);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--color-gold); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.4rem, 1vw, 0.75rem);
  margin-bottom: clamp(0.5rem, 1vw, 0.9rem);
}
.footer-contact-item svg { width: clamp(0.9rem, 1.2vw, 1.1rem); height: auto; color: var(--color-gold); flex-shrink: 0; margin-top: .15rem; }
.footer-contact-item span { color: rgba(255,255,255,.5); font-size: clamp(0.8rem, 1.2vw, 0.95rem); }

.footer-schedule li {
  color: rgba(255,255,255,.45);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
}
.footer-schedule li.highlight { color: rgba(255,255,255,.8); font-weight: 600; }
.footer-schedule li.gold { color: var(--color-gold); font-weight: 700; margin-top: clamp(0.5rem, 1vw, 0.85rem); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: clamp(1rem, 2vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1vw, 0.85rem);
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer-bottom p { color: rgba(255,255,255,.3); font-size: clamp(0.7rem, 1vw, 0.9rem); }
.footer-bottom-links { display: flex; gap: clamp(1rem, 2vw, 1.5rem); flex-wrap: wrap; }
.footer-bottom-links a { color: rgba(255,255,255,.3); font-size: clamp(0.7rem, 1vw, 0.9rem); transition: color var(--transition); }
.footer-bottom-links a:hover { color: var(--color-white); }

/* ---------- MODALES ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10,20,31,.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 2vw, 1.75rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: clamp(300px, 95vw, 480px);
  max-height: 95vh;
  overflow: auto;
  transform: scale(.95) translateY(8px);
  transition: transform .3s ease;
  position: relative;
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }

.modal-close {
  position: absolute;
  top: clamp(0.8rem, 2vw, 1.2rem); 
  right: clamp(0.8rem, 2vw, 1.2rem);
  width: clamp(28px, 5vw, 36px); 
  height: clamp(28px, 5vw, 36px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-gray);
  transition: all var(--transition);
  z-index: 10;
}
.modal-close:hover { background: var(--color-light); color: var(--color-navy); }
.modal-close svg { width: 60%; height: 60%; }

.modal-body { padding: clamp(1.5rem, 3vw, 2.5rem); }
.modal-icon-wrap {
  width: clamp(56px, 10vw, 72px);
  height: clamp(56px, 10vw, 72px);
  border-radius: 50%;
  background: #eff6ff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto clamp(1rem, 2vw, 1.5rem);
}
.modal-icon-wrap svg { width: 70%; height: 70%; color: var(--color-blue); }
.modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700;
  text-align: center;
  color: var(--color-navy);
  margin-bottom: .4rem;
}
.modal-desc {
  text-align: center;
  color: var(--color-gray);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  margin-bottom: clamp(1.5rem, 2vw, 2rem);
}

/* Form */
.form-group { margin-bottom: clamp(0.8rem, 1.5vw, 1.1rem); }
.form-label {
  display: block;
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: clamp(0.3rem, 0.8vw, 0.5rem);
}
.form-input {
  width: 100%;
  padding: clamp(0.55rem, 1.2vw, 0.75rem) clamp(0.8rem, 1.5vw, 1.1rem);
  border: 1.5px solid var(--color-gray-light);
  border-radius: var(--radius-md);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-family: inherit;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}
.form-input::placeholder { color: #bbb; }

.modal-feedback {
  display: none;
  margin-top: clamp(0.75rem, 1.5vw, 1rem);
  padding: clamp(0.6rem, 1.2vw, 0.9rem) clamp(0.8rem, 1.5vw, 1.1rem);
  background: #fef2f2;
  color: #b91c1c;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  border-radius: var(--radius-md);
  border: 1px solid #fecaca;
  text-align: center;
}
.modal-feedback.show { display: block; }

.modal-footer {
  background: var(--color-light);
  border-top: 1px solid var(--color-gray-light);
  padding: clamp(0.8rem, 1.5vw, 1.2rem) clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}
.modal-footer a {
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 600;
  color: var(--color-blue);
  transition: color var(--transition);
}
.modal-footer a:hover { color: var(--color-blue-hover); }

/* ---------- MODAL CHAT IA ---------- */

.chat-container {
  width: 300px;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px;
}

#chat-box {
  height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.user {
  text-align: right;
  color: blue;
}

.bot {
  text-align: left;
  color: green;
}


#aiModal .modal-box {
  max-width: clamp(300px, 95vw, 560px);
  max-height: clamp(400px, 95vh, 88vh);
  display: flex;
  flex-direction: column;
}

.chat-header {
  background: var(--color-navy);
  padding: clamp(0.8rem, 1.5vw, 1.3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(26,86,219,.15);
}
.chat-header-info { display: flex; align-items: center; gap: clamp(0.6rem, 1vw, 1rem); }
.chat-avatar {
  position: relative;
  width: clamp(38px, 6vw, 48px);
  height: clamp(38px, 6vw, 48px);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-avatar svg { width: 70%; height: 70%; color: var(--color-gold); }
.chat-status-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: clamp(9px, 1.5vw, 12px);
  height: clamp(9px, 1.5vw, 12px);
  background: #22c55e;
  border: 2px solid var(--color-navy);
  border-radius: 50%;
}
.chat-header-text h3 { color: var(--color-white); font-weight: 700; font-size: clamp(0.85rem, 1.5vw, 1rem); }
.chat-header-text p { color: rgba(255,255,255,.55); font-size: clamp(0.7rem, 1.2vw, 0.8rem); }
.chat-header .modal-close { position: static; color: rgba(255,255,255,.6); }
.chat-header .modal-close:hover { background: rgba(255,255,255,.1); color: var(--color-white); }

.chat-body {
  flex: 1;
  background: #f8fafc;
  padding: clamp(1rem, 2vw, 1.5rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  min-height: 250px;
}

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.4rem, 0.8vw, 0.6rem);
}
.chat-msg.user { justify-content: flex-end; }

.chat-bubble {
  max-width: 82%;
  padding: clamp(0.65rem, 1.2vw, 1rem) clamp(0.9rem, 1.5vw, 1.2rem);
  border-radius: var(--radius-lg);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  line-height: 1.6;
}
.chat-bubble.bot {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
  color: var(--color-text);
}
.chat-bubble.user {
  background: var(--color-navy);
  color: var(--color-white);
  border-bottom-right-radius: 4px;
}
.chat-bubble .chat-note {
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  color: var(--color-gray);
  font-style: italic;
  margin-top: .4rem;
}
.chat-bubble .chat-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: clamp(0.5rem, 1vw, 0.75rem);
  padding: clamp(0.3rem, 0.8vw, 0.5rem) clamp(0.7rem, 1vw, 0.95rem);
  background: var(--color-white);
  border: 1px solid rgba(26,86,219,.25);
  color: var(--color-blue);
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.chat-bubble .chat-btn:hover { background: #eff6ff; }

/* Typing indicator */
.typing-indicator .chat-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: clamp(0.65rem, 1.2vw, 1rem) clamp(0.9rem, 1.5vw, 1.2rem);
}
.typing-dot {
  width: 8px; height: 8px;
  background: #94a3b8;
  border-radius: 50%;
  animation: bounce 1s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: .12s; }
.typing-dot:nth-child(3) { animation-delay: .24s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.chat-input-area {
  background: var(--color-white);
  border-top: 1px solid var(--color-gray-light);
  padding: clamp(0.8rem, 1.5vw, 1.2rem);
  display: flex;
  gap: clamp(0.4rem, 0.8vw, 0.6rem);
  align-items: center;
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: var(--color-light);
  border: 1.5px solid var(--color-gray-light);
  border-radius: var(--radius-full);
  padding: clamp(0.55rem, 1.2vw, 0.75rem) clamp(0.85rem, 1.5vw, 1.2rem);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--color-blue); }
.chat-send-btn {
  width: clamp(40px, 7vw, 48px);
  height: clamp(40px, 7vw, 48px);
  border-radius: 50%;
  background: var(--color-blue);
  color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--color-blue-hover); transform: scale(1.06); }
.chat-send-btn svg { width: 60%; height: 60%; }

/* ---------- CHAT BOT ---------- */

:root {
    --green-dark:  #0f5c3a;
    --green-main:  #17a36a;
    --green-light: #e6f7ef;
    --green-hover: #12874f;
    --white:       #ffffff;
    --gray-100:    #f4f6f5;
    --gray-200:    #e0e5e3;
    --gray-400:    #8fa39a;
    --gray-700:    #3a4a44;
    --shadow:      0 8px 32px rgba(15,92,58,0.18);
    --radius:      16px;
  }
 
  /* --- Toggle Button --- */
  #cb-toggle {
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--green-main);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: background 0.2s, transform 0.2s;
  }
  #cb-toggle:hover { background: var(--green-hover); transform: scale(1.08); }
  #cb-toggle svg { width: 28px; height: 28px; }
  #cb-badge {
    position: absolute;
    top: -2px; right: -2px;
    width: 18px; height: 18px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    transition: opacity 0.2s;
  }
 
  /* --- Chat Panel --- */
  #cb-panel {
    position: fixed;
    bottom: 100px;
    left: 28px;
    width: 340px;
    max-height: 520px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
    transform: scale(0.85) translateY(30px);
    opacity: 0;
    pointer-events: none;
    transform-origin: bottom left;
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s;
  }
  #cb-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
  }
 
  /* Header */
  .cb-header {
    background: var(--green-dark);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }
  .cb-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--green-main);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .cb-avatar svg { width: 22px; height: 22px; }
  .cb-header-info { flex: 1; }
  .cb-header-info h3 { color: #fff; font-size: 14px; font-weight: 600; margin: 0; }
  .cb-header-info span { color: rgba(255,255,255,0.7); font-size: 12px; }
  .cb-online-dot {
    width: 8px; height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
  }
  #cb-close {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.7); font-size: 20px; line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.15s;
  }
  #cb-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
 
  /* Shortcut buttons */
  .cb-shortcuts {
    padding: 10px 14px 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
  }
  .cb-shortcut-btn {
    background: var(--green-light);
    color: var(--green-dark);
    border: 1px solid #b8ddc8;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
  }
  .cb-shortcut-btn:hover { background: #c6ebd8; transform: scale(1.04); }
 
  /* Messages */
  #cb-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
  }
  #cb-messages::-webkit-scrollbar { width: 4px; }
  #cb-messages::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }
 
  .msg {
    max-width: 85%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    word-break: break-word;
  }
  .msg.bot {
    background: var(--gray-100);
    color: var(--gray-700);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
  }
  .msg.user {
    background: var(--green-main);
    color: #fff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
  }
  .msg.typing {
    background: var(--gray-100);
    align-self: flex-start;
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 16px;
  }
  .dot {
    width: 7px; height: 7px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: bounce 1.2s infinite;
  }
  .dot:nth-child(2) { animation-delay: 0.2s; }
  .dot:nth-child(3) { animation-delay: 0.4s; }
  @keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
  }
  .msg-time { font-size: 10px; opacity: 0.55; margin-top: 3px; display: block; text-align: right; }
 
  /* WhatsApp button */
  .cb-whatsapp-bar {
    padding: 8px 14px;
    border-top: 1px solid var(--gray-200);
    flex-shrink: 0;
  }
  #cb-whatsapp-btn {
    width: 100%;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s, transform 0.1s;
  }
  #cb-whatsapp-btn:hover { background: #1ebe5c; transform: scale(1.02); }
  #cb-whatsapp-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
 
  /* Input area */
  .cb-input-area {
    padding: 10px 14px 14px;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
    border-top: 1px solid var(--gray-200);
  }
  #cb-input {
    flex: 1;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    padding: 9px 13px;
    font-size: 13.5px;
    font-family: inherit;
    resize: none;
    outline: none;
    line-height: 1.4;
    max-height: 90px;
    overflow-y: auto;
    color: var(--gray-700);
    background: var(--gray-100);
    transition: border-color 0.15s;
  }
  #cb-input:focus { border-color: var(--green-main); background: #fff; }
  #cb-input::placeholder { color: var(--gray-400); }
  #cb-send {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--green-main);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
  }
  #cb-send:hover { background: var(--green-hover); transform: scale(1.08); }
  #cb-send:disabled { background: var(--gray-200); cursor: not-allowed; transform: none; }
  #cb-send svg { width: 18px; height: 18px; }
 
  @media (max-width: 400px) {
    #cb-panel { width: calc(100vw - 32px); left: 16px; }
    #cb-toggle { left: 16px; bottom: 16px; }
  }



/* ---------- CHAT BOT ---------- */







/* ---------- MEDIA QUERIES RESPONSIVAS MEJORADAS ---------- */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }


  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background: #333;
    width: 100%;
    flex-direction: column;
    align-items: center;
    display: none;
  }


  .nav-links.active {
    display: flex;
  }


  .nav-links li {
    padding: 15px 0;
  }


  .container {
    width: 95%;
    padding: 10px;
  }


  h1 {
    font-size: 1.8rem;
  }


  p {
    font-size: 1rem;
  }
}


@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }


  p {
    font-size: 0.9rem;
  }
}


