/* ==========================================================================
   1. CORE VARIABLES & RESET
   ========================================================================== */
:root {
  --bg-primary: #0f172a;
  --bg-card: #1e293b;
  --bg-footer: #090d16;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-gold: #f59e0b;
  --accent-blue: #3b82f6;
  --border-color: #334155;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Sticky Footer Layout Structure */
html, body {
  height: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main.container {
  flex: 1 0 auto; /* Expands to push footer down */
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 2rem 1rem;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.header {
  max-width: 900px;
  margin: 2rem auto 1.5rem auto;
  text-align: center;
  border-bottom: 2px solid var(--accent-gold);
  padding: 0 1rem 1.5rem 1rem;
}

.header h1 {
  font-size: 2.2rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header p.tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

/* Nav buttons */
.search-btn, .reset-btn, .tag-btn {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease-in-out;
}

.search-btn {
  background: var(--accent-gold);
  color: #000;
}

.search-btn:hover {
  background: #d97706;
}

.tag-btn {
  background: #334155;
  color: #f1f5f9;
}

.tag-btn:hover {
  background: var(--accent-blue);
}

/* ==========================================================================
   3. CARDS & CONTENT BLOCKS
   ========================================================================== */
.statute-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-gold);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.statute-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.statute-code {
  font-weight: bold;
  color: var(--accent-gold);
  font-size: 1.1rem;
}

.category-badge {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.badge-green {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-red {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.statute-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.statute-summary {
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.legis-link {
  display: inline-block;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}

.legis-link:hover {
  text-decoration: underline;
}

/* Expandable Layman's Terms Dropdown */
.layman-details {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin: 1rem 0;
  overflow: hidden;
}

.layman-summary {
  padding: 0.75rem 1rem;
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--accent-gold);
  cursor: pointer;
  user-select: none;
}

.layman-summary:hover {
  background: rgba(245, 158, 11, 0.1);
}

.layman-content {
  padding: 0.85rem 1rem 1rem 1rem;
  font-size: 0.95rem;
  color: #e2e8f0;
  border-top: 1px solid var(--border-color);
  line-height: 1.5;
}

/* ==========================================================================
   PERFECTED FOOTER & SITEMAP STYLES
   ========================================================================== */
.site-footer {
  flex-shrink: 0;
  background-color: var(--bg-footer);
  border-top: 2px solid var(--accent-gold);
  padding: 2.5rem 1rem 2rem 1rem;
  margin-top: auto;
  color: var(--text-muted);
  width: 100%;
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Social Media Section */
.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.social-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--accent-gold);
}

.social-icon-link {
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #1e293b;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}

.social-icon-link:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

/* Organized Sitemap Columns (No Messy Wrapping) */
.footer-sitemap {
  width: 100%;
  max-width: 800px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.footer-sitemap a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.15s ease-in-out;
  text-align: center;
  padding: 0.2rem 0;
}

.footer-sitemap a:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

/* Footer Copyright & Disclaimers */
.footer-meta p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.footer-meta strong {
  color: var(--text-main);
}

.disclaimer {
  font-size: 0.75rem !important;
  color: #64748b;
  max-width: 700px;
  margin: 0.5rem auto 0 auto;
}

/* ==========================================================================
   FORM CONTROLS & TEXT AREAS (FANCY DARK MATCHING SCHEME)
   ========================================================================== */

/* Universal Dark Styling for Inputs, Textareas, and Select Boxes */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
textarea,
select,
.search-input {
  background-color: #0f172a !important; /* Deep dark blue background */
  color: #f8fafc !important;          /* Clean off-white text */
  border: 1px solid #334155;            /* Slate accent border */
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  width: 100%;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4); /* Inset shadow for depth */
  transition: all 0.2s ease-in-out;
  appearance: none;                     /* Normalizes mobile OS native overlays */
  -webkit-appearance: none;
}

/* Focused State Glow & Gold Accent */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus,
.search-input:focus {
  outline: none;
  border-color: #f59e0b !important;    /* Pro-2A Gold Border */
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Styled Placeholder Text */
input::placeholder,
textarea::placeholder,
.search-input::placeholder {
  color: #64748b !important;           /* Subtle gray placeholder text */
  opacity: 1;
}

/* Custom Scrollbar for Textareas */
textarea::-webkit-scrollbar {
  width: 8px;
}

textarea::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}