/* ==========================================================================
   KIOS — PROPUESTA 03: CUATRO CAMPOS
   Fiel a: conceptos-geometria-logo/03-cuatro-campos.png
   Identidad: Azul #002175 · Cian #00C1DD · Verde #22CC7E · Papel #F4F6FB
   Filosofía: Cuatro formas. Un mismo centro. Composición matricial de 4 cuadrantes.
   ========================================================================== */

/* 1. TIPOGRAFÍA LOCAL (TITILLIUM WEB) */
@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/TitilliumWeb-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/TitilliumWeb-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/TitilliumWeb-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/TitilliumWeb-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 2. VARIABLES DE DISEÑO INSTITUCIONAL */
:root {
  --blue: #002175;
  --blue-dark: #00164e;
  --blue-tint: #002c9b;
  --cyan: #00C1DD;
  --cyan-dark: #008fa4;
  --green: #22CC7E;
  --green-dark: #1aa665;
  --white: #ffffff;
  --paper: #F4F6FB;
  --paper-card: #EEF2FA;
  --lavender: #D0DCFA;
  --line: rgba(0, 33, 117, 0.12);
  --line-subtle: rgba(0, 33, 117, 0.06);
  --text-dark: #1E293B;
  --text-muted: #475569;
  --text-light: #ffffff;
  --text-light-muted: rgba(255, 255, 255, 0.88);
  --font-base: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --gutter: clamp(16px, 3.5vw, 48px);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 9999px;
  --transition: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 3. RESET Y BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body.kios-cuatro-campos {
  font-family: var(--font-base);
  background-color: var(--white);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--blue);
  color: var(--white);
  padding: 12px 24px;
  font-weight: 600;
  z-index: 9999;
  border-radius: var(--radius-md);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* BARRA DE PROGRESO SUPERIOR */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  z-index: 1000;
  pointer-events: none;
}

/* 4. BARRA DE NAVEGACIÓN INSTITUCIONAL CLARA */
.main-navbar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  height: 76px;
  display: flex;
  align-items: center;
}

.navbar-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo-img {
  display: block !important;
  width: 132px;
  height: auto;
}

.nav-menu-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 36px);
}

.nav-menu-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.01em;
  padding: 8px 0;
  position: relative;
  transition: color var(--transition);
}

.nav-menu-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--cyan);
  transition: width var(--transition);
}

.nav-menu-links a:hover {
  color: var(--cyan);
}

.nav-menu-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-tag-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
  text-transform: uppercase;
}

.btn-nav-action {
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), transform var(--transition);
}

.btn-nav-action:hover {
  background: var(--blue-tint);
  transform: translateY(-1px);
}

/* MENÚ MÓVIL */
.nav-mobile-details {
  display: none;
  position: relative;
}

.nav-mobile-details summary {
  list-style: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-mobile-details summary::-webkit-details-marker {
  display: none;
}

.nav-mobile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 32px rgba(0, 33, 117, 0.12);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-mobile-dropdown a {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
  padding: 8px 0;
  border-bottom: 1px solid var(--line-subtle);
}

.btn-mobile-contact {
  background: var(--blue);
  color: var(--white);
  padding: 10px 16px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-align: center;
  margin-top: 8px;
}

/* 5. ESTRUCTURA MATRICIAL: CUATRO CAMPOS Y DISCO CENTRAL */
.cuatro-campos-section {
  width: 100%;
  background: var(--white);
  overflow: hidden;
  position: relative;
}

.cuatro-campos-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(540px, auto) minmax(540px, auto);
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

/* 5.0 EL DISCO CENTRAL DE MARCA KIOS */
.center-brand-disc {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(180px, 16vw, 240px);
  height: clamp(180px, 16vw, 240px);
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 48px rgba(0, 33, 117, 0.22);
  z-index: 20;
  border: 8px solid rgba(255, 255, 255, 0.4);
}

.center-brand-disc img {
  width: 70%;
  height: auto;
  display: block;
}

/* 5.1 CAMPO 1: SUPERIOR IZQUIERDO — AZUL INSTITUCIONAL #002175 */
.field-azul {
  background: var(--blue);
  color: var(--text-light);
  padding: clamp(36px, 4.5vw, 64px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.field-azul-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

.field-main-title {
  font-size: clamp(38px, 4.2vw, 66px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 20px;
}

.field-main-title .highlight-cyan {
  color: var(--cyan);
}

.field-white-dash {
  width: 40px;
  height: 3px;
  background: var(--white);
  margin-bottom: 20px;
}

.field-azul-subtitle {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light-muted);
  margin-bottom: 28px;
}

.field-azul-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-azul-primary {
  background: var(--cyan);
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), transform var(--transition);
}

.btn-azul-primary:hover {
  background: var(--white);
  transform: translateY(-2px);
}

.field-azul-photo {
  position: relative;
  height: 100%;
  min-height: 360px;
  border-radius: 200px 0 0 0;
  overflow: hidden;
}

.field-azul-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* 5.2 CAMPO 2: SUPERIOR DERECHO — CIAN DINÁMICO #00C1DD */
.field-cian {
  background: var(--cyan);
  color: var(--blue);
  padding: clamp(36px, 4.5vw, 64px);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.field-cian-photo {
  position: relative;
  height: 100%;
  min-height: 360px;
  border-radius: 0 200px 0 0;
  overflow: hidden;
}

.field-cian-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.field-cian-pillars {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-left: 20px;
}

.pillar-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pillar-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pillar-icon-box svg {
  width: 34px;
  height: 34px;
}

.pillar-text-name {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  color: var(--blue);
}

.field-cian-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

/* 5.3 CAMPO 3: INFERIOR IZQUIERDO — VERDE VITAL #22CC7E */
.field-verde {
  background: var(--green);
  color: var(--blue);
  padding: clamp(36px, 4.5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.field-verde-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.field-verde-header h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  color: var(--blue);
}

.field-verde-dash {
  width: 32px;
  height: 2px;
  background: var(--blue);
}

/* 3 Portales Arqueados de Servicios/Sectores */
.field-verde-portals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.arched-portal-card {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border-radius: 120px 120px var(--radius-md) var(--radius-md);
  overflow: hidden;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: transform var(--transition), background var(--transition);
}

.arched-portal-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.4);
}

.arched-photo-window {
  width: 100%;
  aspect-ratio: 0.85;
  border-radius: 110px 110px var(--radius-sm) var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}

.arched-photo-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.arched-card-title {
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
}

.btn-arched-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  transition: transform var(--transition), background var(--transition);
  margin-bottom: 4px;
}

.btn-arched-arrow:hover {
  background: var(--white);
  color: var(--blue);
  transform: translateX(3px);
}

.field-verde-footer {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

/* 5.4 CAMPO 4: INFERIOR DERECHO — PAPEL CLARO #F4F6FB */
.field-papel {
  background: var(--paper);
  color: var(--text-dark);
  padding: clamp(36px, 4.5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

/* Sub-bloque: Nuestro Proceso */
.field-proceso-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-proceso-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.field-proceso-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
}

.field-proceso-dash {
  width: 28px;
  height: 2px;
  background: var(--blue);
}

.field-proceso-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  gap: 12px;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  position: relative;
}

.step-node:not(:last-child)::after {
  content: '>';
  position: absolute;
  right: -8px;
  top: 14px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.step-arc-indicator {
  width: 40px;
  height: 40px;
}

.step-arc-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.step-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
}

.step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

/* Sub-bloque: Conectar con KIOS (Pétalo + Foto) */
.field-conectar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 33, 117, 0.08);
}

.conectar-photo-window {
  height: 100%;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

.conectar-photo-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.conectar-petal-card {
  background: var(--blue);
  color: var(--white);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* Forma de pétalo/hoja de la identidad KIOS */
  border-radius: 0 100px 0 100px;
  height: 100%;
}

.conectar-petal-title {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
}

.btn-conectar-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform var(--transition), background var(--transition);
}

.btn-conectar-arrow:hover {
  background: var(--cyan);
  transform: translateX(4px);
}

.field-papel-footer {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* 6. PIE DE PÁGINA INSTITUCIONAL CLARO */
.site-footer-cuatro {
  width: 100%;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.footer-inner-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 36px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-left-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo-img {
  width: 110px;
  height: auto;
  display: block;
}

.footer-tagline-small {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 24px);
  flex-wrap: wrap;
}

.footer-nav-menu a {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  transition: color var(--transition);
}

.footer-nav-menu a:hover {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-right-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-claim-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-footer-next {
  background: var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  transition: background var(--transition);
}

.btn-footer-next:hover {
  background: var(--blue-tint);
}

.footer-notice-accordion {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--gutter) 24px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-notice-accordion summary {
  cursor: pointer;
  font-weight: 600;
}

.footer-notice-accordion p {
  margin-top: 8px;
  line-height: 1.5;
}

/* 7. DIÁLOGO ACCESIBLE DE CONTACTO (100% OFFLINE) */
.request-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 64px rgba(0, 33, 117, 0.24);
  background: var(--white);
  color: var(--text-dark);
  max-width: 540px;
  width: calc(100% - 32px);
  margin: auto;
  padding: 0;
}

.request-dialog::backdrop {
  background: rgba(0, 24, 84, 0.55);
  backdrop-filter: blur(4px);
}

.dialog-inner-card {
  padding: clamp(24px, 4vw, 40px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.dialog-header h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--blue);
  line-height: 1.1;
}

.dialog-header p {
  font-size: 13px;
  color: var(--cyan-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.dialog-close-btn {
  font-size: 28px;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  transition: color var(--transition);
}

.dialog-close-btn:hover {
  color: var(--blue);
}

.request-form {
  display: grid;
  gap: 16px;
}

.form-field-group {
  display: grid;
  gap: 6px;
}

.form-field-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}

.form-field-group input,
.form-field-group select,
.form-field-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--text-dark);
  font-size: 15px;
  transition: border-color var(--transition), background var(--transition);
}

.form-field-group input:focus,
.form-field-group select:focus,
.form-field-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(0, 33, 117, 0.1);
}

.form-field-group textarea {
  min-height: 84px;
  resize: vertical;
}

.form-offline-notice {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-form-submit {
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition);
}

.btn-form-submit:hover {
  background: var(--blue-tint);
}

.form-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark);
  min-height: 1.5em;
}

/* 8. ADAPTACIÓN RESPONSIVA */
@media (max-width: 1100px) {
  .cuatro-campos-matrix {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }
  .center-brand-disc {
    display: none;
  }
  .field-azul, .field-cian {
    grid-template-columns: 1fr;
  }
  .field-azul-photo, .field-cian-photo {
    min-height: 280px;
  }
  .field-cian-pillars {
    padding-left: 0;
  }
  .field-verde-portals {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-inner-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 860px) {
  .nav-menu-links, .nav-tag-badge {
    display: none;
  }
  .nav-mobile-details {
    display: block;
  }
  .field-verde-portals {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .arched-portal-card {
    border-radius: var(--radius-md);
  }
  .arched-photo-window {
    aspect-ratio: 16/9;
    border-radius: var(--radius-sm);
  }
  .field-proceso-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .step-node:not(:last-child)::after {
    display: none;
  }
  .field-conectar-row {
    grid-template-columns: 1fr;
  }
  .conectar-petal-card {
    border-radius: var(--radius-md);
  }
}

@media (max-width: 540px) {
  .main-navbar {
    height: 68px;
  }
  .brand-logo-img {
    width: 110px;
  }
  .field-azul, .field-cian, .field-verde, .field-papel {
    padding: 32px 20px;
  }
}

/* 9. PREFERENCIAS DE ACCESIBILIDAD */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
