/* global.css - Consolidated styles for all pages */

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

#smooth-wrapper {
  /* overflow: hidden only needed when ScrollSmoother is active.
     Setting it globally clips dynamically injected footer content.
     Pages using ScrollSmoother set this via JS when initialising. */
}

#smooth-content {
  overflow: visible;
}

body {
  background: #000;
  color: #fff;
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* ============================================
   RED SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #000;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: #b41616;
  border-radius: 6px;
  border: 2px solid #000;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #d11a1a;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #b41616 #000;
}

/* ============================================
   BLUEPRINT BACKGROUND
   ============================================ */
#blueprint-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: #000;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  transition: background 0.3s ease;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  transition: opacity 0.3s ease;
}

.nav-left:hover {
  opacity: 0.8;
}

.nav-logo {
  height: 35px;
  width: 35px;
  object-fit: contain;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-item,
.nav-donate {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-donate {
  background: #b41616;
  font-weight: 600;
}

.nav-donate:hover {
  background: #d11a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(180, 22, 22, 0.3);
}

.nav-toggle {
  display: none;
  width: 28px;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 3px;
  background: #fff;
  width: 100%;
  border-radius: 3px;
  transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  text-align: center;
}

.btn.red {
  background: #b41616;
}

.btn.red:hover {
  background: #d11a1a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(180, 22, 22, 0.4);
}

.btn.large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn.outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn.outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ============================================
   FOOTER - DEAD SIMPLE
   ============================================ */
.footer {
  background: rgba(0, 0, 0, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer-brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.footer-tagline {
  color: #888;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  min-height: 38px;
  flex-shrink: 0;
}

.community-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.community-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-column-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  color: #b41616;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: #aaa;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  color: #666;
  font-size: 0.875rem;
}

.footer-disclaimer {
  width: 100%;
  margin-top: 1rem;
  text-align: center;
  color: #666;
  font-size: 0.8rem;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-link {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom-link:hover {
  color: #b41616;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    }
}

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  flex-shrink: 0;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 650;
  color: #fff;
  line-height: 1.3;
}

.modal-description {
  font-size: 0.9rem;
  color: #888;
  line-height: 1.6;
  margin: 0;
}

.modal-destination {
  font-size: 0.78rem;
  color: #ccc;
  font-family: monospace;
  margin: 0.5rem 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  display: block;
  letter-spacing: 0.01em;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, opacity 0.2s ease;
  line-height: 1;
}

.modal-btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-btn--primary {
  background: #b41616;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.modal-btn--primary:hover {
  background: #d11a1a;
}

/* ============================================
   MOBILE 
   ============================================ */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1.5rem;
  }

  .nav-left {
    display: flex;
    flex: 1;
    min-width: 0;
  }

  .nav-logo {
    display: block;
    flex-shrink: 0;
  }

  .brand-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
    flex-shrink: 0;
  }

  .nav-links {
    position: fixed;
    top: 63px;
    right: 0;
    height: calc(100vh - 63px);
    width: 280px;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    z-index: 999;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
    opacity: 1;
  }

  .nav-item,
  .nav-donate {
    padding: 1rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* FOOTER - DEAD SIMPLE ON MOBILE */
  .footer {
    padding: 2rem 1.5rem 1.5rem;
  }
  
  .footer-container {
    display: block; /* SIMPLE BLOCK LAYOUT */
  }

  .footer-brand {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .footer-column {
    margin-bottom: 2rem;
  }

  .footer-column-title {
    margin-bottom: 0.75rem;
  }

  .footer-links {
    gap: 0.5rem;
  }

  .footer-link {
    display: block;
    padding: 0.5rem 0;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-bottom-links {
    display: block;
  }

  .footer-bottom-link {
    display: block;
    padding: 0.5rem 0;
  }

  .modal-content {
    padding: 1.5rem;
    width: 95%;
  }

  .modal-buttons {
    flex-direction: column;
  }

  .modal-buttons .btn {
    width: 100%;
  }
}

/* ============================================
   TABLET
   ============================================ */
@media (max-width: 1024px) and (min-width: 769px) {
  .footer-container {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #b41616;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */
#gb-cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 2rem));
  width: calc(100% - 3rem);
  max-width: 860px;
  z-index: 9000;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
              opacity 0.3s ease;
}

#gb-cookie-banner.gb-cookie-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#gb-cookie-banner.gb-cookie-hiding {
  transform: translateX(-50%) translateY(calc(100% + 2rem));
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.gb-cookie-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem 1.5rem;
}

.gb-cookie-text {
  flex: 1;
  min-width: 0;
}

.gb-cookie-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
  letter-spacing: 0.01em;
}

.gb-cookie-desc {
  font-size: 0.8rem;
  color: #888;
  line-height: 1.6;
  margin: 0;
}

.gb-cookie-desc strong {
  color: #bbb;
}

.gb-cookie-link {
  color: #aaa;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.gb-cookie-link:hover {
  color: #fff;
}

.gb-cookie-actions {
  display: flex;
  gap: 0.625rem;
  flex-shrink: 0;
}

.gb-cookie-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  letter-spacing: 0.01em;
}

.gb-cookie-btn--primary {
  background: #b41616;
  border-color: #b41616;
  color: #fff;
}

.gb-cookie-btn--primary:hover {
  background: #c91c1c;
  border-color: #c91c1c;
}

@media (max-width: 640px) {
  #gb-cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: translateY(100%);
    border-radius: 14px 14px 0 0;
  }

  #gb-cookie-banner.gb-cookie-visible {
    transform: translateY(0);
  }

  #gb-cookie-banner.gb-cookie-hiding {
    transform: translateY(100%);
  }

  .gb-cookie-inner {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .gb-cookie-actions {
    width: 100%;
  }

  .gb-cookie-btn {
    flex: 1;
    text-align: center;
    padding: 0.7rem;
  }
}