/* AS.FISP - Estilos sencillos y corporativos */
:root {
  --azul: #123b7a;
  --azul-oscuro: #0b2855;
  --dorado: #c5a45a;
  --texto: #263449;
  --gris: #667085;
  --fondo: #f4f6f9;
  --blanco: #ffffff;
  --borde: #dce2ea;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--texto);
  line-height: 1.6;
  background: var(--blanco);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.wrap { width: min(1100px, calc(100% - 40px)); margin: 0 auto; }

/* Encabezado */
.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px max(20px, calc((100% - 1100px) / 2));
  background: var(--blanco);
  border-bottom: 3px solid var(--dorado);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--azul); }
.brand-mark { font-size: 27px; font-weight: 800; letter-spacing: -1px; }
.brand-mark span { color: var(--dorado); }
.brand-name {
  border-left: 1px solid var(--borde);
  padding-left: 12px;
  font-size: 9px;
  line-height: 1.4;
  font-weight: bold;
  letter-spacing: .5px;
}
.main-nav { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.main-nav a:hover, .nav-login:hover { color: var(--dorado); }
.nav-cta {
  padding: 9px 14px;
  color: white;
  background: var(--azul);
  border-radius: 3px;
}

/* Portada */

.hero {
  min-height: 470px;
  display: flex;
  align-items: center;
  position: relative;
  color: white;
  background: var(--azul);
  overflow: hidden;
  box-sizing: border-box;
}

.hero-content {
  width: 38%;
  box-sizing: border-box;
  padding: 65px 35px 65px clamp(25px, 5vw, 80px);
  position: relative;
  z-index: 2;
}

.hero-image {
  width: 75%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--dorado);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1.5px;
}
.eyebrow span { display: inline-block; width: 22px; height: 2px; background: var(--dorado); margin-right: 8px; vertical-align: middle; }
.eyebrow-blue { color: var(--azul); }
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -1.5px;
}
.hero h1 em, h2 em { color: var(--dorado); font-style: normal; }
.hero-copy { max-width: 580px; color: #e3eaf4; font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 0;
  border-radius: 3px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.button-gold { color: #17243a; background: var(--dorado); }
.button-outline { color: white; border: 1px solid white; background: transparent; }
.button-blue { width: 100%; color: white; background: var(--azul); }
.button-light { color: var(--azul); background: #edf1f6; }
.hero-foot { margin-top: 55px; color: #cbd6e6; font-size: 10px; letter-spacing: 1px; }
.hero-line { display: inline-block; width: 28px; height: 2px; margin-right: 8px; background: var(--dorado); vertical-align: middle; }
.hero-index { position: absolute; right: 25px; bottom: 18px; color: #dce5f1; font-size: 11px; }
.hero-index span { margin-left: 8px; }

/* Secciones */
.section-pad { padding: 75px 0; }
h2 { margin: 0; color: var(--azul-oscuro); font-size: clamp(29px, 4vw, 40px); line-height: 1.2; }
h2 em { color: var(--azul); }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.intro-text { color: var(--gris); font-size: 14px; }
.intro-text strong { color: var(--azul); }
.text-link { display: inline-block; margin-top: 10px; color: var(--azul); font-weight: bold; font-size: 13px; }
.text-link span { color: var(--dorado); }
.training { color: white; background: var(--azul-oscuro); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 35px; margin-bottom: 30px; }
.section-heading h2 { color: white; }
.section-heading h2 em { color: var(--dorado); }
.section-heading > p { max-width: 350px; margin: 0; color: #d1d9e5; font-size: 13px; }
.training-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.training-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.04);
}
.card-number { color: var(--dorado); font-size: 11px; font-weight: bold; }
.card-symbol { display: block; margin: 10px 0; color: var(--dorado); font-size: 22px; }
.training-card h3 { margin: 0 0 8px; font-size: 17px; }
.training-card p { margin: 0; color: #d1d9e5; font-size: 12px; }
.training-note {
  display: flex; gap: 12px; align-items: center;
  margin-top: 20px; padding: 15px;
  border: 1px solid rgba(197,164,90,.6);
  color: #e1e7ef; font-size: 12px;
}
.training-note span { color: var(--dorado); font-size: 22px; }
.training-note p { margin: 0; }

/* Video y datos generales */
.director-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 55px; }
.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--azul-oscuro);
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.video-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 20px; text-align: center; color: white;
  background: var(--azul);
  pointer-events: none;
}
.play-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; margin-bottom: 12px;
  border: 2px solid var(--dorado); border-radius: 50%; color: var(--dorado);
}
.video-placeholder strong { font-size: 16px; }
.video-placeholder small { color: #dce5f1; }
.video-caption { position: absolute; left: 12px; bottom: 8px; color: white; font-size: 9px; }
.director-copy > p:not(.eyebrow):not(.director-sign) { color: var(--gris); font-size: 14px; }
.director-sign { padding-top: 15px; border-top: 1px solid var(--borde); color: var(--azul); font-weight: bold; }
.director-sign span { display: block; color: var(--gris); font-size: 12px; font-weight: normal; }
.facts-strip { padding: 28px 0; background: var(--fondo); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.facts-grid > div { display: grid; grid-template-columns: 30px 1fr; align-items: center; }
.fact-icon { grid-row: span 2; color: var(--dorado); font-size: 22px; }
.facts-grid strong { color: var(--azul); font-size: 13px; }
.facts-grid small { color: var(--gris); font-size: 11px; }

/* Formulario de aspirantes */
.enrollment { background: var(--fondo); }
.enrollment-grid { display: grid; grid-template-columns: .8fr 1.2fr; align-items: start; gap: 50px; }
.enrollment-copy > p:not(.eyebrow) { color: var(--gris); font-size: 14px; }
.privacy-note { display: flex; gap: 12px; margin-top: 25px; padding: 15px; border-left: 3px solid var(--dorado); background: white; color: var(--gris); font-size: 12px; }
.privacy-note p { margin: 0; }
.privacy-note span { color: var(--azul); }
.application-form { padding: 28px; background: white; border: 1px solid var(--borde); }
.form-heading { display: flex; flex-direction: column; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--borde); }
.form-heading span { color: var(--azul); font-weight: bold; font-size: 13px; }
.form-heading small { color: var(--gris); font-size: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.application-form label, .login-form label { display: block; margin-bottom: 14px; color: var(--texto); font-size: 12px; font-weight: bold; }
.application-form input, .application-form select, .application-form textarea,
.login-form input {
  display: block; width: 100%; margin-top: 6px; padding: 11px;
  border: 1px solid var(--borde); border-radius: 3px; background: white;
  color: var(--texto); font-size: 12px;
}
.application-form textarea { resize: vertical; }
.application-form input:focus, .application-form select:focus, .application-form textarea:focus,
.login-form input:focus { outline: 2px solid #c8d6ed; border-color: var(--azul); }
.consent { display: flex!important; align-items: flex-start; gap: 9px; color: var(--gris)!important; font-weight: normal!important; line-height: 1.45; }
.consent input { width: 15px; margin: 1px 0 0; }
.submit-button { width: 100%; }
.form-feedback { min-height: 18px; margin: 8px 0 0; color: var(--azul); font-size: 11px; }
.form-feedback.error { color: #b42318; }

/* Pie de página y acceso privado */
.site-footer { color: white; background: var(--azul-oscuro); }
.footer-main { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding-top: 35px; padding-bottom: 35px; }
.site-footer .brand-mark { color: white; }
.footer-main p, .footer-contact { color: #d1d9e5; font-size: 12px; }
.footer-contact { display: flex; flex-direction: column; gap: 4px; }
.footer-contact strong { color: white; font-size: 14px; }
.footer-contact small { color: #b6c4d8; }
.back-top { color: var(--dorado); font-size: 12px; font-weight: bold; }
.footer-bottom { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.15); color: #b6c4d8; font-size: 10px; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 12px; }
.modal { display: none; position: fixed; z-index: 9999; inset: 0; align-items: center; justify-content: center; padding: 18px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,15,34,.75); }
.admin-panel { position: relative; z-index: 1; width: min(720px, 100%); max-height: 90vh; overflow: auto; padding: 35px; background: white; }
.modal-close { position: absolute; top: 8px; right: 15px; border: 0; background: none; color: var(--gris); font-size: 28px; }
.admin-panel h2 { font-size: 30px; }
.admin-intro { color: var(--gris); font-size: 13px; }
.login-form { max-width: 420px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.applications-toolbar { display: flex; justify-content: space-between; margin-top: 20px; padding: 12px 0; border-bottom: 1px solid var(--borde); color: var(--gris); font-size: 12px; }
.applications-toolbar .text-link { border: 0; background: none; cursor: pointer; }
.applications-list { display: grid; gap: 12px; padding-top: 15px; }
.application-item { padding: 15px; border: 1px solid var(--borde); border-left: 3px solid var(--dorado); }
.application-item h3 { margin: 0 0 8px; color: var(--azul); font-size: 15px; }
.application-item p { margin: 4px 0; color: var(--gris); font-size: 12px; overflow-wrap: anywhere; }
.application-item .app-date { color: #8993a3; font-size: 10px; }
.empty-state { color: var(--gris); font-size: 12px; }
[hidden] { display: none !important; }
 
 .site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 70px;
  padding: 10px 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  background: white;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
@media (max-width: 680px) {
  .site-header { min-height: 70px; padding: 10px 18px; }
  .brand-mark { font-size: 23px; }
  .brand-name { font-size: 8px; }
  .menu-toggle { display: block; border: 0; background: none; color: var(--azul); font-size: 24px; }
  .main-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; z-index: 10; padding: 12px 20px; background: white; box-shadow: 0 8px 15px #0002; }
  .main-nav.open { display: flex; flex-direction: column; align-items: stretch; }
  .main-nav a, .nav-login { padding: 10px; text-align: left; }
  .hero { min-height: 440px; }
  .hero h1 { font-size: 42px; }
  .hero-copy { font-size: 14px; }
  .section-pad { padding: 55px 0; }
  .intro-grid, .director-grid, .enrollment-grid { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 15px; }
  .training-grid { grid-template-columns: 1fr 1fr; }
  .training-card { min-height: 185px; padding: 16px; }
  .facts-grid { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .application-form { padding: 20px; }
  .footer-main { align-items: flex-start; flex-wrap: wrap; }
  .footer-contact { flex-basis: 100%; }
  .footer-bottom .wrap { flex-direction: column; }
  .admin-panel { padding: 35px 20px 22px; }
  .admin-top { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 390px) {
  .training-grid { grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
}
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  right: 25px;
  bottom: 25px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float svg {
  width: 34px;
  height: 34px;
}

@media (max-width: 768px) {
  .whatsapp-float {
    width: 54px;
    height: 54px;
    right: 18px;
    bottom: 18px;
  }
}
body {
  padding-top: 65px;
}
.estado-selector {
    padding: 7px 12px;
    border: 1px solid var(--borde);
    border-radius: 5px;
    background: white;
    color: var(--azul);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.estado-selector:focus {
    outline: 2px solid var(--dorado);
    outline-offset: 2px;
}

.estado-feedback {
    display: block;
    margin-top: 5px;
    font-size: 11px;
}
/* Resumen de solicitudes */
.applications-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 25px;
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--borde);
  border-radius: 6px;
  background: #fff;
}

.summary-card span {
  color: var(--gris);
  font-size: 12px;
  font-weight: 600;
}

.summary-card strong {
  color: var(--azul);
  font-size: 28px;
}

.summary-card.pending {
  border-top: 3px solid #d6a642;
}

.summary-card.contacted {
  border-top: 3px solid #4386c6;
}

.summary-card.enrolled {
  border-top: 3px solid #39966b;
}

.summary-card.discarded {
  border-top: 3px solid #c65b5b;
}

/* Adaptación para celulares */
@media (max-width: 600px) {
  .applications-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}
#searchApplications {
  width: min(280px, 100%);
  padding: 9px 12px;
  border: 1px solid var(--borde);
  border-radius: 5px;
  font-size: 12px;
}

#searchApplications:focus {
  outline: 2px solid var(--dorado);
  outline-offset: 2px;
}
.admin-panel {
  width: min(900px, 95vw);
  box-sizing: border-box;
}

.applications-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

#searchApplications {
  flex: 1;
  min-width: 180px;
}

.applications-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}

.application-item {
  min-width: 0;
  box-sizing: border-box;
}
#refreshApplications {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--azul);
  border-radius: 5px;
  background: var(--azul);
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

#refreshApplications:hover {
  background: var(--azul-oscuro);
  border-color: var(--azul-oscuro);
}

#refreshApplications:active {
  transform: translateY(1px);
}
#filterStatus {
  min-width: 170px;
  padding: 10px 35px 10px 12px;
  border: 1px solid var(--borde);
  border-radius: 5px;
  background-color: white;
  color: var(--azul);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

#filterStatus:hover {
  border-color: var(--azul);
}

#filterStatus:focus {
  outline: none;
  border-color: var(--dorado);
  box-shadow: 0 0 0 2px rgba(214, 166, 66, .2);
}
/* Ventana de cotizaciones */
.quote-panel {
  position: relative;
  width: min(720px, 94%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 35px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.quote-panel h2 {
  margin-bottom: 25px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f0f2f5;
  color: #26364a;
  font-size: 25px;
  cursor: pointer;
}

.quote-courses {
  display: grid;
  gap: 18px;
  margin: 25px 0;
}

.quote-course {
  display: grid;
  grid-template-columns: 1fr 100px 150px;
  gap: 10px;
  padding: 18px;
  background: #f5f7fa;
  border: 1px solid #e1e6ed;
  border-radius: 12px;
}

.quote-course label {
  font-size: 13px;
  font-weight: 600;
  color: #34445a;
}

.quote-course input {
  width: 100%;
  min-width: 0;
  padding: 11px;
  border: 1px solid #d5dce5;
  border-radius: 8px;
  outline-color: #1e5a91;
}

.quote-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 25px 0;
  padding: 20px;
  background: #edf3f9;
  border-radius: 12px;
  color: #173b60;
}

.quote-total strong {
  font-size: 24px;
}

@media (max-width: 600px) {
  .quote-panel {
    padding: 25px 18px;
  }

  .quote-course {
    grid-template-columns: 1fr;
  }
}
/* Posición de la ventana de cotización */
#quoteModal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(10, 25, 45, 0.75);
}

/* Ocultar cuando no esté abierta */
#quoteModal[hidden] {
  display: none !important;
}

/* Contenido de la ventana */
#quoteModal .quote-panel {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
}

/* Editor de cotizaciones AS.FISP */

.quote-panel {
  width: min(760px, 96%);
  padding: 35px;
  background: #fff;
  color: #26364a;
  border-radius: 16px;
}

.quote-header {
  padding-bottom: 22px;
  margin-bottom: 25px;
}

.quote-header h2 {
  color: #173b60;
  margin: 8px 0;
}

.quote-header > p:last-child {
  color: #687586;
  font-size: 14px;
}

.quote-section {
  padding: 22px 0;
  border-bottom: 1px solid #e2e6eb;
}

.quote-section h3 {
  color: #173b60;
  font-size: 17px;
  margin-bottom: 16px;
}

.quote-section p,
.quote-section li {
  color: #596575;
  font-size: 14px;
  line-height: 1.7;
}

.quote-section ul {
  padding-left: 22px;
  margin: 10px 0;
}

.quote-section label {
  display: block;
  margin-top: 12px;
  color: #34445a;
  font-size: 13px;
  font-weight: 600;
}

.quote-section input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px;
  border: 1px solid #d5dce5;
  border-radius: 8px;
  font: inherit;
}

.quote-course {
  display: grid;
  grid-template-columns: 1fr 100px 150px;
  gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #f5f7fa;
  border: 1px solid #e1e6ed;
  border-radius: 10px;
}

.quote-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding: 20px;
  background: #173b60;
  color: white;
  border-left: 5px solid #c6a34a;
  border-radius: 8px;
}

.quote-total strong {
  font-size: 24px;
  color: #fff;
}

#generateQuoteButton {
  width: 100%;
  margin-top: 25px;
}

@media (max-width: 600px) {
  .quote-panel {
    padding: 25px 18px;
  }

  .quote-course {
    grid-template-columns: 1fr;
  }
}
.quote-logo {
  display: block;
  width: 180px;
  max-width: 70%;
  height: auto;
  object-fit: contain;
  margin: 0 auto 20px;
}

/* Hojas tamaño carta */
.quote-page {
  width: 8.5in;
  min-height: 11in;
  box-sizing: border-box;
  padding: 0.55in;
  margin: 0 auto 25px;
  background: white;
  border: 1px solid #d9dee5;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  overflow: hidden;
  position: relative;
}

.quote-header-page2 {
  text-align: center;
  padding: 15px 0;
  border-bottom: 3px solid #c6a34a;
}

@media screen {
  .quote-page {
    width: 100%;
    max-width: 816px;
    min-height: 1056px;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0;
  }

  body {
    margin: 0;
  }

  .quote-page {
    width: 8.5in;
    height: 11in;
    min-height: 11in;
    margin: 0;
    padding: 0.55in;
    box-sizing: border-box;
    border: none;
    box-shadow: none;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
  }

  .quote-page:last-of-type {
    page-break-after: auto;
    break-after: auto;
  }

  #generateQuoteButton,
  #quoteFeedback,
  .modal-close,
  #addQuoteCourse {
    display: none !important;
  }
}
.quote-page:nth-of-type(3) h2 {
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 12px;
}
/* Ajuste vertical de títulos y secciones de cotización */
.quote-section {
  padding: 14px 0;
}

.quote-section h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.quote-section p {
  margin-top: 5px;
  margin-bottom: 5px;
  line-height: 1.4;
}

.quote-section li {
  line-height: 1.4;
}