:root {
    --primary-color: #1e4d8c;
    --secondary-color: #64b5f6;
    --accent-color: #ffb74d;
    --dark-color: #263238;
    --light-color: #f5f9ff;
    --success-color: #81c784;
    --error-color: #e57373;
    --text-color: #455a64;
    --light-text: #78909c;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

header {
    background: linear-gradient(135deg, var(--primary-color), #0d2e59);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--white);
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadeInDown 0.5s ease-out;
}

.logo span {
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    overflow-x: hidden;
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 3rem auto;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .card {
        padding: 1.2rem;
        border-radius: 8px;
        margin: 0;
        width: 100%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-title {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1.8rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 1rem;
    position: relative;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40%;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.card:hover .card-title::after {
    width: 60%;
}

.form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

.calculator-desc {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(245,249,255,0.9));
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    margin: 1.5rem 0;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 480px) {
    .calculator-desc {
        padding: 1rem;
        font-size: 0.95rem;
        line-height: 1.6;
        margin: 1rem 0;
        gap: 0.8rem;
    }
}

.calculator-desc:before {
    content: "💡";
    font-size: 1.5rem;
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    body {
        overflow-x: hidden;
    }
}

.calculator-desc:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    background: linear-gradient(135deg, rgba(255,255,255,1), rgba(245,249,255,1));
}

label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

input[type="number"], 
input[type="text"],
select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

input[type="number"]:hover, 
input[type="text"]:hover,
select:hover {
    border-color: var(--secondary-color);
}

input[type="number"]:focus, 
input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 77, 140, 0.1);
    background-color: var(--white);
}

.slider-container {
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider::-webkit-slider-thumb:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.row {
    display: flex;
    justify-content: space-between;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: var(--light-text);
}

.btn {
    background: linear-gradient(135deg, var(--primary-color), #15396b);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: translateY(0);
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #4fa3e8);
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

@media (max-width: 480px) {
    .result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.8rem;
    }
    
    .result-row .result-value {
        align-self: flex-end;
        width: 100%;
        text-align: right;
    }
}

.result-row:hover {
    background-color: #f5f5f5;
    transform: translateX(5px);
}

.result-label {
    font-weight: 500;
    color: var(--text-color);
}

.result-value {
    font-weight: 700;
    color: var(--primary-color);
}

.highlighted {
    font-size: 1.3rem;
    color: var(--dark-color);
    background: linear-gradient(135deg, rgba(255,183,77,0.15), rgba(255,183,77,0.05));
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(255,183,77,0.1);
}

@media (max-width: 480px) {
    .highlighted {
        font-size: 1.1rem;
        padding: 0.8rem;
    }
}

.chart-container {
    margin-top: 2rem;
    position: relative;
    height: 300px;
    padding: 1rem;
    border-radius: 8px;
    background-color: #fafafa;
}

@media (max-width: 480px) {
    .chart-container {
        height: 250px;
        padding: 0.8rem;
        margin-top: 1.5rem;
    }
}

.payment-schedule {
    margin-top: 2rem;
    overflow-x: auto;
    border-radius: 8px;
    background-color: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eceff1;
}

th {
    background-color: #f5f5f5;
    color: var(--primary-color);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr {
    transition: background-color 0.3s ease;
}

tr:hover {
    background-color: #f9f9f9;
}

.section {
    padding: 5rem 0;
    position: relative;
}

.section:nth-child(even) {
    background-color: #f5f5f5;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    margin: 1rem auto 0;
    border-radius: 2px;
}

.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-title {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.feature-desc {
    color: var(--light-text);
    font-size: 1rem;
    line-height: 1.6;
}

.how-to-steps {
    counter-reset: step-counter;
    margin-top: 3rem;
    position: relative;
}

.step {
    display: flex;
    margin-bottom: 2.5rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInStep 0.5s ease-out forwards;
    align-items: flex-start;
}

@keyframes fadeInStep {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 25px;
    top: 60px;
    bottom: -30px;
    width: 2px;
    background: linear-gradient(var(--secondary-color), transparent);
}

.step-number {
    flex: 0 0 50px;
    width: 50px;
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), #4fa3e8);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 2rem;
    box-shadow: 0 4px 10px rgba(100,181,246,0.3);
    position: relative;
}

.step-content {
    flex: 1;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.step-content:hover {
    transform: translateX(10px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
}

.step-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.step-desc {
    color: var(--text-color);
    line-height: 1.6;
}

.faq {
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-item {
    background-color: var(--white);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
}

.faq-question {
    font-size: 1.1rem;
    color: var(--dark-color);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-question.active {
    background-color: #f8f9fa;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.faq-question.active::after {
    content: "-";
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--light-text);
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.faq-answer.show {
    display: block;
}

.faq-answer p, .faq-answer ul, .faq-answer ol {
    margin-bottom: 1rem;
}

.faq-answer ul, .faq-answer ol {
    padding-left: 1.5rem;
}

footer {
    background: linear-gradient(135deg, var(--dark-color), #1a242f);
    color: var(--white);
    padding: 4rem 0 2rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
}

.footer-column h3 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    position: relative;
    display: inline-block;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #b0bec5;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(5px);
}

.currency-selector {
    margin-top: 1.5rem;
    padding: 0.5rem 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.currency-selector:hover {
    opacity: 1;
}

.currency-selector label {
    color: var(--white);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.currency-selector select {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.currency-selector select:hover {
    border-color: rgba(255,255,255,0.4);
}

.currency-selector select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.currency-selector select option {
    background-color: var(--dark-color);
    color: var(--white);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    color: #78909c;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.social-links {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.8;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.social-links i {
    font-size: 1.2rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--primary-color), #15396b);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    margin-left: 8px;
}

.tooltip .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tooltip:hover .icon {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    border-radius: 8px;
    padding: 1rem;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: var(--dark-color) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .form-group {
        margin-bottom: 1.2rem;
    }

    input[type="number"], 
    input[type="text"],
    select {
        padding: 0.8rem;
        font-size: 16px; /* Prevents iOS zoom on focus */
        height: 45px; /* Better touch target */
    }

    .slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    .slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }

    .btn-group {
        gap: 0.8rem;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        padding: 0.8rem;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tooltip .tooltip-text {
        width: 200px;
        font-size: 0.85rem;
        padding: 0.8rem;
    }
}

@media (max-width: 767px) {
    .main-content {
        margin: 1.5rem auto;
        gap: 1.25rem;
        padding: 0;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .card {
        padding: 1.5rem 1.25rem;
        min-width: 0;
    }
    
    .card-title {
        font-size: 1.4rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .step-number {
        margin: 0 auto 1rem;
        flex-shrink: 0;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .btn,
    .back-to-top,
    .social-links {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .chart-container {
        break-inside: avoid;
    }
    
    table {
        break-inside: auto;
    }
    
    tr {
        break-inside: avoid;
        break-after: auto;
    }
}

/* Ad Container Styles */
.ad-container {
    margin: 2rem auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-banner-728 { 
    width: 728px;
    height: 90px;
}

.ad-banner-300 { 
    width: 300px;
    height: 250px;
}

.ad-banner-320 { 
    width: 320px;
    height: 50px;
    display: none;
}

.ad-native { 
    width: 500px;
    max-width: 100%;
}

@media (max-width: 480px) {
    .ad-native {
        width: 100%;
        padding: 0 1rem;
    }
    
    #container-1510137318aa4c38c27275475ac05385 {
        width: 100% !important;
        max-width: 100% !important;
    }
}

.ad-container > div,
.ad-container > iframe,
#container-1510137318aa4c38c27275475ac05385 {
    margin: 0 auto !important;
    display: block !important;
    text-align: center !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Center iframe itself */
iframe[id^="ad_"] {
    margin: 0 auto !important;
    display: block !important;
}

@media (max-width: 768px) {
    .ad-banner-728 { 
        display: none; 
    }
    .ad-banner-320 { 
        display: block; 
    }
}
