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

html{
    scroll-behavior:smooth;
}

/* =========================
   THEME VARIABLES
========================= */
:root {
    --bg: #f8fafc;
    --text: #1e293b;
    --card: #ffffff;
    --primary: #2563eb;
    --secondary-bg: #eef4ff;
}

/* Dark mode */
body.dark-mode {
    --bg: #0f172a;
    --text: #f1f5f9;
    --card: #1e293b;
    --primary: #60a5fa;
    --secondary-bg: #1e293b;
}

/* =========================
   BODY
========================= */
body{
    font-family:'Poppins',sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height:1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* =========================
   NAVBAR
========================= */
.navbar{
    background: var(--card);
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 8%;
    box-shadow:0 2px 15px rgba(0,0,0,0.08);
    position:sticky;
    top:0;
    z-index:1000;
}

.logo{
    font-size:1.6rem;
    font-weight:700;
    color: var(--primary);
}
.nav-right{
    display:flex;
    align-items:center;
    gap:35px;
}

.nav-links{
    display:flex;
    align-items:center;
    list-style:none;
    gap:25px;
}

.nav-links a{
    text-decoration:none;
    color: var(--text);
    font-weight:500;
    transition:0.3s;
}

.nav-links a:hover{
    color: var(--primary);
}
/* SIP Chart */
.chart-container{
    max-width:400px;
    height:400px;
    margin:40px auto 0;
}

.chart-container canvas{
    width:100% !important;
    height:100% !important;
}

/* =========================
   HERO
========================= */
.hero{
    min-height:85vh;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:40px 8%;
    background:linear-gradient(135deg,#2563eb,#1e40af);
    color:white;
}

.hero-content{
    max-width:850px;
}

.hero h1{
    font-size:3.5rem;
    margin-bottom:20px;
}

.hero p{
    font-size:1.15rem;
    margin-bottom:35px;
}

.hero-buttons{
    display:flex;
    gap:15px;
    justify-content:center;
    flex-wrap:wrap;
}

.btn{
    display:inline-block;
    text-decoration:none;
    background:white;
    color:#2563eb;
    padding:14px 28px;
    border-radius:10px;
    font-weight:600;
    transition:0.3s;
}

.btn:hover{
    transform:translateY(-4px);
}

.btn-outline{
    background:transparent;
    color:white;
    border:2px solid white;
}

/* =========================
   SECTIONS
========================= */
section{
    padding:80px 8%;
}

/* =========================
   CALCULATORS
========================= */
.calculators h2{
    text-align:center;
    margin-bottom:40px;
    font-size:2rem;
}

.calculator-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:25px;
}

.calculator-card{
    text-decoration:none;
    color:inherit;
    background: var(--card);
    padding:30px;
    border-radius:18px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
    transition:0.3s;
}

.calculator-card:hover{
    transform:translateY(-8px);
}

.calculator-card h3{
    color: var(--primary);
    margin-bottom:10px;
}

/* =========================
   FEATURES
========================= */
.features{
    background: var(--secondary-bg);
}

.features h2{
    text-align:center;
    margin-bottom:40px;
}

.feature-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:25px;
}

.feature-card{
    background: var(--card);
    padding:30px;
    border-radius:18px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
}

/* =========================
   BLOG
========================= */
.blog-section{
    padding:80px 8%;
    background: var(--bg);
}

.blog-section h2{
    text-align:center;
    margin-bottom:40px;
    font-size:2rem;
}

.blog-grid{
    display:grid;
    gap:25px;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
}

.blog-card{
    display:block;
    text-decoration:none;
    color:inherit;
    background: var(--card);
    border-radius:18px;
    padding:30px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
    transition:transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover{
    transform:translateY(-6px);
    box-shadow:0 10px 30px rgba(0,0,0,0.12);
}

.blog-card h3{
    margin-bottom:15px;
    color: var(--primary);
}

.blog-card p{
    line-height:1.7;
}

/* =========================
   BLOG ARTICLE PAGE
========================= */

.blog-container{
    max-width:900px;
    margin:60px auto;
    padding:0 20px;
}

.blog-content{
    background:var(--card);
    padding:40px;
    border-radius:20px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
}

.blog-content h1{
    color:var(--primary);
    margin-bottom:20px;
    font-size:2.5rem;
}

.blog-content h2{
    margin-top:30px;
    margin-bottom:15px;
    color:var(--primary);
}

.blog-content p{
    margin-bottom:15px;
    line-height:1.8;
}

.blog-content ul{
    margin-left:25px;
    margin-bottom:20px;
}

.blog-content li{
    margin-bottom:10px;
}

.back-btn{
    display:inline-block;
    margin-bottom:20px;
    text-decoration:none;
    color:var(--primary);
    font-weight:600;
}

.back-btn:hover{
    text-decoration:underline;
}

/* =========================
   FAQ
========================= */
.faq{
    background: var(--secondary-bg);
}

.faq h2{
    text-align:center;
    margin-bottom:40px;
}

.faq-item{
    background: var(--card);
    margin-bottom:20px;
    padding:25px;
    border-radius:15px;
    box-shadow:0 5px 15px rgba(0,0,0,0.05);
}

/* =========================
   CALCULATOR PAGE
========================= */
.calculator-container{
    max-width:1000px;
    margin:60px auto;
    padding:0 20px;
}

.calculator-box{
    background: var(--card);
    padding:35px;
    border-radius:20px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
}

.calculator-box h1{
    text-align:center;
    margin-bottom:25px;
    color: var(--primary);
}

.input-group{
    margin-bottom:20px;
}

.input-group label{
    display:block;
    margin-bottom:8px;
    font-weight:500;
}

.input-group input{
    width:100%;
    padding:14px;
    border:1px solid #cbd5e1;
    border-radius:10px;
    font-size:1rem;
}

.calculate-btn{
    width:100%;
    padding:15px;
    border:none;
    border-radius:10px;
    background: var(--primary);
    color:white;
    font-size:1rem;
    cursor:pointer;
    font-weight:600;
    transition:0.3s;
}

.calculate-btn:hover{
    opacity:0.9;
}

.results{
    margin-top:30px;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
}

.result-card{
    background: var(--card);
    padding:20px;
    border-radius:15px;
    text-align:center;
    border:1px solid #e2e8f0;
}

.result-value{
    font-size:1.3rem;
    font-weight:700;
}

/* =========================
   FOOTER
========================= */
footer{
    background:#0f172a;
    color:white;
    text-align:center;
    padding:30px;
}

.footer-links a{
    color:white;
    text-decoration:none;
    margin:0 10px;
}

/* =========================
   MOBILE
========================= */
@media(max-width:768px){

    .navbar{
        flex-direction:column;
        gap:15px;
    }
    .nav-right{
        flex-direction:column;
        gap:15px;
    }

    .theme-switch{
        margin-left:0;
    }

    .nav-links{
        flex-wrap:wrap;
        justify-content:center;
    }

    .hero h1{
        font-size:2.2rem;
    }

    .hero p{
        font-size:1rem;
    }

    section{
        padding:60px 5%;
    }

    .calculator-box{
        padding:25px;
    }
}

/* =========================
   🌗 TOGGLE SWITCH (PRO)
========================= */
.theme-switch{
    position:relative;
    display:inline-block;
    width:60px;
    height:30px;
    margin-left:10px;
    flex-shrink:0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0f0c0c;
    border: 2px solid rgb(246, 1, 75);
    border-radius: 50px;
    transition: 0.4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

/* knob */
.theme-slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.4s;
}

.icon {
    font-size: 14px;
}

/* ON state */
.theme-switch input:checked + .theme-slider {
    background: var(--primary);
}

.theme-switch input:checked + .theme-slider::before {
    transform: translateX(30px);
}