/* ===================================
   Variables y Configuración Base
   =================================== */
:root {
  /* Colores primarios (azul marino - confianza/seguridad) */
  --primary-500: #092d91;
  --primary-600: #081a49;
  --primary-700: #0A1329;

  /* Colores de acento (magenta - llamados a la acción) */
  --accent-500: #1058c4;
  --accent-600: #0c4381;
  --accent-700: #1714ad;

  /* Neutrales */
  --neutral-50: #FAFAFA;
  --neutral-100: #F4F5F7;
  --neutral-200: #E8EAEE;
  --neutral-300: #D6D9E0;
  --neutral-600: #5B6172;
  --neutral-700: #3D4254;
  --neutral-900: #1A1D29;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(15, 27, 61, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(15, 27, 61, 0.12);
  --shadow-lg: 0 12px 24px -6px rgba(15, 27, 61, 0.18);
  --shadow-xl: 0 24px 48px -12px rgba(15, 27, 61, 0.28);

  /* Transiciones */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
}

/* ===================================
   Reset y Configuración Global
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  color: var(--neutral-900);
  background-color: #fff;
  line-height: 1.65;
  overflow-x: hidden;
}

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

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* ===================================
   Animaciones
   =================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

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

.float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

/* ===================================
   Utilidades de layout
   =================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.section-alt {
  background: var(--neutral-50);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-header--tight {
  margin-bottom: 2rem;
}

.section-eyebrow {
  display: inline-block;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin-bottom: 0.75rem;
}

.section-eyebrow--on-dark {
  color: var(--accent-500);
}

.section-title {
  font-size: 2rem;
  color: var(--neutral-900);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.5rem;
  }
}

.section-subtitle {
  color: var(--neutral-600);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ===================================
   Botones
   =================================== */
.btn-primary {
  background: var(--accent-500);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-block;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--accent-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-block;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn-block {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
}

/* ===================================
   Header
   =================================== */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-text {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary-600);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.logo-sub {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent-600);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--neutral-700);
  position: relative;
}

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

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

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

.nav-link.active {
  color: var(--accent-600);
}

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

.hide-mobile { display: block; }
@media (max-width: 900px) {
  .hide-mobile { display: none !important; }
}

.hide-desktop { display: none; }
@media (max-width: 900px) {
  .hide-desktop { display: block; }
}

.hamburger-btn {
  padding: 0.5rem;
}

/* Menú móvil desplegable */
#mobile-menu {
  display: none;
  border-top: 1px solid var(--neutral-200);
}

#mobile-menu.open {
  display: block;
  animation: slideUp var(--transition-normal) ease-out;
}

.mobile-nav {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav .nav-link {
  padding: 0.65rem 0;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary-600);
  margin: 5px 0;
  transition: all var(--transition-fast);
}

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

/* ===================================
   Hero
   =================================== */
.hero {
  position: relative;
  background: 
    linear-gradient(rgba(10, 19, 41, 0.6), rgba(10, 19, 41, 0.6)),
    url('../images/hero-index.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(233, 30, 140, 0.18), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.08), transparent 45%);
  pointer-events: none;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

@media (min-width: 768px) {
  .hero-inner {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-text {
  color: #fff;
}

.hero-title {
  font-size: 2.25rem;
  color: #fff;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-illustration {
  display: none;
  justify-content: center;
}

@media (min-width: 768px) {
  .hero-illustration {
    display: flex;
  }
}

/* ===================================
   Grillas reutilizables
   =================================== */
.grid-3 {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-2 {
  display: grid;
  gap: 1.25rem;
}

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

.grid-services {
  display: grid;
  gap: 1.5rem;
}

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

@media (min-width: 1024px) {
  .grid-services {
    grid-template-columns: repeat(4, 1fr);
  }
}

.grid-badges {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-badges {
    grid-template-columns: repeat(2, 1fr);
  }
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.two-col {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===================================
   Tarjetas
   =================================== */
.card-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--neutral-600);
  font-size: 0.92rem;
}

.card-text--spaced {
  margin-bottom: 1rem;
}

.service-card {
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 16px;
  padding: 2rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  height: 100%;
}

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

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-500), var(--primary-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 1.25rem;
}

.service-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary-600);
  background: var(--neutral-100);
  border-radius: 9999px;
  padding: 0.3rem 0.75rem;
  margin: 0 0.35rem 0.35rem 0;
}

.spec-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
}

.spec-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--accent-600);
}

.mini-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

.mini-card-title {
  color: var(--primary-600);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.commitment-panel {
  background: var(--neutral-50);
  border-radius: 20px;
  padding: 2rem;
}

@media (min-width: 768px) {
  .commitment-panel {
    padding: 3rem;
  }
}

.lead-text {
  color: var(--neutral-700);
  font-size: 1.1rem;
  line-height: 1.7;
}

.lead-text--tight {
  margin-bottom: 1.5rem;
}

.lead-strong {
  color: var(--neutral-700);
  font-weight: 600;
}

.commitment-divider {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--neutral-200);
}

.subheading {
  font-size: 1.4rem;
}

.badge-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 9999px;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--neutral-700);
  box-shadow: var(--shadow-sm);
}

.badge-pill svg {
  width: 22px;
  height: 22px;
  color: var(--accent-600);
  flex-shrink: 0;
}

/* ===================================
   Contacto
   =================================== */
.contact-section {
  background: linear-gradient(160deg, var(--primary-600), #0a1128);
  color: #fff;
}

.contact-title {
  font-size: 1.9rem;
  color: #fff;
}

@media (min-width: 768px) {
  .contact-title {
    font-size: 2.3rem;
  }
}

.contact-layout {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info-item .contact-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-500);
  margin-bottom: 1rem;
}

.contact-item-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.contact-text {
  color: rgba(255, 255, 255, 0.7);
}

.contact-link {
  color: rgba(255, 255, 255, 0.7);
  overflow-wrap: break-word;
}

.contact-link:hover {
  color: #fff;
}

.map-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-xl);
}

.map-frame iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

/* ===================================
   Formulario de contacto
   =================================== */
.contact-form-panel {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  color: var(--neutral-900);
}

@media (min-width: 768px) {
  .contact-form-panel {
    padding: 2.5rem;
  }
}

.contact-form-title {
  font-size: 1.3rem;
  color: var(--neutral-900);
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 480px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--neutral-200);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--neutral-900);
  background: var(--neutral-50);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-500);
  background: #fff;
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: #d0342c;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  width: 100%;
  text-align: center;
  border-radius: 10px;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-feedback {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2rem;
}

.form-feedback--success {
  color: #1a8f4c;
}

.form-feedback--error {
  color: #d0342c;
}

/* ===================================
   Footer
   =================================== */
.site-footer {
  background: #0a1128;
  color: rgba(255, 255, 255, 0.65);
}

.footer-inner {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
  font-size: 0.9rem;
}

@media (min-width: 1024px) {
  .footer-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    row-gap: 0.75rem;
    text-align: left;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  white-space: nowrap;
}


/* --- FOOTER CENTRADO PERFECTO CON GRID --- */
.site-footer {
  background-color: #0b1329;
  color: #ffffff;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* 3 columnas: Izq, Centro exacto, Der */
  align-items: center;
  gap: 20px;
}

/* Columna 1: Marca (Alineada a la izquierda) */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  justify-content: flex-start;
}

/* Columna 2: Redes Sociales (Centro absoluto) */
.footer-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 50%;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-socials a:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 86, 179, 0.4);
}

/* Columna 3: Info & Copyright (Alineada a la derecha) */
.footer-info {
  text-align: right;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  justify-self: end;
}

.footer-slogan {
  margin-bottom: 4px;
  font-weight: 500;
}

/* Adaptación para pantallas pequeñas */
@media (max-width: 768px) {
  .footer-layout {
    grid-template-columns: 1fr; /* Se apila en una sola columna para celular */
    text-align: center;
    gap: 15px;
  }

  .footer-brand,
  .footer-info {
    justify-content: center;
    text-align: center;
    justify-self: center;
  }
}