/* ========================================
   GLOBAL STYLES & UTILITIES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #f5f7fb;
  color: #1f2937;
  overflow-x: hidden;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s ease;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

h1 { font-size: 42px; }
h2 { font-size: 36px; }
h3 { font-size: 28px; }
h4 { font-size: 24px; }
h5 { font-size: 20px; }
h6 { font-size: 16px; }

p {
  margin-bottom: 1em;
  line-height: 1.8;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 16px;
  font-weight: 600;
  transition: 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: #2563eb;
  color: white;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-4px);
  background: #1d4ed8;
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.25);
}

.btn-outline {
  background: transparent;
  border: 2px solid #2563eb;
  color: #2563eb;
}

.btn-outline:hover {
  background: #2563eb;
  color: white;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

.btn-lg {
  padding: 18px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

input, textarea, select {
  font-family: 'Poppins', sans-serif;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 14px;
  transition: 0.3s ease;
  width: 100%;
  min-height: 46px;
  background: #ffffff;
  color: #111827;
  line-height: 1.5;
}

input::placeholder, textarea::placeholder {
  color: #94a3b8;
}

input[type="file"] {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  cursor: pointer;
}

button, select {
  font-family: inherit;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
}

.form-group {
  margin-bottom: 20px;
}

.form-error {
  border-color: #ef4444 !important;
}

.error-message {
  color: #ef4444;
  font-size: 13px;
  margin-top: 5px;
}

.success-message {
  color: #10b981;
  font-size: 13px;
  margin-top: 5px;
}

/* ========================================
   COLORS & UTILITIES
   ======================================== */

.text-primary { color: #2563eb; }
.text-secondary { color: #6b7280; }
.text-danger { color: #ef4444; }
.text-success { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-light { color: #e5e7eb; }
.text-muted { color: #9ca3af; }
.text-white { color: white; }

.bg-primary { background: #2563eb; }
.bg-secondary { background: #6b7280; }
.bg-danger { background: #ef4444; }
.bg-success { background: #10b981; }
.bg-warning { background: #f59e0b; }
.bg-light { background: #f3f4f6; }
.bg-white { background: white; }

/* ========================================
   SPACING UTILITIES
   ======================================== */

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
.p-5 { padding: 40px; }

.px-2 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }

/* ========================================
   CONTAINERS & LAYOUT
   ======================================== */

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Public pages share a fixed header, so reserve its vertical space once. */
main {
  width: min(1100px, calc(100% - 40px));
  min-height: 60vh;
  margin: 0 auto;
  padding: 40px 0 64px;
}

.page-card {
  min-width: 0;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
  margin-top: 20px;
}

.page-card h2,
.page-card h3 {
  color: #0f766e;
}

.muted { color: #64748b; }

.tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 12px;
}

.template-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.template-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.template-item__info { min-width: 0; }
.template-item__title { margin: 0 0 6px; }
.template-item__meta { margin: 0; }
.template-item__actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }

.service-form { max-width: 720px; margin-top: 24px; }
.service-form h3 { margin: 28px 0 14px; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-group-wide { grid-column: 1 / -1; }
.service-history { padding: 32px 0 0; margin-top: 32px; border-top: 1px solid #e2e8f0; }
.table-scroll { overflow-x: auto; }
.search-form { display: flex; gap: 12px; margin: 20px 0; }
.search-form input { flex: 1; }
.search-heading { margin-top: 32px; }
.search-results { display: grid; gap: 16px; margin-top: 16px; }
.search-result { border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px; }
.search-result h3 { margin: 10px 0 4px; font-size: 19px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-top: 24px; }
.gallery-item { padding: 0; text-align: left; border: 0; border-radius: 14px; overflow: hidden; cursor: pointer; background: #fff; box-shadow: 0 5px 18px rgba(15,23,42,.1); }
.gallery-item img { display: block; width: 100%; height: 190px; object-fit: cover; transition: transform .25s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item span { display: grid; gap: 4px; padding: 14px; color: #1f2937; }.gallery-item small { color: #64748b; }
.gallery-lightbox { width: min(96vw, 1100px); max-height: 94vh; padding: 16px; border: 0; border-radius: 16px; background: #111827; color: #fff; }.gallery-lightbox::backdrop { background: rgba(0,0,0,.82); }.gallery-lightbox figure { margin: 30px 0 0; }.gallery-lightbox img { display: block; max-width: 100%; max-height: calc(94vh - 110px); width: auto; height: auto; margin: auto; object-fit: contain; }.gallery-lightbox figcaption { display: grid; gap: 4px; padding-top: 12px; }.lightbox-close { float: right; padding: 8px 12px; border: 1px solid #94a3b8; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; }
.news-detail { max-width: 900px; margin: auto; }.news-back { color: #0f766e; font-weight: 600; }.news-detail__heading { margin: 16px 0 24px; }.news-detail h1 { margin: 12px 0; font-size: clamp(28px,5vw,46px); }.news-hero { margin: 0 0 28px; }.news-hero img { display: block; width: 100%; max-height: none; object-fit: contain; border-radius: 16px; background: #e2e8f0; }.news-content { font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.profile-page { display: grid; gap: 24px; }
.profile-page section { padding: 0; }
.profile-hero { padding: clamp(28px, 5vw, 56px); border-radius: 24px; background: linear-gradient(120deg, #0f766e, #134e4a); color: #fff; box-shadow: 0 14px 36px rgba(15, 118, 110, .22); }
.profile-hero .tag { background: rgba(255,255,255,.16); color: #fff; }.profile-hero h1 { margin: 14px 0 10px; font-size: clamp(30px, 6vw, 52px); }.profile-hero p { max-width: 700px; margin: 0; color: #d1fae5; }
.profile-section { padding: clamp(22px, 4vw, 36px) !important; background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; box-shadow: 0 8px 26px rgba(15,23,42,.06); }
.section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }.section-heading > span { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: #ccfbf1; color: #0f766e; font-weight: 700; }.section-heading h2 { margin: 0 0 3px; font-size: clamp(22px, 3vw, 28px); }.section-heading p { margin: 0; }
.profile-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 14px; background: #e2e8f0; }.profile-facts div { padding: 16px; background: #fff; }.profile-facts dt, .contact-panel dt { font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }.profile-facts dd, .contact-panel dd { margin: 5px 0 0; color: #0f172a; font-weight: 600; overflow-wrap: anywhere; }
.profile-story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }.profile-story-grid article { padding: 20px; border-radius: 14px; background: #f8fafc; }.profile-story-grid h3 { margin-bottom: 10px; }.profile-story-grid p, .profile-prose { margin: 0; color: #475569; }
.boundary-grid, .demography-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }.boundary-grid div, .demography-grid div { display: grid; gap: 6px; min-height: 112px; padding: 18px; border: 1px solid #dbeafe; border-radius: 14px; background: #f8fafc; }.boundary-grid strong { color: #0f766e; }.boundary-grid span { color: #475569; overflow-wrap: anywhere; }.demography-grid strong { color: #0f766e; font-size: clamp(24px, 4vw, 34px); }.demography-grid span { color: #64748b; font-size: 14px; }
.profile-two-column, .contact-map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }.potential-list { display: flex; flex-wrap: wrap; gap: 10px; }.potential-list span { padding: 9px 13px; border-radius: 999px; background: #ecfeff; color: #0f766e; font-weight: 600; }.contact-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }.contact-panel dl { display: grid; gap: 18px; }.map-frame { min-height: 340px; overflow: hidden; border-radius: 14px; background: #e2e8f0; }.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; }.map-placeholder { display: grid; place-items: center; height: 100%; min-height: 340px; padding: 24px; color: #64748b; text-align: center; }

section {
  padding: 90px 40px;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.row-2 {
  grid-template-columns: repeat(2, 1fr);
}

.row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.row-4 {
  grid-template-columns: repeat(4, 1fr);
}

.col-full { grid-column: 1 / -1; }

/* ========================================
   ALERTS
   ======================================== */

.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.alert-info {
  background: #dbeafe;
  color: #0c4a6e;
  border: 1px solid #93c5fd;
}

.alert-close {
  cursor: pointer;
  margin-left: auto;
  font-size: 20px;
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.card-body {
  flex: 1;
}

.card-footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
  margin-top: 20px;
}

/* ========================================
   TABLE STYLES
   ======================================== */

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}

tr:hover {
  background: #f9fafb;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-primary {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none; }
.visible { display: block; }

.rounded { border-radius: 12px; }
.rounded-full { border-radius: 9999px; }

.shadow { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 24px; }
  
  .container {
    padding: 0 30px;
  }
  
  section {
    padding: 60px 30px;
  }
  
  .row-3, .row-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  
  .container {
    padding: 0 20px;
  }
  
  section {
    padding: 40px 20px;
  }
  
  .row, .row-2, .row-3, .row-4 {
    grid-template-columns: 1fr;
  }

  main {
    width: min(100% - 32px, 1100px);
    padding-top: 32px;
    padding-bottom: 48px;
  }

  .page-card { padding: 20px; }

  .template-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .search-form { flex-direction: column; }.gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }.gallery-item img { height: 145px; }.gallery-item span { padding: 10px; font-size: 13px; }.gallery-lightbox { width: 100vw; border-radius: 0; }
  .form-grid { grid-template-columns: 1fr; }.form-group-wide { grid-column: auto; }
  .profile-facts, .profile-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.boundary-grid, .demography-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.profile-two-column, .contact-map-grid { grid-template-columns: 1fr; }.map-frame, .map-frame iframe, .map-placeholder { min-height: 280px; }
  
  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  table {
    font-size: 14px;
  }
  
  th, td {
    padding: 10px 8px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }
  
  .container {
    padding: 0 15px;
  }
  
  section {
    padding: 30px 15px;
  }

  main { width: min(100% - 24px, 1100px); }
  .page-card { padding: 16px; border-radius: 16px; }
  .gallery-grid { grid-template-columns: 1fr; }.gallery-item img { height: 210px; }
  .profile-hero, .profile-section { border-radius: 16px; }.profile-facts, .profile-story-grid, .boundary-grid, .demography-grid { grid-template-columns: 1fr; }.section-heading { gap: 10px; }.map-frame, .map-frame iframe, .map-placeholder { min-height: 240px; }
}
