/* ==========================================================================
   METRODORA DESIGN SYSTEM - AlliancePlatt Typography
   ========================================================================== */
@font-face {
  font-family: 'AlliancePlatt';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('https://storage.googleapis.com/metrodorafp-assets/fonts/AlliancePlatt-Light.woff2') format('woff2');
}

@font-face {
  font-family: 'AlliancePlatt';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://storage.googleapis.com/metrodorafp-assets/fonts/AlliancePlatt-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'AlliancePlatt';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('https://storage.googleapis.com/metrodorafp-assets/fonts/AlliancePlatt-RegularItalic.woff2') format('woff2');
}

@font-face {
  font-family: 'AlliancePlatt';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('https://storage.googleapis.com/metrodorafp-assets/fonts/AlliancePlatt-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'AlliancePlatt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('https://storage.googleapis.com/metrodorafp-assets/fonts/AlliancePlatt-SemiBold.woff2') format('woff2');
}

:root {
  /* Design System Tokens */
  --font-family-base: 'AlliancePlatt', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'AlliancePlatt', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Brand Colors */
  --brand-primary: #1b3440;
  --brand-primary-light: #2c505e;
  --brand-primary-light-20: rgba(44, 80, 94, 0.12);
  --brand-primary-dark: #08151b;

  --accent-green: #3b9178;
  --accent-green-hover: #2e735f;
  --accent-green-light: #e8f6f2;

  --brand-gray: #d7dcdf;
  --brand-gray-light: #f8fafc;
  --brand-gray-dark: #64748b;
  --brand-border: #cbd5e1;
  --brand-text: #2d3748;

  --spacer-size: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--brand-text);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--brand-gray);
  background-color: #1b3440;
  padding: 18px 24px;
}

.site-header-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.site-header .brand-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.site-header .header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-green);
  background-color: var(--accent-green-light);
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(59, 145, 120, 0.2);
}

/* Main Layout */
.site-main {
  padding: 48px 20px 80px 20px;
}

.page-content {
  max-width: 860px;
  margin: 0 auto;
}

.elementor-section {
  position: relative;
  width: 100%;
}

.elementor-container {
  display: flex;
  margin: 0 auto;
  position: relative;
}

.elementor-col-100 {
  width: 100%;
}

.elementor-widget-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.elementor-widget {
  margin-bottom: 20px;
}

/* Headings */
.elementor-heading-title {
  padding: 0;
  margin: 0 0 8px 0;
  line-height: 1.15;
  font-family: var(--font-family-heading);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--brand-primary);
}

@media (max-width: 768px) {
  .elementor-heading-title {
    font-size: 32px;
  }
}

.subtitle-text {
  font-size: 20px;
  font-weight: 400;
  color: var(--brand-primary-light);
  margin-bottom: 8px;
}

.elementor-spacer-inner {
  height: var(--spacer-size);
}

/* Highlight Quote */
.quote-highlight {
  background: #f8fafc;
  border-left: 4px solid var(--accent-green);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin: 12px 0 28px 0;
  border-top: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  border-right: 1px solid #edf2f7;
}

.quote-highlight p {
  font-style: italic;
  font-size: 15px;
  line-height: 1.7;
  color: var(--brand-primary);
  margin-bottom: 12px;
}

.quote-highlight p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   FORMULARIO Y CONTROLES
   ========================================================================== */
.elementor-form {
  background: #ffffff;
}

.elementor-form-fields-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.elementor-field-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.elementor-field-label {
  display: block;
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   SEGMENTED CONTROL (3 Categorías)
   ========================================================================== */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
  .segmented-control {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.segment-option {
  position: relative;
  cursor: pointer;
  display: flex;
  margin: 0;
}

/* Ocultar radio nativo pero mantener accesibilidad */
.segment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.segment-label {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 14px 12px;
  font-family: var(--font-family-base);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  color: #64748b;
  background: transparent;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  min-height: 84px;
}

.segment-label .segment-icon {
  stroke: #64748b;
  transition: stroke 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.segment-option:hover .segment-label {
  color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.7);
}

.segment-option:hover .segment-label .segment-icon {
  stroke: var(--brand-primary);
  transform: translateY(-1px);
}

/* Estado ACTIVO del segmento */
.segment-option input[type="radio"]:checked + .segment-label {
  background: #ffffff;
  color: var(--brand-primary);
  font-weight: 600;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(27, 52, 64, 0.12);
}

.segment-option input[type="radio"]:checked + .segment-label .segment-icon {
  stroke: var(--brand-primary);
  transform: scale(1.08);
}

/* ==========================================================================
   INPUTS Y TEXTAREAS
   ========================================================================== */
.elementor-field {
  width: 100%;
  font-family: var(--font-family-base);
  font-size: 15px;
  padding: 13px 16px;
  border: 1.5px solid var(--brand-border);
  border-radius: 10px;
  color: var(--brand-primary-dark);
  background-color: #fafbfc;
  transition: all 0.2s ease;
}

.elementor-field:hover {
  border-color: #94a3b8;
  background-color: #ffffff;
}

.elementor-field:focus {
  outline: none;
  border-color: var(--brand-primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(27, 52, 64, 0.12);
}

.elementor-field::placeholder {
  color: #94a3b8;
  font-weight: 300;
}

textarea.elementor-field {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

/* ==========================================================================
   DROPZONE DE DOCUMENTOS APORTADOS
   ========================================================================== */
.file-upload-wrapper {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 28px 20px;
  background: #f8fafc;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-upload-wrapper:hover,
.file-upload-wrapper.dragover {
  border-color: var(--accent-green);
  background: #f0fdf4;
}

.file-upload-wrapper input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e6f7f2;
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.file-upload-wrapper:hover .file-upload-icon-bubble {
  transform: translateY(-2px);
  background: #d1fae5;
}

.file-upload-text {
  font-size: 14.5px;
  color: var(--brand-primary);
  font-weight: 400;
  margin-bottom: 4px;
}

.file-upload-text strong {
  font-weight: 600;
  color: var(--accent-green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.file-upload-subtext {
  font-size: 12.5px;
  color: #64748b;
}

/* Nombre de archivo seleccionado (oculto si vacío) */
.file-selected-name {
  display: none;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--accent-green);
  font-weight: 600;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--accent-green);
  box-shadow: 0 2px 6px rgba(59, 145, 120, 0.15);
}

.file-selected-name:empty {
  display: none !important;
}

/* ==========================================================================
   BOTÓN SUBMIT (Estilo Píldora Primario)
   ========================================================================== */
.elementor-button {
  background-color: var(--brand-primary);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 16px 36px;
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-shadow: 0 6px 18px rgba(27, 52, 64, 0.24);
}

.elementor-button .btn-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.elementor-button .btn-arrow-icon {
  transition: transform 0.25s ease;
  display: inline-block;
  vertical-align: middle;
}

.elementor-button:hover:not(:disabled) {
  background-color: var(--brand-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(27, 52, 64, 0.32);
}

.elementor-button:hover:not(:disabled) .btn-arrow-icon {
  transform: translateX(6px);
}

.elementor-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(27, 52, 64, 0.2);
}

.elementor-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.7s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Alerts */
.form-alert {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
  font-family: var(--font-family-base);
}

.form-alert.alert-error {
  background-color: #fee2e2;
  border: 1px solid #f87171;
  color: #991b1b;
}

/* Success Card */
.success-container {
  display: none;
  background: var(--accent-green-light);
  border: 1px solid rgba(59, 145, 120, 0.3);
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 28px;
}

.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-green);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}

.success-title {
  font-family: var(--font-family-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

.success-message {
  font-size: 15px;
  color: var(--brand-primary-light);
  max-width: 520px;
  margin: 0 auto 24px auto;
  line-height: 1.6;
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--accent-green);
  color: var(--accent-green);
  padding: 10px 22px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: var(--font-family-base);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--accent-green);
  color: #ffffff;
}

/* Legal text block */
.legal-notice-box {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--brand-gray-dark);
}

.legal-notice-box p {
  margin-bottom: 12px;
}

.legal-notice-box p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background-color: #1b3440;
  border-top: 1px solid #e2e8f0;
  padding: 32px 20px;
  font-size: 13px;
  color: white;
}

.site-footer-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer .footer-logo img {
  height: 28px;
  width: auto;
}

.site-footer .footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.site-footer .footer-links a {
  color: white;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer .footer-links a:hover {
  color: var(--brand-primary);
}

@media (max-width: 640px) {
  .site-footer-container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 18px;
  }
  .site-header .header-badge {
    font-size: 10px;
    padding: 6px;
  }
  .site-header .brand-logo img,
  .site-footer .footer-logo img {
    height: 24px;
  }
}