@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;

html {
  overflow-y: scroll !important;
}

.gov-inner-container,
.nav-inner-container {
  max-width: 1200px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* Apply the fonts to specific elements or the whole page */
body {
  font-family: "Inter", sans-serif;
  @apply text-gray-800 antialiased;
}

/* Ensure the main page content never bleeds over the fixed header */
#main-content {
  position: relative;
  z-index: 0;
  isolation: isolate;
}

/* nav bar  */
.navbar {
  background-color: #fff;
  height: 100%;
  width: 100%;
  z-index: 50;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0rem;
  height: 100%;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
}

.nav-links li a {
  color: #1f2937; /* text-gray-800 */
}

.nav-links li a.text-white {
  color: #ffffff;
}

.nav-links li a:hover {
  color: green; /* hover:text-amber-600 */
}

.nav-item {
  position: relative;
}

.nav-link {
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  color: black;
  font-size: 1.25rem; /* text-xl */
  transition: color 0.3s;
}

.nav-link:hover {
  color: #f59e0b; /* hover:text-amber-600 */
}



@media (max-width: 720px) {
  .navbar-container {
    padding: 0.1rem 2rem;
  }

  .logo {
    height: 2rem;
    width: 4rem;
    object-fit: cover;
  }
}

.top-bar {
}

.top-bar .govt-logo {
  height: 4rem;
  width: auto;
  object-fit: cover;
}

.registration-cta {
  color: red;
}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}
.animate-marquee {
  display: inline-block;
  min-width: 100%;
  animation: marquee 12s linear infinite;
}

/* ── Sticky Header & Navbar on Scroll (30% less size) ── */
.gov-main-header {
  position: relative !important;
  z-index: 999999 !important;
  background-color: #ffffff !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-sticky-navbar {
  position: relative !important;
  z-index: 999998 !important;
  background-color: #046307 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-sticky-header {
  position: relative !important;
  z-index: 999998 !important;
  background-color: #046307 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gov-emblem,
.gov-brand-divider,
.gov-title-bn,
.gov-title-en,
.gov-subtitle,
.main-sticky-navbar .nav-links,
.main-sticky-navbar .nav-links a,
.main-sticky-navbar .nav-links span,
.main-sticky-navbar .nav-links svg {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrolled state for Header (Fixed perfectly to viewport) */
body.is-scrolled .gov-main-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 64px !important;
  max-height: 64px !important;
  z-index: 999999 !important;
  background-color: #ffffff !important;
  background: #ffffff !important;
  padding: 6px 0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
  border-bottom: 2px solid #006633 !important;
  overflow: hidden !important;
  isolation: isolate !important;
  will-change: transform !important;
}

/* Extra solid white paint — prevents ANY content showing through the header */
body.is-scrolled .gov-main-header::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100% !important;
  background: #ffffff !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

/* Make all direct children of the header appear above the white paint layer */
body.is-scrolled .gov-main-header > * {
  position: relative !important;
  z-index: 1 !important;
}

/* Hide the green top utility bar when scrolled — it's not fixed and causes bleed */
body.is-scrolled .gov-top-bar {
  display: none !important;
}

body.is-scrolled .gov-emblem {
  width: 50px !important;
  height: 50px !important;
}

body.is-scrolled .gov-brand-divider {
  height: 42px !important;
}

body.is-scrolled .gov-title-bn {
  font-size: 16px !important;
  margin-bottom: 0 !important;
}

body.is-scrolled .gov-title-en {
  font-size: 11px !important;
  margin-bottom: 0 !important;
}

body.is-scrolled .gov-subtitle {
  display: none !important;
}

/* গ্রাম আদালত মামলা button — 30% smaller when scrolled */
.gov-village-court-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.is-scrolled .gov-village-court-btn {
  padding: 2px 8px !important;
  border-radius: 6px !important;
}

body.is-scrolled .gov-village-court-btn .fas.fa-balance-scale {
  font-size: 14px !important;
  margin-bottom: 0 !important;
}

body.is-scrolled .gov-village-court-btn span:first-of-type {
  font-size: 9px !important;
  line-height: 1.2 !important;
}

body.is-scrolled .gov-village-court-btn span:last-of-type {
  font-size: 8px !important;
  margin-top: 0 !important;
}


/* Scrolled state for Desktop Navbar */
body.is-scrolled .main-sticky-navbar {
  position: fixed !important;
  top: 64px !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 999998 !important;
  background-color: #046307 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

body.is-scrolled .main-sticky-navbar .nav-links {
  gap: 1.25rem !important;
  padding-top: 0.125rem !important;
  padding-bottom: 0.125rem !important;
}

body.is-scrolled .main-sticky-navbar .nav-links a {
  font-size: 10px !important;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

body.is-scrolled .main-sticky-navbar .nav-links svg {
  width: 13px !important;
  height: 13px !important;
}

body.is-scrolled .main-sticky-navbar .nav-links span.h-6.w-6 {
  width: 18px !important;
  height: 18px !important;
}

/* Mobile responsive fixed positioning */
@media (max-width: 991px) {
  body.is-scrolled .gov-main-header {
    height: 52px !important;
    max-height: 52px !important;
    padding: 4px 0 !important;
  }
  body.is-scrolled .gov-emblem {
    width: 36px !important;
    height: 36px !important;
  }
  body.is-scrolled .gov-title-bn {
    font-size: 14px !important;
  }
  body.is-scrolled .gov-title-en {
    font-size: 10px !important;
  }
  body.is-scrolled .mobile-sticky-header {
    position: fixed !important;
    top: 52px !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 999998 !important;
    background-color: #046307 !important;
    height: 45px !important;
  }
}
