/* 
  North Yorkshire School Transport Action Group (STAG)
  Design System and Stylesheet
*/

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

/* --- CUSTOM VARIABLES --- */
:root {
  /* Colors */
  --primary: #0f172a;       /* Deep slate/navy */
  --primary-light: #1e293b;
  --secondary: #d97706;     /* School bus gold */
  --secondary-light: #f59e0b;
  --secondary-dark: #b45309;
  --accent: #ef4444;        /* Warning/danger red */
  --accent-light: #fee2e2;
  --success: #10b981;
  --success-light: #d1fae5;
  
  /* Neutrals */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #64748b;
  --text-on-dark: #f8fafc;
  
  /* Borders and Shadows */
  --border-color: #e2e8f0;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Navigation */
  --nav-height: 80px;
  
  /* Typography */
  --font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- RESET & BASIC STYLES --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

/* --- TYPOGRAPHY SYSTEM --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 1rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

/* --- LAYOUT UTILITIES --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid {
  display: grid;
  gap: 30px;
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.section {
  padding: 80px 0;
  position: relative;
}

.section-dark {
  background-color: var(--primary);
  color: var(--text-on-dark);
}

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark p {
  color: var(--text-on-dark);
}

.section-dark p {
  opacity: 0.9;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

.section-header .tag {
  color: var(--secondary);
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  display: inline-block;
  margin-bottom: 10px;
}

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

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--secondary);
  color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--secondary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--primary);
  color: var(--text-on-dark);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 2px solid var(--border-color);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-dark-outline {
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text-on-dark);
}

.btn-dark-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--text-on-dark);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: var(--accent);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- HEADER & NAVIGATION --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s;
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.navbar {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  height: 58px;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 100%;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.95rem;
  position: relative;
  padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-cta {
  margin-left: 10px;
}

/* Hamburger menu button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (max-width: 991px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow-xl);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 120px 40px 40px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    gap: 24px;
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .nav-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .nav-cta {
    margin-left: 0;
    width: 100%;
    margin-top: 10px;
  }
  
  .nav-cta .btn {
    width: 100%;
  }
}

/* --- HERO SECTION --- */
.hero {
  padding: 120px 0 80px;
  position: relative;
  background-color: #f8fafc;
  background-image: radial-gradient(rgba(217, 119, 6, 0.08) 1.5px, transparent 1.5px), radial-gradient(rgba(15, 23, 42, 0.05) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--secondary-light);
  background-opacity: 0.15;
  color: var(--secondary-dark);
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: 24px;
  align-self: flex-start;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background-color: var(--secondary-dark);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.4; }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-image-container {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4/3;
}

.hero-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay-card {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: var(--border-radius-md);
  color: white;
}

.hero-overlay-card h4 {
  color: white;
  margin-bottom: 5px;
}

.hero-overlay-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* --- STATS CARD / ROW --- */
.stats-banner {
  background-color: var(--primary);
  padding: 50px 0;
  border-bottom: 4px solid var(--secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  text-align: center;
  color: white;
}

.stat-number {
  font-family: var(--font-headings);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--secondary-light);
  line-height: 1;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* --- CAMPAIGN CARDS & GRIDS --- */
.card {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.card .btn, .card .button {
  margin-top: auto;
}

.card:not(.flip-card-front):not(.flip-card-back):hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(217, 119, 6, 0.3);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-sm);
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.card-icon-danger {
  background-color: var(--accent-light);
  color: var(--accent);
}

.card h3 {
  margin-bottom: 12px;
  font-weight: 800;
}

.card p {
  margin-bottom: 0;
}

/* --- "IS MY ROUTE SAFE?" QUIZ WIDGET --- */
.quiz-widget {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.quiz-header {
  background-color: var(--primary);
  padding: 24px 32px;
  color: white;
}

.quiz-header h3 {
  color: white;
  margin-bottom: 5px;
}

.quiz-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.quiz-body {
  padding: 32px;
}

.quiz-step {
  display: none;
}

.quiz-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-question {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.quiz-option {
  display: flex;
  align-items: center;
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.quiz-option:hover {
  background-color: var(--bg-primary);
  border-color: var(--text-light);
}

.quiz-option.selected {
  border-color: var(--secondary);
  background-color: rgba(217, 119, 6, 0.05);
  color: var(--secondary-dark);
}

.quiz-option input {
  margin-right: 12px;
  accent-color: var(--secondary);
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.quiz-result {
  text-align: center;
}

.quiz-result h4 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.result-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.result-badge.warning {
  background-color: var(--accent-light);
  color: var(--accent);
}

.result-badge.info {
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--secondary-dark);
}

/* --- PARENT STORIES GRID / FEED --- */
.story-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  justify-content: center;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  transition: all 0.2s;
}

.filter-btn:hover {
  background-color: var(--bg-tertiary);
}

.filter-btn.active {
  background-color: var(--secondary);
  color: var(--primary);
  border-color: var(--secondary);
}

.story-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.story-quote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--primary);
  margin-bottom: 24px;
  position: relative;
}

.story-quote::before {
  content: '“';
  font-family: var(--font-headings);
  font-size: 4rem;
  color: var(--border-color);
  position: absolute;
  top: -24px;
  left: -10px;
  line-height: 1;
  z-index: -1;
}

.story-meta {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.story-author {
  font-weight: 700;
  font-size: 0.95rem;
}

.story-location {
  color: var(--text-light);
  font-size: 0.85rem;
}

.story-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background-color: var(--bg-tertiary);
  color: var(--text-light);
  padding: 4px 10px;
  border-radius: 4px;
}

/* --- FORMS & STORY SUBMISSION --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-primary);
  transition: all 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--secondary);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 48px;
}

/* --- LETTER TEMPLATE GENERATOR --- */
.letter-box {
  background-color: #fafafa;
  border: 1px solid #dcdcdc;
  border-radius: var(--border-radius-sm);
  padding: 32px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
  margin-top: 24px;
  white-space: pre-wrap;
  position: relative;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

/* --- FAQ ACCORDION --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: var(--text-light);
}

.faq-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  text-align: left;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

.faq-icon {
  width: 20px;
  height: 20px;
  position: relative;
  transition: transform 0.3s;
}

.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--primary);
  transition: transform 0.3s;
}

.faq-icon::before {
  top: 9px;
  left: 0;
  width: 100%;
  height: 2px;
}

.faq-icon::after {
  top: 0;
  left: 9px;
  width: 2px;
  height: 100%;
}

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

.faq-content-inner {
  padding: 0 24px 24px;
  border-top: 1px solid transparent;
  color: var(--text-secondary);
}

/* Active FAQ states */
.faq-item.active {
  border-color: var(--secondary);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-item.active .faq-content {
  max-height: 500px; /* arbitrary height to slide down */
}

/* --- CAMPAIGN TIMELINE --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 31px;
  height: 100%;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-left: 70px;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 20px;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 4px solid var(--secondary);
  z-index: 2;
}

.timeline-date {
  font-weight: 700;
  color: var(--secondary);
  font-size: 0.9rem;
  margin-bottom: 5px;
  display: block;
}

.timeline-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
}

.timeline-content h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.timeline-content p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* --- FOOTER --- */
footer {
  background-color: var(--primary);
  color: var(--text-on-dark);
  padding: 80px 0 40px;
  margin-top: auto;
  border-top: 8px solid var(--secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.footer-brand .logo-img {
  height: 58px;
  margin-bottom: 20px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-bottom: 24px;
  max-width: 350px;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.social-link:hover {
  background-color: var(--secondary);
  color: var(--primary);
  transform: translateY(-2px);
}

.footer-col h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--secondary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0;
}

.footer-legal-links {
  display: flex;
  gap: 20px;
}

.footer-legal-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal-links a:hover {
  color: white;
}

/* --- IMAGES & BADGES UTILS --- */
.img-badge-container {
  position: relative;
}

.img-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-md);
}

/* --- ANIMATIONS --- */
.animate-slide-up {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* --- NEWS CAROUSEL --- */
.carousel-track::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.carousel-track {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.carousel-track .card {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .carousel-track .card {
    flex: 0 0 calc(50% - 12px);
  }
}

@media (min-width: 1024px) {
  .carousel-track .card {
    flex: 0 0 calc(33.333% - 16px);
  }
}

.carousel-control:hover {
  background-color: var(--secondary) !important;
  color: var(--primary) !important;
  transform: translateY(-50%) scale(1.1) !important;
}

/* --- FLIP CARD ANIMATION --- */
.flip-card {
  perspective: 1000px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 380px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-card:hover {
  transform: translateY(-5px);
}

.flip-card-inner {
  position: relative;
  width: 100%;
  flex-grow: 1;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
}

.flip-card-front {
  z-index: 2;
}

.flip-card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

.flip-card.flipped .flip-card-front {
  z-index: 1;
}

.flip-card.flipped .flip-card-back {
  z-index: 2;
}

/* --- TEXT LINK WITH TRANSITION --- */
.text-link {
  color: var(--secondary-dark);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: auto;
  width: fit-content;
}

.text-link:hover {
  color: var(--secondary-light);
  transform: translateX(4px);
}

/* --- GET INVOLVED GRID WITH SEPARATORS --- */
.get-involved-grid {
  gap: 0 !important;
}

.get-involved-grid > div {
  padding: 30px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.get-involved-grid > div .text-link {
  margin: auto auto 0; /* Center horizontally in flex and push to bottom */
}

@media (min-width: 900px) {
  .get-involved-grid > div:not(:last-child) {
    border-right: 1px solid var(--border-color);
  }
}

@media (max-width: 899px) and (min-width: 600px) {
  .get-involved-grid > div:nth-child(odd) {
    border-right: 1px solid var(--border-color);
  }
  .get-involved-grid > div:nth-child(1),
  .get-involved-grid > div:nth-child(2) {
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 599px) {
  .get-involved-grid > div:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
  }
}

/* --- LEGAL MODALS (POP-UPS) --- */
.legal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 32, 67, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.legal-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.legal-modal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  width: 90%;
  max-width: 650px;
  max-height: 85vh;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-modal-overlay.active .legal-modal-card {
  transform: translateY(0);
}

.legal-modal-header {
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legal-modal-header h3 {
  color: var(--primary);
  margin-bottom: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.legal-modal-close-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1.8rem;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.2s;
}

.legal-modal-close-btn:hover {
  color: var(--secondary-dark);
}

.legal-modal-body {
  padding: 30px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.legal-modal-body h4 {
  color: var(--primary);
  margin-top: 24px;
  margin-bottom: 8px;
  font-weight: 700;
}

.legal-modal-body h4:first-of-type {
  margin-top: 0;
}

.legal-modal-body p {
  margin-bottom: 16px;
}

.legal-modal-body ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

.legal-modal-body li {
  margin-bottom: 8px;
}

