/* Government Portal Stylesheet - GIGW Compliant */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --gov-font: 'Outfit', sans-serif;
  --gov-color-primary: hsl(265, 80%, 40%);
  --gov-color-primary-light: hsl(265, 100%, 97%);
  --gov-color-dark: #1e1e24;
  --gov-color-muted: #4a5568;
  --gov-color-border: #cbd5e1;
  --gov-bg: #ffffff;
  --gov-bg-card: #f8fafc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--gov-font);
  color: var(--gov-color-dark);
  background: var(--gov-bg);
  line-height: 1.5;
}

.gov-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Accessibility Top Bar */
.gov-top-bar {
  background: #f1f5f9;
  border-bottom: 1px solid var(--gov-color-border);
  padding: 6px 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gov-color-muted);
}

.gov-top-bar .gov-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gov-top-links {
  display: flex;
  gap: 12px;
}

.gov-top-btn {
  background: none;
  border: none;
  font-family: var(--gov-font);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gov-color-muted);
  cursor: pointer;
}

.gov-language-toggle {
  display: flex;
  gap: 8px;
}

.lang-btn {
  background: #ffffff;
  border: 1px solid var(--gov-color-border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--gov-color-primary);
  color: white;
  border-color: var(--gov-color-primary);
}

/* Branding Header */
.gov-header {
  padding: 20px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--gov-color-border);
}

.gov-header .gov-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gov-branding {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gov-title-text h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gov-color-primary);
}

.gov-title-text p {
  font-size: 0.8rem;
  color: var(--gov-color-muted);
  font-weight: 500;
}

.gov-header-search {
  display: flex;
}

.gov-header-search input {
  padding: 8px 12px;
  border: 1px solid var(--gov-color-border);
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-family: var(--gov-font);
  font-size: 0.8rem;
}

.gov-header-search button {
  background: var(--gov-color-primary);
  color: white;
  border: 1px solid var(--gov-color-primary);
  border-radius: 0 4px 4px 0;
  padding: 8px 16px;
  font-family: var(--gov-font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* Nav Bar */
.gov-nav-bar {
  background: var(--gov-color-primary);
  color: white;
}

.gov-menu {
  display: flex;
  flex-wrap: wrap;
}

.gov-menu a {
  padding: 14px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.gov-menu a:hover, .gov-menu a.active {
  background: rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.gov-hero {
  padding: 60px 0;
  background: linear-gradient(135deg, var(--gov-color-primary-light) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--gov-color-border);
}

.gov-hero-content {
  max-width: 550px;
}

.gov-hero-content h2 {
  font-size: 2.2rem;
  color: var(--gov-color-primary);
  margin-bottom: 16px;
}

.gov-hero-content p {
  font-size: 0.95rem;
  color: var(--gov-color-muted);
  margin-bottom: 24px;
}

/* Buttons utility */
.gov-btn {
  display: inline-flex;
  align-items: center;
  background: var(--gov-color-primary);
  color: white;
  padding: 10px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.gov-btn:hover {
  background: hsl(265, 80%, 30%);
}

.gov-divider {
  width: 60px;
  height: 3px;
  background: var(--gov-color-primary);
  margin-bottom: 24px;
}

/* Split Columns */
.gov-info-section {
  padding: 60px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--gov-color-border);
}

.gov-info-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
}

.gov-services-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gov-service-item {
  display: flex;
  gap: 16px;
  background: var(--gov-bg-card);
  border: 1px solid var(--gov-color-border);
  padding: 20px;
  border-radius: 4px;
}

.gov-service-item .icon {
  font-size: 2rem;
}

.gov-service-item h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.gov-service-item p {
  font-size: 0.85rem;
  color: var(--gov-color-muted);
}

/* Notices Board */
.gov-notices-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notice-item {
  border-bottom: 1px solid var(--gov-color-border);
  padding-bottom: 12px;
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-date {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  background: var(--gov-color-primary);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.notice-item p a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gov-color-dark);
}

.notice-item p a:hover {
  color: var(--gov-color-primary);
  text-decoration: underline;
}

/* Emergency Helplines */
.gov-emergency-bar {
  background: #dc2626; /* Official red for emergency alerts */
  padding: 40px 0;
  color: white;
}

.gov-emergency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}

.emergency-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.emergency-card h3 {
  font-size: 0.95rem;
  color: white;
  margin-bottom: 8px;
}

.emergency-card p a {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}

/* Grievance Form Section */
.gov-grievance-section {
  padding: 60px 0;
  background: var(--gov-bg-card);
  border-bottom: 1px solid var(--gov-color-border);
}

.gov-grievance-wrapper {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
}

.grievance-info h2 {
  font-size: 2rem;
}

.grievance-info p {
  color: var(--gov-color-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.grievance-warning {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #b45309;
  padding: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
}

.gov-form {
  background: #ffffff;
  padding: 30px;
  border: 1px solid var(--gov-color-border);
  border-radius: 4px;
}

.gov-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.gov-group label {
  font-size: 0.8rem;
  font-weight: 700;
}

.gov-group input, .gov-group select, .gov-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--gov-color-border);
  border-radius: 4px;
  font-family: var(--gov-font);
  font-size: 0.85rem;
}

.gov-group input:focus, .gov-group select:focus, .gov-group textarea:focus {
  outline: none;
  border-color: var(--gov-color-primary);
}

/* Footer styling */
.gov-footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 60px 0 20px 0;
  font-size: 0.8rem;
}

.gov-footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 30px;
  margin-bottom: 20px;
}

.gov-footer-brand h3 {
  color: white;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.gov-footer-brand p {
  max-width: 400px;
  color: #94a3b8;
}

.gov-footer-links {
  display: flex;
  gap: 12px;
}

.gov-footer-links a:hover {
  text-decoration: underline;
}

.gov-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #94a3b8;
}

.gov-footer-ssl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.gov-footer-ssl svg {
  color: #10b981;
}

/* --- ACCESSIBILITY HIGH CONTRAST OVERRIDES --- */
body.high-contrast {
  --gov-color-primary: #ffff00 !important;
  --gov-color-primary-light: #000000 !important;
  --gov-color-dark: #ffffff !important;
  --gov-color-muted: #ffffff !important;
  --gov-color-border: #ffffff !important;
  --gov-bg: #000000 !important;
  --gov-bg-card: #000000 !important;
  
  background-color: #000000 !important;
  color: #ffffff !important;
}

body.high-contrast .gov-top-bar {
  background: #000000 !important;
  border-bottom: 2px solid #ffffff !important;
}

body.high-contrast .lang-btn {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #ffffff !important;
}

body.high-contrast .lang-btn.active {
  background: #ffff00 !important;
  color: #000000 !important;
  border-color: #ffff00 !important;
}

body.high-contrast .gov-header {
  background: #000000 !important;
  border-bottom: 2px solid #ffffff !important;
}

body.high-contrast .gov-title-text h1 {
  color: #ffff00 !important;
}

body.high-contrast .gov-header-search button {
  background: #ffff00 !important;
  color: #000000 !important;
  border: 1px solid #ffff00 !important;
}

body.high-contrast .gov-header-search input {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #ffffff !important;
}

body.high-contrast .gov-nav-bar {
  background: #ffff00 !important;
  color: #000000 !important;
}

body.high-contrast .gov-menu a {
  color: #000000 !important;
  font-weight: 700 !important;
}

body.high-contrast .gov-menu a:hover, body.high-contrast .gov-menu a.active {
  background: #ffffff !important;
  outline: 2px solid #000000 !important;
}

body.high-contrast .gov-hero {
  background: #000000 !important;
  border-bottom: 2px solid #ffffff !important;
}

body.high-contrast .gov-hero-content h2 {
  color: #ffff00 !important;
}

body.high-contrast .gov-btn {
  background: #ffff00 !important;
  color: #000000 !important;
  border: 2px solid #ffff00 !important;
}

body.high-contrast .gov-btn:hover {
  background: #ffffff !important;
  color: #000000 !important;
}

body.high-contrast .gov-divider {
  background: #ffff00 !important;
}

body.high-contrast .gov-service-item {
  background: #000000 !important;
  border: 2px solid #ffffff !important;
}

body.high-contrast .notice-date {
  background: #ffff00 !important;
  color: #000000 !important;
}

body.high-contrast .notice-item p a {
  color: #ffff00 !important;
}

body.high-contrast .gov-emergency-bar {
  background: #000000 !important;
  border: 2px solid #ffffff !important;
}

body.high-contrast .emergency-card {
  background: #000000 !important;
  border: 1px solid #ffffff !important;
}

body.high-contrast .emergency-card p a {
  color: #ffff00 !important;
}

body.high-contrast .grievance-warning {
  background: #000000 !important;
  border: 1px solid #ffffff !important;
  color: #ffff00 !important;
}

body.high-contrast .gov-form {
  background: #000000 !important;
  border: 2px solid #ffffff !important;
}

body.high-contrast .gov-group input, body.high-contrast .gov-group select, body.high-contrast .gov-group textarea {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #ffffff !important;
}

body.high-contrast .gov-group input:focus, body.high-contrast .gov-group select:focus, body.high-contrast .gov-group textarea:focus {
  border-color: #ffff00 !important;
}

body.high-contrast .gov-footer {
  background: #000000 !important;
  border-top: 2px solid #ffffff !important;
}

body.high-contrast .gov-footer-brand h3 {
  color: #ffff00 !important;
}

body.high-contrast .gov-footer-ssl {
  border: 1px solid #ffffff !important;
}

/* Hide visually-hidden search label helper */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .gov-header .gov-container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .gov-branding {
    flex-direction: column;
  }
  .gov-menu {
    justify-content: center;
  }
  .gov-info-grid, .gov-grievance-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .gov-emergency-grid {
    grid-template-columns: 1fr;
  }
  .gov-footer-wrapper {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .gov-footer-links {
    width: 100%;
    justify-content: center;
  }
  .gov-footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
