/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --azul:        #192e7c;
  --naranja:     #e56500;
  --azul-suave:  #eef3f9;
  --gris:        #b4b4b4;
  --blanco:      #ffffff;
  --negro:       #000000;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  color: var(--negro);
  background: var(--blanco);
  padding-top: 36px; /* espacio para la barra portal fija */
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

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

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.btn--orange {
  background-color: var(--naranja);
  color: var(--blanco);
}
.btn--orange:hover {
  background-color: #c95a00;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(229,101,0,.40);
}
.btn--orange:active { transform: translateY(0); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 36px;
  z-index: 100;
  background: var(--blanco);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 90px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
}
.header__logo { display: flex; align-items: center; }
.header__logo-img { height: 65px; width: auto; }

.header__nav { display: flex; align-items: stretch; }
.header__nav-list { display: flex; align-items: stretch; gap: 36px; }
.header__nav-list li { display: flex; align-items: stretch; }
.header__nav-link {
  display: flex;
  align-items: center;
  font-size: 16px;
  color: var(--negro);
  position: relative;
  transition: color 0.2s;
}
.header__nav-link:hover { color: var(--naranja); }
.header__nav-link--active { color: var(--naranja); }
.header__nav-link--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -10px;
  width: calc(100% + 20px);
  height: 3px;
  background: var(--naranja);
  border-radius: 2px;
}

/* Burger */
.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  align-self: center;
}
.header__burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--azul);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.header__burger--active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger--active span:nth-child(2) { opacity: 0; }
.header__burger--active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu { display: none; }

.no-scroll { overflow: hidden; }

/* ============================================================
   HERO BANNER
   ============================================================ */
.contacto-hero {
  position: relative;
  height: 240px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contacto-hero__bg {
  position: absolute;
  inset: 0;
}
.contacto-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.contacto-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.62);
}

.contacto-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.contacto-hero__title {
  font-size: 64px;
  font-weight: 400;
  color: var(--azul);
  letter-spacing: -0.5px;
  line-height: 1;
}

.contacto-hero__line {
  width: 110px;
  height: 3px;
  background: var(--naranja);
  border-radius: 2px;
}

/* ============================================================
   CUERPO PRINCIPAL
   ============================================================ */
.contacto-main {
  padding: 60px 0 80px;
}

/* ── Tarjeta principal ── */
.contacto-card {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(25,46,124,.22);
}

/* ============================================================
   PANEL IZQUIERDO — Info de contacto
   ============================================================ */
.contact-panel {
  flex: 0 0 390px;
  background: var(--azul);
  padding: 44px 36px 40px;
  display: flex;
  flex-direction: column;
}

/* Barra naranja superior */
.contact-panel__accent {
  width: 110px;
  height: 3px;
  background: var(--naranja);
  border-radius: 2px;
  margin-bottom: 36px;
}

/* Lista de ítems */
.contact-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 20px 0;
}

.contact-info__divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.22), rgba(255,255,255,0));
}

/* Icono */
.contact-info__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.80);
  margin-top: 1px;
}
.contact-info__icon svg {
  width: 22px;
  height: 22px;
}

/* Texto */
.contact-info__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.contact-info__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--blanco);
  line-height: 1.3;
}
.contact-info__value {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,.82);
  line-height: 1.55;
}
.contact-info__value sup {
  font-size: 9px;
  vertical-align: super;
}
.contact-info__value--link {
  transition: color 0.2s;
}
.contact-info__value--link:hover {
  color: var(--naranja);
}

/* Nota 24 horas */
.contact-panel__note {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,.70);
  line-height: 1.6;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.contact-panel__note em {
  font-style: italic;
  font-weight: 700;
  color: var(--blanco);
}

/* ============================================================
   PANEL DERECHO — Formulario
   ============================================================ */
.contact-form-panel {
  flex: 1;
  background: var(--blanco);
  padding: 44px 44px 48px;
}

/* ── Formulario ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Fila de 2 columnas */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Grupo de campo */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group--full {
  width: 100%;
}

/* Etiqueta */
.form-label {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.01em;
}
.form-required {
  color: var(--naranja);
  font-weight: 700;
}

/* Inputs y textarea */
.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: #f5f5f5;
  border: 1.5px solid transparent;
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: var(--negro);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none;
  resize: none;
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: #aaa;
  font-weight: 300;
}
.form-input:focus,
.form-textarea:focus {
  background: var(--blanco);
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(25,46,124,.09);
}

.form-textarea {
  min-height: 110px;
  line-height: 1.55;
}

/* Select personalizado */
.form-select-wrap {
  position: relative;
}
.form-select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: #f5f5f5;
  border: 1.5px solid transparent;
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: var(--negro);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.form-select:focus {
  background: var(--blanco);
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(25,46,124,.09);
}
.form-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #888;
  pointer-events: none;
}

/* Botón de envío */
.form-submit {
  display: flex;
  justify-content: flex-start;
  margin-top: 6px;
}

/* Spinner animado dentro del botón */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.btn-spinner {
  animation: spin 0.9s linear infinite;
}

/* Mensaje de estado del formulario */
.form-message {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
}
.form-message--success {
  background: #e8f8ef;
  color: #166534;
  border: 1px solid #bbf0d0;
}
.form-message--error {
  background: #fff0f0;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--blanco); }
.footer__top-line { height: 4px; background: var(--azul); }
.footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer__logo-img { height: 90px; width: auto; }
.footer__contact { display: flex; flex-direction: column; gap: 12px; }
.footer__contact-item { display: flex; align-items: center; gap: 10px; }
.footer__contact-icon-svg { flex-shrink: 0; }
.footer__contact-link,
.footer__contact-text { font-size: 15px; color: var(--negro); }
.footer__contact-link:hover { color: var(--naranja); }
.footer__bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid #e8e8e8;
}
.footer__nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer__nav-link { font-size: 18px; color: var(--gris); transition: color 0.2s; }
.footer__nav-link:hover { color: var(--azul); }
.footer__copy { font-size: 13px; color: var(--gris); }

/* ============================================================
   WHATSAPP FLOTANTE
   ============================================================ */
.whatsapp-btn {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 999;
  width: 52px;
  height: 52px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transition: transform 0.2s;
}
.whatsapp-btn:hover { transform: scale(1.1); }

/* ============================================================
   RESPONSIVE — TABLET  (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .contacto-hero { height: 180px; }
  .contacto-hero__title { font-size: 44px; }

  .contacto-card { flex-direction: column; }
  .contact-panel { flex: none; padding: 36px 28px 32px; }
  .contact-form-panel { padding: 36px 28px 40px; }
  .form-row { grid-template-columns: 1fr; }

  .footer__container { justify-content: center; text-align: center; }
  .footer__contact-item { justify-content: center; }
  .footer__bottom { justify-content: center; }
}

/* ============================================================
   RESPONSIVE — MÓVIL  (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
  /* Header */
  .header__container { align-items: center; }
  .header__burger { display: flex; }
  .header__nav {
    display: none;
    position: absolute;
    top: 90px;
    left: 0;
    right: 0;
    background: var(--blanco);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    padding: 16px 24px;
    z-index: 99;
  }
  .header__nav--open { display: block; }
  .header__nav-list { flex-direction: column; gap: 16px; }
  .header__nav-link--active::after { display: none; }

  /* Hero */
  .contacto-hero { height: 150px; }
  .contacto-hero__title { font-size: 36px; }

  /* Formulario */
  .contact-form-panel { padding: 28px 20px 32px; }
  .contact-panel { padding: 28px 20px 28px; }

  /* Footer */
  .footer__nav { justify-content: center; }

  /* Mobile menu overlay */
  .mobile-menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--blanco);
    padding: 28px 24px 40px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  }
  .mobile-menu--open { opacity: 1; visibility: visible; transform: scale(1); }
  .mobile-menu__close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--negro);
    transition: color 0.2s;
  }
  .mobile-menu__close:hover { color: var(--naranja); }
  .mobile-menu__logo {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    margin-bottom: 40px;
  }
  .mobile-menu__logo-img { height: 100px; width: auto; filter: none; }
  .mobile-menu__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .mobile-menu__link {
    display: block;
    padding: 10px 0;
    text-align: center;
    font-size: 20px;
    font-weight: 400;
    color: var(--negro);
    transition: color 0.2s;
  }
  .mobile-menu__link:hover { color: var(--naranja); }
  .mobile-menu__link--active {
    color: var(--naranja);
    font-weight: 700;
    position: relative;
    padding-bottom: 6px;
  }
  .mobile-menu__link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background-color: var(--naranja);
    border-radius: 2px;
  }
  .mobile-menu__contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 48px;
  }
  .mobile-menu__contact-link {
    font-size: 14px;
    font-weight: 300;
    color: #b4b4b4;
    text-align: center;
    transition: color 0.2s;
  }
  a.mobile-menu__contact-link:hover { color: var(--naranja); }
}


/* ============================================================
   BARRA PORTAL
   ============================================================ */
.portal-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
  background: #f0f2f8;
  border-bottom: 1px solid #dde3f0;
  height: 36px;
}
.portal-bar__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.portal-bar__back {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #666;
  transition: color 0.2s;
}
.portal-bar__back svg { width: 14px; height: 14px; flex-shrink: 0; }
.portal-bar__back:hover { color: var(--azul); }
.portal-bar__brands {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.portal-bar__brand { color: #999; transition: color 0.2s; }
.portal-bar__brand:hover { color: var(--azul); }
.portal-bar__brand--active { color: var(--azul); font-weight: 700; }
.portal-bar__sep { color: #ccc; }

@media (max-width: 360px) {
  .portal-bar__brands { display: none; }
}
