/* ===================================================
   SWANSEA MATTERS — style.css
   Color Palette:
     --red:    #cc0000
     --dark:   #1a1a1a
     --mid:    #2d2d2d
     --grey:   #f4f4f4
     --border: #e0e0e0
   =================================================== */

:root {
  --red:    #cc0000;
  --red-dk: #a00000;
  --dark:   #1a1a1a;
  --mid:    #2d2d2d;
  --grey:   #f4f4f4;
  --border: #e0e0e0;
  --white:  #ffffff;
  --text:   #222222;
  --muted:  #666666;
  --green:  #2a7a2a;
}

/* ===== RESET / BASE ===== */
html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
}

/* ===== NAVBAR ===== */
.navbar {
  background-color: var(--dark) !important;
  border-bottom: 3px solid var(--green);
  padding: 0.6rem 0;
  z-index: 1050;
}

.navbar-brand {
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.brand-swansea { color: var(--white); }
.brand-matters { color: var(--green); }

.navbar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem !important;
  transition: color 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--red) !important;
}

/* Keep "Write to Them" CTA button white text when active */
.navbar .nav-cta.active {
  color: white !important;
}

.navbar .nav-cta {
  background: var(--red);
  color: white !important;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 0.5rem;
}

.navbar .nav-cta:hover {
  background: var(--red-dk);
  color: white !important;
}

/* ===== HERO ===== */
.hero-section {
  background-image:
    url('banner.jpg'),
    linear-gradient(135deg, var(--dark) 0%, #3a0000 100%);
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.hero-overlay {
  width: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72) 0%, rgb(18 59 18 / 61%) 100%);
  min-height: 520px;
  display: flex;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  background: var(--red);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  /* max-width: 600px; */
  margin: 1rem auto 0;
  line-height: 1.6;
}

/* ===== ALERT BAR ===== */
.alert-bar {
  background: var(--red);
  color: white;
  font-size: 0.9rem;
}

.alert-bar a.btn-light {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
}

/* ===== BREAKING NEWS BAR ===== */
.breaking-news-bar {
  background: #1f7a33;
  color: white;
  border-top: 3px solid #145323;
  border-bottom: 3px solid #145323;
}

.breaking-news-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.6rem;
  white-space: nowrap;
}

.breaking-news-text {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.breaking-news-btn {
  color: #145323;
  border: 1px solid #d9e7dc;
  white-space: nowrap;
}

.breaking-news-btn:hover {
  background: #f1f7f2;
  color: #0f3e1a;
}

/* ===== SECTION COMMONS ===== */
.section-white  { background: var(--white); }
.section-dark   { background: var(--dark); }
.section-grey   { background: var(--grey); }
.section-red    { background: var(--green); }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green);
  border-left: 3px solid var(--green);
  padding-left: 0.6rem;
  margin-bottom: 0.5rem;
}

.section-label.section-label-red {
  color: var(--red);
  border-left-color: var(--red);
}

.section-label.light {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.4);
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

/* ===== VISION CARDS ===== */
.vision-card {
  border-radius: 8px;
  padding: 1.75rem;
  height: 100%;
  border: 2px solid var(--border);
  display: flex;
  flex-wrap: wrap;
}

.vision-card .vision-badge {
  width: 100%;
}

.vision-card .vision-content {
  flex: 1;
  min-width: 280px;
}

.vision-card .vision-image {
  flex: 0 0 40%;
  max-width: 40%;
  padding-left: 1.5rem;
  display: flex;
  align-items: flex-start;
}

.vision-card .vision-image img {
  width: 100%;
  border-radius: 6px;
}

.vision-card.vision-bad {
  border-color: #f5c6c6;
  background: #fff9f9;
}

.vision-card.vision-good {
  border-color: #b8ddb8;
  background: #f6faf6;
}

.vision-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--red);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.vision-badge.good {
  background: var(--green);
}

.vision-card h4 {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.vision-card ul {
  padding-left: 1.2rem;
}

.vision-card ul li {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

/* Vision cards - image goes under text on mobile */
@media (max-width: 767.98px) {
  .vision-card .vision-image {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 0;
    margin-top: 1.5rem;
  }
}

/* ===== SITE PURPOSE BOX ===== */
.site-purpose {
  background: #fff3f3;
  border-left: 4px solid var(--red);
  border-radius: 0 8px 8px 0;
}

/* ===== HISTORY CARDS ===== */
.history-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  height: 100%;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.history-card.highlight {
  background: #fff5f5;
  border-color: var(--red);
  border-left: 4px solid var(--red);
}

.history-era {
  display: inline-block;
  background: var(--dark);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.history-card.highlight .history-era {
  background: var(--red);
}

.history-card h5 {
  color: var(--text);
  font-weight: 700;
}

.history-card p {
  color: var(--muted);
  margin-bottom: 0;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.7rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--red), var(--border));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

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

.timeline-dot {
  position: absolute;
  left: -2.1rem;
  top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--dark);
  border: 3px solid var(--border);
  z-index: 2;
}

.timeline-dot.warning  { border-color: #f0a500; background: #f0a500; }
.timeline-dot.critical { border-color: var(--red); background: var(--red); }

.timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.timeline-warning .timeline-date { color: #a07000; }
.timeline-critical .timeline-date { color: var(--red); }

.timeline-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.timeline-warning .timeline-content {
  border-color: #f5c06e;
  background: #fffdf5;
}

.timeline-critical .timeline-content {
  border-color: #f5c6c6;
  background: #fff5f5;
}

.timeline-content h5 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

/* ===== DOCUMENT TABS ===== */
.doc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.doc-tab-btn {
  background: white;
  border: 2px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
  bottom: -2px;
}

.doc-tab-btn:hover {
  color: var(--red);
  border-color: #ccc;
}

.doc-tab-btn.active {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}

.doc-count {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
  min-width: 1.2rem;
  text-align: center;
}

.doc-tab-btn:not(.active) .doc-count {
  background: #e8e8e8;
  color: var(--muted);
}

/* .tab-content { padding-top: 1.25rem; } */

/* Coming soon badge */
.badge-coming {
  display: inline-block;
  background: #ddd;
  color: #666;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Placeholder cards */
.doc-card-placeholder {
  opacity: 0.7;
  cursor: default;
  border-style: dashed !important;
  border-color: #ccc !important;
  background: #fafafa !important;
}

.doc-card-placeholder:hover {
  border-color: #bbb !important;
  box-shadow: none !important;
  transform: none !important;
}

.doc-icon-placeholder {
  background: #eee !important;
  color: #aaa !important;
}

.placeholder-tag {
  color: #999 !important;
  font-style: italic;
}

/* ===== DOCUMENT CARDS ===== */
.doc-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  height: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.doc-card:hover {
  border-color: var(--green);
  box-shadow: 0 2px 12px rgba(42,122,42,0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}

.doc-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 6px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--green);
}

.doc-icon-red { background: #f0fff0; color: var(--green); }
.doc-icon-green { background: #f0fff0; color: var(--green); }

.doc-info { flex: 1; min-width: 0; }

.doc-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.critical-tag { color: var(--red) !important; }
.action-tag   { color: var(--green) !important; }

.doc-info h6 {
  font-weight: 700;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.doc-info p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

/* ===== ACTION CARDS (petitions) ===== */
.action-card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  height: 100%;
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}

.action-icon {
  width: 3rem;
  height: 3rem;
  background: #f0fff0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--green);
  margin-bottom: 1rem;
}

.action-card h4 {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.action-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* ===== DEPUTATION CARDS ===== */
.deputation-card {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem;
}

.deputation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.deputation-org {
  font-weight: 700;
  color: var(--dark);
}

.deputation-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: var(--grey);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

.deputation-submit {
  background: #f0fff0;
  border: 2px dashed var(--green);
  border-radius: 10px;
}

/* ===== NEWS CARDS ===== */
.news-card {
  display: block;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  height: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.news-card:hover {
  border-color: var(--green);
  box-shadow: 0 2px 12px rgba(42,122,42,0.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}

.news-outlet {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  margin-bottom: 0.4rem;
}

.news-card h5 {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-card p {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.news-read {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green);
}

/* ===== EMAIL TOOL ===== */
.email-tool {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 2rem;
}

.recipient-btn {
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  min-width: 220px;
  line-height: 1.4;
}

.recipient-btn:hover {
  border-color: var(--red);
  color: white;
}

.recipient-btn.active {
  border-color: var(--red);
  background: rgba(200,0,0,0.2);
  color: white;
}

.recipient-btn i { font-size: 1.1rem; }
.recipient-btn small { display: block; font-size: 0.75rem; }

.email-body {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 280px;
}

.copy-confirm {
  background: rgba(0,180,0,0.15);
  border: 1px solid rgba(0,200,0,0.3);
  color: #5fffaa;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Councillor Dropdown */
#councillorDropdown {
  background: rgba(255,255,255,0.95);
  border: 2px solid rgba(255,255,255,0.3);
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
}

#councillorDropdown:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,0,0,0.2);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark);
  border-top: 3px solid var(--red);
  color: rgba(255,255,255,0.85);
}

.site-footer small,
.site-footer p,
.site-footer div {
  color: rgba(255,255,255,0.75);
}

.site-footer .text-muted {
  color: rgba(255,255,255,0.6) !important;
}

.footer-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--red); }

/* ===== UTILITIES ===== */
.btn-danger {
  background-color: var(--red);
  border-color: var(--red);
}

.btn-danger:hover {
  background-color: var(--red-dk);
  border-color: var(--red-dk);
}

/* ===== SCROLL PADDING ===== */
section[id], header[id] {
  scroll-margin-top: 70px;
}

/* ===== VIDEO EMBED ===== */
.video-embed {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

/* ===== FAQ ACCORDION ===== */
.faq-number {
  display: inline-block;
  font-weight: 700;
  color: var(--green);
  margin-right: 0.5rem;
}

#faqAccordion .accordion-button {
  font-weight: 600;
  font-size: 1rem;
}

#faqAccordion .accordion-body {
  font-size: 0.95rem;
  line-height: 1.7;
}

#faqAccordion .accordion-body ol {
  padding-left: 1.25rem;
}

#faqAccordion .accordion-body ol li {
  margin-bottom: 0.5rem;
}

/* ===== BLOCKQUOTE (timeline) ===== */
.blockquote-sm {
  border-left: 3px solid var(--red);
  padding: 0.6rem 1rem;
  margin: 0.75rem 0;
  background: #fff8f8;
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem;
  font-style: italic;
  color: #444;
}

/* ===== COUNCILLOR DROPDOWN ===== */
.councillor-dropdown {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 0.75rem !important;
  font-size: 0.9rem;
  border: 2px solid var(--border) !important;
  border-radius: 6px;
  background-color: var(--white) !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  cursor: pointer;
}

.councillor-dropdown:focus {
  border-color: var(--red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(204,0,0,0.15);
}

/* ===== TIMELINE ACCORDION ===== */
#timelineAccordion .accordion-item {
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  border-radius: 8px !important;
  overflow: hidden;
}

#timelineAccordion .accordion-button {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 1rem 1.25rem;
  background-color: var(--white);
}

#timelineAccordion .accordion-button:not(.collapsed) {
  background-color: #f8f9fa;
  color: var(--text);
  box-shadow: none;
}

#timelineAccordion .accordion-button:focus {
  box-shadow: none;
  border-color: var(--border);
}

.timeline-date-badge {
  display: inline-block;
  background: var(--dark);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-right: 0.75rem;
  white-space: nowrap;
}

.timeline-date-badge.warning {
  background: var(--dark);
  color: var(--white);
}

.timeline-date-badge.critical {
  background: var(--dark);
  color: var(--white);
}

.accordion-warning .accordion-button {
  border-left: none;
}

.accordion-critical .accordion-button {
  border-left: none;
}

#timelineAccordion .accordion-body {
  padding: 1.25rem;
  background: #fafafa;
  font-size: 0.95rem;
  line-height: 1.7;
}

#timelineAccordion .accordion-body p:last-child {
  margin-bottom: 0;
}

#timelineAccordion .blockquote-sm {
  font-size: 0.9rem;
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--muted);
  font-style: italic;
}

/* ===== SCROLL ANIMATIONS ===== */
.section-hidden {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .hero-section,
  .hero-overlay {
    min-height: 380px;
  }

  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1rem; }

  .timeline { padding-left: 2rem; }

  .deputation-header {
    flex-direction: column;
  }

  .doc-tab-btn {
    font-size: 0.78rem;
    padding: 0.4rem 0.7rem;
  }

  .email-tool { padding: 1.25rem; }
  .recipient-btn { min-width: unset; width: 100%; }
}
