.page-wrapper {
  background: linear-gradient(180deg, #fdfbf7 0%, #f3eae0 100%);
  min-height: calc(100vh - 120px);
  padding: clamp(24px, 5vw, 40px) clamp(12px, 3vw, 16px) 60px;
}

.top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.btn-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 7px 14px;
  border-radius: 6px;
  transition: all 0.15s ease;
  margin-bottom: 1rem;
}

.btn-nav-back:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.contact-container {
  max-width: 1100px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact-header h2 {
  font-size: clamp(1.7rem, 5vw, 2.25rem);
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.contact-header p {
  color: #6b7280;
  font-size: 1.05rem;
}

/* COMBINED PORTAL & HELPDESK CARD */
.portal-helpdesk-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: clamp(1.25rem, 4vw, 2.25rem) clamp(1rem, 4vw, 2.5rem);
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.03);
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 2.5rem;
  align-items: center;
}

.portal-info-side {
  border-bottom: 1px solid #f1f5f9;
  padding: 0 clamp(0px, 2vw, 2rem) clamp(1rem, 2vw, 1.5rem) 0;
}

.portal-info-side .portal-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}

.portal-info-side h3 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.portal-info-side p {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.portal-info-side .badge-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
}

.helpdesk-side h4 {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.helpdesk-side .helpdesk-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.2rem;
}

.helpdesk-side .helpdesk-subtitle {
  font-size: 0.88rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
}

.helpdesk-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.92rem;
  color: #374151;
  padding: 0;
  margin: 0;
}

.helpdesk-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.helpdesk-list i {
  color: #475569;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.helpdesk-list a {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
}

.helpdesk-list a:hover {
  text-decoration: underline;
}

/* SECTION CARD WRAPPER */
.contact-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.03);
  margin-bottom: 2rem;
}

.contact-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #f3f4f6;
  padding-bottom: 0.5rem;
}

.district-authority-title {
  margin: 0 0 1rem;
  color: #1f4f74;
  font-size: 1.05rem;
}
.district-authority-group {
  margin-top: 2rem;
}
.directory-empty {
  padding: 1rem;
  color: #64748b;
  background: #f8fafc;
  border-radius: 0.5rem;
}

.role-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
  margin: -0.35rem 0 1rem;
  color: #64748b;
  font-size: 0.88rem;
}

.role-legend strong {
  color: #1f4f74;
}

.authority-table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
}

.authority-table {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #ffffff;
}

.authority-table .authority-col-role {
  width: 110px;
}

.authority-table .authority-col-phone {
  width: 150px;
}

.authority-table .authority-col-name {
  width: 28%;
}

.authority-table .authority-col-email {
  width: auto;
}

.authority-table th,
.authority-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
}

.authority-table th {
  background: #f1f5f9;
  color: #1f4f74;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.authority-table td {
  color: #1f2937;
  font-size: 0.9rem;
}

.authority-table tbody tr:last-child td {
  border-bottom: 0;
}
.authority-table tbody tr:hover {
  background: #f8fafc;
}
.authority-table a {
  color: #1d5d8f;
  word-break: break-word;
}
.authority-table .badge-role {
  display: inline-block;
  width: auto;
  padding: 0;
  margin: 0;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
}

.badge-role {
  display: none;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d9534f;
  font-size: 0.65rem;
  font-weight: 700;
}

@media (max-width: 1050px) {
  .authority-table-wrapper {
    overflow: visible;
    border: 0;
  }
  .authority-table {
    min-width: 0;
    table-layout: auto !important;
    border-collapse: separate;
    border-spacing: 0;
  }
  .authority-table colgroup {
    display: none;
  }
  .authority-table thead {
    display: none;
  }
  .authority-table tbody,
  .authority-table tr,
  .authority-table td {
    display: block;
    width: 100%;
  }
  .authority-table tr {
    padding: 0.55rem 0;
    border-bottom: 1px solid #e5e7eb;
  }
  .authority-table tbody tr:last-child {
    border-bottom: 0;
  }
  .authority-table td {
    display: grid !important;
    grid-template-columns: 4rem minmax(0, 1fr) !important;
    gap: clamp(5px, 4.76vw, 50px);
    font-size: 13px;
    align-items: center;
    padding: 8px 0.25rem !important;
    border: 0;
    width: 100% !important;
    min-height: 36px;
    min-width: 0 !important;
    overflow-wrap: anywhere;
    text-align: left !important;
  }
  .authority-table td::before {
    content: attr(data-label);
    width: 4rem;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    align-self: center;
    text-transform: uppercase;
    text-align: left;
  }
  .authority-table td > * {
    min-width: 0;
    font-size: 13px;
    align-self: center;
    justify-self: start !important;
    margin-right: 0;
  }
  .authority-table .authority-value {
    display: block;
    text-align: left !important;
  }
  .authority-table .badge-role {
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
    font-size: 13px;
    justify-self: start !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
