/* ===================================
   LAYOUT.CSS - MABL Page Structure & Sections
   =================================== */

/* ===================================
   TOP NOTICE BAR
   =================================== */
.topline {
  background: linear-gradient(90deg, var(--brand-deep), #0f172a);
  color: var(--white);
  padding: 10px 0;
  font-size: 0.95rem;
}

.topline .container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.topline small { opacity: .9; }

.topline a {
  color: var(--mabl-gold);
  font-weight: 700;
}

/* ===================================
   HEADER / NAVIGATION
   =================================== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: box-shadow .2s ease;
}

header.stuck {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__logo {
  height: 50px;
  width: auto;
}

@media (max-width: 768px) {
  .brand__logo {
    height: 40px;
  }
}

nav ul {
  display: none;
  list-style: none;
  gap: 8px;
  flex-wrap: wrap;
}

@media (min-width: 769px) {
  nav ul {
    display: flex;
  }
}

nav a {
  display: inline-block;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Remove underline animation for nav links */
nav a::after {
  display: none;
}

nav a:hover {
  background: var(--mabl-green-light);
  color: var(--mabl-green);
  transform: translateY(-1px);
}

nav a:active {
  transform: translateY(0);
}

.cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 768px) {
  .cta .btn--donate {
    display: none;
  }
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--brand-deep);
}

.hero__video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
  opacity: 0.4;
}

@media (max-width: 768px) {
  .hero__video {
    display: none;
  }

  .hero {
    padding: 60px 0 40px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.85), rgba(30, 41, 59, 0.75)),
                var(--mabl-green-dark);
  }
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.8) 0%,
    rgba(30, 41, 59, 0.6) 50%,
    rgba(30, 41, 59, 0.9) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero__content {
    padding: 16px 16px 16px;
  }
}

.hero__wrap {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 880px) {
  .hero__wrap {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
  }
}

.hero__eyebrow {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mabl-gold);
  margin-bottom: 16px;
  opacity: 0.95;
}

.hero h1 {
  color: var(--white);
  font-size: var(--text-5xl);
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  font-weight: 800;
}

.hero .lede {
  color: rgba(255, 255, 255, 0.95);
  font-size: var(--text-lg);
  max-width: 600px;
  margin-bottom: 32px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .hero__actions {
    flex-direction: column;
  }
}

.hero__stats {
  display: flex;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px 0;
  }
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero__stat strong {
  font-size: var(--text-3xl);
  color: var(--mabl-gold);
  font-weight: 800;
  line-height: 1;
}

.hero__stat span {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.3;
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  animation: bounce 2s ease-in-out infinite;
}

@media (max-width: 768px) {
  .scroll-indicator span {
    display: none;
  }
}

/* ===================================
   STATS SECTION
   =================================== */
.stats {
  background: linear-gradient(135deg, var(--mabl-green-dark) 0%, var(--mabl-green) 50%, var(--mabl-green-dark) 100%);
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
  color: var(--white);
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}

/* Enhanced floating particles */
.stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(218, 165, 32, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(218, 165, 32, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 60% 20%, rgba(218, 165, 32, 0.1) 0%, transparent 50%);
  animation: float-particles 12s ease-in-out infinite;
  pointer-events: none;
}

/* Additional sparkle effect */
.stats::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 90% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 3%),
    radial-gradient(circle at 10% 60%, rgba(255, 255, 255, 0.3) 0%, transparent 3%),
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 3%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.3) 0%, transparent 3%);
  animation: sparkle 3s ease-in-out infinite;
  pointer-events: none;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

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

.stat {
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  border: 2px solid rgba(218, 165, 32, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  animation: stat-entrance 0.6s ease forwards;
}

.stat::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(218, 165, 32, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.stat:active::before {
  width: 300px;
  height: 300px;
  transition: width 0s, height 0s;
}

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }
.stat:nth-child(4) { animation-delay: 0.4s; }

.stat:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 12px 32px rgba(47, 105, 53, 0.35);
  border-color: rgba(218, 165, 32, 0.5);
}

.stat:active {
  transform: translateY(-2px) scale(1.01);
}

.stat b {
  font-size: clamp(2rem, 4vw, 2.8rem);
  display: block;
  color: var(--mabl-gold);
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat span {
  opacity: 0.95;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: block;
  line-height: 1.4;
}

/* ===================================
   SECTIONS
   =================================== */
section {
  padding: clamp(40px, 6vw, 80px) 0;
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

h2 {
  margin: 0 0 4px;
  font-size: var(--text-4xl);
  color: var(--mabl-green-dark);
  font-weight: 800;
}

.subtle {
  color: var(--text-secondary);
  max-width: 80ch;
  font-size: var(--text-base);
}

/* ===================================
   GRIDS & LAYOUTS
   =================================== */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

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

/* ===================================
   NEWSLETTER SECTION
   =================================== */
.newsletter {
  background: linear-gradient(135deg, var(--mabl-green), var(--mabl-green-dark));
  color: var(--white);
  border-radius: var(--radius-2xl);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.newsletter h3 {
  color: var(--white);
  margin-bottom: 8px;
}

.newsletter .subtle {
  color: rgba(255, 255, 255, 0.9);
}

.newsletter form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 20px auto 0;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .newsletter form {
    flex-direction: column;
  }
}

/* ===================================
   FOOTER
   =================================== */
footer {
  background: var(--brand-deep);
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 0 20px;
  margin-top: 60px;
}

.fgrid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  margin-bottom: 32px;
}

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

footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: var(--text-lg);
}

footer ul {
  list-style: none;
}

footer li {
  margin-bottom: 8px;
}

footer a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--mabl-gold);
}

.footer__logo {
  height: 60px;
  width: auto;
  margin-bottom: 16px;
}

.legal {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   MOBILE BOTTOM NAVIGATION
   =================================== */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  z-index: 100;
  padding: 8px 0;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
}

.mobile-nav--hidden {
  transform: translateY(100%);
}

.mobile-nav--at-top {
  transform: translateY(0) !important;
}

.mobile-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 60px;
  position: relative;
}

.mobile-nav__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--mabl-green);
  border-radius: 0 0 3px 3px;
  transition: width 0.3s ease;
}

.mobile-nav__item:hover::before,
.mobile-nav__item--active::before {
  width: 80%;
}

.mobile-nav__item svg {
  width: 24px;
  height: 24px;
}

.mobile-nav__item--active {
  color: var(--mabl-green);
  background: rgba(47, 105, 53, 0.1);
}

.mobile-nav__item--primary {
  color: var(--mabl-red);
}

.mobile-nav__item--primary svg {
  width: 28px;
  height: 28px;
}

.mobile-nav__item--donate {
  color: var(--mabl-gold);
}

.mobile-nav__item:active {
  transform: scale(0.95);
}

/* ===================================
   MOBILE MENU OVERLAY
   =================================== */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.mobile-menu {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85%;
  max-width: 400px;
  background: var(--white);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease;
  overflow-y: auto;
}

.mobile-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--mabl-green-dark);
}

.mobile-menu__logo {
  height: 40px;
  width: auto;
}

.mobile-menu__close {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu__nav {
  flex: 1;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu__nav a {
  padding: 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.mobile-menu__nav a:active {
  background: rgba(47, 105, 53, 0.1);
}

.mobile-menu__footer {
  padding: 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--brand-cream);
}

.mobile-menu__contact {
  margin-top: 16px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.mobile-menu__contact p {
  margin: 8px 0;
}

/* ===================================
   VIDEO PLAYER MODAL
   =================================== */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-modal[aria-hidden="false"] {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.video-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}

.video-modal__container {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 1100px;
  max-height: 90vh;
  margin: 0 auto;
}

.video-modal__close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.video-modal__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.video-modal__close:active {
  transform: scale(0.95);
}

.video-modal__close svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .video-modal__close {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
  }
}

/* Video Player */
.video-player {
  position: relative;
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-player__video {
  width: 100%;
  height: 100%;
  display: block;
}

.video-player__poster {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--mabl-green-dark), var(--mabl-green));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.video-player__poster.hidden {
  opacity: 0;
  pointer-events: none;
}

.video-poster__content {
  text-align: center;
  color: var(--white);
  padding: 20px;
}

.video-poster__play {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.video-player__poster:hover .video-poster__play {
  transform: scale(1.1);
}

.video-poster__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.video-poster__desc {
  font-size: var(--text-base);
  opacity: 0.95;
  max-width: 500px;
  margin: 0 auto 16px;
}

.video-poster__duration {
  display: inline-block;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* Video Controls */
.video-player__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 60px 20px 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-player:hover .video-player__controls,
.video-player__controls.show {
  opacity: 1;
}

.video-controls__progress {
  margin-bottom: 12px;
  cursor: pointer;
}

.video-controls__progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  position: relative;
  transition: height 0.2s ease;
}

.video-controls__progress:hover .video-controls__progress-bar {
  height: 7px;
}

.video-controls__progress-filled {
  height: 100%;
  background: var(--mabl-red);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.1s linear;
  position: relative;
}

.video-controls__progress-filled::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.video-controls__progress:hover .video-controls__progress-filled::after {
  opacity: 1;
}

.video-controls__bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.video-controls__btn {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: var(--radius-md);
}

.video-controls__btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.video-controls__btn:active {
  transform: scale(0.95);
}

.video-controls__icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
}

.video-controls__time {
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  gap: 4px;
  min-width: 100px;
}

.video-controls__volume {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 768px) {
  .video-controls__volume {
    display: none;
  }
}

.video-controls__slider {
  width: 80px;
  height: 5px;
  border-radius: var(--radius-full);
  outline: none;
  background: rgba(255, 255, 255, 0.3);
  -webkit-appearance: none;
}

.video-controls__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-controls__slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-controls__btn--fullscreen {
  margin-left: 8px;
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
