/* Common Header and Footer Styles for DIU Silver Jubilee */
/* This file ensures consistent styling across all pages */

:root {
    /* Logo colors: Blue (#0047AB), Green (#228B22), Grey (#808080), White, Red accent (#DC143C) */
    --brand-blue: #0047AB;
    --brand-blue-light: #0066CC;
    --brand-green: #228B22;
    --brand-green-light: #32CD32;
    --brand-grey: #808080;
    --brand-grey-light: #A0A0A0;
    --brand-red: #DC143C;
    --brand-dark-blue: #001837;
    --brand-gray: #F4F7FB;
    --bs-link-hover-color: var(--brand-blue);
}

/* Brand Background Colors */
.bg-brand-blue {
    background-image: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-light) 50%, var(--brand-green) 100%);
    color: #ffffff !important;
}

.bg-brand-dark-blue {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(34, 139, 34, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, 
            rgba(0, 71, 171, 0.98) 0%, 
            rgba(0, 102, 204, 0.96) 25%,
            rgba(34, 139, 34, 0.94) 50%,
            rgba(0, 102, 204, 0.96) 75%,
            rgba(0, 71, 171, 0.98) 100%);
    color: #ffffff !important;
    box-shadow: 
        0 -10px 40px rgba(0, 71, 171, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.bg-brand-gray { 
    background-color: var(--brand-gray) !important; 
}

/* Brand Text Colors */
.text-brand-blue { 
    color: var(--brand-blue) !important;
}

.text-brand-green { 
    color: var(--brand-green) !important;
}

.text-brand-dark-blue { 
    color: var(--brand-dark-blue) !important; 
}

.border-brand-blue { 
    border-color: var(--brand-blue) !important; 
}

.border-transparent { 
    border-color: transparent !important; 
}

.h-20 { 
    height: 5rem; 
}

.h-650px { 
    height: 650px; 
}

/* Celebration Jubilee Header - Standard Style */
.header-bg {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(34, 139, 34, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, 
            rgba(0, 71, 171, 0.98) 0%, 
            rgba(0, 102, 204, 0.96) 25%,
            rgba(34, 139, 34, 0.94) 50%,
            rgba(0, 102, 204, 0.96) 75%,
            rgba(0, 71, 171, 0.98) 100%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    backdrop-filter: blur(12px) saturate(150%);
    box-shadow: 
        0 10px 40px rgba(0, 71, 171, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 2px 8px rgba(0, 0, 0, 0.1);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    transform: translateZ(0);
    will-change: box-shadow;
    -webkit-transform: translateZ(0);
}

.header-bg:hover {
    box-shadow: 
        0 12px 50px rgba(0, 71, 171, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.5) 50%, 
        transparent 100%);
    animation: headerShine 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes headerShine {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.header-bg .container {
    position: relative;
    z-index: 10;
}

.header-bg .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.6rem 1rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.header-bg .nav-link.active {
    color: rgba(255, 255, 255, 0.9) !important;
    border-bottom: none !important;
    padding-bottom: 0.6rem !important;
}

.header-bg .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
}

.header-bg span.fw-bold {
    color: #ffffff !important;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.3);
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.header-bg:hover span.fw-bold {
    text-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(255, 255, 255, 0.4);
}

/* Header Logo Styles */
.header-logo {
    object-fit: cover !important;
    display: block !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* Header Title Styles */
.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    color: #ffffff !important;
    display: inline-block !important;
}

.header-bg:hover .header-title {
    text-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(255, 255, 255, 0.4);
}

/* Footer Logo Styles */
.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: inline-block;
    background-color: #ffffff;
    padding: 10px 15px;
    border-radius: 12px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Global Preloader Styles — short fade, minimal motion (static feel) */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.22s ease-out, visibility 0.22s ease-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

#preloader img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: preloaderFadeIn 0.35s ease-out;
}

@keyframes preloaderFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.7s ease-out;
}

/* Z-index utilities */
.z-index-100 { z-index: 100; }
.z-index-70 { z-index: 70; }
.z-index-60 { z-index: 60; }
.z-index-50 { z-index: 50; }
.z-index-10 { z-index: 10; }
.z-index-5 { z-index: 5; }

.cursor-pointer { cursor: pointer; }

/* Mobile Menu Sidebar Styles */
.mobile-menu-sidebar {
    width: 320px;
    max-width: 85vw;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.08);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom minimal scrollbar for sidebar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.mobile-menu-sidebar.menu-open {
    transform: translateX(0);
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 65;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.mobile-menu-backdrop.backdrop-show {
    opacity: 1;
    pointer-events: all;
}

/* Mobile Menu Button - White Color */
.mobile-menu-btn {
    color: #ffffff !important;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus {
    color: rgba(255, 255, 255, 0.8) !important;
}

.mobile-menu-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Mobile Menu Close Button */
.mobile-close-btn {
    color: #212529 !important;
    transition: all 0.3s ease;
    z-index: 75;
}

.mobile-close-btn:hover {
    color: #0047AB !important;
    transform: rotate(90deg);
}

.mobile-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.25);
    border-radius: 50%;
}

/* Mobile Nav Links */
.mobile-nav-link {
    transition: color 0.2s ease;
    border-radius: 0;
    border-bottom: 1px solid #edf2f7;
    padding: 1rem 0 !important;
    color: #2d3748 !important;
    font-weight: 500 !important;
    font-size: 0.95rem;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background-color: transparent !important;
    color: var(--brand-blue) !important;
}

.mobile-nav-link.active {
    background-color: transparent !important;
    color: var(--brand-blue) !important;
    font-weight: 600 !important;
    box-shadow: none;
}

/* Mobile Menu Logo */
.mobile-menu-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: inline-block;
    max-width: 100%;
}

/* Footer Styles */
footer.bg-brand-dark-blue {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(34, 139, 34, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, 
            rgba(0, 71, 171, 0.98) 0%, 
            rgba(0, 102, 204, 0.96) 25%,
            rgba(34, 139, 34, 0.94) 50%,
            rgba(0, 102, 204, 0.96) 75%,
            rgba(0, 71, 171, 0.98) 100%);
    color: #ffffff !important;
    box-shadow: 
        0 -10px 40px rgba(0, 71, 171, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

/* Ensure consistent font sizes across all pages */
body {
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    /* Make header fully fixed on mobile */
    .header-bg {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 70 !important;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
    
    .header-title {
        font-size: 0.95rem;
        white-space: nowrap;
        color: #ffffff !important;
    }
    
    .header-bg span.fw-bold {
        font-size: 1rem;
    }
    
    /* Ensure content starts below fixed header on mobile */
    body {
        padding-top: 80px;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    html {
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* Allow pull-to-refresh on mobile */
        overscroll-behavior-y: auto;
    }
    
    /* Prevent any movement on scroll */
    .header-bg .container {
        position: relative;
    }
    
    /* Ensure main content scrolls properly */
    main {
        position: relative;
        overflow-x: hidden;
    }
}

/* Notification Badge Styles */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: linear-gradient(135deg, #DC143C 0%, #FF4444 100%);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.9);
    line-height: 1;
    z-index: 10;
    animation: pulse-badge 2s ease-in-out infinite;
}

.notification-badge-mobile {
    top: 8px;
    right: 12px;
    font-size: 0.7rem;
    padding: 3px 7px;
    min-width: 20px;
    height: 20px;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(220, 20, 60, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.9);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 3px 12px rgba(220, 20, 60, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.9);
    }
}

/* Desktop nav link positioning for badges */
.nav-link-with-badge {
    padding-right: 14px !important;
}

#desktop-nav .nav-link-with-badge .nav-link-label {
    display: inline-block;
    padding-right: 4px;
}

/* Mobile nav link positioning for badges */
.mobile-nav-link.position-relative {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 18px;
}

