/* ============================================
   Página SingUp - Estilos Específicos
   ============================================ */

/* ========== Fondo con color primary ========== */
.signup-page {
    padding: 0 !important;
    background: linear-gradient(135deg, #043362 0%, #065a9e 50%, #043362 100%) !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.signup-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.signup-page::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    top: -100px;
    right: -100px;
    pointer-events: none;
    z-index: 0;
}

/* ========== Layout Principal (más ancho para 2 columnas) ========== */
.signup-wrap {
    max-width: 680px !important;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* ========== Logo ========== */
.signup-page .simple-page-logo {
    text-align: center;
    margin-bottom: 24px !important;
}

.signup-page .simple-page-logo img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.signup-page .simple-page-logo img:hover {
    transform: scale(1.03);
}

/* ========== Tarjetas de sección ========== */
.signup-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: cardFadeIn 0.5s ease-out both;
}

.signup-card:nth-child(2) { animation-delay: 0.1s; }
.signup-card:nth-child(3) { animation-delay: 0.2s; }
.signup-card:nth-child(4) { animation-delay: 0.3s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.signup-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 48px rgba(0, 0, 0, 0.25);
}

/* ========== Header de tarjeta (sin fondo, texto primary, divider gris) ========== */
.signup-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 22px 28px 18px;
    background: none;
    border-bottom: 1px solid #e8ecf1;
}

.signup-card-header > i {
    font-size: 20px;
    color: #043362;
    width: 24px;
    text-align: center;
    margin-top: 2px;
    flex-shrink: 0;
}

.signup-card-titles {
    flex: 1;
}

.signup-card-header h4 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #043362;
    line-height: 1.3;
}

.signup-card-subtitle {
    margin: 0 !important;
    font-size: 13px !important;
    color: #7a8a9e !important;
    font-weight: 400 !important;
    line-height: 1.4;
}

/* ========== Body de tarjeta ========== */
.signup-card-body {
    padding: 28px;
}

/* ========== Grid de formulario (2 columnas) ========== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.form-grid .col-full {
    grid-column: 1 / -1;
    padding-left: 0;
    padding-right: 0;
}

.form-grid .form-group {
    margin-bottom: 18px;
}

.form-grid .form-group:last-child {
    margin-bottom: 0;
}

/* ========== Labels ========== */
.signup-card-body label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
}

/* ========== Inputs ========== */
.signup-card-body .form-control {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-size: 14px;
    transition: all 0.25s ease;
    background-color: #f8fafc;
    color: #333;
    height: auto !important;
    box-sizing: border-box;
}

.signup-card-body .form-control:focus {
    border-color: #043362;
    box-shadow: 0 0 0 3px rgba(4, 51, 98, 0.1);
    outline: none;
    background-color: #fff;
}

.signup-card-body .form-control::placeholder {
    color: #a0aec0;
}

/* ========== Input con icono ========== */
.input-icon {
    position: relative;
    width: 100%;
}

.input-icon > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    z-index: 2;
    pointer-events: none;
    transition: color 0.25s ease;
}

.input-icon > .form-control {
    padding-left: 40px !important;
}

.input-icon:focus-within > i {
    color: #043362;
}

/* ========== Selects estilizados ========== */
.select-wrapper {
    position: relative;
    width: 100%;
}

/* Icono izquierdo del select */
.select-wrapper .select-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    z-index: 3;
    pointer-events: none;
    transition: color 0.25s ease;
}

.select-wrapper:focus-within .select-icon {
    color: #043362;
}

/* Flecha derecha del select */
.select-wrapper::after {
    content: '\f107';
    font-family: 'FontAwesome';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
    z-index: 3;
}

.select-wrapper select.form-control,
.signup-card-body select.form-control {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-left: 40px !important;
    padding-right: 38px;
    cursor: pointer;
    background-color: #f8fafc;
    background-image: none !important;
    position: relative;
    z-index: 1;
    width: 100% !important;
    line-height: 1.4;
}

.select-wrapper select.form-control:focus,
.signup-card-body select.form-control:focus {
    border-color: #043362;
    box-shadow: 0 0 0 3px rgba(4, 51, 98, 0.1);
    background-color: #fff;
}

.signup-card-body select.form-control option {
    padding: 10px;
    background-color: #fff;
    color: #333;
}

/* ========== Fila de ZIP ========== */
.zip-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.zip-row .form-control {
    flex: 1;
    min-width: 0;
}

.btn-zip-find {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    border-radius: 8px;
    background-color: #f0f7ff;
    color: #043362;
    font-size: 14px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    border: 2px solid #d0e3f7;
}

.btn-zip-find:hover {
    background-color: #043362;
    color: #fff;
    border-color: #043362;
}

/* ========== Validación de contraseña ========== */
.password-validation {
    background-color: #f1f5f9;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 0;
    border: 1px solid #e2e8f0;
}

.pw-validation-title {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: none;
    letter-spacing: normal;
}

.pw-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 14px;
}

.pw-rules p {
    margin: 0;
    font-size: 12px;
    transition: color 0.3s ease;
}

.valid {
    color: #28a745 !important;
}

.valid:before {
    position: relative;
    left: -4px;
    content: "✔";
}

.invalid {
    color: #dc3545 !important;
}

.invalid:before {
    position: relative;
    left: -4px;
    content: "✖";
}

/* ========== Acordeón ========== */
.signup-accordion {
    margin-bottom: 20px;
}

.signup-accordion .signup-card {
    margin-bottom: 12px;
}

.accordion-header {
    padding: 0;
}

.accordion-header .accordion-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    color: #334155;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.accordion-header .accordion-toggle:hover {
    color: #043362;
    text-decoration: none;
    background-color: #f8fafc;
}

.accordion-header .accordion-toggle > i:first-child {
    color: #043362;
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

/* ---- Grupo de título + subtítulo del acordeón ---- */
.accordion-title-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accordion-title {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.accordion-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    line-height: 1.3;
}

.accordion-toggle:hover .accordion-title {
    color: #043362;
}

.accordion-arrow {
    margin-left: auto !important;
    font-size: 12px !important;
    color: #94a3b8;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-toggle[aria-expanded="true"] .accordion-arrow {
    transform: rotate(180deg);
    color: #043362;
}

.accordion-body {
    padding: 20px 24px;
    border-top: 1px solid #e8ecf1;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}

/* ---- Contenido estilizado del acordeón ---- */
.accordion-content-styled p {
    margin-bottom: 12px;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}

.accordion-content-styled p strong {
    color: #1e293b;
    font-weight: 700;
}

.accordion-content-styled ol,
.accordion-content-styled ul {
    padding-left: 20px !important;
    margin: 12px 0 !important;
}

.accordion-content-styled li {
    margin-bottom: 8px;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
    list-style-type: disc !important;
}

.terms-body {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.terms-body::-webkit-scrollbar {
    width: 5px;
}

.terms-body::-webkit-scrollbar-track {
    background: transparent;
}

.terms-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

/* ========== Alertas ========== */
.signup-actions {
    animation: cardFadeIn 0.5s ease-out 0.4s both;
}

.signup-actions .alert {
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    border: none;
}

.signup-actions .alert-danger {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.signup-actions .alert-success {
    background-color: #f0fff4;
    color: #276749;
    border: 1px solid #c6f6d5;
}

/* ========== Botón de registro (BLANCO para contraste) ========== */
.btn-signup {
    width: 100%;
    padding: 15px 24px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    border: 2px solid #fff !important;
    color: #043362 !important;
    letter-spacing: 0.3px;
    text-transform: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-signup:hover {
    background: #f0f7ff !important;
    border-color: #f0f7ff !important;
    color: #032a4d !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.btn-signup:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #e8f0f8 !important;
}

.btn-signup:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4), 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-signup i {
    color: #043362;
}

/* ========== Footer ========== */
.signup-page .simple-page-footer {
    text-align: center;
    margin-top: 24px;
    padding: 0;
}

.signup-page .simple-page-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    font-size: 15px;
}

.signup-page .simple-page-footer a:hover {
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid rgba(255,255,255,0.6);
}

/* ========== Responsive: Móvil (1 columna) ========== */
@media (max-width: 767px) {
    .signup-wrap {
        padding: 24px 14px;
        max-width: 100% !important;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .col-full {
        grid-column: 1;
    }

    .signup-card-header {
        padding: 16px 18px 14px;
    }

    .signup-card-header h4 {
        font-size: 16px;
    }

    .signup-card-subtitle {
        font-size: 12px !important;
    }

    .input-icon > i,
    .select-wrapper .select-icon {
        left: 12px;
        font-size: 13px;
    }

    .input-icon > .form-control,
    .select-wrapper select.form-control {
        padding-left: 36px !important;
    }

    .signup-card-body {
        padding: 18px;
    }

    .signup-card-body .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    .zip-row {
        flex-direction: row;
    }

    .pw-rules {
        grid-template-columns: 1fr;
    }

    .accordion-header .accordion-toggle {
        padding: 14px 16px;
        gap: 10px;
    }

    .accordion-title {
        font-size: 14px;
    }

    .accordion-subtitle {
        font-size: 11px;
    }

    .accordion-header .accordion-toggle > i:first-child {
        font-size: 16px;
        width: 20px;
    }

    .btn-signup {
        padding: 14px !important;
        font-size: 15px !important;
    }

    .signup-page .simple-page-logo img {
        max-height: 80px !important;
    }
}

/* ========== Responsive: Tablet ========== */
@media (min-width: 768px) and (max-width: 991px) {
    .signup-wrap {
        max-width: 640px !important;
    }
}

/* ========== Responsive: Pantallas grandes ========== */
@media (min-width: 1200px) {
    .signup-wrap {
        max-width: 720px !important;
    }

    .signup-card-body {
        padding: 32px;
    }

    .form-grid {
        gap: 0 24px;
    }
}
