:root {
    --primary-color: #3b0b7c;
    --secondary-color: #5e17eb;
    --accent-color: #ff9a9e;
    --text-dark: #111111; /* Darker dark text for better readability */
    --text-light: #333333; /* Darker light/muted text for better readability */
}

/* ===== PRELOADER ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-logo {
    height: 80px;
    width: auto;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

body {
    font-family: 'Inter', sans-serif !important;
    color: var(--text-dark) !important;
    line-height: 1.6;
}

/* Ensure all normal text, paragraphs, lists, table content, spans, small text have a similar highly legible size and dark color, except for Hindi */
p, li, td, th, label, .small, .text-muted, .text-light, span:not(.badge):not(.fa):not(.bi):not(.ticker-right span):not(.navbar-links) {
    font-size: 14.8px !important;
    color: #222222; /* Removed !important to allow custom colored backgrounds to override naturally */
    font-family: 'Inter', sans-serif !important;
}

/* Ensure spans inside headings retain the heading's font size and don't get overridden by general span font-size rules */
h1 span:not(.badge), h2 span:not(.badge), h3 span:not(.badge), h4 span:not(.badge), h5 span:not(.badge), h6 span:not(.badge) {
    font-size: inherit !important;
}

/* Style main section titles (like OUR DEPARTMENTS) to be beautifully large, balanced and premium */
h2.fw-bold.text-primary, .section-header h2 {
    font-size: 2.5rem !important;
}

/* Force white/light text inside blue or dark backgrounds, gradients, buttons, footers, tickers, and badges to fix black-on-blue issues */
.ibvte-ticker-bar, .ibvte-ticker-bar *,
.ibvte-navbar-wrapper, .ibvte-navbar-wrapper *,
.ibvte-footer-main, .ibvte-footer-main *,
.bg-primary, .bg-primary *,
.bg-danger, .bg-danger *,
.bg-success, .bg-success *,
.bg-dark, .bg-dark *,
.badge, .badge *,
.btn-primary, .btn-primary *,
.btn-danger, .btn-danger *,
.btn-success, .btn-success * {
    color: #ffffff !important;
}

/* Force dropdown menu items (white BG) to have black text */
.ibvte-dropdown, .ibvte-dropdown *,
.dropdown-menu, .dropdown-menu *,
.dropdown-menu .dropdown-item {
    color: #222222 !important;
}

/* Keep dropdown item hover states white/primary colored as designed */
.ibvte-dropdown .dropdown-item:hover,
.dropdown-menu .dropdown-item:hover {
    color: #ffffff !important;
    background-color: var(--primary-color) !important;
}

/* Force white/light text inside sub-page hero headers (.ibvte-page-hero) to fix black-on-purple breadcrumbs and subtitles */
.ibvte-page-hero,
.ibvte-page-hero *,
.ibvte-page-hero p,
.ibvte-page-hero li,
.ibvte-page-hero span,
.ibvte-page-hero a {
    color: #ffffff !important;
}

/* Maintain light gold accent for breadcrumb links in hero headers */
.ibvte-page-hero .ibvte-breadcrumb .breadcrumb-item a,
.ibvte-page-hero .breadcrumb-item a {
    color: #ffe082 !important;
}

/* Keep anchor hover states inside footer white/gold as designed */
.ibvte-footer-main a:hover {
    color: #ffd700 !important;
}
.ibvte-footer-main a {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Keep gold highlights and warning-colored texts in footer intact */
.ibvte-footer-main .footer-org-name,
.ibvte-footer-main .fstat-num,
.ibvte-footer-main .footer-logo-tagline,
.ibvte-footer-main .footer-link-list li a i,
.ibvte-footer-main .fci-icon,
.ibvte-footer-main .fa-map-pin {
    color: #ffd700 !important;
}

/* Force mobile offcanvas menu links to have black text on their white BG */
.offcanvas, .offcanvas *,
.ibvte-offcanvas-nav, .ibvte-offcanvas-nav *,
.offcanvas-body, .offcanvas-body * {
    color: #222222 !important;
}

/* Keep mobile offcanvas menu links white on hover/active */
.offcanvas-body a:hover,
.ibvte-offcanvas-nav .nav-link:hover,
.ibvte-offcanvas-nav .dropdown-item:hover {
    color: #ffffff !important;
    background-color: var(--primary-color) !important;
}

/* Global paragraph justify alignment */
p {
    text-align: justify !important;
}

/* Exclude Hindi from being converted to English fonts; keep it in Noto Sans Devanagari */
:lang(hi), .ibvte-hindi-name, [class*="hindi"], [class*="devanagari"] {
    font-family: 'Noto Sans Devanagari', sans-serif !important;
}

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

.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: #fff !important;
    transition: transform 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4);
    color: #fff !important;
}

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

/* Top Ticker Bar */
.ibvte-ticker-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 15px;
    min-height: 34px;
    overflow: hidden;
}

.ticker-left {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    margin-right: 10px;
}

.ticker-left marquee {
    color: #fff;
}

.ticker-link {
    color: #ffe082 !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.ticker-link:hover {
    color: #fff176 !important;
    text-decoration: underline;
}

.ticker-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0;
    white-space: nowrap;
    font-size: 12px;
}

.ticker-auth-link {
    color: #fff !important;
    text-decoration: none;
    padding: 0 8px;
    font-weight: 600;
    transition: color 0.2s;
}

.ticker-auth-link:hover {
    color: #ffe082 !important;
}

.ticker-sep {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

/* Main Header Brand Area */
.ibvte-header-brand {
    background: #ffffff;
    border-bottom: 3px solid #e0e0e0;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(59,11,124,0.07);
}

.ibvte-logo-img {
    height: 150px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    border: none;
}

.ibvte-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ibvte-hindi-name {
    font-size: calc(1.7rem + 0.6vw) !important;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.4;
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
    letter-spacing: 0.2px;
}

.ibvte-english-name {
    font-size: calc(1.05rem + 0.3vw) !important;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    line-height: 1.4;
    margin-top: 18px !important;
}

.ibvte-sub-name {
    display: none;
}

/* Government Logos */
.ibvte-govt-logos {
    gap: 15px;
}

.ibvte-govt-logo {
    object-fit: contain;
    max-height: 72px;
    transition: transform 0.2s ease;
}

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

/* Navigation Bar */
.ibvte-navbar-wrapper {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 3px 10px rgba(59,11,124,0.25);
    position: relative;
    z-index: 1000;
}

/* ── Sticky state ── */
.ibvte-navbar-wrapper.navbar-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    box-shadow: 0 4px 20px rgba(59,11,124,0.45);
    animation: navSlideDown 0.35s ease forwards;
}

@keyframes navSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.ibvte-navbar-wrapper .navbar {
    padding: 0;
    background: transparent !important;
}

.ibvte-navbar-wrapper .navbar-nav {
    align-items: center;
    justify-content: center !important;
    width: 100%;
}

.ibvte-navbar-wrapper .navbar-links {
    color: #fff !important;
    font-size: 14.5px;
    font-weight: 600;
    padding: 12px 5px !important;
    text-transform: uppercase;
    letter-spacing: 0.1px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.ibvte-navbar-wrapper .navbar-links:hover,
.ibvte-navbar-wrapper .navbar-links:focus {
    background: rgba(255,255,255,0.15);
    color: #ffe082 !important;
}

/* Dropdown Menus */
.ibvte-dropdown {
    border: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 25px rgba(59,11,124,0.2);
    background: #fff;
    min-width: 220px;
    padding: 5px 0;
    margin-top: 0;
    border-top: 3px solid var(--primary-color);
}

.ibvte-dropdown .dropdown-item {
    font-size: 15.5px;
    font-weight: 600;
    color: #333;
    padding: 10px 18px;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.ibvte-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

/* Hide default bootstrap/font-awesome caret via ::after */
.ibvte-navbar-wrapper .dropdown-toggle::after {
    display: none !important;
}

/* Custom premium transitions for inline dropdown carets */
.dropdown-caret-icon {
    font-size: 10px;
    margin-left: 6px;
    vertical-align: middle;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

.ibvte-navbar-wrapper .nav-item.dropdown:hover .dropdown-caret-icon {
    transform: rotate(180deg);
    opacity: 1;
}

/* Hover-open for desktop submenus */
@media (min-width: 992px) {
    .ibvte-navbar-wrapper .nav-item.dropdown:hover > .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        animation: dropdownFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

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

.ibvte-dropdown .dropdown-item:hover {
    background: var(--primary-color);
    color: #fff !important;
    padding-left: 25px;
}

/* Apply For Affiliation Button in Nav */
.ibvte-apply-btn > .navbar-links {
    background: deeppink !important;
    border-radius: 50px !important;
    margin: 5px 5px !important;
    padding: 7px 16px !important;
    color: #fff !important;
}

.ibvte-apply-btn > .navbar-links:hover {
    background: #c2185b !important;
}

/* Mobile Toggler */
.ibvte-toggler {
    color: white !important;
    background: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
}

/* Offcanvas Nav styles */
.ibvte-offcanvas-nav .nav-link {
    color: #333 !important;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    text-transform: uppercase;
}

.ibvte-offcanvas-nav .nav-link:hover {
    background: var(--primary-color);
    color: #fff !important;
}

.ibvte-offcanvas-nav .dropdown-item {
    font-size: 15px;
    padding: 8px 24px;
    border-bottom: 1px solid #f5f5f5;
}

/* Old nav link hover (kept for compatibility) */
.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    background-color: var(--primary-color);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Notice Modal circle effect */
.notice-circle-container {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-15px);}
    60% {transform: translateY(-7px);}
}

/* Card and Hover Effects */
.hover-up {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-up:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card {
    transition: all 0.3s ease;
}

/* Slider Section */
.hero-section {
    overflow: hidden;
}

#heroCarousel .carousel-item {
    height: 720px; 
}

.hero-img {
    width: 100% !important;
    height: 100% !important;
    max-height: 720px !important;
    object-fit: fill !important; 
}

/* 50% less slider height on mobile screens */
@media (max-width: 767px) {
    #heroCarousel .carousel-item {
        height: 360px !important; 
    }
    .hero-img {
        max-height: 360px !important;
    }
}

.hero-content {
    background-position: center !important;
    transition: transform 0.5s ease;
}

/* Leadership Showcase Section */
.leadership-showcase {
    background: #f4f5ff;
}

.board-box {
    border-radius: 30px;
    overflow: hidden;
}

.box-header h4 {
    color: #1d1d4c;
}

.box-scroll {
    background: #f8f9ff;
    border-radius: 24px;
    padding: 12px 14px;
    border: 1px solid #e7eafc;
}

.scroll-card {
    min-width: 150px;
}

.scroll-card-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 3px solid rgba(255, 193, 7, 0.25);
}

.board-big-image {
    min-height: 250px;
}

.board-big-image img,
.gallery-large img,
.director-box img {
    object-fit: cover;
}

.gallery-card {
    background: #fff;
}

.gallery-card img {
    min-height: 120px;
    object-fit: cover;
}

.gallery-caption {
    background: #ffffff;
}

.gallery-caption h6 {
    font-size: 0.95rem;
}

.gallery-caption span {
    color: #6c757d;
}

.gallery-large {
    min-height: 100%;
}

.gallery-large img {
    min-height: 100%;
}

.director-box {
    min-height: 250px;
    overflow: hidden;
}

@media (max-width: 1199px) {
    .board-big-image,
    .director-box {
        min-height: 220px;
    }
}

@media (max-width: 767px) {
    .scroll-card {
        min-width: 120px;
    }
}

@media (max-width: 991px) {
    .director-top {
        padding-bottom: 80px;
    }

    .director-photo-wrapper {
        bottom: -35px;
        width: 100px;
        height: 100px;
    }

    .director-photo {
        width: 100px;
        height: 100px;
    }
}

/* Leadership Showcase Section */
.leadership-showcase {
    background: #f6f7ff;
}

.leadership-panel {
    border-radius: 30px;
    overflow: hidden;
}

.leadership-side {
    min-height: 100%;
}

.leadership-avatar-wrapper {
    width: 68px;
    height: 68px;
    min-width: 68px;
}

.leadership-avatar {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.35);
}

.leadership-image-box {
    min-height: 180px;
    overflow: hidden;
}

.leadership-image-box img {
    width: 100%;
    min-height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.leadership-image-box:hover img {
    transform: scale(1.05);
}

.director-panel {
    border-radius: 30px;
}

.director-top {
    position: relative;
    padding-bottom: 100px;
}

.director-photo-wrapper {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.director-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.director-panel .card-body {
    padding-top: 60px;
}

@media (max-width: 991px) {
    .director-top {
        padding-bottom: 80px;
    }

    .director-photo-wrapper {
        bottom: -35px;
        width: 100px;
        height: 100px;
    }

    .director-photo {
        width: 100px;
        height: 100px;
    }
}

/* Sticky Left Sidebar */
.quick-links-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sidebar-toggle-btn {
    position: absolute;
    right: -30px;
    top: 0;
    width: 30px;
    height: 40px;
    background: var(--primary-color);
    border: none;
    color: white;
    border-radius: 0 5px 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.sidebar-toggle-btn:hover {
    background: var(--secondary-color);
    right: -35px;
    width: 35px;
}

.quick-links-sidebar.sidebar-closed {
    left: -140px;
}

.quick-links-sidebar.sidebar-closed .sidebar-toggle-btn i {
    transform: rotate(0deg);
}

.quick-links-sidebar:not(.sidebar-closed) .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.quick-link-btn {
    display: block;
    width: 140px;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    border-radius: 0 50px 50px 0;
    transition: all 0.3s;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}

.quick-link-btn:hover {
    width: 160px;
    padding-left: 25px;
    color: white;
    box-shadow: 4px 4px 15px rgba(0,0,0,0.2);
}

/* Floating Actions Right */
.floating-actions {
    position: fixed;
    right: 0;
    top: 40%;
    z-index: 1000;
}

.rotate-btn {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background: #e91e63;
    color: white;
    padding: 20px 8px;
    font-weight: bold;
    border-radius: 5px 0 0 5px;
    text-decoration: none;
    font-size: 14px;
}

/* Service Grid (lbspstc style) */
.service-icon-box {
    border-radius: 10px;
    transition: 0.3s;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.service-icon-box i { font-size: 2.5rem; margin-bottom: 10px; }

/* Portal Cards */
.portal-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 200px;
    z-index: 1;
}

.portal-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}

.portal-bg-icon {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    opacity: 0.15;
    transform: rotate(-15deg);
    z-index: 0;
    pointer-events: none;
}

/* Additional Color Utils */
.bg-orange { background-color: #ff9800 !important; }
.bg-cyan { background-color: #00bcd4 !important; }
.bg-pink { background-color: #e91e63 !important; }
.bg-purple { background-color: #9c27b0 !important; }
.bg-teal { background-color: #009688 !important; }
.bg-orange { background: #ff9800; }
.bg-cyan { background: #00bcd4; }
.bg-pink { background: #e91e63; }
.bg-teal { background: #009688; }

/* Logo Marquee Animation */
.logo-marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.logo-track {
    display: flex;
    width: calc(250px * 22); /* Adjust based on logo count */
    animation: scrollLogos 30s linear infinite;
}

@keyframes scrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 11)); }
}

.logo-track:hover {
    animation-play-state: paused;
}

/* ===== EXTRA EFFECTS ===== */

/* Scroll Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Zoom Effect for Cards/Images */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Click Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple:after {
    content: "";
    background: rgba(255, 255, 255, 0.3);
    display: block;
    position: absolute;
    border-radius: 50%;
    padding-top: 240%;
    padding-left: 240%;
    margin-top: -120%;
    margin-left: -120%;
    opacity: 0;
    transition: all 0.8s;
}

.ripple:active:after {
    padding: 0;
    margin: 0;
    opacity: 1;
    transition: 0s;
}

/* Magnetic Hover for Icons */
.magnetic-icon {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.magnetic-icon:hover {
    transform: scale(1.2) rotate(5deg);
}

/* Popup Specific Styles */
.bg-primary-subtle { background-color: rgba(59, 11, 124, 0.1) !important; }
.bg-success-subtle { background-color: rgba(25, 135, 84, 0.1) !important; }
.bg-warning-subtle { background-color: rgba(255, 193, 7, 0.1) !important; }

@keyframes popupScale {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Section Header Decoration */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-weight: 800;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Slider Caption Text Outline/Border for Maximum Contrast and Visibility */
.carousel-caption h2,
.carousel-caption .display-4 {
    text-shadow: 2px 2px 0px #000000, 
                 -2px -2px 0px #000000, 
                 2px -2px 0px #000000, 
                 -2px 2px 0px #000000,
                 0px 2px 0px #000000,
                 0px -2px 0px #000000,
                 2px 0px 0px #000000,
                 -2px 0px 0px #000000,
                 3px 3px 10px rgba(0,0,0,0.8);
}

.carousel-caption p,
.carousel-caption .lead {
    text-shadow: 1.5px 1.5px 0px #000000, 
                 -1.5px -1.5px 0px #000000, 
                 1.5px -1.5px 0px #000000, 
                 -1.5px 1.5px 0px #000000,
                 0px 1.5px 0px #000000,
                 0px -1.5px 0px #000000,
                 1.5px 0px 0px #000000,
                 -1.5px 0px 0px #000000,
                 2px 2px 8px rgba(0,0,0,0.8);
}


