/* ═══════════════════════════════════════════
   ROTEX Distrito 4340 — Estilos Globales
   css/global.css
   ═══════════════════════════════════════════ */

/* ─────────────────────────────────────────
   1. VARIABLES & RESET
   ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colores principales */
  --blue:       #17458F;
  --blue-dark:  #0e2c5e;
  --blue-deep:  #091d3e;
  --gold:       #F7A81B;
  --gold-light: #fdf0d4;
  --white:      #ffffff;
  --off-white:  #f8f7f4;
  --text:       #1a1a2e;
  --text-muted: #6b6b7a;

  /* Tipografías */
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'DM Sans', sans-serif;

  /* Utilidades */
  --radius: 16px;
  --shadow: 0 8px 32px rgba(23, 69, 143, 0.10);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Scrollbar personalizada */
::-webkit-scrollbar        { width: 5px; }
::-webkit-scrollbar-track  { background: var(--blue-deep); }
::-webkit-scrollbar-thumb  { background: var(--gold); border-radius: 3px; }

/* ─────────────────────────────────────────
   2. SISTEMA DE ÍCONOS
   ───────────────────────────────────────── */
.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.icon-inline { width: 0.95em; height: 0.95em; vertical-align: -0.12em; margin-right: 2px; }

/* ─────────────────────────────────────────
   3. NAVEGACIÓN (HEADER)
   ───────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(9, 29, 62, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(247, 168, 27, 0.12);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: border-color 0.3s;
}

.nav-brand {
  display: flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

/* Estilo para el logo oficial de imagen */
.nav-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-logo-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-right: 12px;
  flex-shrink: 0;
}

.nav-brand-title { font-size: 15px; font-weight: 500; color: #fff; line-height: 1.2; }
.nav-brand-sub   { font-size: 11px; color: rgba(255, 255, 255, 0.45); font-weight: 300; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.nav-links button {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 13px;
  font-family: var(--sans);
  font-weight: 400;
  padding: 7px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a:hover,
.nav-links button:hover {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active,
.nav-links button.active { color: var(--gold); }

/* Dropdown del nav */
.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--blue-deep);
  border: 1px solid rgba(247, 168, 27, 0.15);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  transform-origin: top center;
}

.nav-dropdown:hover .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu a:hover {
  background: rgba(247, 168, 27, 0.1);
  color: var(--gold);
}

/* Botón CTA del nav */
.nav-cta {
  background: var(--gold) !important;
  color: var(--blue-dark) !important;
  font-weight: 500 !important;
  padding: 9px 22px !important;
  border-radius: 40px !important;
}
.nav-cta:hover { background: #ffc03a !important; transform: none !important; }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  display: block;
  transition: all 0.3s;
}

/* ─────────────────────────────────────────
   4. MENÚ MOBILE
   ───────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0; bottom: 0;
  background: var(--blue-deep);
  z-index: 150;
  overflow-y: auto;
  padding: 28px 24px;
}

.mobile-menu.open { display: block; }

.mobile-menu a,
.mobile-menu button {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 17px;
  font-family: var(--sans);
  background: none;
  border-top: none; border-left: none; border-right: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: color 0.2s;
}

.mobile-menu a:hover,
.mobile-menu button:hover { color: var(--gold); }

.mobile-menu .m-cta {
  margin-top: 20px;
  background: var(--gold);
  color: var(--blue-dark);
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  border: none;
}

.mobile-sub { padding-left: 16px; }
.mobile-sub a { font-size: 15px; color: rgba(255, 255, 255, 0.55); border-color: rgba(255, 255, 255, 0.04); }

/* ─────────────────────────────────────────
   5. LAYOUT COMPARTIDO
   ───────────────────────────────────────── */
.pt-nav   { padding-top: 68px; }
section   { padding: 88px 24px; }
.container { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-body {
  font-size: 17px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.85;
  max-width: 620px;
}

.text-center { text-align: center; }
.text-center .section-body  { margin: 0 auto; }
.text-center .section-title { margin: 0 auto 16px; }

/* Botones */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--blue-dark);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--sans);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(247, 168, 27, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(247, 168, 27, 0.5); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font-size: 15px;
  font-weight: 400;
  padding: 13px 30px;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--blue); color: #fff; }

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 400;
  padding: 13px 30px;
  border-radius: 50px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline-white:hover { border-color: var(--gold); color: var(--gold); }

/* Animación de aparición al hacer scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Cabecera compartida de páginas internas */
.page-header {
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue-dark) 100%);
  padding: 100px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(247, 168, 27, 0.1) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.page-header-inner        { position: relative; z-index: 1; }
.page-header .section-label { color: var(--gold); }
.page-header .section-title { color: #fff; margin: 0 auto 14px; max-width: 680px; }
.page-header .section-body  { color: rgba(255, 255, 255, 0.65); margin: 0 auto; }

/* ─────────────────────────────────────────
   6. BANDERAS (flag-icons)
   ───────────────────────────────────────── */
.country-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 0;
}

.country-flag {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px; height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  font-size: 20px;
  color: transparent;
  opacity: 0.95;
}

.country-flag:hover {
  transform: translateY(-2px) scale(1.12);
  opacity: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  filter: brightness(1.05);
}

.country-flag .fi { font-size: 20px; line-height: 1; }

/* ─────────────────────────────────────────
   7. FORMULARIOS (compartido)
   ───────────────────────────────────────── */
.form-group       { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--blue); margin-bottom: 6px; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid rgba(23, 69, 143, 0.15);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 69, 143, 0.08);
}

.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.form-submit:hover { background: var(--blue-dark); }

/* ─────────────────────────────────────────
   8. COMPONENTE COMPARTIDO: CTA INTERMEDIO (.cta-mid)
   ───────────────────────────────────────── */
.cta-mid {
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue-dark) 100%);
  padding: 100px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.cta-mid::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(247, 168, 27, 0.1) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.cta-mid-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.cta-mid h2 { font-family: var(--serif); font-size: clamp(32px, 5vw, 48px); color: #fff; line-height: 1.15; margin: 12px 0 16px; }
.cta-mid p  { font-size: 16px; color: rgba(255, 255, 255, 0.7); font-weight: 300; line-height: 1.75; margin-bottom: 32px; }
.cta-mid-btns { display: flex; gap: 14px; justify-content: center; }

/* ─────────────────────────────────────────
   9. PIE DE PÁGINA (FOOTER)
   ───────────────────────────────────────── */
footer {
  background: var(--blue-deep);
  color: #fff;
  padding: 80px 40px 32px;
  border-top: 1px solid rgba(247, 168, 27, 0.12);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}

.footer-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.7;
  margin-top: 18px;
  margin-bottom: 24px;
  max-width: 320px;
  font-weight: 300;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  outline: none;
}

.social-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--blue-dark);
  transform: translateY(-2px);
}

.social-btn-soon { cursor: default; }

/* Tooltips */
.social-btn .tooltip {
  position: absolute;
  bottom: 125%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--blue-dark);
  color: #fff;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(247,168,27,0.2);
  pointer-events: none;
}

.social-btn:hover .tooltip,
.social-btn:focus .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.social-btn-copy.copied::after {
  content: '¡Copiado!';
  position: absolute;
  bottom: 125%; left: 50%;
  transform: translateX(-50%);
  background: #28a745;
  color: #fff;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  animation: fadeUp 0.2s ease both;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 24px;
}

.footer-col a,
.footer-col button {
  display: block;
  background: none; border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.15s;
  text-align: left;
  font-family: var(--sans);
  font-weight: 300;
  cursor: pointer;
}

.footer-col a:hover,
.footer-col button:hover {
  color: var(--gold);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  line-height: 1.7;
  font-weight: 300;
  max-width: 720px;
}

.footer-badge {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 40px;
}

/* ─────────────────────────────────────────
   10. MEJORAS DE ACCESIBILIDAD & HOVER GLOBAL
   ───────────────────────────────────────── */
a, button, select, input[type="submit"], input[type="button"], 
[onclick], .social-btn, .faq-question, .nav-brand, .mapa-country,
.btn-primary, .btn-outline, .btn-outline-white {
  cursor: pointer !important;
}

/* ─────────────────────────────────────────
   11. RESPONSIVE COMPLETO (MÓVIL Y TABLETA)
   ───────────────────────────────────────── */
@media (max-width: 900px) {
  nav     { padding: 0 20px; }
  section { padding: 48px 20px; } /* Ajuste de padding de secciones en mobile/tablet */

  .nav-links  { display: none; }
  .hamburger  { display: flex; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .country-flag { width: 34px; height: 24px; font-size: 18px; }
  .country-flags { gap: 8px; }
}

@media (max-width: 600px) {
  section { padding: 40px 16px; } /* Más compacto en teléfonos */
  .footer-inner  { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .cta-mid-btns { flex-direction: column; align-items: center; }
  .section-title { font-size: 24px; } /* Menor tamaño para títulos en celular */
  .container { padding: 0 10px; }
}
