/* ===== common.css - Global Design System for MUDRA CASH ===== */

/* ----- CSS Variables ----- */
:root {
    /* ----- COLOR PALETTE ----- */
    --pure-white: #ffffff;
    --smoke-bg: #f5f9fc;
    --smoke-darker: #eaf0f6;
    --sky-light: #d4e8ff;
    --sky-primary: #7bb3ff;
    --sky-deep: #3d7eb9;
    --text-dark: #1d2b3f;
    --text-soft: #4a5b6e;
    --border-light: #cbd6e4;

    /* ----- SHADOWS & EFFECTS ----- */
    --shadow-sm: 0 20px 30px -10px rgba(61, 126, 185, 0.12);
    --shadow-md: 0 25px 40px -12px rgba(61, 126, 185, 0.18);
    --shadow-lg: 0 30px 50px -15px rgba(61, 126, 185, 0.24);
    --card-glow: 0 8px 22px rgba(123, 179, 255, 0.15);
    --underline-glow: rgba(61, 126, 185, 0.25);

    /* ----- GRADIENTS ----- */
    --gradient-primary: linear-gradient(90deg, var(--sky-primary), var(--sky-deep));
    --gradient-reverse: linear-gradient(90deg, var(--sky-deep), var(--sky-primary));
    --gradient-soft: linear-gradient(135deg, #7bb3ff, #b6d6ff);
    --gradient-card: linear-gradient(135deg, #ffffff, #f8fcff);

    /* ----- TYPOGRAPHY - BASE SIZES (Mobile First) ----- */
    --font-h1: 2rem;
    --font-h2: 1.8rem;
    --font-h3: 1.5rem;
    --font-h4: 1.3rem;
    --font-body: 1rem;
    --font-small: 0.875rem;
    --font-tiny: 0.75rem;

    /* ----- LINE HEIGHTS ----- */
    --line-tight: 1.2;
    --line-normal: 1.5;
    --line-loose: 1.7;

    /* ----- SPACING SYSTEM ----- */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* ----- BORDER RADIUS ----- */
    --radius-sm: 16px;
    --radius-md: 24px;
    --radius-lg: 32px;
    --radius-xl: 42px;
    --radius-full: 999px;

    /* ----- LAYOUT ----- */
    --container-max: 1200px;
    --container-padding: 1rem;
    --header-height: 70px;

    /* ----- Z-INDEX SYSTEM ----- */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-popover: 500;
    --z-tooltip: 600;
    --z-toast: 700;
    --z-backdrop: 800;
    --z-menu: 900;
    --z-max: 999;
}

/* ===== BREAKPOINT VARIABLES ===== */
/* Tablet (576px - 768px) */
@media (min-width: 576px) {
    :root {
        --font-h1: 2.2rem;
        --font-h2: 2rem;
        --font-h3: 1.7rem;
        --font-h4: 1.4rem;
        --font-body: 1rem;
        --container-padding: 1.5rem;
    }
}

/* Small Desktop (768px - 992px) */
@media (min-width: 768px) {
    :root {
        --font-h1: 2.5rem;
        --font-h2: 2.2rem;
        --font-h3: 1.9rem;
        --font-h4: 1.5rem;
        --font-body: 1.05rem;
        --container-padding: 2rem;
    }
}

/* Desktop (992px - 1200px) */
/* @media (min-width: 992px) {
    :root {
        --font-h1: 3rem;
        --font-h2: 2.5rem;
        --font-h3: 2rem;
        --font-h4: 1.6rem;
        --font-body: 1.1rem;
        --font-small: 0.9rem;
    }
} */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--font-body);
    line-height: var(--line-normal);
    color: var(--text-dark);
    background-color: var(--smoke-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body.menu-open {
    overflow: hidden;
}

/* ===== TYPOGRAPHY UTILITIES ===== */
.h1,
h1 {
    font-size: var(--font-h1);
    line-height: var(--line-tight);
    font-weight: 700;
}

.h2,
h2 {
    font-size: var(--font-h2);
    line-height: var(--line-tight);
    font-weight: 700;
}

.h3,
h3 {
    font-size: var(--font-h3);
    line-height: var(--line-tight);
    font-weight: 600;
}

.h4,
h4 {
    font-size: var(--font-h4);
    line-height: var(--line-tight);
    font-weight: 600;
}

.text-body {
    font-size: var(--font-body);
    line-height: var(--line-normal);
}

.text-small {
    font-size: var(--font-small);
    line-height: var(--line-normal);
}

.text-tiny {
    font-size: var(--font-tiny);
    line-height: var(--line-normal);
}

/* ===== LAYOUT UTILITIES ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

/* ===== SPACING UTILITIES ===== */
.m-0 {
    margin: 0;
}

.m-xs {
    margin: var(--space-xs);
}

.m-sm {
    margin: var(--space-sm);
}

.m-md {
    margin: var(--space-md);
}

.m-lg {
    margin: var(--space-lg);
}

.m-xl {
    margin: var(--space-xl);
}

.p-0 {
    padding: 0;
}

.p-xs {
    padding: var(--space-xs);
}

.p-sm {
    padding: var(--space-sm);
}

.p-md {
    padding: var(--space-md);
}

.p-lg {
    padding: var(--space-lg);
}

.p-xl {
    padding: var(--space-xl);
}

/* ===== FLEX/GRID UTILITIES ===== */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ===== COMPONENT STYLES ===== */
/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--sky-deep);
    color: var(--pure-white);
    border: 2px solid var(--pure-white);
    box-shadow: 0 4px 15px rgba(61, 126, 185, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: var(--z-fixed);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    border: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--pure-white);
    color: var(--sky-deep);
    border: 2px solid var(--sky-deep);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(61, 126, 185, 0.4);
}

@media (max-width: 767px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* Download Button */
.btn-download {
    background: var(--sky-deep);
    color: var(--pure-white);
    font-weight: 600;
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius-full);
    font-size: clamp(1rem, 3.5vw, 1.2rem);
    box-shadow: 0 14px 24px -8px var(--sky-deep);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 2px solid var(--sky-deep);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}

.btn-download i {
    font-size: 1.3rem;
    color: var(--sky-light);
    transition: color 0.3s ease;
}

.btn-download:hover {
    background: var(--pure-white);
    color: var(--sky-deep);
    border-color: var(--sky-deep);
    box-shadow: 0 14px 24px -8px var(--sky-primary);
    transform: translateY(-2px);
}

.btn-download:hover i {
    color: var(--sky-deep);
}

/* Underline Heading Style */
.underlined-heading {
    display: inline-block;
    position: relative;
    padding-bottom: 6px;
}

.underlined-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px var(--underline-glow);
}

/* Cards */
.card {
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform 0.25s ease, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-glow);
    border-color: var(--sky-primary);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.7s ease-out forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}

/* ===== NAVBAR STYLES ===== */
.navbar-custom {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px rgba(61, 126, 185, 0.08);
    padding: 0.4rem 1rem;
    /* CHANGED: reduced from 0.6rem to 0.4rem (33% reduction) */
    border-bottom: 1px solid rgba(203, 214, 228, 0.5);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    /* CHANGED: reduced from 1.8rem to match smaller navbar */
    letter-spacing: -0.02em;
    color: var(--sky-deep) !important;
    display: flex;
    align-items: center;
    gap: 8px;
    /* CHANGED: reduced from 10px */
    text-decoration: none;
    cursor: pointer;
}

.logo-img {
    height: 42px;
    /* UNCHANGED - kept same size */
    width: auto;
    display: inline-block;
    background: transparent;
    object-fit: contain;
}

.logo-blue {
    filter: brightness(0) saturate(100%) invert(43%) sepia(38%) saturate(742%) hue-rotate(169deg) brightness(95%) contrast(92%);
}

/* Mobile Menu */
@media (max-width: 991px) {
    .navbar-custom {
        padding: 0.3rem 1rem;
        /* CHANGED: reduced from 0.5rem to 0.3rem (40% reduction) */
    }

    .menu-toggle {
        width: 42px;
        /* CHANGED: reduced from 48px */
        height: 42px;
        /* CHANGED: reduced from 48px */
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid var(--sky-primary);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        /* CHANGED: reduced from 6px */
        cursor: pointer;
        z-index: 1001;
        position: relative;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .menu-toggle span {
        width: 22px;
        /* CHANGED: reduced from 24px */
        height: 2px;
        background: var(--sky-deep);
        border-radius: 4px;
        transition: all 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        /* CHANGED: adjusted from 6px */
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
        /* CHANGED: adjusted from 6px */
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 28%;
        min-width: 220px;
        max-width: 300px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        z-index: var(--z-menu);
        transition: right 0.3s ease-in-out;
        padding: 70px 1rem 2rem;
        /* CHANGED: reduced from 80px */
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        border-left: 2px solid var(--sky-light);
    }

    .mobile-menu.active {
        right: 0;
    }

    .mobile-menu-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 0.7rem 1rem;
        /* CHANGED: reduced from 1rem */
        border-bottom: 1px solid rgba(203, 214, 228, 0.5);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .mobile-menu-header .navbar-brand {
        font-size: 1.2rem;
        /* CHANGED: reduced from 1.3rem */
        gap: 5px;
        /* CHANGED: reduced from 6px */
    }

    .mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        /* CHANGED: reduced from 0.8rem */
        margin-top: 1.5rem;
        /* CHANGED: reduced from 1.8rem */
    }

    .mobile-nav-link {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        /* CHANGED: reduced from 0.7rem */
        padding: 0.7rem 0.7rem;
        /* CHANGED: reduced from 0.8rem */
        font-size: 0.95rem;
        /* CHANGED: reduced from 1rem */
        font-weight: 600;
        color: var(--text-dark);
        text-decoration: none;
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.9);
        transition: all 0.2s ease;
    }

    .mobile-nav-link i {
        font-size: 1.1rem;
        /* CHANGED: reduced from 1.2rem */
        color: var(--sky-deep);
        width: 22px;
        /* CHANGED: reduced from 24px */
    }

    .mobile-nav-link.active {
        background: var(--gradient-primary);
        color: white;
        border: none;
        box-shadow: 0 8px 16px -5px rgba(61, 126, 185, 0.3);
        /* CHANGED: slightly reduced */
    }

    .mobile-nav-link:active {
        transform: scale(0.98);
    }

    .mobile-menu-footer {
        position: absolute;
        bottom: 1.2rem;
        /* CHANGED: reduced from 1.5rem */
        left: 1rem;
        right: 1rem;
        padding-top: 1.2rem;
        /* CHANGED: reduced from 1.5rem */
        border-top: 1px solid rgba(203, 214, 228, 0.5);
        text-align: center;
        color: var(--text-soft);
        font-size: 0.75rem;
        /* CHANGED: reduced from 0.8rem */
    }

    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: var(--z-backdrop);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .navbar-collapse {
        display: none !important;
    }
}

@media (min-width: 992px) {

    .menu-toggle,
    .mobile-menu,
    .menu-overlay {
        display: none !important;
    }

    .navbar-nav {
        gap: 0.4rem;
        /* CHANGED: reduced from 0.5rem */
    }

    .nav-link {
        color: var(--text-dark) !important;
        font-weight: 500;
        font-size: 0.9rem;
        /* CHANGED: reduced from 0.95rem */
        padding: 0.4rem 1rem !important;
        /* CHANGED: reduced from 0.5rem 1.2rem */
        border-radius: 50px;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.5);
    }

    .nav-link.active {
        background: var(--gradient-primary);
        color: white !important;
        box-shadow: 0 3px 10px rgba(61, 126, 185, 0.2);
        /* CHANGED: slightly reduced */
    }
}

/* ===== FOOTER STYLES ===== */
.footer-new {
    background: #0f2b3f;
    color: #c7dff7;
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: var(--space-xl);
    border-top: 4px solid var(--sky-primary);
}

.footer-new h5 {
    color: white;
    font-weight: 600;
    font-size: var(--font-h4);
    margin-bottom: var(--space-xs);
}

.footer-new .app-badges {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: var(--space-md) 0 var(--space-lg);
}

.footer-new .app-badge {
    background: var(--sky-deep);
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 500;
    font-size: var(--font-body);
    border: 1px solid var(--sky-primary);
    transition: 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    border: none;
}

.footer-new .app-badge i {
    font-size: 1.3rem;
}

.footer-new .app-badge:hover {
    background: #2b659b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.footer-new .about-text {
    max-width: 700px;
    margin: 0 auto var(--space-lg);
    font-size: var(--font-small);
    line-height: var(--line-normal);
    color: #b3d0ec;
    padding: 0 var(--space-md);
}

.footer-new hr {
    width: 80%;
    margin: var(--space-lg) auto;
    border: 1px solid var(--sky-primary);
    opacity: 0.5;
}

.footer-new .copyright-row {
    font-size: var(--font-tiny);
    color: #9cb9d4;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 var(--space-md);
}

.footer-new .copyright-row a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.footer-new .copyright-row a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {

    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .card {
        padding: var(--space-md);
    }
}