/* ==========================================================================
   contactos.css
   Rediseño visual de contactos.php — EMAPAAC EP
   Fecha: 2026-09-15
   Sistema visual compartido con las demás páginas rediseñadas
   (valores copiados, archivo independiente).
   Diferenciador de esta página: tarjeta de formulario con cabecera en
   degradado y panel de contacto oscuro con el mapa integrado.
   ========================================================================== */

/* -------------------------------------------------------------------------
   TOKENS
   ------------------------------------------------------------------------- */
.ct-page {
  --ct-primary: #1e3a8a;
  --ct-primary-2: #1d4ed8;
  --ct-accent: #06b6d4;          /* solo bordes, fondos y decoración */
  --ct-accent-soft: #67e8f9;     /* sobre fondo oscuro */
  --ct-accent-text: #0e7490;     /* texto e íconos sobre claro (5.4:1) */
  --ct-bg: #f8fafc;
  --ct-band: #f0f4f8;
  --ct-text: #334155;
  --ct-muted: #4b5563;
  --ct-border: #f3f4f6;
  --ct-input-border: #e2e8f0;
  --ct-shadow: 0 10px 15px -3px rgba(0, 0, 0, .05);
  --ct-shadow-hover: 0 20px 40px rgba(0, 0, 0, .08);
  display: block;
  font-family: "Poppins", sans-serif;
  color: var(--ct-text);
  background: var(--ct-bg);
}

/* -------------------------------------------------------------------------
   FRANJA DE TÍTULO (centrada)
   ------------------------------------------------------------------------- */
.ct-page section#page-title.ct-titlebar {
  background: var(--ct-band);
  border-bottom: 1px solid #e5e7eb;
  padding: 44px 0;
}
.ct-page #page-title.ct-titlebar .container {
  display: block;
  text-align: center;
}
.ct-page #page-title.ct-titlebar .page-title {
  text-align: center;
  margin: 0 auto;
  max-width: 900px;
  padding: 0;
}
.ct-page #page-title .page-title > h1.ct-titlebar__title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ct-primary);
  margin: 0 0 6px;
  letter-spacing: normal;
}
.ct-page #page-title .page-title > span.ct-titlebar__sub {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ct-accent-text);
  margin: 0;
}
.ct-page #page-title .breadcrumb.ct-breadcrumb {
  display: block;
  float: none;
  text-align: center;
  margin: 10px auto 0;
  font-size: 13px;
}
.ct-page #page-title .breadcrumb.ct-breadcrumb ul {
  display: inline-block;
  margin: 0;
  padding: 0;
}
.ct-page #page-title .breadcrumb.ct-breadcrumb ul li {
  display: inline;
}
.ct-page #page-title .breadcrumb.ct-breadcrumb ul li a {
  color: var(--ct-muted);
}
.ct-page #page-title .breadcrumb.ct-breadcrumb ul li a:hover {
  color: var(--ct-primary);
}
.ct-page #page-title .breadcrumb.ct-breadcrumb ul li:last-child a {
  color: var(--ct-primary);
  font-weight: 600;
  opacity: 1;
}

@media (max-width: 768px) {
  .ct-page section#page-title.ct-titlebar {
    padding: 34px 0;
  }
  .ct-page #page-title .page-title > h1.ct-titlebar__title {
    font-size: 24px;
  }
}

/* -------------------------------------------------------------------------
   SECCIÓN
   ------------------------------------------------------------------------- */
.ct-page section#page-content.ct-section {
  padding: 64px 0;
  background: transparent;
  overflow: visible;
}
.ct-page .ct-main > .row {
  margin-left: -12px;
  margin-right: -12px;
}
.ct-page .ct-main > .row > .col-lg-6 {
  padding: 0 12px;
  margin-bottom: 24px;
  display: flex;
}
.ct-page .ct-main > .row > .col-lg-6 > * {
  width: 100%;
}

@media (max-width: 768px) {
  .ct-page section#page-content.ct-section {
    padding: 48px 0;
  }
}

/* -------------------------------------------------------------------------
   TARJETA DE FORMULARIO (diferenciador: cabecera en degradado)
   ------------------------------------------------------------------------- */
.ct-page .ct-form-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--ct-border);
  box-shadow: 0 20px 40px rgba(30, 58, 138, .08);
  overflow: hidden;
}
.ct-page .ct-form-card__head {
  position: relative;
  background: linear-gradient(135deg, var(--ct-primary) 0%, var(--ct-primary-2) 55%, var(--ct-accent-text) 100%);
  color: #fff;
  padding: 32px 32px 28px;
  overflow: hidden;
}
.ct-page .ct-form-card__head::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.ct-page .ct-form-card__head::after {
  content: "";
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.ct-page .ct-form-card__head > * {
  position: relative;
  z-index: 1;
}
.ct-page .ct-form-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.ct-page .ct-form-card h5.ct-form-card__title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: normal;
  text-transform: none;
}
.ct-page .ct-form-card p.ct-form-card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .9);
  text-align: left;
}
.ct-page .ct-form-card__body {
  padding: 32px;
}
.ct-page .ct-form-card__inner {
  margin-top: 0;
}

@media (max-width: 768px) {
  .ct-page .ct-form-card__head {
    padding: 24px 22px;
  }
  .ct-page .ct-form-card__body {
    padding: 22px;
  }
}

/* Campos */
.ct-page .ct-form-card .form-group label.ct-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: normal;
  color: var(--ct-primary);
  margin-bottom: 8px;
}
.ct-page .ct-input {
  position: relative;
}
.ct-page .ct-input__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
  transition: color .2s;
}
.ct-page .ct-form-card .ct-input .form-control {
  padding-left: 44px;
}
.ct-page .ct-input:focus-within .ct-input__icon {
  color: var(--ct-accent-text);
}
.ct-page .ct-form-card .form-control {
  min-height: 48px;
  height: auto;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 22px;
  border: 1.5px solid var(--ct-input-border);
  border-radius: 12px;
  background: var(--ct-bg);
  color: var(--ct-text);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.ct-page .ct-form-card .form-control:hover {
  border-color: #cbd5e1;
}
.ct-page .ct-form-card .form-control:focus {
  border-color: var(--ct-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, .18);
  outline: 0;
}
.ct-page .ct-form-card .form-control::placeholder {
  color: #94a3b8;
}
.ct-page .ct-form-card textarea.form-control.ct-autogrow {
  min-height: 130px;
  max-height: 360px;
  resize: vertical;
  overflow-y: auto;
}

/* -------------------------------------------------------------------------
   BOTÓN
   ------------------------------------------------------------------------- */
.ct-page button.btn.ct-btn {
  background: linear-gradient(135deg, var(--ct-primary), var(--ct-primary-2));
  border: 0;
  color: #fff;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-transform: none;
  letter-spacing: normal;
  margin: 8px 0 0;
  box-shadow: 0 10px 20px rgba(30, 58, 138, .25);
  transition: transform .2s, box-shadow .2s, opacity .2s;
}
.ct-page button.btn.ct-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(30, 58, 138, .32);
  color: #fff;
}
.ct-page button.btn.ct-btn:hover .fa-paper-plane {
  transform: translateX(3px);
}
.ct-page button.btn.ct-btn:disabled,
.ct-page button.btn.ct-btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.ct-page button.btn.ct-btn:focus-visible {
  outline: 3px solid var(--ct-accent);
  outline-offset: 3px;
}

@media (max-width: 576px) {
  .ct-page button.btn.ct-btn {
    width: 100%;
  }
}

/* -------------------------------------------------------------------------
   MENSAJES
   ------------------------------------------------------------------------- */
.ct-page .ct-result {
  margin: 8px 0 0;
}
.ct-page #i_resultado h5[style*="red"],
.ct-page #i_resultado h5[style*="green"] {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  letter-spacing: normal;
}
.ct-page #i_resultado h5[style*="red"] {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  /* EXCEPCIÓN DOCUMENTADA: este !important vence el color inline (red) que
     escriben el script y el servidor; ese rojo por sí solo no alcanza un
     contraste de 4.5:1 sobre el fondo #fef2f2. */
  color: #b91c1c !important;
}
.ct-page #i_resultado h5[style*="red"]::before {
  content: "\f06a";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}
.ct-page #i_resultado h5[style*="green"] {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  /* EXCEPCIÓN DOCUMENTADA: este !important vence el color inline (green) que
     escriben el script y el servidor; ese verde por sí solo no alcanza un
     contraste de 4.5:1 sobre el fondo #f0fdf4. */
  color: #15803d !important;
}
.ct-page #i_resultado h5[style*="green"]::before {
  content: "\f058";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}
.ct-page #i_loading img {
  display: block;
  margin: 8px auto;
  max-width: 56px;
  height: auto;
}

/* -------------------------------------------------------------------------
   PANEL DE CONTACTO (diferenciador: panel oscuro con el mapa integrado)
   ------------------------------------------------------------------------- */
.ct-page .ct-info {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(160deg, #16306f 0%, #0f1f4d 100%);
  box-shadow: 0 20px 40px rgba(15, 31, 77, .18);
}
.ct-page .ct-info__head {
  padding: 32px 32px 0;
}
.ct-page .ct-info h5.ct-info__title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  padding-left: 14px;
  border-left: 4px solid var(--ct-accent);
  letter-spacing: normal;
  text-transform: none;
}
.ct-page ul.ct-info__list {
  list-style: none;
  margin: 0;
  padding: 26px 32px 28px;
}
.ct-page .ct-info__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 16px;
  margin-left: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 15px;
  line-height: 1.6;
}
.ct-page .ct-info__item:last-child {
  margin-bottom: 0;
}
.ct-page .ct-info__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(6, 182, 212, .18);
  color: var(--ct-accent-soft);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .3s, transform .3s;
}
.ct-page .ct-info__icon i {
  margin-left: 0;
}
.ct-page .ct-info__item:hover .ct-info__icon {
  background: rgba(6, 182, 212, .3);
  transform: scale(1.05);
}
.ct-page .ct-info__text {
  padding-top: 8px;
  overflow-wrap: anywhere;
}
.ct-page .ct-info__text a:not(.btn) {
  color: #fff;
  font-weight: 600;
}
.ct-page .ct-info__text a:not(.btn):hover {
  color: var(--ct-accent-soft);
  text-decoration: underline;
}
.ct-page .ct-map-card {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, .1);
  line-height: 0;
}
/* Altura del mapa: se conserva el min-height de 460px que ya aplicaba el
   tema (style.css) para no reducir el mapa respecto a lo actual. */
.ct-page .ct-map-card #google-map.map {
  min-height: 460px;
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .ct-page .ct-info__head {
    padding: 24px 22px 0;
  }
  .ct-page ul.ct-info__list {
    padding: 20px 22px 24px;
  }
  .ct-page .ct-map-card #google-map.map {
    min-height: 320px;
  }
}

/* -------------------------------------------------------------------------
   REVEAL Y MOVIMIENTO
   ------------------------------------------------------------------------- */
.ct-page.ct-js .ct-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.ct-page.ct-js .ct-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .ct-page.ct-js .ct-reveal {
    transition: none;
    transform: none;
    opacity: 1;
  }
  .ct-page .ct-form-card,
  .ct-page button.btn.ct-btn,
  .ct-page .ct-info__icon,
  .ct-page .ct-input__icon {
    transition: none;
  }
  .ct-page button.btn.ct-btn:hover {
    transform: none;
  }
  .ct-page button.btn.ct-btn:hover .fa-paper-plane {
    transform: none;
  }
  .ct-page .ct-info__item:hover .ct-info__icon {
    transform: none;
  }
}
