:root {
    --color-primary: #c62828;      
    --color-secondary: #212121;    
    --color-accent: #ffeb3b;       
    --color-bg: #f5f5f5;          
    --color-surface: #ffffff;      
    --text-default: #333333;
    --text-inverse: #ffffff;
    --radius: 6px;
    --transition: 0.2s ease-in-out;
    --font-sans: 'Roboto', sans-serif;
  }
body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--text-default);
    line-height: 1.5;
}
  

/* Secondary nav bar */
.second-nav {
    background: var(--color-secondary);
    top:9px;
}

.second-nav ul {
    display: flex;
    justify-content: center;
    gap:3;
    list-style: none;
}
.second-nav li {
    margin: 0 1.2rem;
}
.second-nav a {
    color: var(--text-inverse);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius);
    transition: background var(--transition);
}
/* .second-nav a:hover {
    background: rgba(255, 235, 59, 0.15);
} */
.second-nav a i {
    margin-right: 0.4rem;
}

.main-container {
    display: grid;
    grid-template-columns: 3fr 1.2fr;
    gap: 1.5rem;
    padding: 1rem;
}
  
/* On mobile, stack */
@media (max-width: 768px) {
  .header-container {
    background: #fff;
    margin-top: -2rem;
    box-shadow: 0 31px 45px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 1000;
  }
    .main-container {
      display: block;
    }
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
  
.card img {
    width: 100%;
    height: auto;
    display: block;
}
  
.card-content {
    padding: 0.75rem 1rem;
}
.card-content h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.card-content .meta {
    font-size: 0.75rem;
    color: #777;
}

.sidebar-item {
    display: flex;
    margin-bottom: 1rem;
}
.sidebar-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-right: 0.75rem;
}
.sidebar-item .info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.sidebar-item .info .meta {
    font-size: 0.7rem;
    color: #888;
}


/* header-container */
.header-container {
    background: #fff;
    margin-top: -2rem;
    box-shadow: 0 31px 45px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 7rem;
    position: relative;
    z-index: 1000;
  }
  
  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .logo img {
    max-height: 48px;
  }
  
  .nav {
    list-style: none;
    display: flex;
    font-size:1.8rem;
    gap: 1rem;
    margin: 0;
    padding: 0;
  }
  
  .nav li a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
  }
  
  .nav li a:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }
  
  .menu-wrapper {
    position: relative;
    display: none; /* hidden by default on desktop */
  }
  
  .menu-toggle {
    cursor: pointer;
    font-size: 1.5rem;
  }

  .dropdown-content {
    max-height: 300px;
    overflow-y: auto;
  }


  .mobile-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 999;
  }
  
  .mobile-dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .mobile-dropdown-menu li a {
    display: block;
    padding: 4px 15px;
    color: #333;
    text-decoration: none;
  }
  
  .mobile-dropdown-menu li a:hover {
    background: #f1f1f1;
  }
  
  /* Responsive Rules */
  @media (max-width: 991px) {
    .header-container {
    background: #fff;
    margin-top: -2rem;
    box-shadow: 0 31px 45px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 1000;
  }
    .desktop-nav {
      display: none;
    }
  
    .menu-wrapper {
      display: block;
    }
  }
  
  .dropdown-content {
    position: relative;
    width: 300px;
    border: 1px solid #ccc;
    padding: 10px;
    background-color: #f9f9f9;
    overflow: hidden;
}
.district-grid-wrapper {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
}
.district-item {
    /* padding: 8px; */
    background-color: #efeeee;
    margin: 2px;
    text-align: center;
    border-radius: 4px;
}
.list-container {
    max-height: 200px;
    overflow-y: auto;
}
.list-item {
    padding: 8px;
    cursor: pointer;
    margin: 2px;
    background-color: #eaeaea;
    border-radius: 4px;
}
/* .back-btn {
    display: none;
    padding: 5px;
    cursor: pointer;
    margin-bottom: 5px;
    background-color: #ccc;
    border-radius: 4px;
} */
  
.dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  padding: 10px;
  margin-left: -17rem;
  /* border: 1px solid #ddd; */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 999;
}

.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content {
  /* display: block; */
}

.mobile-dropdown-menu {
  position: absolute;
  top: 31px;
  right: -14px;
  width: 132px;
  background: #fff;
  border: 1px solid #ccc;
  z-index: 1000;
}
/* Dropdown wrapper */
.district-wrapper {
  position: absolute;
  background-color: #f1f1f1;
  border: 1px solid #ccc;
  padding: 5px;
  display: none; /* Hidden by default */
}

/* Back button styling */
.back-btn {
     padding: 0px 10px;
    background-color: #efefef;
    color: #333;
    cursor: pointer;
    margin-bottom: 5px;
}

/* District grid styling */
.district-grid {
  display: grid;
  gap: 5px;
}

.district-item a {
  padding: 5px;
  text-decoration: none;
  color: #000;
}

.district-item a:hover {
  background-color: #ddd;
}


#districtContainer {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 0;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden; /* Hides horizontal scrollbar */
    width: auto;
    padding-right: 5px;
  }
  
  /* Scrollbar styling for WebKit browsers */
#districtContainer::-webkit-scrollbar {
    width: 6px;
}
  
#districtContainer::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}
  
#districtContainer::-webkit-scrollbar-thumb {
    background-color: #999;
    border-radius: 10px;
}
  
#districtContainer::-webkit-scrollbar-thumb:hover {
    background-color: #666;
}
  
  /* Firefox scrollbar */
#districtContainer {
    scrollbar-width: thin;
    scrollbar-color: #999 #f0f0f0;
}
  
  
  
  