:root {
    --bg-dark: #1a1956;
    --accent-yellow: #ffb800;
    --accent-orange: #fcb93c;
    --card-light: #b1b1c6;
    --text-light: #ffffff;
    --text-dark: #1a1956;
    --badge-blue: #2563eb;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* iti-mobile-body class to lock scrolling when modal is open */
body.iti-mobile-body {
    overflow: hidden;
}

/* ==========================================
   CABECERA SUPERIOR
   ========================================== */
.top-bar {
    width: 100%;
    background-color: var(--bg-dark);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.top-logo {
    max-width: 180px;
    height: auto;
}

.btn-header {
    background-color: var(--accent-yellow);
    color: var(--text-dark);
    font-weight: 800;
    font-size: 14px;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    transition: transform 0.2s;
}

.btn-header:hover {
    transform: scale(1.05);
}

/* ==========================================
   CONTENEDOR PRINCIPAL
   ========================================== */
.container {
    max-width: 1000px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.campaign-pretitle {
    color: var(--accent-yellow);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 20px;
    margin-bottom: 20px;
}

.logo-img {
    max-width: 600px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 22px;
    margin-bottom: 40px;
    line-height: 1.5;
    font-weight: 400;
}

.btn-main {
    background-color: var(--accent-yellow);
    color: var(--text-dark);
    font-weight: 800;
    font-size: 20px;
    padding: 15px 50px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.btn-main:hover {
    transform: scale(1.05);
}

/* ==========================================
   SECCIÓN VIDEO Y TEXTOS
   ========================================== */
.video-placeholder {
    background-color: var(--accent-yellow);
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    margin-bottom: 50px;
    border-radius: 4px;
}

.play-btn {
    background-color: var(--text-dark);
    color: var(--accent-yellow);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
    cursor: pointer;
}

.video-placeholder p {
    font-weight: 700;
    font-style: italic;
    font-size: 18px;
    margin: 0;
}

.intro-text {
    text-align: left;
    margin-bottom: 50px;
    max-width: 800px;
    width: 100%;
}

.intro-text p.pre-title {
    color: var(--accent-yellow);
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 5px 0;
}

.intro-text h2 {
    color: var(--text-light);
    font-size: 45px;
    margin: 0 0 20px 0;
    font-weight: 800;
    line-height: 1.1;
}

.intro-text h2 span.highlight {
    color: var(--accent-yellow);
    font-style: italic;
}

.intro-text p.desc {
    font-size: 20px;
    line-height: 1.5;
    margin: 0;
    font-weight: 400;
}

/* ==========================================
   ESTADÍSTICAS
   ========================================== */
.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 50px;
    max-width: 800px;
    width: 100%;
}

.stat-item:first-child {
    width: 100%;
    margin-bottom: 30px;
}

.stat-item h3 {
    color: var(--accent-yellow);
    font-size: 110px;
    font-weight: 800;
    letter-spacing: -3px;
    margin: 0;
    line-height: 1;
}

.stat-item p {
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    margin: 5px 0 0 0;
    color: var(--text-light);
}

/* ==========================================
   PROMOCIÓN NEWSLETTER
   ========================================== */
.newsletter-promo {
    text-align: center;
    margin-bottom: 50px;
    margin-top: 20px;
    max-width: 800px;
}

.newsletter-promo h4 {
    color: var(--accent-yellow);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.newsletter-promo p {
    font-style: italic;
    font-size: 24px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* ==========================================
   FORMULARIO DE REGISTRO
   ========================================== */
.registration-section {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 60px auto;
    text-align: center;
}

.registration-section h2 {
    color: var(--accent-yellow);
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 40px;
}

.form-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: 1fr;
    text-align: left;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.input-group {
    position: relative;
}

.input-group input,
.input-group select,
.mobile-select-trigger {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 18px 15px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s;
}

/* Custom trigger button style */
.mobile-select-trigger {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    text-align: left;
    display: none;
    /* Desktop hidden */
}

/* Ícono del calendario forzado a color blanco puro */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(100) sepia(100%) saturate(0%) hue-rotate(0deg) !important;
    opacity: 0.9 !important;
    cursor: pointer;
}

/* Autocompletado oscuro corregido */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-dark) inset !important;
    -webkit-text-fill-color: var(--text-light) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.input-group select {
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

/* DESKTOP Native options styling */
.input-group select option {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 16px;
    padding: 10px;
}

.input-group select optgroup {
    background-color: var(--bg-dark);
    color: var(--accent-yellow);
    font-weight: 800;
    font-style: normal;
    font-size: 14px;
}

.input-group input:focus,
.input-group select:focus,
.mobile-select-trigger:focus {
    border-color: var(--accent-yellow);
    background-color: var(--bg-dark);
}

.input-group label {
    position: absolute;
    top: -10px;
    left: 15px;
    background-color: var(--bg-dark);
    padding: 0 8px;
    font-size: 14px;
    color: white;
    font-weight: 500;
    z-index: 5;
}

/* ==========================================
   ESTILOS INTL-TEL-INPUT (Banderas WhatsApp)
   ========================================== */
.iti {
    width: 100%;
    display: block;
}

.iti__flag-container {
    z-index: 6;
}

/* El texto de +593 debe ser blanco en lugar de negro */
.iti__selected-dial-code {
    color: var(--text-light) !important;
}

/* Dropdown de países Desktop controlled */
.iti__country-list {
    background-color: var(--bg-dark) !important;
    color: var(--text-light) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
    max-width: 320px !important;
    white-space: normal !important;
}

.iti__country-name {
    color: var(--text-light) !important;
    font-size: 14px;
}

.iti__dial-code {
    color: var(--text-light) !important;
    opacity: 0.7;
    font-size: 14px;
    margin-left: 5px;
}

.iti__country {
    padding: 10px 15px !important;
    transition: background 0.2s;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.iti input,
.iti input[type=tel] {
    padding-left: 90px !important;
}

.iti__country-list::-webkit-scrollbar {
    width: 6px;
}

.iti__country-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

/* ==========================================
   BOTONES
   ========================================== */
.btn-submit {
    width: 100%;
    background-color: var(--accent-yellow);
    color: var(--text-dark);
    border: none;
    font-weight: 800;
    padding: 20px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    margin-top: 15px;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #e6a600;
}

.form-disclaimer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 20px;
    line-height: 1.5;
}

/* ==========================================
   MOBILE CUSTOM SELECT (CITY) + ITI FIXES
   ========================================== */
@media (max-width: 768px) {
    .top-bar {
        padding: 15px 20px;
    }

    .top-logo {
        max-width: 120px;
    }

    .btn-header {
        padding: 10px 15px;
        font-size: 12px;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .stat-item h3 {
        font-size: 80px;
    }

    .intro-text h2 {
        font-size: 38px;
    }

    .logo-img {
        max-width: 100%;
    }

    /* Fix WHATSAPP OVERFLOW - Center it perfectly */
    .iti-mobile .iti--container {
        inset: 0 !important;
        /* Reset position */
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .iti-mobile .iti__country-list {
        max-width: 100% !important;
        max-height: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
    }

/* CUSTOM CITY SELECT MOBILE */
    .input-group select#select-ciudades {
        /* Se oculta con opacidad para no romper la validación "required" de HTML5 */
        position: absolute !important;
        opacity: 0 !important;
        width: 100% !important;
        height: 100% !important;
        top: 0;
        left: 0;
        pointer-events: none; /* Evita que reciba clics, el clic lo recibe el trigger falso */
        z-index: -1;
    }

    .mobile-select-trigger {
        display: block;
    }

    .mobile-select-trigger.selected {
        color: var(--text-light);
    }

    /* Modal Styling replicating ITI Mobile look */
    .city-modal-full {
        position: fixed;
        inset: 0;
        z-index: 10000;
        background-color: var(--bg-dark);
        display: flex;
        flex-direction: column;
    }

    .city-list-custom {
        height: 100%;
        display: flex;
        flex-direction: column;
        border-radius: 0 !important;
        border: none !important;
    }

    .city-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        color: var(--accent-yellow);
        font-weight: 800;
        font-size: 18px;
    }

    .city-modal-close {
        background: none;
        border: none;
        color: var(--text-light);
        font-size: 30px;
        font-weight: 400;
        cursor: pointer;
        padding: 0;
        line-height: 1;
    }

    .city-list-scroll {
        flex: 1;
        overflow-y: auto;
        padding-top: 10px;
    }

    .city-optgroup {
        color: var(--accent-yellow);
        font-weight: 800;
        font-size: 14px;
        padding: 15px 20px 5px 20px;
        text-transform: uppercase;
    }

    .city-option {
        color: var(--text-light);
        font-size: 16px;
        padding: 12px 20px;
        cursor: pointer;
        transition: background 0.2s;
    }

    .city-option:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}



/* ===== MODAL GLOBAL ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Estado visible */
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  max-width: 520px;
  width: 92%;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease;
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Animación al abrir */
.modal-overlay.open .modal-dialog {
  transform: translateY(0) scale(1);
}

/* Botón X */
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 2px 6px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  color: #000;
  transform: scale(1.1);
}

.modal-header {
  padding: 18px 22px 10px;
  border-bottom: 3px solid #009ADB; /* --e-global-color-secondary */
  background: #CCEBF8; /* --e-global-color-accent */
}

.modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  color: #052861; /* --e-global-color-primary */
  letter-spacing: 0.06em;
}

.modal-body {
  padding: 18px 22px 14px;
  font-size: 16px;
  line-height: 1.6;
  color: #222;
}

.modal-body p {
  margin: 0 0 10px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-footer {
  padding: 14px 22px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f4f6fb;
}

/* Botón principal del modal */
.modal-btn {
  min-width: 120px;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #052861; /* primary */
  color: #ffffff;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.modal-btn:hover {
  background: #009ADB; /* secondary */
  box-shadow: 0 0 0 2px #CCEBF8;
}

.modal-btn:active {
  transform: translateY(1px);
}

/* Variante extra si quieres estilos por tipo (success, error, info) */
.modal-dialog.modal-success .modal-header {
  border-bottom-color: #2e7d32;
  background: #e8f5e9;
}

.modal-dialog.modal-error .modal-header {
  border-bottom-color: #c62828;
  background: #ffebee;
}

.modal-dialog.modal-info .modal-header {
  border-bottom-color: #009ADB;
  background: #CCEBF8;
}

/* Responsive pequeño */
@media (max-width: 480px) {
  .modal-dialog {
    max-width: 94%;
    border-radius: 8px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal-title {
    font-size: 18px;
  }
}

.pm-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center; justify-content: center;
  padding: 18px;
  z-index: 999999;
}

.pm-backdrop.is-open{ display:flex; }

.pm-modal{
  width: min(520px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  position: relative;
  overflow: hidden;
  transform: translateY(8px);
  animation: pmIn .18s ease-out forwards;
}

@keyframes pmIn{
  to { transform: translateY(0); }
}

.pm-close{
  position:absolute; top:10px; right:12px;
  width: 38px; height: 38px;
  border:0; border-radius: 12px;
  background: rgba(0,0,0,.06);
  cursor:pointer;
  font-size: 22px; line-height: 38px;
}

.pm-content{ padding: 22px 22px 18px; }

.pm-badge{
  width: 46px; height: 46px;
  border-radius: 14px;
  background: rgba(255, 195, 0, .22);
  display:flex; align-items:center; justify-content:center;
  font-size: 22px;
  margin-bottom: 10px;
}

.pm-title{
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.2px;
}

.pm-text{
  margin: 0 0 16px;
  color: #333;
  font-size: 14.5px;
  line-height: 1.35rem;
}

.pm-actions{
  display:flex;
  gap: 10px;
  margin-top: 6px;
}

.pm-btn{
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  flex: 1;
}

.pm-btn-primary{
  background: #111;
  color: #fff;
}

.pm-btn-ghost{
  background: rgba(0,0,0,.06);
  color: #111;
}

.pm-footnote{
  margin: 12px 0 0;
  color: #777;
  font-size: 12.5px;
}
