/**
 * Shree Radha Madhav Braj Ashraya Foundation
 * Royal Sapphire & 24K Gold Design System
 */

:root {
    --primary-navy: #0A1931;
    --dark-midnight: #060E1E;
    --royal-sapphire: #102652;
    --secondary-gold: #E5B73B;
    --light-gold: #F5D061;
    --dark-gold: #C89422;
    --peacock-teal: #0D7377;
    --bg-sandstone: #FAF7F0;
    --bg-card: #FFFFFF;
    --text-dark: #1A2436;
    --text-muted: #64748B;
    --gold-gradient: linear-gradient(135deg, #FFF8E1 0%, #F5D061 35%, #E5B73B 70%, #AA7B14 100%);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--dark-midnight);
    color: var(--text-dark);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    margin: 0;
    padding: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark-midnight); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--secondary-gold) 0%, var(--primary-navy) 100%);
    border-radius: 4px;
}

/* Typography Helpers */
.font-cinzel { font-family: 'Cinzel', serif; }
.font-cinzeldec { font-family: 'Cinzel Decorative', serif; }
.font-devanagari { font-family: 'Tiro Devanagari Hindi', 'Rozha One', serif; }

.text-gold { color: var(--light-gold) !important; }
.text-gold-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.bg-navy-950 { background-color: var(--dark-midnight) !important; }
.bg-navy-900 { background-color: var(--primary-navy) !important; }
.bg-sandstone-50 { background-color: #FAF7F0 !important; }
.bg-sandstone-100 { background-color: #F4EFE6 !important; }

/* Dividers */
.gold-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--secondary-gold);
    margin: 20px auto;
    max-width: 320px;
}
.gold-divider::before, .gold-divider::after {
    content: "";
    flex-grow: 1;
    height: 1.5px;
    background: linear-gradient(to right, transparent, var(--secondary-gold) 50%, transparent);
}

/* Luxury Cards */
.royal-card {
    background: #FFFFFF;
    border: 1px solid rgba(229, 183, 59, 0.3);
    border-radius: 20px;
    box-shadow: 0 10px 30px -10px rgba(6, 14, 30, 0.08);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.royal-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-gold), var(--light-gold), var(--peacock-teal));
    opacity: 0;
    transition: opacity 0.3s ease;
}
.royal-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary-gold);
    box-shadow: 0 20px 40px -10px rgba(6, 14, 30, 0.16);
}
.royal-card:hover::before {
    opacity: 1;
}

/* Pulsing Gold Donate Button */
.btn-gold-donate {
    background: linear-gradient(135deg, #F5D061 0%, #E5B73B 50%, #C89422 100%);
    color: #060E1E !important;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: 9999px;
    border: none;
    padding: 10px 24px;
    box-shadow: 0 4px 18px rgba(229, 183, 59, 0.45);
    transition: all 0.3s ease;
    white-space: nowrap;
}
.btn-gold-donate:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(229, 183, 59, 0.65);
}

/* Animated Progress Bars */
.progress-gold {
    background-color: #E2E8F0;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}
.progress-gold .progress-bar {
    background: linear-gradient(90deg, #C89422, #F5D061);
    border-radius: 999px;
}

/* Desktop Navbar */
.main-navbar {
    background: rgba(6, 14, 30, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 2px solid rgba(229, 183, 59, 0.45);
    transition: all 0.3s ease;
    z-index: 1030;
}
.nav-link-custom {
    color: #E2E8F0 !important;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 8px 10px !important;
    white-space: nowrap !important;
    position: relative;
    transition: color 0.25s ease;
}
.nav-link-custom:hover, .nav-link-custom.active {
    color: #F5D061 !important;
}
.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--light-gold);
    transition: all 0.25s ease;
    transform: translateX(-50%);
}
.nav-link-custom:hover::after, .nav-link-custom.active::after {
    width: 70%;
}

/* Mobile Offcanvas Drawer & Navigation */
.main-navbar .container-fluid {
    flex-wrap: nowrap !important;
}
.main-navbar .navbar-brand {
    min-width: 0;
    max-width: calc(100% - 135px);
}
.navbar-brand-logo {
    width: 38px;
    height: 38px;
    transition: transform 0.2s ease;
}
.navbar-brand-title {
    font-size: 13.5px;
    letter-spacing: 0.5px;
    line-height: 1.15;
}
.navbar-brand-sub {
    font-size: 9.5px;
    letter-spacing: 0.6px;
    opacity: 0.85;
    text-transform: uppercase;
}
@media (min-width: 768px) {
    .main-navbar .navbar-brand {
        max-width: none;
    }
    .navbar-brand-logo {
        width: 44px;
        height: 44px;
    }
    .navbar-brand-title {
        font-size: 15px;
    }
    .navbar-brand-sub {
        font-size: 10.5px;
    }
}

.btn-mobile-donate {
    font-size: 11px !important;
    padding: 6px 12px !important;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 10px rgba(229, 183, 59, 0.35);
    white-space: nowrap !important;
    flex-shrink: 0;
}

.mobile-menu-toggle {
    border: 1px solid rgba(229, 183, 59, 0.45) !important;
    background: rgba(229, 183, 59, 0.1) !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    color: var(--secondary-gold) !important;
    line-height: 1 !important;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
    background: rgba(229, 183, 59, 0.25) !important;
    border-color: var(--secondary-gold) !important;
    box-shadow: 0 0 10px rgba(229, 183, 59, 0.25) !important;
}

@media (max-width: 390px) {
    .navbar-brand-logo {
        width: 33px !important;
        height: 33px !important;
    }
    .navbar-brand-title {
        font-size: 12px !important;
        letter-spacing: 0.3px !important;
    }
    .navbar-brand-sub {
        font-size: 8px !important;
        letter-spacing: 0.4px !important;
    }
    .btn-mobile-donate {
        font-size: 10px !important;
        padding: 5px 9px !important;
    }
    .mobile-menu-toggle {
        padding: 5px 8px !important;
    }
}

@media (max-width: 330px) {
    .btn-mobile-donate .btn-donate-label {
        display: none !important;
    }
    .btn-mobile-donate {
        padding: 5px 8px !important;
    }
}

.offcanvas-royal {
    background: linear-gradient(180deg, #0A1931 0%, #060E1E 100%);
    border-left: 2px solid rgba(229, 183, 59, 0.4);
    color: #FFF;
    width: min(340px, 86vw) !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.65);
}
.offcanvas-royal .offcanvas-body {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(229, 183, 59, 0.4) transparent;
}
.offcanvas-royal .offcanvas-body::-webkit-scrollbar {
    width: 4px;
}
.offcanvas-royal .offcanvas-body::-webkit-scrollbar-thumb {
    background: rgba(229, 183, 59, 0.4);
    border-radius: 4px;
}
.offcanvas-royal .nav-link {
    color: #E2E8F0;
    font-family: 'Cinzel', serif;
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}
.offcanvas-royal .nav-link i {
    color: var(--light-gold);
    width: 22px;
    text-align: center;
    font-size: 15px;
}
.offcanvas-royal .nav-link:hover,
.offcanvas-royal .nav-link.active {
    background: rgba(229, 183, 59, 0.16);
    color: #F5D061;
    border: 1px solid rgba(229, 183, 59, 0.35);
}

/* Global Mobile Responsiveness & Fluid Typography */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}
img, svg {
    max-width: 100%;
    height: auto;
}
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    /* Fluid headings for small viewports */
    .display-3 { font-size: clamp(1.8rem, 6.5vw, 2.4rem) !important; }
    .display-4 { font-size: clamp(1.6rem, 5.8vw, 2.2rem) !important; line-height: 1.25 !important; }
    .display-5 { font-size: clamp(1.4rem, 5.2vw, 1.85rem) !important; line-height: 1.25 !important; }
    .display-6 { font-size: clamp(1.25rem, 4.5vw, 1.6rem) !important; }
    h1 { font-size: clamp(1.5rem, 5.2vw, 2rem); }
    h2 { font-size: clamp(1.35rem, 4.8vw, 1.75rem); }
    h3 { font-size: clamp(1.2rem, 4.2vw, 1.5rem); }
    
    .lead { font-size: 1rem !important; }

    /* Touch padding for cards and containers */
    .container-fluid, .container-xl, .container-lg, .container {
        padding-left: 14px;
        padding-right: 14px;
    }
    
    /* Prevent iOS auto-zoom on form inputs */
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="tel"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Quick donation buttons */
    .btn-amount-preset {
        font-size: 13px !important;
        padding: 8px 4px !important;
    }
    
    /* Hero Trust Badges wrap */
    .rounded-pill.bg-navy-900 {
        border-radius: 14px !important;
        gap: 10px !important;
        padding: 10px 14px !important;
    }
}

/* Floating Actions on Mobile Screens */
@media (max-width: 575.98px) {
    a[aria-label="Chat with us on WhatsApp"],
    .floating-whatsapp {
        bottom: 16px !important;
        right: 16px !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 24px !important;
    }
    #btnScrollTop {
        bottom: 72px !important;
        right: 20px !important;
        width: 38px !important;
        height: 38px !important;
        font-size: 14px !important;
    }
}

