:root {
    --primary: #3b82f6;
    --accent: #1e3a8a;
    --silver: #475569;
    --text: #0f172a;
    --text-light: #f8fafc;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(15, 23, 42, 0.1);
    --bg-dark: #f8fafc;
    --bg-accent: #f1f5f9;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --primary-glow: #2563eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f0f7ff;
    /* White with a hint of blue */
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-left: 70px;
    /* Space for sticky sidebar */
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    padding: 1rem 0;
}

nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text);
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo span.mfd-subtitle {
    color: #3B82F6;
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-top: 4px;
    font-weight: 400;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    background-size: 200% auto;
    color: white !important;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text) !important;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    backdrop-filter: blur(5px);
    text-decoration: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(30, 58, 138, 0.2) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.15;
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    padding-right: 4rem;
    /* Buffer for the Nivesh AI button */
    max-width: 800px;
}

/* SWP Detailed Table */
.swp-table-container {
    margin-top: 1.5rem;
    text-align: center;
}

.btn-text {
    background: none;
    border: none;
    color: #60A5FA;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    transition: var(--transition);
}

.btn-text:hover {
    color: white;
}

.detailed-table-wrapper {
    margin-top: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.mfd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.mfd-table th,
.mfd-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.mfd-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
}

.mfd-table tr:last-child td {
    border-bottom: none;
}

/* Footer Social Links */
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: #3B82F6;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

/* Fix for background-clip lint warning */
.hero h1 span {
    background: linear-gradient(to right, #60A5FA, #A5B4FC);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.mfd-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* About Section */
.about {
    padding: 100px 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item h3 {
    font-size: 2.2rem;
    color: #60A5FA;
}

.stat-item p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-frame {
    height: 500px;
    background: linear-gradient(45deg, rgba(30, 58, 138, 0.1), rgba(1, 22, 39, 1));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.glass-card {
    position: absolute;
    bottom: 30px;
    right: -20px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    max-width: 300px;
}

/* Services */
.services {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.02);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.service-card,
.glass-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.glass-card:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.stat-box {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.btn-primary.large {
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
    border-radius: 50px;
}

/* Footer */
footer {
    padding: 60px 0 30px;
    background: #0f172a;
    border-top: 1px solid #1e293b;
    color: #f8fafc;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-disclaimer {
    max-width: 400px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

/* Responsive */
@media (max-width: 968px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }
}

/* Wealth Calculators */
.calculators {
    padding: 100px 0;
    background: radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.1) 0%, transparent 40%);
}

.calc-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--accent);
    color: white;
    border-color: #3B82F6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.glass-card-large {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calc-inputs .input-group {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 0.5rem 1rem;
    align-items: center;
}

.calc-inputs .input-group label {
    grid-column: 1 / 2;
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
}

.calc-inputs .input-group input[type="number"] {
    grid-column: 2 / 3;
    padding: 0.5rem;
    font-size: 1.1rem;
    text-align: right;
    font-weight: 700;
    color: var(--primary);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.calc-inputs .input-group input[type="range"] {
    grid-column: 1 / 3;
    width: 100%;
    margin-top: 0.5rem;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--primary) var(--range-progress, 50%), #e2e8f0 var(--range-progress, 50%));
    height: 4px;
    border-radius: 2px;
}

.calc-inputs .input-group input[type="range"]:focus {
    outline: none;
}

.calc-inputs .input-group input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: transparent;
    border-radius: 2px;
}

.calc-inputs .input-group input[type="range"]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transition: transform 0.1s;
}

.calc-inputs .input-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.calc-inputs .input-group input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: transparent;
    border-radius: 2px;
}

.calc-inputs .input-group input[type="range"]::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transition: transform 0.1s;
}

.calc-inputs .input-group input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.calc-results {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}

.res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.res-value {
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
}

.res-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

.res-item.highlight .res-label {
    color: var(--text);
    font-weight: 600;
}

.res-item.highlight .res-value {
    font-size: 1.8rem;
    color: var(--primary);
}

/* ================================
   PREMIUM CALCULATOR REDESIGN
   ================================ */

.calc-box {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 0;
    min-height: 350px;
    border-radius: 16px;
    overflow: hidden;
}

.calc-panel-left {
    padding: 1.75rem 2rem;
    background: #ffffff;
}

.calc-panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.calc-icon {
    font-size: 1.8rem;
    background: #eff6ff;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.calc-panel-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.1rem 0;
}

.calc-panel-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.input-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.input-group-header label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0;
}

.input-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: #eff6ff;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Results Panel - gradient right side */
.calc-results-panel {
    background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 100%);
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.results-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.results-total-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.results-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.results-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
    margin-top: auto;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.breakdown-value {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.breakdown-value.gain {
    color: #6ee7b7;
}

.btn-text-light {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.btn-text-light:hover {
    color: #ffffff;
}

/* ================================
   FLOATING CONSULT NIVESH AI BUTTON
   ================================ */
.float-consult {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.float-consult-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 16px 0 0 16px;
    padding: 1rem 0.9rem;
    text-decoration: none;
    gap: 0.5rem;
    box-shadow: -4px 0 20px rgba(16, 185, 129, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    width: 64px;
    animation: float-pulse-green 2.5s infinite;
}

.float-consult-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.6);
}

.float-consult-icon {
    font-size: 1.5rem;
}

.float-consult-text {
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

@keyframes float-pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
        transform: scale(1.03);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        transform: scale(1);
    }
}

/* Floating Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 320px;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(0);
}

.chat-widget.minimized {
    transform: translateY(calc(100% - 60px));
}

.chat-header {
    background: var(--accent);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.chat-status {
    width: 10px;
    height: 10px;
    background: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10B981;
}

.chat-header span {
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-toggle {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.7;
}

.chat-body {
    height: 250px;
    padding: 1.2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 85%;
}

.message.bot {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-footer {
    padding: 0.8rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.5);
}

.input-wrapper {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    outline: none;
}

.input-wrapper button {
    background: var(--primary-glow);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-wrapper button:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.message.user {
    background: var(--primary-glow);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

/* Typing Animation */
.typing span {
    height: 8px;
    width: 8px;
    background: #a5a5a5;
    display: inline-block;
    border-radius: 50%;
    margin-right: 4px;
    animation: typing 1s infinite;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.chat-link-btn {
    display: block;
    text-align: center;
    background: #3B82F6;
    color: white;
    text-decoration: none;
    padding: 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.chat-link-btn:hover {
    background: #2563EB;
}

@media (max-width: 768px) {
    .calc-box {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .glass-card-large {
        padding: 1.5rem;
    }

    .chat-widget {
        width: 280px;
        right: 15px;
        bottom: 15px;
    }
}

/* Sticky Social Sidebar */
.sticky-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 2000;
}

.sidebar-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.3rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sidebar-item:hover {
    transform: scale(1.1) translateX(5px);
    color: white;
}

.sidebar-item.wa:hover {
    background: #25D366;
    border-color: #25D366;
}

.sidebar-item.tg:hover {
    background: #0088cc;
    border-color: #0088cc;
}

.sidebar-item.in:hover {
    background: #0077b5;
    border-color: #0077b5;
}

.sidebar-item.ig:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: transparent;
}

.sidebar-item.phone:hover {
    background: #34b7f1;
    border-color: #34b7f1;
}

.sidebar-item.mail:hover {
    background: #ea4335;
    border-color: #ea4335;
}

@media (max-width: 768px) {
    .sticky-sidebar {
        left: 10px;
        transform: translateY(-50%) scale(0.8);
    }

    .float-consult {
        right: 10px;
    }

    .float-consult-btn {
        width: 50px;
        padding: 0.7rem 0.5rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .calc-box {
        grid-template-columns: 1fr;
    }

    .calc-results-panel {
        border-radius: 0 0 16px 16px;
        padding: 1.5rem;
    }

    .edu-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ================================
   TAG CHIPS
   ================================ */
.tag-chip {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    border: 1px solid #bfdbfe;
    margin-bottom: 1rem;
}

/* ================================
   SECTION TYPOGRAPHY
   ================================ */
.section-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0.75rem auto 0;
    line-height: 1.7;
}

.section-body {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 760px;
    margin: 1rem auto 0;
    line-height: 1.75;
}

/* ================================
   ADVISOR SECTION
   ================================ */
.advisor-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.advisor-grid {
    align-items: start;
    gap: 4rem;
    margin-bottom: 3rem;
}

.advisor-quote {
    margin: 1.5rem 0;
    padding: 1.2rem 1.5rem;
    border-left: 4px solid var(--primary);
    background: #eff6ff;
    border-radius: 0 12px 12px 0;
    font-size: 1rem;
    font-style: italic;
    color: var(--accent);
    font-weight: 600;
    line-height: 1.6;
}

.credentials-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.cred-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
}

.cred-chip i {
    color: var(--primary);
    font-size: 0.75rem;
}

/* ================================
   QUICK CONNECT FORM (ABOUT SECTION)
   ================================ */
.quick-connect-wrapper {
    width: 100%;
    margin-top: 1rem;
    perspective: 1000px;
}

.quick-connect-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

.quick-connect-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #1e3a8a);
}

.qc-header {
    margin-bottom: 2rem;
}

.qc-header h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.qc-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.qc-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.qc-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.qc-icon {
    position: absolute;
    left: 1.25rem;
    color: #94a3b8;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.qc-input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: #f8fafc;
    transition: all 0.3s;
}

.qc-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.qc-input-group input:focus+.qc-icon,
.qc-input-group input:not(:placeholder-shown)+.qc-icon {
    color: var(--primary);
}

.qc-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    border-radius: 12px;
}

.qc-security {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
}

/* ================================
   STATS ROW
   ================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stats-row .stat-box {
    text-align: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stats-row .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-bottom: 0.4rem;
    font-family: 'Inter', sans-serif;
}

.stats-row .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ================================
   6-COLUMN SERVICE GRID
   ================================ */
.service-grid-6 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    text-align: left;
}

.service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.12);
    border-color: #bfdbfe;
}

.service-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.service-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
}

.card-link {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    transition: gap 0.2s;
}

.card-link:hover {
    text-decoration: underline;
}

/* ================================
   CONSULTATION SECTION
   ================================ */
.consultation-section {
    padding: 100px 0;
    background: #f8fafc;
}

.consult-grid {
    align-items: center;
    gap: 4rem;
}

.contact-trust-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.consult-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text);
    background: #f8fafc;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ================================
   CALCULATOR DISCLAIMER
   ================================ */
.calc-disclaimer {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.calc-disclaimer i {
    color: var(--primary);
    margin-right: 0.4rem;
}

/* ================================
   EDUCATION SECTION
   ================================ */
.education-section {
    padding: 100px 0;
    background: #ffffff;
}

.edu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

/* .edu-card removed - replaced by .flip-card structure */


.edu-cta {
    text-align: center;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    border-radius: 20px;
    padding: 3rem 2rem;
    color: white;
}

.edu-cta h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.edu-cta p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}



/* ================================
   FOOTER UPDATES
   ================================ */
.footer-credentials {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0.5rem 0 1rem;
    line-height: 1.6;
}

.footer-nav h4,
.footer-disclaimer h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav ul li a {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav ul li a:hover {
    color: #f8fafc;
}

.footer-disclaimer p {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.7;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 2fr;
    gap: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #1e293b;
}

/* ================================
   SIDEBAR OVERLAP FIX
   ================================ */
body {
    padding-left: 95px;
    padding-right: 80px;
}

.glass-nav .container,
section>.container,
.hero .container,
footer>.container {
    padding-left: 2rem;
}

/* ================================
   EDUCATION FLIP CARDS
   ================================ */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.flip-card {
    height: 200px;
    cursor: pointer;
    perspective: 1000px;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-inner,
.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1.5rem;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.flip-front {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    transition: background 0.2s;
}

.flip-card:hover .flip-front {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.flip-front h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.3;
}

.flip-hint {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: auto;
}

.flip-back {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
}

.flip-back h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

.flip-back p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.65;
}

/* ================================
   EDUCATION CTA BUTTON (visible on dark gradient)
   ================================ */
.edu-cta-btn {
    display: inline-block;
    background: #ffffff;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

.edu-cta-btn:hover {
    background: #dbeafe;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ================================
   SWP TABLE — POLISHED DESIGN
   ================================ */
.detailed-table-wrapper {
    margin-top: 1rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.mfd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.mfd-table thead {
    background: rgba(255, 255, 255, 0.15);
}

.mfd-table thead th {
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.72rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.mfd-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.15s;
}

.mfd-table tbody tr:last-child {
    border-bottom: none;
}

.mfd-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mfd-table tbody td {
    padding: 0.6rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Inter', sans-serif;
}

.btn-text-light {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.btn-text-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ================================
   CALCULATOR TAB ACTIVE STYLING
   ================================ */
.tab-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* ================================
   FAQ SECTION
   ================================ */
.faq-section {
    padding: 6rem 0;
    background: #f8fafc;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 1.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question i {
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 400px;
}

/* ================================
   MOBILE RESPONSIVE UPDATES (Enhanced)
   ================================ */
@media (max-width: 968px) {
    .hero h1 {
        font-size: 2.8rem;
        padding-right: 0;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .service-grid,
    .service-grid-6,
    .calc-box {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        /* Remove the deep padding for mobile so content isn't squashed */
        padding-left: 0;
        padding-right: 0;
    }

    .glass-nav .container,
    section>.container,
    .hero .container,
    footer>.container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Sticky Sidebar adjustment for mobile - moves it to the bottom or hides it */
    .sticky-sidebar {
        flex-direction: row;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        padding: 0.8rem;
        justify-content: space-around;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 3000;
        gap: 0;
    }

    .sidebar-item {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        background: transparent;
        border: none;
        box-shadow: none;
        color: rgba(255, 255, 255, 0.7);
    }

    footer {
        padding-bottom: 80px;
        /* Space for the new bottom mobile nav */
    }

    /* Floating Nivesh AI button adjustment */
    .float-consult {
        top: auto;
        bottom: 80px;
        /* Above the mobile nav */
        right: 10px;
        transform: none;
    }

    .float-consult-btn {
        width: 55px;
        padding: 0.6rem 0.5rem;
        border-radius: 50%;
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    }

    .float-consult-text {
        display: none;
        /* Hide text on mobile to save space */
    }

    /* Grids and Layouts */
    .edu-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .flip-card {
        height: auto;
        min-height: 180px;
    }

    /* Modify flip card behavior for mobile (tap instead of hover) */
    .flip-inner {
        transform: none;
        /* Disable 3D flip on mobile by default */
    }

    /* Make the back visible directly under the front, or stack them */
    .flip-front,
    .flip-back {
        position: relative;
        backface-visibility: visible;
        -webkit-backface-visibility: visible;
        border-radius: 12px;
    }

    .flip-back {
        transform: none;
        /* Remove the 180deg flip */
        margin-top: 1rem;
        display: none;
        /* We would need JS to toggle this, for pure CSS we'll just stack */
    }

    /* Mobile-friendly flip approach: just show front, expand on active */
    .flip-card.active .flip-back {
        display: flex;
    }

    .calc-results-panel {
        border-radius: 0 0 16px 16px;
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-actions a {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .calc-panel-left {
        padding: 1.5rem;
    }

    .calc-inputs .input-group {
        grid-template-columns: 1fr;
    }

    .calc-inputs .input-group input[type="number"] {
        grid-column: 1;
        width: 100px;
        margin-top: 0.5rem;
    }
}