/* ===========================
   Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #10b981;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --bg-white: #ffffff;
    --bg-gray: #f8fafc;
    --bg-light: #f1f5f9;
    --border-color: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --orange: #f97316;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    font-size: 16px;
}

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

/* ===========================
   Header
   =========================== */
.header {
    background-color: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-gray);
    display: block;
    margin-top: -5px;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-dark);
    transition: all 0.3s;
}

/* ===========================
   Calculator Section
   =========================== */
.calculator-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 0;
    min-height: calc(100vh - 70px);
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.calculator-form-side {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* ===========================
   Form Styles
   =========================== */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-with-suffix,
.input-with-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-suffix input {
    padding-right: 3rem;
    width: 100%;
}

.input-suffix {
    position: absolute;
    right: 1rem;
    color: var(--text-gray);
    font-weight: 500;
    pointer-events: none;
}

.input-with-prefix {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.input-prefix {
    background-color: var(--bg-light);
    padding: 0.75rem 0.75rem;
    color: var(--text-gray);
    font-weight: 500;
    border-right: 1px solid var(--border-color);
}

.input-with-prefix input {
    border: none;
    flex: 1;
}

.input-with-prefix input:focus {
    box-shadow: none;
}

/* ===========================
   Checkboxes
   =========================== */
.form-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    font-size: 0.875rem;
    color: var(--text-gray);
    line-height: 1.5;
    cursor: pointer;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--orange);
    color: white;
}

.btn-primary:hover {
    background-color: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

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

.btn-large {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    margin-top: 1rem;
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-secondary-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ===========================
   Wizard Steps
   =========================== */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   SMS Verification
   =========================== */
.sms-verification {
    text-align: center;
    padding: 2rem 0;
}

.sms-verification h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.sms-verification p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.sms-code-input {
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    font-weight: 600;
}

.sms-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.sms-timer {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ===========================
   Results
   =========================== */
.results-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.results-info {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.offers-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.offer-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
    background-color: var(--bg-white);
}

.offer-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bank-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.interest-rate {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.monthly-payment {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.monthly-payment strong {
    font-size: 1.25rem;
    color: var(--text-dark);
}

.offer-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.offer-actions .btn {
    flex: 1;
    min-width: 150px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* ===========================
   Benefits Side
   =========================== */
.calculator-benefits-side {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.calculator-benefits-side h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.benefits-highlight {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-gray);
}

.benefits-highlight strong {
    color: var(--primary-color);
}

.benefits-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.icon-check {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    flex-shrink: 0;
}

/* ===========================
   General Sections
   =========================== */
.section {
    padding: 4rem 0;
}

.section-gray {
    background-color: var(--bg-gray);
}

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

.content-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
    color: var(--text-gray);
}

.content-box p {
    margin-bottom: 1rem;
}

/* ===========================
   Articles Grid
   =========================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.article-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.article-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.article-card p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.link-arrow {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

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

/* ===========================
   Contact
   =========================== */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    text-align: center;
}

.contact-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-gray);
}

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

.contact-item a:hover {
    text-decoration: underline;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background-color: var(--text-dark);
    color: var(--bg-white);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ===========================
   Loading Overlay
   =========================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

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

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

.loading-overlay p {
    color: white;
    font-size: 1.125rem;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1024px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
    
    .calculator-benefits-side {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .calculator-section {
        padding: 2rem 0;
    }
    
    .calculator-form-side {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .offer-actions {
        flex-direction: column;
    }
    
    .offer-actions .btn {
        width: 100%;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .calculator-form-side {
        padding: 1rem;
    }
    
    .btn-large {
        font-size: 1rem;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
}
