/* The Right to Choose Australia - Main Stylesheet */

:root {
  /* Colour Palette */
  --peach: #F5D5C3;
  --warm-white: #FFFCF8;
  --lavender: #E5DDF3;
  --sage: #DCE8D8;
  --dusty-pink: #E8CED3;
  --mauve: #9B829F;
  --plum: #493D4D;
  --plum-light: #6B5A70;
  --text: #493D4D;
  --text-muted: #6B5A70;
  --bg: #FFFCF8;
  --bg-alt: #F8F4F0;
  --card-bg: #FFFFFF;
  --border: #EDE6E0;
  --accent: #9B829F;
  --accent-hover: #7A667E;
  --success: #5A8A6A;
  --shadow: 0 4px 20px rgba(73, 61, 77, 0.08);
  --shadow-hover: 0 8px 30px rgba(73, 61, 77, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  --peach: #3D2E28;
  --warm-white: #1A1618;
  --lavender: #2A2430;
  --sage: #243028;
  --dusty-pink: #2E2428;
  --mauve: #B8A0BC;
  --plum: #F0E6F0;
  --plum-light: #D4C4D8;
  --text: #F0E6F0;
  --text-muted: #C4B4C8;
  --bg: #1A1618;
  --bg-alt: #221E22;
  --card-bg: #2A2428;
  --border: #3A3238;
  --accent: #B8A0BC;
  --accent-hover: #D0B8D4;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Lora', 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--plum);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); margin-bottom: 0.75rem; }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1rem; color: var(--text-muted); }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== Header & Nav ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--plum);
}

.logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--plum);
}

.nav-toggle svg { width: 28px; height: 28px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.15rem;
  align-items: center;
}

.nav-list > li {
  position: relative;
}

.nav-list a, .nav-list button {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  font-family: inherit;
}

.nav-list a:hover, .nav-list button:hover,
.nav-list a.active {
  background: var(--lavender);
  color: var(--plum);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 100;
  padding: 0.5rem 0;
}

.nav-list > li:hover .dropdown,
.nav-list > li:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text);
  border-radius: 0;
}

.dropdown a:hover {
  background: var(--lavender);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle, .search-toggle {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--plum);
  transition: background var(--transition);
}

.theme-toggle:hover, .search-toggle:hover {
  background: var(--lavender);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 22, 24, 0.7);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.search-overlay.active { display: flex; }

.search-box {
  background: var(--card-bg);
  width: 90%;
  max-width: 560px;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-hover);
}

.search-box input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  font-size: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
}

.search-box input:focus {
  border-color: var(--mauve);
}

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, var(--lavender) 0%, var(--peach) 50%, var(--sage) 100%);
  padding: 4.5rem 0 5rem;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #2A2430 0%, #3D2E28 50%, #243028 100%);
}

.hero-content {
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.55);
  color: var(--plum);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .hero-badge {
  background: rgba(255,255,255,0.1);
}

.hero h1 {
  margin-bottom: 1.25rem;
  color: var(--plum);
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--plum-light);
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--plum);
  color: var(--warm-white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: rgba(255,255,255,0.7);
  color: var(--plum);
  border: 1px solid rgba(73,61,77,0.15);
}

[data-theme="dark"] .btn-secondary {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: var(--text);
}

.btn-secondary:hover {
  background: white;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--mauve);
  color: var(--mauve);
}

.btn-outline:hover {
  background: var(--mauve);
  color: white;
}

/* ========== Sections ========== */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header p {
  font-size: 1.05rem;
}

/* Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.pillar-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  text-align: center;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.pillar-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.1rem;
  background: var(--lavender);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--plum);
}

.pillar-card h3 {
  margin-bottom: 0.5rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.card-link {
  margin-top: auto;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--accent);
}

/* Topic Tags */
.topic-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--lavender);
  color: var(--plum);
  margin-bottom: 0.6rem;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--plum);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--mauve);
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}

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

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--plum);
}

tr:last-child td { border-bottom: none; }

/* Quick Exit */
.quick-exit {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1500;
  background: #c0392b;
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.35);
  display: none;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.2s;
}

.quick-exit.visible {
  display: flex;
}

.quick-exit:hover {
  transform: scale(1.05);
}

.quick-exit-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  max-width: 320px;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--plum);
  color: white;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 900;
  transition: opacity 0.2s;
}

.back-to-top.visible {
  display: flex;
}

/* Footer */
.site-footer {
  background: var(--plum);
  color: #F0E6F0;
  padding: 3.5rem 0 2rem;
  margin-top: 3rem;
}

[data-theme="dark"] .site-footer {
  background: #0F0C10;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col a {
  color: #D4C4D8;
  font-size: 0.92rem;
  display: block;
  padding: 0.3rem 0;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: #B8A0BC;
}

.disclaimer {
  background: var(--bg-alt);
  border-left: 4px solid var(--mauve);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  margin: 2rem 0;
}

/* Filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
  align-items: center;
}

.filter-btn {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--mauve);
  color: white;
  border-color: var(--mauve);
}

/* Myth vs Fact */
.myth-fact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.myth, .fact {
  padding: 1.25rem;
  border-radius: var(--radius-sm);
}

.myth {
  background: #FDF0F0;
  border: 1px solid #F0D0D0;
}

.fact {
  background: #F0F7F0;
  border: 1px solid #C8E0C8;
}

[data-theme="dark"] .myth {
  background: #3A2828;
  border-color: #5A3838;
}

[data-theme="dark"] .fact {
  background: #283828;
  border-color: #385038;
}

.myth h4, .fact h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* State cards for laws */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.state-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
}

.state-card h4 {
  margin-bottom: 0.4rem;
  color: var(--plum);
}

/* Responsive */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--card-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 4rem 1.5rem 2rem;
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
  }
  
  .main-nav.open {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
  
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--bg-alt);
    margin: 0.25rem 0 0.5rem 0.75rem;
    display: none;
  }
  
  .nav-list > li.open .dropdown {
    display: block;
  }
  
  .myth-fact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero { padding: 3rem 0 3.5rem; }
  .section { padding: 3rem 0; }
  .header-actions .search-toggle { display: none; }
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}