/**
 * SIHFW Patna - Government Body UI/UX Theme
 * Compliant with Guidelines for Indian Government Websites (GIGW 3.0)
 * Deep Navy, Saffron Gold, Accessible Contrast & Responsive Hierarchy
 */

:root {
  --gov-navy-dark: #072540;
  --gov-navy: #0b3c68;
  --gov-navy-light: #155288;
  --gov-saffron: #e67e22;
  --gov-saffron-light: #f39c12;
  --gov-green: #1b6e3b;
  --gov-maroon: #8e1b1b;
  --gov-bg-gray: #f4f7fa;
  --gov-text-dark: #1e293b;
  --gov-text-muted: #64748b;
  --gov-border: #e2e8f0;
}

/* Base Accessibility Scaling */
body.font-sm { font-size: 14px !important; }
body.font-md { font-size: 16px !important; }
body.font-lg { font-size: 18px !important; }

/* High Contrast Accessibility Mode */
body.high-contrast {
  background-color: #000000 !important;
  color: #ffffff !important;
}
body.high-contrast .header-inner,
body.high-contrast .card,
body.high-contrast .admin-content-card,
body.high-contrast .table-responsive,
body.high-contrast section {
  background-color: #121212 !important;
  color: #ffffff !important;
  border-color: #ffff00 !important;
}
body.high-contrast a,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5 {
  color: #ffff00 !important;
}

/* Indian Tricolor Strip */
.gov-tricolor-strip {
  height: 4px;
  width: 100%;
  background: linear-gradient(to right, #ff9933 0%, #ff9933 33.3%, #ffffff 33.3%, #ffffff 66.6%, #138808 66.6%, #138808 100%);
}

/* Accessibility Top Utility Bar */
.gov-topbar {
  background: var(--gov-navy-dark);
  color: #cbd5e1;
  font-size: 0.8rem;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.gov-topbar a {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.2s;
}
.gov-topbar a:hover {
  color: var(--gov-saffron-light);
}
.gov-accessibility-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 1px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 3px;
  margin-left: 4px;
  cursor: pointer;
  line-height: 1.2;
}
.gov-accessibility-btn:hover,
.gov-accessibility-btn.active {
  background: var(--gov-saffron);
  border-color: var(--gov-saffron);
  color: #fff;
}
.gov-helpline-pill {
  background: rgba(230, 126, 34, 0.2);
  border: 1px solid var(--gov-saffron);
  color: #ffb74d;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Main Government Header Branding */
.gov-header-inner {
  background: #ffffff;
  padding: 12px 0;
  border-bottom: 2px solid #e2e8f0;
}
.gov-brand-container {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none !important;
}
.gov-emblem-img {
  height: 72px;
  width: auto;
  object-fit: contain;
}
.gov-brand-text h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gov-navy);
  margin: 0;
  line-height: 1.2;
  font-family: 'Mukta', 'Noto Sans Devanagari', sans-serif;
  letter-spacing: -0.2px;
}
.gov-brand-text h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  margin: 3px 0 0;
  letter-spacing: 0.2px;
}
.gov-brand-text p {
  font-size: 0.8rem;
  color: var(--gov-green);
  margin: 2px 0 0;
  font-weight: 600;
}
.gov-nihfw-seal {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* Navigation Bar */
.gov-navbar-bg {
  background: var(--gov-navy);
  border-bottom: 3px solid var(--gov-saffron);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.gov-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.gov-nav-menu > li {
  position: relative;
}
.gov-nav-menu > li > a {
  display: block;
  padding: 12px 16px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.gov-nav-menu > li > a:hover,
.gov-nav-menu > li.active > a {
  background: rgba(255,255,255,0.12);
  color: #ffeb3b;
}
.gov-nav-menu .dropdown-menu {
  border: none;
  border-top: 3px solid var(--gov-saffron);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border-radius: 0 0 6px 6px;
  padding: 6px 0;
  min-width: 250px;
}
.gov-nav-menu .dropdown-item {
  font-size: 0.88rem;
  padding: 9px 18px;
  color: #334155;
  font-weight: 500;
  transition: all 0.15s;
}
.gov-nav-menu .dropdown-item:hover {
  background: #f1f5f9;
  color: var(--gov-navy);
  padding-left: 22px;
}

/* Mobile Nav Drawer */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid #ffffff;
  color: #ffffff;
  font-size: 1.3rem;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}
@media (max-width: 991px) {
  .mobile-menu-btn {
    display: inline-block;
  }
  .gov-nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--gov-navy);
    padding: 10px 0;
  }
  .gov-nav-menu.is-open {
    display: flex;
  }
  .gov-nav-menu .dropdown-menu {
    background: rgba(255,255,255,0.05);
    box-shadow: none;
    border: none;
    padding-left: 15px;
  }
  .gov-nav-menu .dropdown-item {
    color: #e2e8f0;
  }
}

/* News Flash Marquee */
.notice-marquee-wrapper {
  background: #fff8ee;
  border-bottom: 1px solid #fed7aa;
  padding: 8px 0;
}
.notice-marquee-container {
  display: flex;
  align-items: center;
  gap: 14px;
}
.notice-marquee-badge {
  background: var(--gov-saffron);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(230, 126, 34, 0.3);
}
.notice-marquee-text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.notice-marquee-text a {
  color: #1e293b;
  margin-right: 35px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.notice-marquee-text a:hover {
  color: var(--gov-navy);
  text-decoration: underline;
}

/* Leadership Showcase Cards */
.gov-leader-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  padding: 16px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gov-leader-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}
.gov-leader-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gov-navy);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 12px;
}
.gov-leader-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gov-navy);
  margin-bottom: 2px;
}
.gov-leader-role {
  font-size: 0.8rem;
  color: var(--gov-text-muted);
  margin: 0;
  line-height: 1.3;
}

/* Quick Service Citizen Tiles */
.gov-service-tile {
  background: #ffffff;
  border-radius: 10px;
  padding: 22px 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  text-align: center;
  transition: all 0.25s;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.gov-service-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gov-navy);
  transition: background 0.25s;
}
.gov-service-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(11, 60, 104, 0.12);
  border-color: #cbd5e1;
}
.gov-service-tile:hover::before {
  background: var(--gov-saffron);
}
.gov-service-icon {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: #f1f5f9;
  color: var(--gov-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 14px;
  transition: all 0.25s;
}
.gov-service-tile:hover .gov-service-icon {
  background: var(--gov-navy);
  color: #ffffff;
}

/* Section Header Typography */
.gov-section-title {
  position: relative;
  margin-bottom: 30px;
}
.gov-section-title h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gov-navy);
  margin-bottom: 6px;
  font-family: 'Mukta', 'Noto Sans Devanagari', sans-serif;
}
.gov-section-title p {
  color: var(--gov-text-muted);
  font-size: 0.95rem;
  margin: 0;
}
.gov-section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gov-saffron);
  margin-top: 8px;
}
.gov-section-title.text-center::after {
  margin: 8px auto 0;
}

/* Tenders & Notice Widget */
.gov-notice-widget {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  overflow: hidden;
}
.gov-notice-header {
  background: var(--gov-navy);
  color: #ffffff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gov-tab-nav {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.gov-tab-btn {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.gov-tab-btn.active,
.gov-tab-btn:hover {
  color: var(--gov-navy);
  border-bottom-color: var(--gov-saffron);
  background: #ffffff;
}

/* Badges */
.badge-tender {
  background: #c2410c;
  color: #fff;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-recruitment {
  background: #047857;
  color: #fff;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-quotation {
  background: #7e22ce;
  color: #fff;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-notice {
  background: #0369a1;
  color: #fff;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-new {
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  animation: pulseNew 1.5s infinite;
  display: inline-block;
  margin-left: 6px;
}
@keyframes pulseNew {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

/* Cards & Gallery */
.gallery-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  background: #fff;
  transition: transform 0.25s, box-shadow 0.25s;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
}
.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}
.gallery-card-img-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
  background: #1e293b;
}
.gallery-card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.gallery-card:hover .gallery-card-img-wrapper img {
  transform: scale(1.06);
}
.gallery-card-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(11, 60, 104, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}
.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}
.gallery-card-overlay i {
  color: #fff;
  font-size: 2rem;
}
.gallery-card-body {
  padding: 14px;
  flex: 1;
}

/* Lightbox Modal */
.sihfw-lightbox {
  position: fixed;
  z-index: 99999;
  left: 0; top: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sihfw-lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sihfw-lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.sihfw-lightbox-caption {
  color: #fff;
  font-size: 1.1rem;
  margin-top: 14px;
  text-align: center;
  font-weight: 500;
}
.sihfw-lightbox-close {
  position: absolute;
  top: -42px;
  right: 0;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
}

/* Hero Slider */
.hero-slider-container {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #0f172a;
}
.hero-slide {
  display: none;
  position: relative;
  height: 480px;
  background-size: cover;
  background-position: center;
}
.hero-slide.active {
  display: block;
}
.hero-slide::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, rgba(7, 37, 64, 0.85) 0%, rgba(7, 37, 64, 0.45) 100%);
}
.hero-slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 60px;
  color: #fff;
}
.hero-slide-content h1 {
  font-size: 2.3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  max-width: 780px;
  font-family: 'Mukta', 'Noto Sans Devanagari', sans-serif;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hero-slide-content p {
  font-size: 1.1rem;
  color: #f1f5f9;
  margin-bottom: 25px;
  max-width: 650px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.hero-slider-nav {
  position: absolute;
  bottom: 25px;
  right: 40px;
  z-index: 10;
  display: flex;
  gap: 10px;
}
.hero-slider-nav button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.45);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}
.hero-slider-nav button:hover {
  background: var(--gov-saffron);
  border-color: var(--gov-saffron);
}

@media (max-width: 768px) {
  .hero-slide {
    height: 380px;
  }
  .hero-slide-content {
    padding: 0 25px;
  }
  .hero-slide-content h1 {
    font-size: 1.55rem;
  }
}

/* Statistics Ribbon */
.gov-stats-ribbon {
  background: linear-gradient(135deg, var(--gov-navy-dark) 0%, var(--gov-navy) 100%);
  color: #ffffff;
  border-top: 3px solid var(--gov-saffron);
  border-bottom: 3px solid var(--gov-saffron);
  padding: 35px 0;
}
.gov-stat-item {
  text-align: center;
  padding: 15px;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.gov-stat-item:last-child {
  border-right: none;
}
.gov-stat-number {
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffeb3b;
  margin-bottom: 2px;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
}
.gov-stat-label-en {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}
.gov-stat-label-hi {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}
@media (max-width: 768px) {
  .gov-stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 15px;
  }
}

/* Government Footer */
.gov-footer {
  background: var(--gov-navy-dark);
  color: #cbd5e1;
  padding-top: 50px;
  border-top: 4px solid var(--gov-saffron);
}
.gov-footer h3 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}
.gov-footer h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--gov-saffron);
}
.gov-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.gov-footer-links li {
  margin-bottom: 10px;
}
.gov-footer-links a {
  color: #94a3b8;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}
.gov-footer-links a:hover {
  color: var(--gov-saffron-light);
  transform: translateX(4px);
}
.gov-visitor-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 8px 14px;
  display: inline-block;
  margin-top: 15px;
}
.gov-copyright-bar {
  background: #031424;
  padding: 16px 0;
  font-size: 0.82rem;
  color: #64748b;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Admin Panel Modern Styling */
.admin-wrapper {
  background: #f1f5f9;
  min-height: 85vh;
  padding: 30px 0;
}
.admin-sidebar {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  padding: 20px 0;
  border: 1px solid #e2e8f0;
}
.admin-sidebar-header {
  padding: 0 20px 15px;
  border-bottom: 1px solid #edf2f7;
  text-align: center;
}
.admin-sidebar-header h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gov-navy);
  margin-bottom: 4px;
}
.admin-menu {
  list-style: none;
  padding: 10px 0 0;
  margin: 0;
}
.admin-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #475569;
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}
.admin-menu li a:hover,
.admin-menu li.active a {
  background: #eff6ff;
  color: var(--gov-navy);
  border-left-color: var(--gov-navy);
  font-weight: 600;
}
.admin-content-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid #e2e8f0;
}
.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}
.admin-header-bar h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.stat-tile {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
  border-bottom: 4px solid var(--gov-navy);
}
.stat-tile-icon {
  width: 55px;
  height: 55px;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--gov-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.stat-tile-info h3 {
  font-size: 1.7rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1;
}
.stat-tile-info span {
  font-size: 0.85rem;
  color: #64748b;
}
.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-dropzone:hover {
  border-color: var(--gov-navy);
  background: #eff6ff;
}
.preview-thumbnail {
  max-width: 200px;
  max-height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
