/* Importing a professional font family from Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap");

:root {
  --primary-color: #31517f; /* A darker, professional blue */
  --secondary-color: #2c3e50;
  --background-color: #f0f2f5;
  --card-background: #ffffff;
  --text-color: #444;
  --light-text: #999;
  --shadow-color: rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
  color: var(--text-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Navbar and Header --- */
.navbar {
  background-color: #ffffff;
  box-shadow: 0 2px 4px var(--shadow-color);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.logo-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  fill: var(--primary-color);
}

.logo-wrapper h1 {
  font-size: 1.8em;
  font-weight: 600;
  color: var(--secondary-color);
  margin: 0;
}

.logo-title p {
  font-size: 0.9em;
  color: var(--light-text);
  margin: 0;
}

.search-bar-container {
  display: flex;
  align-items: center;
}

#search-form {
  display: flex;
  gap: 10px;
}

#district-search {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-size: 1em;
  width: 250px;
  transition: all 0.3s ease;
}

#district-search:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(49, 81, 127, 0.3);
}

#search-form button {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#search-form button:hover {
  background-color: #254466;
  transform: translateY(-2px);
}

/* --- Main Content Layout --- */
.content-section {
  padding: 40px 0;
}

h2,
h3 {
  color: var(--secondary-color);
  margin-bottom: 25px;
  font-weight: 600;
}

.section-title {
  font-size: 1.5em;
  border-left: 4px solid var(--primary-color);
  padding-left: 15px;
  margin-top: 40px;
}

/* --- Card and Shadow Effects --- */
.card {
  background: var(--card-background);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 15px var(--shadow-color);
  margin-bottom: 25px;
}

.no-data-card {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}

/* --- Table Styling --- */
.table-container {
  overflow-x: auto;
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 6px 15px var(--shadow-color);
  padding: 20px;
}

.responsive-table {
  width: 100%;
  border-collapse: collapse;
}

.responsive-table th,
.responsive-table td {
  text-align: left;
  padding: 15px;
  border-bottom: 1px solid #eef1f4;
}

.responsive-table th {
  background-color: #f8f9fa;
  color: var(--secondary-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9em;
}

.responsive-table tbody tr {
  transition: background-color 0.2s ease;
}

.responsive-table tbody tr:hover {
  background-color: #f6f8fb;
}

/* --- Footer --- */
.footer {
  background-color: var(--secondary-color);
  color: #f8f9fa;
  text-align: center;
  padding: 30px 0;
  margin-top: 40px;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .logo-title {
    align-items: center;
  }

  #district-search {
    width: 100%;
  }

  .table-container {
    padding: 10px;
  }
}

/* Add to existing CSS file */

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.home-button {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.home-button:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Sitemap Styling */
.sitemap-section {
    margin-top: 50px;
    padding: 30px;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 6px 15px var(--shadow-color);
}

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
}

.sitemap-grid a {
    text-decoration: none;
    color: var(--primary-color);
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    display: block;
    transition: all 0.2s ease;
}

.sitemap-grid a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .header-right {
        justify-content: center;
    }
}