/* =========================================
   GENERAL RESET & BASE STYLES
   ========================================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    line-height: 1.7; 
    color: #2c3e50; 
    background-color: #ffffff; 
}

.container { 
    max-width: 900px; 
    margin: auto; 
    padding: 0 30px; 
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header { 
    background: #ffffff; 
    border-bottom: 1px solid #eaeaea; 
    padding: 15px 0; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}

header .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo { 
    font-size: 1.3rem; 
    font-weight: 700; 
    color: #111; 
    letter-spacing: -0.5px; 
}

.lang-selector { 
    padding: 6px 12px; 
    border-radius: 6px; 
    border: 1px solid #ddd; 
    background: #f9f9f9;
    font-size: 0.9rem;
    cursor: pointer;
}

/* =========================================
   HERO SECTION (CALCULATOR)
   ========================================= */
.hero { 
    background: #fafafa; 
    padding: 60px 0; 
    text-align: center; 
    border-bottom: 1px solid #eee; 
}

h1 { 
    font-size: 2.2rem; 
    font-weight: 800; 
    color: #111; 
    margin-bottom: 30px; 
}

#calculator-container { 
    width: 100%; 
    max-width: 800px; 
    height: 450px; 
    margin: 0 auto;
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

/* =========================================
   CONTENT SECTIONS & GRID
   ========================================= */
main { padding: 60px 0; }

section { margin-bottom: 50px; }

h2, h3 { 
    color: #111; 
    margin-bottom: 20px; 
    font-weight: 700; 
}

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px; 
    margin: 30px 0; 
}

.card { 
    background: #fff; 
    padding: 25px; 
    border-radius: 10px; 
    border: 1px solid #efefef;
    transition: transform 0.2s ease;
}

.card:hover { 
    transform: translateY(-3px); 
    border-color: #ddd; 
}

/* Typography */
p { margin-bottom: 15px; color: #555; }
ul { margin-left: 20px; color: #555; margin-bottom: 20px; }
li { margin-bottom: 8px; }

/* =========================================
   BACK TO TOP BUTTON
   ========================================= */
.back-to-top { 
    text-align: center; 
    margin: 60px 0; 
}

.back-to-top a { 
    text-decoration: none; 
    color: #007aff; 
    font-weight: 600;
    padding: 12px 25px;
    border: 1px solid #007aff;
    border-radius: 30px;
    transition: all 0.2s;
}

.back-to-top a:hover { 
    background: #007aff; 
    color: #fff; 
}

/* =========================================
   MODERN CLEAN FOOTER (FIXED ALIGNMENT)
   ========================================= */
.site-footer {
    background: #ffffff;
    padding: 60px 0 30px;
    border-top: 1px solid #eee;
    color: #666;
}

.footer-grid {
    display: flex;
    justify-content: space-between; /* Push columns to far left and far right */
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 30px;
}

.footer-col {
    flex: 1;
    max-width: 450px;
}

/* Legal Column Right Alignment */
.footer-col:last-child {
    text-align: right; 
}

.footer-col h4 {
    color: #111;
    font-size: 0.95rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* =========================================
   RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 768px) {
    #calculator-container {
        height: 350px;
    }
    
    h1 { font-size: 1.8rem; }

    .footer-grid {
        flex-direction: column; /* Stack vertically on mobile */
        gap: 30px;
    }

    .footer-col:last-child {
        text-align: left; /* Align to left on small screens */
    }
}

@media (max-width: 480px) {
    .container { padding: 0 20px; }
    #calculator-container { height: 300px; }
}