/* ==========================================================================
   Estudio Marabini - Stylesheet
   ========================================================================== */

:root {
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Light Theme Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-header: rgba(255, 255, 255, 0.85);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --color-primary: #1e3a8a; /* Deep Blue */
  --color-primary-light: #3b82f6;
  --color-primary-rgb: 30, 58, 138;
  --color-accent: #b45309; /* Warm Amber/Gold */
  --color-accent-hover: #d97706;
  --color-accent-rgb: 180, 83, 9;
  --border-color: #e2e8f0;
  
  /* Utilities */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  
  --border-radius: 16px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

li {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: 3rem; font-weight: 800; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: 70px 0;
  }
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px auto;
}

.section-tagline {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--color-accent);
  display: inline-block;
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
  position: relative;
  font-weight: 800;
}

.section-divider {
  width: 60px;
  height: 4px;
  background-color: var(--color-accent);
  margin: 0 auto 20px auto;
  border-radius: 2px;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 30px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

body.dark-theme .btn-primary {
  background-color: var(--color-accent);
  color: #0f172a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(var(--color-primary-rgb), 0.3);
}

body.dark-theme .btn-primary:hover {
  background-color: var(--color-accent-hover);
  box-shadow: 0 10px 20px -5px rgba(var(--color-accent-rgb), 0.3);
}

.btn-secondary {
  background-color: transparent;
  border-color: #ffffff;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #ffffff;
  color: #0f172a;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  border: none;
  font-size: 1rem;
  padding: 14px 28px;
  box-shadow: 0 8px 16px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
  background-color: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp svg {
  margin-right: 10px;
  display: inline-block;
  vertical-align: middle;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-accent);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: transform var(--transition-fast), color var(--transition-fast);
  padding: 4px 0;
}

.btn-text:hover {
  color: var(--color-accent-hover);
  transform: translateX(4px);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-normal), border-color var(--transition-normal), padding var(--transition-normal);
  padding: 20px 0;
}

.header.scrolled {
  padding: 12px 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  transition: height var(--transition-normal);
}

.header.scrolled .logo-img {
  height: 40px;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  /* Safe fallback if logo fails to render */
}

/* Menu de navegacion */
.nav-menu {
  transition: all var(--transition-normal);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}

body.dark-theme .nav-link:hover, body.dark-theme .nav-link.active {
  color: var(--color-accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

body.dark-theme .nav-link::after {
  background-color: var(--color-accent);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.btn-nav {
  background-color: var(--color-primary);
  color: #ffffff !important;
  padding: 8px 20px !important;
  border-radius: 20px;
}

.btn-nav:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-nav::after {
  display: none !important;
}

/* Hamburger Icon */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  position: relative;
  transition: background-color var(--transition-fast);
}

.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: inherit;
  left: 0;
  transition: transform var(--transition-fast), top var(--transition-fast);
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* Menu responsive en moviles */
@media (max-width: 992px) {
  .nav-toggle {
    display: block;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition-normal), transform var(--transition-normal), visibility var(--transition-normal);
  }
  
  .nav-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .nav-link {
    font-size: 1.1rem;
    width: 100%;
    display: block;
  }
  
  .btn-nav {
    display: inline-block;
    text-align: center;
    width: 100%;
  }

  /* Hamburger animado */
  .nav-toggle[aria-expanded="true"] .hamburger {
    background-color: transparent !important;
  }
  
  .nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
  }
  
  .nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
  }
}


/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  height: 100vh;
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  transform: scale(1.05);
  animation: zoomBg 20s infinite alternate;
}

@keyframes zoomBg {
  0% { transform: scale(1.02); }
  100% { transform: scale(1.1); }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(110deg, rgba(9, 16, 36, 0.94) 0%, rgba(15, 30, 80, 0.88) 50%, rgba(9, 16, 36, 0.82) 100%);
  z-index: 2;
}

body.dark-theme .hero-overlay {
  background: linear-gradient(110deg, rgba(5, 8, 18, 0.97) 0%, rgba(10, 18, 46, 0.92) 100%);
}

.hero-content-wrapper {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1200px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-content {
  max-width: none;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards 0.2s;
  color: #ffffff;
}

.hero-title-accent {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 3.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards 0.4s;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards 0.65s;
}

/* Hero right-side glass card */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeInUp 0.9s forwards 0.5s;
}

.hero-card {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px 36px;
  text-align: center;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.12);
}

.hero-card-logo {
  height: 110px;
  width: auto;
  margin: 0 auto 16px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.hero-card-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-card-rule {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 0 24px 0;
}

.hero-card-stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 24px;
}

.hero-card-stat {
  text-align: center;
}

.hero-card-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-card-lbl {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.hero-card-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-card-partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-card-exactian-logo {
  height: 26px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.hero-card-partner-lbl {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

@media (max-width: 992px) {
  .hero-content-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-visual {
    display: none;
  }

  .hero-title { font-size: 2.75rem; }
  .hero-title-accent { font-size: 2.75rem; }
}

@media (max-width: 576px) {
  .hero-title { font-size: 2.1rem; }
  .hero-title-accent { font-size: 2.1rem; }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-ctas { flex-direction: column; gap: 12px; }
  .btn { width: 100%; }
}

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

/* ==========================================================================
   Services Grid
   ========================================================================== */

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

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

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 40px;
  border-radius: var(--border-radius);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  cursor: pointer;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-primary);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

body.dark-theme .service-card::after {
  background-color: var(--color-accent);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

body.dark-theme .service-card:hover {
  border-color: var(--color-accent);
}

.service-card:hover::after {
  opacity: 1;
}

.service-card-icon {
  width: 60px;
  height: 60px;
  background-color: var(--bg-tertiary);
  color: var(--color-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

body.dark-theme .service-card-icon {
  color: var(--color-accent);
}

.service-card:hover .service-card-icon {
  transform: scale(1.1) rotate(5deg);
  background-color: var(--color-primary);
  color: #ffffff;
}

body.dark-theme .service-card:hover .service-card-icon {
  background-color: var(--color-accent);
  color: #0f172a;
}

.service-card-icon svg {
  width: 28px;
  height: 28px;
}

.service-card-title {
  font-size: 1.35rem;
  margin-bottom: 14px;
  font-weight: 700;
}

.service-card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
  flex-grow: 1;
}

/* ==========================================================================
   Convenios Section
   ========================================================================== */

.convenios-section {
  background-color: var(--bg-secondary);
}

.convenios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 992px) {
  .convenios-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .convenios-grid {
    grid-template-columns: 1fr;
  }
}

.convenio-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 32px;
  text-align: center;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.convenio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.convenio-icon {
  width: 56px;
  height: 56px;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.convenio-icon svg {
  width: 100%;
  height: 100%;
}

.convenio-logo-wrapper {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.convenio-logo-img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

/* Dual logos card (HB & EXACTIAN) */
.convenio-dual-logos {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.convenio-logo-hb {
  max-height: 36px;
  width: auto;
}

.convenio-logo-exactian {
  max-height: 28px;
  width: auto;
}

.convenio-logo-amp {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  opacity: 0.5;
}

/* EXACTIAN pill — logo blanco sobre fondo oscuro */
.convenio-exactian-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1a2340;
  border-radius: 6px;
  padding: 5px 10px;
  height: 36px;
}

.convenio-logo-exactian {
  height: 22px;
  width: auto;
  display: block;
}

/* UNCA logo: es horizontal, ajustar altura */
.convenio-logo-wrapper .convenio-logo-img {
  max-height: 52px;
  max-width: 100%;
}

.convenio-title {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.convenio-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Nosotros Section
   ========================================================================== */

.nosotros-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 992px) {
  .nosotros-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.nosotros-content {
  display: flex;
  flex-direction: column;
}

.nosotros-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.nosotros-features {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nosotros-feature-item {
  display: flex;
  gap: 16px;
}

.feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(var(--color-accent-rgb), 0.1);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nosotros-feature-item h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.nosotros-feature-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Tarjeta de Estadisticas */
.nosotros-stats-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

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

.stat-num {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--color-primary);
  display: block;
  margin-bottom: 4px;
}

body.dark-theme .stat-num {
  color: var(--color-accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 80px 0 40px 0;
  border-top: 1px solid #1e293b;
}

body.dark-theme .footer {
  background-color: #05080e;
  border-top-color: #111726;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 50px;
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
  }
}

.footer-brand {
  max-width: 450px;
}

.footer-logo {
  height: 50px;
  width: auto;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}

.footer-links h4 {
  color: #ffffff;
  margin-bottom: 20px;
  font-size: 1.15rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

body.dark-theme .footer-bottom {
  border-top-color: #111726;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ==========================================================================
   Modal Dialogs (Detalles de Servicios)
   ========================================================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

body.dark-theme .modal {
  background-color: rgba(5, 8, 14, 0.8);
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 750px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-premium);
  transform: scale(0.95) translateY(15px);
  transition: transform var(--transition-normal);
  padding: 40px;
}

.modal.open .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
  line-height: 1;
}

.modal-close:hover {
  background-color: var(--color-accent);
  color: #0f172a;
  transform: rotate(90deg);
}

.modal-title {
  font-size: 1.75rem;
  margin-bottom: 20px;
  padding-right: 40px;
  color: var(--color-primary);
}

body.dark-theme .modal-title {
  color: var(--color-accent);
}

.modal-body {
  font-size: 1rem;
  color: var(--text-secondary);
}

.modal-body p {
  margin-bottom: 24px;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-list li {
  position: relative;
  padding-left: 28px;
}

.modal-list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

/* Video Wrapper */
.video-container {
  margin: 24px 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  background-color: #000000;
}

.exactian-video {
  width: 100%;
  height: auto;
  display: block;
}

.video-caption {
  padding: 12px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

/* ==========================================================================
   Hero Enhancements
   ========================================================================== */

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 0.8s forwards 0.1s;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeInUp 0.8s forwards 0.5s;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-badge::before {
  content: '✓';
  color: #4ade80;
  font-size: 0.82rem;
}

/* Decorative floating rings */
.hero-decorations {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.hero-deco-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-deco-ring:nth-child(1) {
  width: 700px;
  height: 700px;
  top: -250px;
  right: -150px;
  animation: rotateSlow 50s linear infinite;
}

.hero-deco-ring:nth-child(2) {
  width: 450px;
  height: 450px;
  top: -100px;
  right: 100px;
  border-color: rgba(255, 255, 255, 0.04);
  animation: rotateSlow 35s linear infinite reverse;
}

.hero-deco-glow {
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 65%);
  bottom: -400px;
  left: -200px;
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Scroll hint arrow */
.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeIn 1s forwards 1.4s;
}

.hero-scroll-hint span {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.scroll-arrow {
  width: 22px;
  height: 22px;
  border-right: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  transform: rotate(45deg);
  animation: bounceArrow 1.8s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: rotate(45deg) translate(-3px, -3px); opacity: 0.3; }
  50%       { transform: rotate(45deg) translate(3px, 3px);  opacity: 0.9; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ==========================================================================
   Stats Band
   ========================================================================== */

.stats-band {
  background: linear-gradient(135deg, #0a0f1e 0%, #1a2d5a 60%, #0f172a 100%);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}

.stats-band::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
}

.stats-band::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 83, 9, 0.12) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  pointer-events: none;
}

.stats-band-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
}

.stats-band-item {
  text-align: center;
  padding: 16px 32px;
}

.stats-band-num-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 10px;
}

.stats-band-num {
  font-family: var(--font-heading);
  font-size: 3.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.stats-band-suffix {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-accent-hover);
  line-height: 1;
}

.stats-band-word {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent-hover);
  line-height: 1;
  display: block;
  margin-bottom: 10px;
}

.stats-band-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.stats-band-divider {
  width: 1px;
  height: 64px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .stats-band-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 0;
  }

  .stats-band-divider {
    display: none;
  }

  .stats-band-num {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .stats-band-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Scroll Reveal System
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.22s; }
[data-delay="3"] { transition-delay: 0.34s; }
[data-delay="4"] { transition-delay: 0.46s; }
[data-delay="5"] { transition-delay: 0.58s; }
[data-delay="6"] { transition-delay: 0.70s; }

/* ==========================================================================
   Service Cards — Enhanced hover
   ========================================================================== */

.service-card:hover {
  box-shadow: 0 24px 48px -12px rgba(var(--color-primary-rgb), 0.18), var(--shadow-lg);
}

body.dark-theme .service-card:hover {
  box-shadow: 0 24px 48px -12px rgba(var(--color-accent-rgb), 0.2), var(--shadow-lg);
}

/* ==========================================================================
   Button Gradient Enhancement
   ========================================================================== */

.btn-primary {
  background: linear-gradient(135deg, #1e3a8a 0%, #2d5cb8 100%);
}

body.dark-theme .btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2d5cb8 0%, #3b6fd4 100%);
  box-shadow: 0 12px 28px -6px rgba(30, 58, 138, 0.45);
}

/* ==========================================================================
   Logo area — solo imagen, sin texto
   ========================================================================== */

.logo-img {
  height: 68px;
}

.header.scrolled .logo-img {
  height: 56px;
}

/* ==========================================================================
   Contacto Section — rediseño oscuro
   ========================================================================== */

.contacto-section {
  background: linear-gradient(135deg, #080d1c 0%, #112050 55%, #080d1c 100%);
  position: relative;
  overflow: hidden;
}

.contacto-bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.contacto-bg-glow--1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
  top: -200px;
  right: -150px;
}

.contacto-bg-glow--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(180,83,9,0.1) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
}

.contacto-section .section-tagline  { color: #fbbf24; }
.contacto-section .section-title    { color: #ffffff; }
.contacto-section .section-description { color: rgba(255,255,255,0.55); }
.contacto-section .section-divider  { background-color: #fbbf24; }

/* Info cards */
.contacto-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

@media (max-width: 768px) {
  .contacto-info-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
}

.contacto-info-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.contacto-info-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.contacto-info-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #fbbf24;
}

.contacto-info-icon svg {
  width: 22px;
  height: 22px;
}

.contacto-info-card h4 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.contacto-info-card p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  line-height: 1.8;
}

.contacto-info-card a {
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition-fast);
}

.contacto-info-card a:hover {
  color: #ffffff;
}

/* WhatsApp CTA */
.contacto-wa-cta {
  text-align: center;
}

.btn-wa-main {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 20px 52px;
  background: #25d366;
  color: #ffffff;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 16px 48px rgba(37, 211, 102, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.btn-wa-main:hover {
  background: #20ba59;
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(37, 211, 102, 0.45);
  color: #ffffff;
}

.btn-wa-main svg {
  flex-shrink: 0;
}

.contacto-wa-tagline {
  margin-top: 22px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.28);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* ==========================================================================
   Botón flotante WhatsApp
   ========================================================================== */

.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45);
  z-index: 900;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.6);
}

.wa-float svg {
  width: 32px;
  height: 32px;
}

.wa-float::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #25d366;
  animation: waPulse 2.5s ease-out infinite;
  z-index: -1;
}

@keyframes waPulse {
  0%   { transform: scale(1);   opacity: 0.65; }
  100% { transform: scale(1.85); opacity: 0; }
}

@media (max-width: 576px) {
  .wa-float {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
  }
  .wa-float svg { width: 28px; height: 28px; }
}

/* ==========================================================================
   Mejoras generales de polish
   ========================================================================== */

/* Barra de acento superior */
body::before {
  content: '';
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #1e3a8a 0%, #b45309 50%, #1e3a8a 100%);
  z-index: 1001;
  pointer-events: none;
}

/* Sombra coloreada en cards de servicio al hover */
.service-card:hover {
  box-shadow: 0 20px 48px -10px rgba(30, 58, 138, 0.2);
}

/* Nosotros stats: números con el color primario */
.stat-num {
  color: var(--color-primary);
}

/* Footer: separador entre links */
.footer-links ul li + li {
  border-top: none;
}

/* Suavizar imágenes de logos en convenios */
.convenio-logo-img {
  transition: opacity var(--transition-fast);
}

.convenio-card:hover .convenio-logo-img {
  opacity: 0.85;
}
