/* ===================================================
   VARIABLES Y TOKENS DE DISEÑO
=================================================== */
:root {
  --navy:        #1e3a8a;
  --navy-dark:   #152b6b;
  --navy-light:  #dbeafe;
  --red:         #c73a4a;
  --red-dark:    #a02d3a;
  --red-light:   #fde8ea;
  --white:       #ffffff;
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-400:    #94a3b8;
  --gray-600:    #475569;
  --gray-800:    #1e293b;
  --gray-900:    #0f172a;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:   0 10px 24px rgba(0,0,0,.12);
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --transition:  all .28s cubic-bezier(.4,0,.2,1);
}

/* ===================================================
   RESET Y BASE
=================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===================================================
   BARRA DE NAVEGACIÓN
=================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226,232,240,.6);
  transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo img { height: 46px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover  { background: var(--navy-light); color: var(--navy); }
.nav-link.active { background: var(--navy); color: var(--white); }
.nav-cta {
  margin-left: 8px;
  padding: 10px 22px;
  background: var(--red);
  color: var(--white) !important;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .875rem;
  transition: var(--transition);
}
.nav-cta:hover { background: var(--red-dark) !important; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===================================================
   CABECERA DE PÁGINA
=================================================== */
.page-header {
  background: linear-gradient(140deg, #0b1f54 0%, #1e3a8a 60%, #1d4ed8 100%);
  padding: 120px 28px 60px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 70px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70'%3E%3Cpath fill='%23ffffff' d='M0,70 L0,35 C240,70 480,0 720,35 C960,70 1200,0 1440,35 L1440,70 Z'/%3E%3C/svg%3E") center bottom/cover no-repeat;
}
.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  opacity: .75;
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--white); }
.breadcrumb .sep { opacity: .5; }
.page-header h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.page-header p {
  font-size: 1.05rem;
  opacity: .85;
  max-width: 560px;
  margin: 0 auto;
}

/* ===================================================
   SECCIÓN CONTACTO
=================================================== */
.contact-section {
  padding: 80px 0 100px;
  background: var(--white);
}
.contact-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

/* Info lateral izquierda */
.contact-info { padding-top: 8px; }
.contact-info-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 14px;
}
.contact-info-desc {
  font-size: .97rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 36px;
}
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}
.contact-detail-icon {
  width: 44px; height: 44px;
  background: var(--navy-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--navy);
  font-size: 1rem;
}
.contact-detail-text strong {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 3px;
}
.contact-detail-text span {
  font-size: .9rem;
  color: var(--gray-600);
}

/* Tarjeta del formulario */
.contact-form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: var(--shadow-md);
}
.contact-form-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 28px;
}

/* Campos del formulario */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.form-group.full { grid-column: 1 / -1; }
.form-label {
  font-size: .83rem;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: .02em;
}
.form-label .req { color: var(--red); margin-left: 2px; }
.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--gray-800);
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}
.form-input:focus,
.form-textarea:focus {
  background: var(--white);
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30,58,138,.1);
}
.form-textarea { resize: vertical; min-height: 120px; }

.recaptcha-wrap { margin: 8px 0 24px; }

.required-note {
  font-size: .8rem;
  color: var(--gray-400);
  margin-bottom: 20px;
}

.form-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.form-submit:hover { background: var(--navy-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.form-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* Estados éxito / error */
.form-alert {
  display: none;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 500;
  margin-top: 20px;
  align-items: center;
  gap: 12px;
}
.form-alert.show { display: flex; }
.form-alert.success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}
.form-alert.error {
  background: var(--red-light);
  border: 1px solid rgba(199,58,74,.3);
  color: var(--red-dark);
}

/* ===================================================
   PIE DE PÁGINA
=================================================== */
footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.75);
  padding: 72px 0 32px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-col {
  display: flex;
  flex-direction: column;
}
.footer-col .footer-btn { margin-top: auto; }

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-col p { font-size: .88rem; line-height: 1.7; margin-bottom: 16px; }
.footer-logo {
  display: inline-block;
  background: rgba(255,255,255,0.95);
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.footer-logo img { height: 44px; width: auto; display: block; }
.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: .875rem;
  font-weight: 600;
  transition: var(--transition);
  margin-bottom: 20px;
}
.footer-btn:hover { background: rgba(255,255,255,.18); }
.footer-btn.red-btn { background: var(--red); border-color: var(--red); }
.footer-btn.red-btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.social-row { display: flex; gap: 10px; margin-top: 8px; margin-bottom: 20px; }
.social-btn {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: var(--transition);
}
.social-btn:hover { background: var(--navy); }
.footer-bottom {
  padding-top: 28px;
  text-align: center;
  font-size: .82rem;
  opacity: .5;
}

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 960px) {
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    height: calc(100vh - 72px);
    background: rgba(255,255,255,.98);
    flex-direction: column;
    align-items: stretch;
    padding: 24px 20px;
    gap: 8px;
    overflow-y: auto;
  }
  .nav-links.open  { display: flex; }
  .nav-link        { font-size: 1.25rem; width: 100%; padding: 18px 22px; border-radius: var(--radius-sm); }
  .nav-cta         { width: 100%; margin-left: 0; text-align: center; display: block; padding: 18px 22px; margin-top: 8px; font-size: 1.25rem; }

  .page-header h1  { font-size: 2rem; }
  .contact-form-card { padding: 32px 24px; }
  .form-row        { grid-template-columns: 1fr; }
  .footer-top      { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 480px) {
  .contact-section { padding: 60px 0 80px; }
}
