/* ==========================================================================
   RASHTRIYA HINDU MAHASHAKTI SANGAM (RHMS)
   Official Master Design System
   Colors derived from Official Logo:
   Saffron: #F4511E | Deep Saffron: #D84315 | Gold: #D4AF37 | Royal Gold: #FFC107
   Temple Green: #285A32 | Cream: #FFF8E7 | Ivory: #FFFDF5 | Brown: #3E2414
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+Devanagari:wght@400;600;700&family=Poppins:wght@500;600;700;800&display=swap');

:root {
    --primary-saffron: #F4511E;
    --deep-saffron: #D84315;
    --golden: #D4AF37;
    --royal-gold: #FFC107;
    --temple-green: #285A32;
    --leaf-green: #5D8C2F;
    --cream-bg: #FFF8E7;
    --ivory: #FFFDF5;
    --dark-brown: #3E2414;
    --dark-surface: #1E120B;
    --text-dark: #2B180C;
    --text-muted: #6C5A4E;
    --card-shadow: 0 10px 30px rgba(62, 36, 20, 0.08);
    --gold-glow: 0 0 20px rgba(212, 175, 55, 0.4);
    --saffron-gradient: linear-gradient(135deg, #F4511E 0%, #D84315 100%);
    --gold-gradient: linear-gradient(135deg, #FFC107 0%, #D4AF37 100%);
    --temple-gradient: linear-gradient(135deg, #285A32 0%, #1A3E22 100%);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--ivory);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--dark-brown);
}

.devanagari {
    font-family: 'Noto Sans Devanagari', sans-serif;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Mandala Decorative Pattern Background */
.mandala-bg {
    background-image: radial-gradient(circle, rgba(212, 175, 55, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

.mandala-overlay {
    position: relative;
}
.mandala-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Section Titles */
.section-subtitle {
    display: inline-block;
    color: var(--deep-saffron);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 4px 16px;
    background: rgba(244, 81, 30, 0.1);
    border-radius: 30px;
    border: 1px solid rgba(244, 81, 30, 0.2);
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark-brown);
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gold-gradient);
    border-radius: 2px;
}
.section-title.text-start::after {
    left: 0;
    transform: none;
}

/* Top Header Bar */
.top-bar {
    background-color: var(--dark-brown);
    color: var(--cream-bg);
    padding: 8px 0;
    font-size: 0.88rem;
    border-bottom: 2px solid var(--golden);
}

.top-bar a {
    color: #E2D5CB;
}
.top-bar a:hover {
    color: var(--royal-gold);
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--ivory);
    margin-left: 6px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}
.social-icons a:hover {
    background: var(--saffron-gradient);
    color: #fff;
    transform: translateY(-2px);
}

/* Main Navigation Header */
.main-navbar {
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 3px solid var(--primary-saffron);
}

.navbar-brand img {
    height: 65px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}
.brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--dark-brown);
    line-height: 1.2;
}
.brand-tagline {
    font-size: 0.75rem;
    color: var(--deep-saffron);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark-brown) !important;
    padding: 8px 12px !important;
    font-size: 0.92rem;
    white-space: nowrap;
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary-saffron) !important;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 12px;
    right: 12px;
    height: 3px;
    background: var(--saffron-gradient);
    border-radius: 2px;
}

/* Premium Buttons */
.btn-rhms-saffron {
    background: var(--saffron-gradient);
    color: #ffffff !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    box-shadow: 0 6px 18px rgba(244, 81, 30, 0.3);
    transition: all 0.3s ease;
}
.btn-rhms-saffron:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(244, 81, 30, 0.45);
    background: linear-gradient(135deg, #D84315 0%, #BF360C 100%);
}

.btn-rhms-gold {
    background: var(--gold-gradient);
    color: var(--dark-brown) !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}
.btn-rhms-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.5);
}

.btn-rhms-outline {
    background: #ffffff;
    color: var(--dark-brown) !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: 2px solid #6C5A4E;
    padding: 10px 26px;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.btn-rhms-outline:hover {
    background: var(--golden);
    color: var(--dark-brown) !important;
    border-color: var(--golden);
}

.btn-rhms-outline-light {
    background: transparent;
    color: var(--ivory) !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: 2px solid var(--golden);
    padding: 10px 26px;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.btn-rhms-outline-light:hover {
    background: var(--golden);
    color: var(--dark-brown) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(180deg, rgba(30, 18, 11, 0.55) 0%, rgba(62, 36, 20, 0.70) 100%), url('../images/hero_bg.jpg') center center / cover no-repeat;
    min-height: 88vh;
    display: flex;
    align-items: center;
    color: #ffffff;
    overflow: hidden;
}

.hero-glow-circle {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.25) 0%, rgba(244, 81, 30, 0.05) 60%, transparent 100%);
    filter: blur(40px);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid var(--royal-gold);
    color: var(--royal-gold);
    padding: 6px 18px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 20px;
    backdrop-filter: blur(6px);
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.hero-title span {
    color: var(--royal-gold);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #F3E5D8;
    margin-bottom: 35px;
    max-width: 650px;
}

.hero-logo-box img {
    max-height: 380px;
    filter: drop-shadow(0 10px 25px rgba(255, 193, 7, 0.35));
    animation: floatAnimation 4s ease-in-out infinite;
}

@keyframes floatAnimation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

/* Feature Cards & Agendas */
.agenda-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: var(--card-shadow);
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.agenda-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--saffron-gradient);
    transition: all 0.3s ease;
}
.agenda-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(62, 36, 20, 0.15);
    border-color: var(--golden);
}
.agenda-card:hover::before {
    width: 8px;
}

.agenda-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: var(--cream-bg);
    color: var(--primary-saffron);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}
.agenda-card:hover .agenda-icon {
    background: var(--saffron-gradient);
    color: #ffffff;
    transform: scale(1.05);
}

.agenda-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-brown);
}
.agenda-title-hi {
    font-size: 0.95rem;
    color: var(--deep-saffron);
    font-weight: 600;
    margin-bottom: 12px;
}
.agenda-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* Key Initiatives Grid */
.initiative-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    background: #ffffff;
    position: relative;
    height: 100%;
    transition: all 0.3s ease;
}
.initiative-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.12);
}
.initiative-img-box {
    position: relative;
    height: 220px;
    overflow: hidden;
}
.initiative-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.initiative-card:hover .initiative-img-box img {
    transform: scale(1.08);
}
.initiative-category-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--saffron-gradient);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}
.initiative-body {
    padding: 22px;
}

/* Member Cards */
.member-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(212, 175, 55, 0.2);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}
.member-card:hover {
    transform: translateY(-8px);
    border-color: var(--golden);
    box-shadow: var(--gold-glow);
}
.member-photo-wrap {
    width: 180px;
    height: 180px;
    margin: 24px auto 16px;
    border-radius: 50%;
    padding: 6px;
    background: var(--gold-gradient);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.member-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ffffff;
}
.member-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 4px;
}
.member-designation {
    color: var(--deep-saffron);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.member-bio {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0 20px 20px;
}

/* Events Card */
.event-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.06);
}
.event-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px 14px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.event-date-badge .day {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-saffron);
    line-height: 1;
}
.event-date-badge .month {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--dark-brown);
    text-transform: uppercase;
}

/* Gallery Masonry & Lightbox */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(30, 18, 11, 0.85) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-caption {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Counter Statistics */
.counter-box {
    background: var(--dark-brown);
    color: #ffffff;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid var(--golden);
    box-shadow: var(--card-shadow);
}
.counter-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--royal-gold);
    font-family: 'Poppins', sans-serif;
}
.counter-label {
    font-size: 0.95rem;
    color: #E2D5CB;
    font-weight: 500;
}

/* Volunteer Form Card */
.form-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(62, 36, 20, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
}
.form-control, .form-select {
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid #E2D5CB;
    font-size: 0.95rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-saffron);
    box-shadow: 0 0 0 4px rgba(244, 81, 30, 0.15);
}

/* Footer Styling */
footer {
    background-color: var(--dark-surface);
    color: #D4C3B7;
    padding-top: 70px;
    border-top: 4px solid var(--golden);
}
footer h5 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}
footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--saffron-gradient);
    border-radius: 2px;
}
footer a {
    color: #B5A193;
}
footer a:hover {
    color: var(--royal-gold);
    padding-left: 4px;
}
.footer-bottom {
    background-color: #120A06;
    padding: 20px 0;
    font-size: 0.88rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ==========================================================================
   Comprehensive Mobile Responsiveness & Touch Optimization
   ========================================================================== */

/* Mobile Navbar & Drawer Adjustments */
@media (max-width: 991.98px) {
    .main-navbar {
        padding: 10px 0;
    }
    .navbar-brand img {
        height: 52px;
    }
    .brand-name {
        font-size: 1.05rem;
    }
    .brand-tagline {
        font-size: 0.68rem;
    }
    .navbar-toggler {
        padding: 6px 10px;
        border: 2px solid var(--primary-saffron) !important;
        border-radius: 8px;
    }
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(244, 81, 30, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }
    .navbar-collapse {
        background: #ffffff;
        padding: 20px;
        border-radius: 16px;
        margin-top: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.12);
        border: 1px solid rgba(212, 175, 55, 0.3);
    }
    .navbar-collapse.show {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .nav-link {
        padding: 10px 14px !important;
        border-bottom: 1px solid #F4EBE3;
        white-space: normal;
    }
    .nav-link.active::after {
        display: none;
    }

    /* Hero Section Mobile */
    .hero-section {
        min-height: auto;
        padding: 50px 0 45px;
        text-align: center;
    }
    .hero-title {
        font-size: 2.1rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 25px;
    }
    .hero-logo-box img {
        max-height: 220px;
        margin-top: 20px;
    }
    .hero-section .btn {
        width: 100%;
        margin-bottom: 6px;
    }

    /* Section Titles Mobile */
    .section-title {
        font-size: 1.85rem;
    }

    /* Cards & Spacing Mobile */
    .agenda-card, .member-card, .initiative-card, .event-card {
        padding: 20px 16px;
    }
    .form-card {
        padding: 22px 16px;
        border-radius: 14px;
    }
    .counter-box {
        padding: 20px 10px;
    }
    .counter-number {
        font-size: 2.2rem;
    }
}

@media (max-width: 575.98px) {
    /* 2 Cards Side-by-Side Mobile Layout */
    .row.g-4 {
        --bs-gutter-x: 0.65rem;
        --bs-gutter-y: 0.65rem;
    }
    
    .brand-name {
        font-size: 0.95rem;
    }
    .brand-tagline {
        display: none;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-badge {
        font-size: 0.82rem;
        padding: 4px 12px;
    }
    .btn-rhms-saffron, .btn-rhms-gold, .btn-rhms-outline, .btn-rhms-outline-light {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* 2-Column Agenda Cards Mobile */
    .agenda-card {
        padding: 14px 10px;
        border-radius: 12px;
    }
    .agenda-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 10px;
        margin-bottom: 10px;
    }
    .agenda-title {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 4px;
    }
    .agenda-title-hi {
        font-size: 0.78rem;
        margin-bottom: 6px;
    }
    .agenda-desc {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    /* 2-Column Member Cards Mobile */
    .member-card {
        border-radius: 12px;
    }
    .member-photo-wrap {
        width: 95px;
        height: 95px;
        margin: 12px auto 8px;
        padding: 3px;
    }
    .member-name {
        font-size: 1.0rem;
        margin-bottom: 2px;
    }
    .member-designation {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    .member-card .badge {
        font-size: 0.68rem;
        padding: 2px 8px !important;
        margin-bottom: 8px !important;
    }
    .member-bio {
        font-size: 0.75rem;
        padding: 0 6px 10px;
        line-height: 1.3;
    }

    /* 2-Column Initiative & Event Cards Mobile */
    .initiative-img-box {
        height: 120px;
    }
    .initiative-body {
        padding: 12px 10px;
    }
    .initiative-body h4 {
        font-size: 0.95rem;
    }
    .event-card .img-fluid {
        height: 130px !important;
    }
    .event-card .p-4 {
        padding: 12px 10px !important;
    }
    .event-date-badge {
        padding: 4px 8px;
        top: 8px;
        right: 8px;
    }
    .event-date-badge .day {
        font-size: 1.0rem;
    }
    .event-date-badge .month {
        font-size: 0.65rem;
    }

    /* Gallery Grid Mobile */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .gallery-item {
        height: 140px;
    }
}
