/* ============================================
   Variables y Reset
   ============================================ */
:root {
    --primary-color: #4A90E2;
    --primary-dark: #357ABD;
    --secondary-color: #50C878;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E1E8ED;
    --error-color: #E74C3C;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-img {
    max-height: 50px;
    max-width: 200px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Legacy logo text styles (mantener por compatibilidad) */
.logo-text {
    display: inline-block;
}

.logo-drop {
    color: var(--primary-color);
    font-size: 28px;
    display: inline-block;
    transform: rotate(-15deg);
    margin: 0 2px;
}

.btn-login {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.login-prompt {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-prompt a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.arrow-up {
    font-size: 16px;
    color: var(--primary-color);
}

/* ============================================
   Promotional Image
   ============================================ */
.promo-image {
    width: 100%;
    margin-bottom: 40px;
    overflow: hidden;
}

.promo-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ============================================
   Loan Form Section
   ============================================ */
.loan-form-section {
    padding: 40px 0 60px;
    position: relative;
    z-index: 10;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.loan-form-section .section-title {
    font-size: 42px;
    color: #222;
}

/* ============================================
   Hero Title with Countdown
   ============================================ */
.hero-title-container {
    text-align: center;
    margin-bottom: 40px;
}

.hero-title {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    color: #2C3E50;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    padding: 15px 30px;
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(74, 144, 226, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.countdown-display {
    display: flex;
    align-items: center;
    gap: 4px;
}

.countdown-number {
    font-size: clamp(36px, 8vw, 56px);
    font-weight: 800;
    color: white;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    min-width: 1.2ch;
    text-align: center;
    line-height: 1;
}

.countdown-separator {
    font-size: clamp(32px, 7vw, 48px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    animation: blink 1s ease-in-out infinite;
    line-height: 1;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.countdown-label {
    font-size: clamp(16px, 3vw, 22px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Efecto de pulso sutil */
.countdown-timer {
    animation: countdownPulse 2s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 10px 40px rgba(74, 144, 226, 0.35),
            0 0 0 1px rgba(255, 255, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 
            0 15px 50px rgba(74, 144, 226, 0.45),
            0 0 0 1px rgba(255, 255, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

@media (max-width: 480px) {
    .countdown-timer {
        flex-direction: column;
        gap: 5px;
        padding: 12px 24px;
    }
    
    .countdown-label {
        font-size: 14px;
    }
}

.loan-form {
    max-width: 600px;
    margin: 0 auto 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.loan-form:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.form-group {
    margin-bottom: 32px;
}

.form-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.form-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

/* ============================================
   Sliders
   ============================================ */
.slider-container {
    position: relative;
    padding: 20px 0;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.4);
    transition: var(--transition);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.6);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.4);
    transition: var(--transition);
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.6);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
}

/* ============================================
   Submit Button
   ============================================ */
.btn-submit {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 32px;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   Loan Summary
   ============================================ */
.loan-summary {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-total {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid var(--primary-color);
}

.summary-label {
    font-size: 14px;
    color: var(--text-light);
}

.summary-total .summary-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

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

.summary-total .summary-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ============================================
   Footer
   ============================================ */
/* Legal Notice Section */
.legal-notice-section {
    background: #fff3cd;
    border-top: 3px solid #ffc107;
    padding: 30px 0;
    margin-top: 60px;
}

.legal-notice-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.legal-notice-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #856404;
    margin-bottom: 16px;
}

.legal-notice-content p {
    font-size: 14px;
    color: #856404;
    margin-bottom: 12px;
    line-height: 1.6;
}

.legal-links {
    margin-top: 20px;
}

.legal-links a {
    color: #856404;
    text-decoration: underline;
    font-weight: 600;
    margin: 0 8px;
}

.legal-links a:hover {
    color: #664d03;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #999;
    font-size: 14px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .logo-img {
        max-height: 35px;
        max-width: 150px;
    }
    
    .logo {
        flex-shrink: 0;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-nav {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .btn-login {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .loan-form {
        padding: 24px;
    }

    .section-title {
        font-size: 24px;
    }

    .form-value {
        font-size: 16px;
    }
}

/* ============================================
   Loading States
   ============================================ */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   Error Messages
   ============================================ */
.error-message {
    background: #FEE;
    color: var(--error-color);
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

/* ============================================
   Modal - Forgot Password
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
    padding: 32px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-dark);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Code Input */
.code-input-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.code-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.code-digit:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.code-digit:not(:placeholder-shown) {
    border-color: var(--primary-color);
    background: rgba(74, 144, 226, 0.05);
}

/* Attempts Info */
.attempts-info {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    margin: 16px 0;
}

/* Resend Info */
.resend-info {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

.resend-info span {
    color: var(--text-light);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.btn-link:hover {
    color: var(--primary-dark);
}

/* Forgot Password Link */
.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive Modal */
@media (max-width: 576px) {
    .modal-container {
        padding: 24px;
        margin: 0 16px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .code-input-container {
        gap: 8px;
    }
    
    .code-digit {
        width: 42px;
        height: 52px;
        font-size: 20px;
    }
}

