/* Header and Footer Styles - Redesigned */

/* ============================================
   HEADER STYLES
   ============================================ */

/* Header Container */
#header-container {
    position: relative;
    z-index: 1000;
    width: 100%;
    min-height: 1px;
    /* Ensure container has height even when empty to prevent flickering */
    visibility: visible !important;
    /* Always visible */
    display: block !important;
    /* Always displayed */
}

.main-header {
    width: 100%;
    background: white;
    position: relative;
    z-index: 1000;
}

/* Top Orange Bar */
.header-top-bar {
    background: linear-gradient(135deg, #FF9933 0%, #FF6600 100%);
    padding: 10px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    color: white;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform: translateY(0);
    opacity: 1;
    position: relative;
    z-index: 1;
}

.header-top-bar.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.top-bar-text {
    font-size: 13px;
    font-weight: 500;
}

.top-bar-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 10px;
}

.top-bar-left {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-icon-top {
    width: 28px;
    height: 28px;
    background: white;
    color: #FF9933;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s;
}

.social-icon-top:hover {
    transform: scale(1.1);
    background: #FFD700;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Profile badge styling in top bar */
.header-top-bar .user-profile-badge {
    margin-left: 10px;
    padding-right: 15px;
}

.header-top-bar .profile-badge-trigger {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    height: auto;
    min-height: auto;
}

.header-top-bar .profile-avatar {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    font-size: 14px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.header-top-bar .profile-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.header-top-bar .profile-badge-trigger:hover {
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header-top-bar .profile-name {
    color: #1a237e;
    font-size: 12px;
}

.header-top-bar .profile-role {
    color: #6c757d;
    font-size: 10px;
}

.header-top-bar .profile-dropdown-menu {
    top: 100%;
    right: 0;
    margin-top: 5px;
    z-index: 1000;
}

.lang-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 8px;
    transition: all 0.3s;
}

.lang-link:hover,
.lang-link.active {
    color: #FFD700;
    font-weight: bold;
}

.lang-separator {
    color: rgba(255, 255, 255, 0.5);
}

.btn-admin-login {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid white;
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    margin-left: 10px;
}

.btn-admin-login:hover {
    background: white;
    color: #FF9933;
}

/* Main Header - Single Row Layout */
.header-main {
    background: white;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    flex-wrap: nowrap;
}

/* Sticky state for header main when it reaches top while scrolling */
.header-main.sticky-active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
}

/* Only on desktop make sticky nav blue and invert text colors */
@media (min-width: 769px) {
    .header-main.sticky-active {
        background: #1a237e;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }

    .header-main.sticky-active .title-shyam,
    .header-main.sticky-active .title-sarathi,
    .header-main.sticky-active .header-subtitle {
        color: #ffffff;
    }

    .header-main.sticky-active .nav-link {
        color: #ffffff;
    }

    .header-main.sticky-active .nav-link:hover {
        color: #FFEB3B;
    }

    .header-main.sticky-active .nav-link.active {
        color: #FFEB3B;
    }

    /* When header-main is fixed on desktop, push marquee down so it is not hidden */
    .header-main.sticky-active+.header-marquee {
        margin-top: 80px;
    }
}

.header-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.header-title-link {
    text-decoration: none;
    display: block;
    transition: opacity 0.3s ease;
}

.header-title-link:hover {
    opacity: 0.8;
}

.header-title-link:hover .title-shyam,
.header-title-link:hover .title-sarathi {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.header-logo {
    height: 80px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    border-radius: 0;
    background: transparent;
    padding: 5px;
    display: block;
}

.header-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.title-shyam {
    color: #1a237e;
}

.title-sarathi {
    color: #FF9933;
}

.header-subtitle {
    margin: 2px 0 0 0;
    font-size: 9px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    white-space: nowrap;
}

.header-tagline {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-actions .user-profile-badge {
    margin-left: 2px;
}

.btn-sos-emergency {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
    white-space: nowrap;
    animation: sos-blink 1.2s ease-in-out infinite;
}

.btn-sos-emergency:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

@keyframes sos-blink {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 rgba(220, 53, 69, 0.0);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 12px rgba(220, 53, 69, 0.6);
    }
}

.btn-user-login {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
    white-space: nowrap;
    display: inline-block;
    /* Ensure it's visible by default */
}

.btn-user-login:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

/* User Profile Badge */
.user-profile-badge {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.profile-badge-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid rgba(26, 35, 126, 0.12);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 8px 16px rgba(17, 24, 39, 0.06),
        0 2px 4px rgba(17, 24, 39, 0.08);
}

.profile-badge-trigger:hover {
    border-color: rgba(26, 35, 126, 0.22);
    box-shadow:
        0 12px 20px rgba(17, 24, 39, 0.12),
        0 3px 6px rgba(17, 24, 39, 0.08);
    transform: translateY(-1px);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9933 0%, #FFD700 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 6px 12px rgba(255, 153, 51, 0.25);
    overflow: hidden;
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.profile-role {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.profile-dropdown-arrow {
    font-size: 10px;
    color: #9ca3af;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.profile-badge-trigger:hover .profile-dropdown-arrow {
    color: #1f2937;
}

/* Profile Dropdown Menu */
.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    box-shadow:
        0 18px 30px rgba(15, 23, 42, 0.14),
        0 4px 10px rgba(15, 23, 42, 0.08);
    min-width: 220px;
    z-index: 10000;
    display: none;
    overflow: hidden;
    animation: dropdownFadeIn 0.18s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #111827;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.profile-dropdown-item:hover {
    background: rgba(17, 24, 39, 0.06);
    color: #111827;
}

.profile-dropdown-item:active {
    background: rgba(17, 24, 39, 0.1);
}

.dropdown-item-icon {
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(26, 35, 126, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-dropdown-divider {
    height: 1px;
    background: rgba(15, 23, 42, 0.08);
    margin: 6px 0;
}

/* Logout confirmation modal */
.logout-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    backdrop-filter: blur(6px);
}

.logout-modal-overlay.is-visible {
    display: flex;
}

.logout-modal {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px 26px;
    width: min(420px, 90vw);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.logout-modal-header h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #0b4aa1;
}

.logout-modal-message {
    margin: 0 0 18px 0;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.5;
}

.logout-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.logout-btn-cancel,
.logout-btn-confirm {
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}

.logout-btn-cancel {
    background: #eef2f6;
    color: #4b5563;
}

.logout-btn-confirm {
    background: #0b4aa1;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(11, 74, 161, 0.25);
}

.logout-btn-confirm:hover {
    background: #083a80;
}

/* Marquee Banner - Below Header */
.header-marquee {
    background: #F5F5DC;
    border-top: 1px solid #000;
    border-bottom: none !important;
    /* Remove bottom border to eliminate gap */
    padding: 8px 0;
    margin-bottom: 0 !important;
    /* Remove any margin */
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.marquee-content {
    display: inline-block;
    animation: marquee-scroll 30s linear infinite;
    padding-left: 100%;
}

.marquee-text {
    color: #1a237e;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    display: inline-block;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Pause marquee on hover */
.header-marquee:hover .marquee-content {
    animation-play-state: paused;
}

/* Navigation Bar - Inline in Header */
.main-nav-inline {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
    padding: 0 15px;
    position: relative;
    z-index: 1001;
}

/* Legacy Navigation Bar (hidden) */
.main-nav {
    display: none;
}

.nav-link {
    color: #1a237e;
    text-decoration: none;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 6px;
    margin: 0 2px;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF9933 0%, #FFD700 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px 3px 0 0;
}

.nav-link:hover {
    color: #FF9933;
    background: linear-gradient(135deg, rgba(255, 153, 51, 0.08) 0%, rgba(255, 215, 0, 0.05) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 153, 51, 0.15);
}

.nav-link:hover::before {
    width: 80%;
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    color: #FF9933;
    background: linear-gradient(135deg, rgba(255, 153, 51, 0.12) 0%, rgba(255, 215, 0, 0.08) 100%);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 153, 51, 0.2);
}

.nav-link.active::before {
    width: 90%;
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 3px;
    background: linear-gradient(90deg, #FF9933 0%, #FFD700 100%);
    border-radius: 3px 3px 0 0;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 9px;
    margin-left: 6px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 220px;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    border-radius: 8px;
    border-top: 3px solid #FF9933;
    overflow: hidden;
    opacity: 0;
    animation: dropdownFadeIn 0.3s ease forwards;
    padding: 8px 0;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    color: #1a237e;
    /* Match main menu text color */
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #FF9933 0%, #FFD700 100%);
    transform: scaleY(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-content a:hover {
    background: linear-gradient(90deg, rgba(255, 153, 51, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    color: #FF9933;
    padding-left: 28px;
    font-weight: 600;
}

.dropdown-content a:hover .dropdown-icon {
    transform: scale(1.2);
}

.dropdown-content a:hover::before {
    transform: scaleY(1);
}

.dropdown-content a::after {
    content: '→';
    position: absolute;
    right: 20px;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #FF9933;
    font-weight: bold;
}

.dropdown-content a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile Navigation Toggle (for responsive) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #FF9933;
    /* saffron lines */
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
    margin-right: 8px;
}

.nav-toggle:hover {
    color: #FF9933;
}

/* Responsive Navigation */
@media (max-width: 1024px) {
    .main-nav-inline {
        gap: 1px;
    }

    .nav-link {
        padding: 10px 14px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {

    /* Header layout: nav toggle left, logo center, profile/login right */
    .header-main {
        padding: 10px 12px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header-logo-section {
        flex: 1;
        justify-content: center;
    }

    .header-title h1 {
        font-size: 18px;
    }

    .header-subtitle {
        font-size: 8px;
    }

    .header-actions {
        margin-left: auto;
        justify-content: flex-end;
        gap: 8px;
    }

    /* SOS button on mobile when moved to top bar */
    .header-top-bar .btn-sos-emergency {
        display: inline-flex;
        padding: 6px 12px;
        font-size: 11px;
        line-height: 1.2;
        margin-right: 8px;
    }

    /* Mobile nav drawer */
    .main-nav-inline {
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        padding: 12px 10px 14px;
        gap: 4px;
        display: none;
    }

    .main-nav-inline.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 10px 14px;
        border-radius: 6px;
        justify-content: space-between;
    }

    .nav-dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        border: 1px solid #e0e0e0;
        margin-top: 5px;
        border-radius: 6px;
        background: #ffffff;
        opacity: 1;
        animation: none;
    }

    .dropdown-content::before {
        display: none;
    }

    /* Mobile submenu items - ensure strong contrast */
    .main-nav-inline .dropdown-content a,
    .main-nav-inline .nav-dropdown .dropdown-content a,
    .dropdown-content a {
        color: #1b1b1b !important;
        font-weight: 600 !important;
    }

    /* Target all spans inside dropdown links */
    .main-nav-inline .dropdown-content a span,
    .main-nav-inline .nav-dropdown .dropdown-content a span,
    .dropdown-content a span {
        color: #1b1b1b !important;
        display: inline !important;
        opacity: 1 !important;
        font-size: 13px;
    }

    .main-nav-inline .dropdown-content a:hover,
    .main-nav-inline .nav-dropdown .dropdown-content a:hover,
    .dropdown-content a:hover {
        color: #1b1b1b !important;
        background: rgba(27, 27, 27, 0.08) !important;
    }

    /* Ensure spans stay dark blue on hover too */
    .main-nav-inline .dropdown-content a:hover span,
    .main-nav-inline .nav-dropdown .dropdown-content a:hover span,
    .dropdown-content a:hover span {
        color: #1b1b1b !important;
    }

    /* Mobile profile/login: show icon on right */
    .profile-badge-trigger {
        padding: 6px;
        box-shadow: none;
        background: transparent;
        border: none;
    }

    .profile-info {
        display: none;
    }

    .profile-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
        background-image: url('/images/mobile-login-badge.svg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        color: transparent;
        /* hide initial text */
        font-size: 0;
        border: 3px solid #FF9933;
        /* Saffron border for strong contrast */
        background-color: #ffffff;
        /* White background as fallback */
    }

    .profile-dropdown-arrow {
        display: none;
    }

    /* Login button as circular icon on mobile */
    #userLoginBtnTop {
        padding: 0;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background-image: url('/images/mobile-login-badge.svg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border: 3px solid #FF9933;
        /* Saffron border for strong contrast */
        background-color: #ffffff;
        /* White background as fallback */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
        position: relative;
        overflow: hidden;
    }

    #loginBtnTextTop {
        border: none;
        font-size: 0;
        display: none;
        /* Hide text completely */
    }

    /* Hide login icon on mobile when user is logged in */
    body.user-logged-in #userLoginBtnTop {
        display: none;
    }
}

/* ============================================
   FOOTER STYLES - Professional Redesign
   ============================================ */

.main-footer {
    background: linear-gradient(180deg, #1a237e 0%, #0d1440 100%);
    color: white;
    padding: 0;
    margin-top: auto;
    border-top: 4px solid #FFD700;
    box-shadow: 0 -2px 10px rgba(255, 215, 0, 0.3);
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 30px;
    background: rgba(255, 255, 255, 0.02);
    align-items: start;
}

/* Footer Column 1: About */
.footer-about {
    padding-right: 20px;
}

.footer-logo-title-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-logo-wrapper {
    margin-bottom: 0;
    flex-shrink: 0;
}

.footer-logo-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.footer-logo-link:hover {
    transform: scale(1.05);
}

.footer-title-link {
    text-decoration: none;
    display: block;
    transition: opacity 0.3s ease;
}

.footer-title-link:hover {
    opacity: 0.9;
}

.footer-title-link:hover .footer-title {
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}

.footer-logo {
    height: 120px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    border-radius: 0;
    background: transparent;
    padding: 8px;
    border: none;
    transition: all 0.3s ease;
    display: block;
}

.footer-logo-link:hover .footer-logo {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transform: scale(1.05);
}

.footer-title {
    font-size: 26px;
    font-weight: bold;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Playfair Display', serif;
}

.footer-title-shyam {
    color: white;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.footer-title-sarathi {
    color: #FF9933;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.footer-title-link:hover .footer-title-shyam {
    color: white;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

.footer-title-link:hover .footer-title-sarathi {
    color: #FF9933;
    text-shadow: 0 2px 8px rgba(255, 153, 51, 0.6);
}

.footer-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.footer-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.social-icon:hover {
    background: #FFD700;
    color: #1a237e;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* Footer Column 2: Emergency Support */
.footer-emergency {
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.footer-column-title {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Playfair Display', serif;
    border-left: 4px solid #FFD700;
    padding-left: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.footer-icon-red {
    color: #dc3545;
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(220, 53, 69, 0.4));
}

.footer-divider-gold {
    width: 4px;
    height: 24px;
    background: #FFD700;
    display: inline-block;
    margin-right: 12px;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.emergency-box-red {
    background: #A52A2A;
    /* Reddish/maroon background - more reddish */
    border: 2px solid #dc3545;
    border-top: 3px solid #FFD700;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(165, 42, 42, 0.4);
    transition: all 0.3s ease;
    min-height: 45px;
    display: flex;
    align-items: center;
}

.emergency-box-red:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 0, 0, 0.5);
    border-top-color: #FFD700;
}

.emergency-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.emergency-icon {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.emergency-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.emergency-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
    display: inline-block;
}

.emergency-value {
    font-size: 16px;
    font-weight: bold;
    color: white;
    line-height: 1.2;
    display: inline-block;
}

.report-incident-btn-red {
    width: 100%;
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.report-incident-btn-red:hover {
    background: #c82333;
    border-color: #FFD700;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.5), 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.btn-icon {
    font-size: 18px;
}

/* Footer Column 3 & 4: Mela Information & Digital Services */
.footer-info,
.footer-services {
    padding: 0 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
    min-height: 24px;
    display: flex;
    align-items: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 4px 0;
    position: relative;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    color: #FFD700;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #FFD700;
    padding-left: 18px;
    text-decoration: underline;
    text-decoration-color: #FFD700;
    text-underline-offset: 4px;
}

.footer-links a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.5);
    padding: 24px 30px;
    text-align: center;
    border-top: 2px solid #FFD700;
    box-shadow: 0 -2px 8px rgba(255, 215, 0, 0.2);
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    line-height: 1.6;
}

.footer-location {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.footer-devotional {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
}

.footer-devotional::before {
    content: '🕉️';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #1a237e 0%, #0d1440 100%);
    padding: 0 15px;
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
}

.devotional-text {
    margin: 8px 0;
    font-size: 18px;
    color: #FFD700;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
    letter-spacing: 1px;
    font-family: 'Playfair Display', serif;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Responsive: For smaller screens, allow wrapping */
@media (max-width: 1200px) {
    .header-main {
        flex-wrap: wrap;
        gap: 10px;
    }

    .main-nav-inline {
        order: 3;
        width: 100%;
        padding: 10px 0;
        border-top: 1px solid #e0e0e0;
        margin-top: 10px;
    }

    .header-logo-section {
        flex: 0 0 auto;
    }

    .header-actions {
        margin-left: auto;
    }
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .header-main {
        padding: 10px 12px;
    }

    .header-logo {
        width: 50px;
        height: 50px;
    }

    .header-title h1 {
        font-size: 18px;
    }

    .header-subtitle {
        font-size: 8px;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 11px;
    }

    .btn-sos-emergency,
    .btn-user-login {
        padding: 8px 12px;
        font-size: 11px;
    }

    .header-top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .header-title h1 {
        font-size: 24px;
    }

    .btn-sos-emergency,
    .btn-user-login {
        padding: 10px 15px;
        font-size: 12px;
    }

    .nav-link {
        padding: 10px 12px;
        font-size: 11px;
    }
}