:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #10b981;
    --accent: #f59e0b;
    --background: #f8fafc;
    --text: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius: 16px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Outfit', sans-serif;
    font-display: swap;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 500px;
}

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

.grid {
    display: grid;
    gap: 3rem;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.rate-badge {
    background: linear-gradient(135deg, var(--secondary), #059669);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.badge-text {
    font-size: 0.8rem;
    font-weight: 300;
}

.badge-value {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

/* Sections */
section {
    padding: 5rem 0;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero & Calculator */
.hero-calculator .grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
}

.calculator-card {
    width: 100%;
}

.calculator-flex {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.calc-inputs {
    flex: 1;
}

.calc-chart-container {
    flex: 1;
    max-width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.features {
    list-style: none;
}

.features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.features i {
    color: var(--secondary);
}

/* Card Style */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.calculator-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.calc-group {
    margin-bottom: 1.5rem;
}

.calc-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.text-hint {
    font-size: 0.8rem;
    color: var(--primary);
    background: #eef2ff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

input[type="range"] {
    width: 100%;
    margin: 1rem 0;
    accent-color: var(--primary);
}

input[type="number"],
input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

.calc-results {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.result-item.highlight {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #cbd5e1;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.value {
    color: var(--text);
    font-weight: 600;
}

/* Apply Section */
.apply-section {
    background: #eff6ff;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.loan-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #e2e8f0;
    border-radius: 4px;
}

.checkbox-container:hover input~.checkmark {
    background-color: #cbd5e1;
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Contact Section */
.contact-section .grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.contact-list {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.contact-item a:hover i {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(79, 70, 229, 0.2);
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

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

.contact-visual {
    position: relative;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.contact-visual:hover .hero-img {
    transform: scale(1.05);
}

.visual-overlay {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: var(--radius);
    color: white;
    text-align: center;
}

.visual-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    overflow: auto;
}

.modal-content {
    position: relative;
    margin: 10% auto;
    width: 90%;
    max-width: 500px;
    padding: 3rem;
    text-align: center;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--text);
}

.modal-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.offer-badge {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.modal-promo-text {
    margin-bottom: 1.5rem;
}

.modal-promo-text p {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.btn-whatsapp,
.contact-box .btn-primary {
    width: 100%;
    max-width: 250px;
    justify-content: center;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.modal-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-info p {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .calculator-flex {
        flex-direction: column;
    }

    .calc-chart-container {
        order: -1;
    }
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    color: var(--text-muted);
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Floating Button */
.floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--secondary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.floating-btn:hover {
    transform: scale(1.05) translateY(-5px);
}

/* Responsive */
@media (max-width: 992px) {
    .section {
        padding: 3rem 0;
    }

    h1 {
        font-size: 2.2rem;
    }

    /* Tablet Header Adjustment */
    header .container {
        padding: 0.5rem 1.5rem;
    }

    .rate-badge {
        transform: scale(0.9);
        white-space: nowrap;
    }

    .hero-calculator .grid,
    .contact-section .grid {
        grid-template-columns: 1fr;
        padding-bottom: 4rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content p {
        margin: 0 auto 2rem;
    }

    .features {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        max-width: 280px;
        margin: 0 auto 2rem;
        gap: 0.75rem;
    }

    .features li {
        justify-content: flex-start;
        text-align: left;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        padding: 0.5rem 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .rate-badge {
        display: none;
    }

    .contact-cta {
        width: auto;
        text-align: right;
    }

    .contact-cta .btn-outline {
        display: inline-block;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        width: auto;
    }

    section {
        padding: 3rem 0;
    }

    h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .features li {
        justify-content: center;
        font-size: 0.9rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .hero-calculator {
        padding-top: 1rem;
    }

    .floating-btn span {
        display: none;
    }

    .floating-btn {
        padding: 1rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
        margin: 20% auto;
    }
}