:root {
    --primary: #2c3e50;
    --secondary: #ff9933; /* Saffronish Orange */
    --accent: #138808;     /* India Green */
    --blue: #004aad;       /* Ashok Chakra Blue */
    --light: #f4f7f6;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --font-main: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: #eef2f5;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
.main-header {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
}

.site-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.lang-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lang-btn {
    border: 1px solid #ddd;
    background: white;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.lang-btn:hover, .lang-btn.active {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
    transform: translateY(-2px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 15px;
}

/* Calculator Section */
.calculator-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-top: 5px solid var(--secondary);
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Loan Tabs */
.loan-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 2rem;
}

.loan-tab {
    padding: 12px;
    border: none;
    background: #f0f0f0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: 0.3s;
}

.loan-tab.active {
    background: linear-gradient(135deg, var(--secondary), #ff7700);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 153, 51, 0.3);
}

/* Grid Layout */
.calculator-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
}

@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    .main-header {
        flex-direction: column;
        gap: 15px;
    }
}

/* Input Styles */
.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}

.highlight {
    color: var(--blue);
    font-weight: 700;
    font-size: 1.1rem;
}

.range-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Results Card */
.results-section {
    display: flex;
    justify-content: center;
}

.result-card {
    background: linear-gradient(135deg, #004aad 0%, #002c6b 100%);
    color: white;
    width: 100%;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.emi-display {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
    position: relative;
}

.breakdown {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    position: relative;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.breakdown-item:last-child {
    text-align: right;
}

.breakdown-item .val {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Content Area */
.content-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tabs-nav {
    display: flex;
    gap: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.nav-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 8px;
}

.nav-btn.active {
    background: #e3f2fd;
    color: var(--blue);
}

.formula-link {
    color: var(--accent);
    text-decoration: none;
    display: inline-block;
}

.tab-content h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.tab-content p {
    color: #555;
    margin-bottom: 1rem;
}

/* Footer with Full Image */
.main-footer {
    position: relative;
    color: white;
    padding: 3rem 1rem;
    margin-top: 3rem;
    text-align: center;
    background-color: #1a1a1a; /* Fallback */
    overflow: hidden;
}

/* Footer Background Image */
.footer-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15; /* Makes text readable */
    z-index: 0;
}

.footer-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}