/* 
   Mudra Finance / Dhaani Finance
   Common Stylesheet (Shared across all pages)
   Theme: Saffron, Green, Blue, White
*/

:root {
    --primary-color: #FF9933;
    /* Saffron - Main Highlights, Primary Buttons */
    --secondary-color: #138808;
    /* Green - Success, Call Actions */
    --accent-color: #000080;
    /* Navy Blue - Headings, Footer, Trust */
    --text-color: #333;
    --light-text: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --font-heading: 'Cabin', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --transition: all 0.3s ease;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--accent-color);
    /* Headings in Blue */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   Layout Utilities
   ========================================= */
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

.section-header {
    margin-bottom: 40px;
}

.section-header.centered {
    text-align: center;
}

.sub-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
    /* Saffron for subtitles */
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.section-header h2 {
    font-size: 28px;
    color: var(--accent-color);
    /* Blue for main titles */
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 16px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    /* Saffron */
    color: var(--white);
}

.btn-primary:hover {
    background-color: #e68a00;
    /* Darker Saffron */
}

.btn-danger {
    background-color: var(--secondary-color);
    /* Green (Using Green for 'Call Now' / Urgent usually works better for finance trust than red) */
    color: var(--white);
}

.btn-danger:hover {
    background-color: #0f6c06;
}

.btn-secondary {
    background-color: var(--accent-color);
    /* Blue */
    color: white;
}

.btn-secondary:hover {
    background-color: #000060;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    font-weight: bold;
}

.blink {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.7;
    }
}

/* =========================================
   Top Bar
   ========================================= */
.top-bar {
    background-color: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    /* Keep items on same line on mobile */
    gap: 10px;
    /* Reduced gap for mobile */
}

.top-info-box {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Reduced gap for mobile */
    flex: 1;
    min-width: auto;
    /* Remove min-width for mobile */
    justify-content: center;
    /* Center content on mobile */
}

/* Icon Styling */
.top-info-box .icon-wrapper {
    width: 35px;
    /* Smaller icon on mobile */
    height: 35px;
    background-color: rgba(46, 90, 52, 0.1);
    /* Light Green Tint */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    /* Prevent icon from shrinking */
}

.top-info-box:hover .icon-wrapper {
    background-color: #2E5A34;
    /* Dark Green on Hover */
}

.top-info-box .icon-wrapper i {
    font-size: 16px;
    /* Smaller icon on mobile */
    color: #2E5A34;
    /* Dark Green Icon */
    transition: all 0.3s ease;
}

.top-info-box:hover .icon-wrapper i {
    color: #ffffff;
}

/* Text Styling */
.top-info-box .text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.top-info-box .label {
    font-size: 10px;
    /* Smaller font for mobile */
    color: #666;
    font-weight: 500;
    text-transform: capitalize;
    white-space: nowrap;
    /* Prevent text wrapping */
}

.top-info-box .value {
    font-size: 11px;
    /* Smaller font for mobile */
    color: #1a1a1a;
    font-weight: 700;
    /* Bold */
    white-space: nowrap;
    /* Prevent text wrapping */
}

.top-info-box .value a {
    color: inherit;
    text-decoration: none;
}

/* Divider */
.top-divider {
    width: 1px;
    height: 30px;
    /* Smaller divider on mobile */
    border-left: 1px dashed #ccc;
    display: block;
    /* Show divider on mobile */
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .top-bar-inner {
        flex-wrap: nowrap;
        gap: 20px;
        /* Larger gap on desktop */
    }

    .top-info-box {
        justify-content: flex-start;
        /* Left align on desktop */
        flex: 0 1 auto;
        gap: 15px;
        /* Larger gap on desktop */
    }

    /* Larger icons on desktop */
    .top-info-box .icon-wrapper {
        width: 45px;
        height: 45px;
    }

    .top-info-box .icon-wrapper i {
        font-size: 20px;
    }

    /* Larger text on desktop */
    .top-info-box .label {
        font-size: 13px;
    }

    .top-info-box .value {
        font-size: 15px;
        font-weight: 800;
    }

    /* Larger divider on desktop */
    .top-divider {
        display: block;
        height: 40px;
    }
}

/* =========================================
   Header & Navigation
   ========================================= */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 40px;
    /* Smaller on mobile to balance with title */
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 16px;
    /* Smaller on mobile */
    font-weight: 700;
    color: var(--accent-color);
    /* Navy Blue */
    display: block;
    /* Visible on mobile */
    white-space: nowrap;
    /* Prevent text wrapping */
}

.mobile-logo {
    display: block;
}

.desktop-logo {
    display: none;
}

.mobile-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    /* Saffron Toggle */
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    transform: scale(1.1);
}

/* Mobile Close Button */
.mobile-close {
    display: block;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1002;
    transition: all 0.3s ease;
}

.mobile-close:hover {
    transform: rotate(90deg);
    color: var(--accent-color);
}

/* Navigation Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

.main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    /* Start off-screen to the right */
    width: 280px;
    height: 100vh;
    background: var(--white);
    border-left: 3px solid var(--primary-color);
    /* Saffron Left Border */
    display: flex;
    flex-direction: column;
    padding: 60px 0 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
}

.main-nav.active {
    right: 0;
    /* Slide in from right */
}

.main-nav ul {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.main-nav li {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.main-nav a {
    display: block;
    padding: 15px 25px;
    font-weight: 500;
    color: var(--accent-color);
    /* Blue Links */
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    /* Saffron Hover/Active */
    background: #fff8f0;
    /* Light Saffron BG */
    padding-left: 30px;
}

.login-btn {
    margin: 15px 25px;
    width: calc(100% - 50px);
}

/* Desktop Nav */
@media (min-width: 992px) {
    .mobile-logo {
        display: none;
    }

    .desktop-logo {
        display: block;
    }

    .logo img {
        height: 50px;
        /* Larger on desktop */
    }

    .logo-title {
        font-size: 20px;
        /* Larger on desktop */
    }

    .mobile-toggle {
        display: none;
    }

    .mobile-close {
        display: none;
    }

    .nav-overlay {
        display: none !important;
    }

    .main-nav {
        display: flex;
        /* Always show on desktop */
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        flex-direction: row;
        align-items: center;
        right: 0;
    }

    .main-nav ul {
        flex-direction: row;
        gap: 20px;
        align-items: center;
    }

    .main-nav li {
        width: auto;
        border-bottom: none;
        text-align: center;
    }

    .main-nav a {
        padding: 0;
    }

    .main-nav a:hover,
    .main-nav a.active {
        background: transparent;
        padding-left: 0;
    }

    .login-btn {
        margin: 0 0 0 20px;
        width: auto;
    }
}

/* =========================================
   Footer
   ========================================= */
.main-footer {
    background: var(--accent-color);
    /* Navy Blue Footer */
    color: #fff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: var(--white);
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    /* Saffron Underline */
}

.footer-col p {
    margin-bottom: 15px;
    color: #ddd;
    font-size: 14px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: #ddd;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--primary-color);
    /* Saffron Hover */
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-size: 14px;
    color: #bbb;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #bbb;
}

.footer-links a:hover {
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* =========================================
   Modals
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalSlide 0.3s ease-out;
    border-top: 5px solid var(--primary-color);
    /* Saffron Top Border */
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--primary-color);
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal input,
.modal select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.modal input:focus,
.modal select:focus {
    border-color: var(--primary-color);
    outline: none;
}