/* ---------- Global Reset Body ---------- */
html, body {
  height: 100%;
  margin: 0;
  font-family: Segoe UI, sans-serif;
  color: #000000;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;

  /* Subtle Grid Pattern replacing angled mesh */
  background-color: #ffffff;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  background-attachment: fixed;
}


/* ---------- VANTA Background Container ---------- */
.vanta-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  background-color: transparent; /* Let background pattern show */
}


/* ---------- Main Content Area ---------- */
.main-wrapper {
  position: relative;
  z-index: 10;
}

.content {
  margin-left: 0;
  padding: 24px;
  min-height: 100vh;
  background: rgba(255, 255, 255, 0.95); /* Translucent for pattern visibility */
  color: #000000;
  border-radius: 8px;
}


/* ---------- Utility Styles ---------- */
.white-page {
  background: #fff;
  padding: 40px;
  border-radius: 6px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  color: #000000;
}

.download-btn {
  display: inline-block;
  padding: 10px 18px;
  background: #17599b;
  color: #000000;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s ease;
}
.download-btn:hover {
  background: #0d3f70;
  color: #000000;
}


/* ---------- Navbar ---------- */
header.bg-gray-800 {
  background-color: #FFFFFF !important;
  padding: 6px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.site-nav a,
.site-nav button {
  color: #000000 !important;
  text-decoration: none;
  padding: 8px 14px;
  display: inline-block;
  line-height: 1.2;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
}

.site-nav a:hover,
.site-nav button:hover {
  color: #17599b !important;
}

.site-nav ul.bg-gray-800 {
  background-color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  border-radius: 4px;
  margin-top: 0;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
}

.site-nav li:hover > ul {
  display: block;
}


/* ---------- DGMS Circulars & Land Resources Table ---------- */
.dgms-table-container {
  max-width: 1200px;
  margin: 40px auto;
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

.dgms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  color: #000;
}

.dgms-table th {
  background: #17599b;
  color: #fff;
  text-align: left;
  padding: 12px 10px;
  border: 1px solid #ddd;
}

.dgms-table td {
  border: 1px solid #ddd;
  padding: 10px;
  vertical-align: top;
}

.dgms-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.dgms-table tr:hover {
  background-color: #e5f0ff;
}

.dgms-section-title {
  font-size: 22px;
  font-weight: 700;
  color: #17599b;
  margin: 30px 0 10px;
  border-bottom: 2px solid #17599b;
  padding-bottom: 4px;
}


/* ---------- Dropdown Styles ---------- */
.site-nav ul.bg-gray-800 a {
  color: #000000 !important;
  background-color: transparent !important;
  padding: 10px 16px;
  display: block;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 250px;
}

/* Dropdown menu base styles */
.dropdown-menu {
  top: 100%;  /* right below parent button */
  margin-top: 0; /* No extra margin */
  padding: 0.5rem 0; /* Vertical padding inside menu */
  position: absolute;
  display: none;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 16rem;
  z-index: 1000;
}

/* Fix: Class to force submenu to open to the left */
.dropdown-menu .dropdown-submenu.open-left {
  left: auto;       /* Reset the default left positioning */
  right: 100%;      /* Push the menu to the left side of the parent */
  margin-left: -2px; /* Optional: tiny overlap to make it look connected */
}

.site-nav ul.bg-gray-800 > li:not(:last-child),
.site-nav ul.bg-gray-800 ul > li:not(:last-child) {
  border-bottom: 1px solid #d1d5db;
}

.site-nav ul.bg-gray-800 a:hover {
  background-color: #e5f0ff !important;
  color: #000000 !important;
}

.site-nav li {
  position: relative;
}


/* ---------- Miscellaneous ---------- */
.resource-card {
  background: #374151;
  color: #000000;
}

.category-toggle {
  color: #000000;
}

.subs {
  color: #000000;
}

h1, h2, h3, h4, h5, h6 {
  color: #000000;
}

a {
  color: #000000;
}

small {
  color: #000000;
}


/* ---------- Nested Dropdown Fix ---------- */
.site-nav ul.bg-gray-800 ul {
  position: absolute;
  top: 0;
  left: 100%;
  margin-top: 0;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  display: none;
  background-color: #FFFFFF !important;
  z-index: 1050;
}
.site-nav ul.bg-gray-800 li:hover > ul {
  display: block;
}
