/* ====== Reset & Base Styles ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #111;
  color: #fff;
  line-height: 1.6;
}

a {
  color: #e60000;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ====== Header ====== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: #000;
  border-bottom: 2px solid #e60000;
  flex-wrap: wrap;
}

.logo img {
  height: 60px;
  margin-right: 15px;
}

.logo h1, .logo h2 {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
}

nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}

nav a {
  font-weight: bold;
  text-transform: uppercase;
}

/* ====== Hero Section ====== */
#hero {
  position: relative;
  height: 100vh;
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;

  background-image: url('../images/atlanta_skyline.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 0;
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% + 80px);
  width: 300px;
  aspect-ratio: 1 / 1;
  background-image: url('../images/grz-logo-bg.png');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: contain;
  opacity: 0;
  animation: fadeInLogo 3s forwards;
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 1;
}

@keyframes fadeInLogo {
  to {
    opacity: 1;
  }
}

.hero-bg-content {
  position: relative;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 8px;
}

#hero h1 {
  font-size: 3rem;
  color: #fff;
}

#hero h2 {
  font-size: 2rem;
  color: #e60000;
}

#hero p {
  font-style: italic;
  margin: 20px 0;
}

.cta-button {
  background-color: #e60000;
  color: #fff;
  padding: 12px 24px;
  border: none;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cta-button:hover {
  background-color: #ff1a1a;
}

/* ====== Section Base Layout ====== */
section {
  padding: 60px 40px;
  border-bottom: 1px solid #333;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #e60000;
}

/* ====== Responsive Hero Adjustments ====== */
@media (max-width: 768px) {
  #hero::before {
    width: 180px; /* smaller logo on tablets/phones */
    left: 50%; /* center it better */
    top: 10px; /* move it down slightly */
  }

  #hero h1 {
    font-size: 2rem;
  }

  #hero h2 {
    font-size: 1.5rem;
  }

  #hero p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  #hero::before {
    width: 140px; /* even smaller logo for narrow screens */
    top: 20px;
  }

  #hero h1 {
    font-size: 1.8rem;
  }

  #hero h2 {
    font-size: 1.2rem;
  }

  .hero-bg-content {
    padding: 15px;
  }
}

/* ====== About Section ====== */
#about ul {
  list-style: none;
  margin-top: 20px;
}

#about li {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

/* ====== Timeline Styles ====== */

/* INDEX ONLY - HORIZONTAL MILESTONE LAYOUT */
.index-timeline {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

.index-timeline .milestone {
  background-color: #222;
  padding: 20px;
  border-left: 4px solid #e60000;
  flex: 1 1 180px;
  min-width: 150px;
}

.index-timeline .milestone h3 {
  color: #e60000;
  font-size: 1.5rem;
}

/* HISTORY PAGE ONLY - VERTICAL TIMELINE LAYOUT */
.history-timeline {
  padding: 2rem 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.history-timeline h2 {
  border-bottom: 2px solid #ccc;
  margin-top: 3rem;
  padding-bottom: 0.5rem;
}

.history-timeline ul {
  list-style-type: none;
  padding-left: 1rem;
}

.history-timeline li {
  padding: 0.5rem 0;
  border-left: 3px solid #e60000;
  padding-left: 1rem;
  position: relative;
  margin-bottom: 1rem;
}

.history-timeline li::before {
  content: '';
  width: 12px;
  height: 12px;
  background: #e60000;
  border-radius: 50%;
  position: absolute;
  left: -9px;
  top: 10px;
}

.history-timeline li.active {
  border-color: #333;
}

.history-timeline li.active::before {
  background: #333;
}

.history-timeline .dissolved {
  color: #c00;
  font-style: italic;
}

.footnote {
  font-size: 0.9rem;
  color: #777;
  margin-top: 2rem;
}

/* ====== Event Section ====== */
.event-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.event-card {
  background-color: #222;
  padding: 20px;
  border-left: 4px solid #e60000;
  flex: 1 1 300px;
}

.event-flyer {
  width: 100%;
  max-width: 300px;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid #333;
}

.event-flyer:hover {
  transform: scale(1.03);
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}

.rsvp-button {
  display: inline-block;
  margin-top: 10px;
  background-color: #e60000;
  color: #fff;
  padding: 10px 20px;
  font-weight: bold;
  text-transform: uppercase;
}

/* ====== Gallery Section ====== */
.video-thumbnail {
  position: relative;
  width: 300px;
  aspect-ratio: 16 / 9; /* Forces consistent height based on width */
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background-color: #000; /* Optional: fallback if image doesn't load */
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image fills thumbnail box */
  display: block;
  border-radius: 8px;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: white;
  text-shadow: 0 0 10px black;
  pointer-events: none;
}

/* ====== Lightbox Video ====== */
.lightbox {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

/* When lightbox is visible */
.lightbox.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  margin: 5% auto;
  width: 90%;
  max-width: 800px;
  padding: 0;
}

.lightbox video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  display: block;
  border: 2px solid #333;
  border-radius: 8px;
}

.lightbox .close {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}


/* ====== Membership Form ====== */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
}

input, textarea {
  padding: 10px;
  background-color: #222;
  border: 1px solid #444;
  color: #fff;
}

button {
  background-color: #e60000;
  color: #fff;
  padding: 12px;
  font-weight: bold;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

button:hover {
  background-color: #ff1a1a;
}

/* ====== Membership Form Enhancements ====== */
.membership-container {
  max-width: 800px;
  margin: 60px auto;
  padding: 40px;
  background-color: #111;
  border: 1px solid #333;
  border-radius: 8px;
}

label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #ccc;
}

.captcha-box {
  margin-top: 20px;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #e60000;
}

.membership-link {
  margin-top: 30px;
}

#membership-info {
  background-color: #1a1a1a;
  border-left: 4px solid #e60000;
  border-radius: 6px;
}

.application-warning {
  background-color: #222;
  border-left: 4px solid #e60000;
  padding: 15px 20px;
  margin: 20px 0 30px;
  color: #fff;
  border-radius: 4px;
  font-size: 0.95rem;
}

.application-warning a {
  color: #e60000;
  font-weight: bold;
  text-decoration: underline;
}


/* ====== Social Icons ====== */
.social-icons {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.social-icons a {
  color: #e60000;
  font-weight: bold;
  text-transform: uppercase;
}

/* ====== Footer ====== */
footer {
  background-color: #000;
  color: #777;
  padding: 20px;
  text-align: center;
  border-top: 2px solid #e60000;
}

footer nav a {
  margin: 0 10px;
  color: #e60000;
  font-weight: bold;
}

/* ====== Image Lightbox (Flyers) ====== */
.image-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);

  /* These two ensure centering */
  justify-content: center;
  align-items: center;
}

.image-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 20px #e60000;

  /* Add this to prevent flickering layout issues */
  display: block;
  margin: auto;
}

.image-lightbox .close {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}
/* Container to hold thumbnails side-by-side */
.video-thumbnails {
  display: flex;
  gap: 20px;            /* space between thumbnails */
  flex-wrap: wrap;      /* wrap on small screens */
  justify-content: center; /* center thumbnails horizontally */
  margin-top: 20px;
}

/* Ensure all thumbnails have the same size and shape */
.video-thumbnail {
  width: 300px;
  aspect-ratio: 16 / 9; /* maintains 16:9 ratio */
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background-color: #000;
  position: relative;
  flex-shrink: 0;       /* prevent shrinking below width */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.video-thumbnail:hover {
  transform: scale(1.05);
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

/* Play button styling */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: white;
  text-shadow: 0 0 10px black;
  pointer-events: none;
}

/* Popup overlay (hidden by default) */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0; /* shorthand for top/right/bottom/left: 0 */
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden;
  -webkit-overflow-scrolling: touch; /* fixes iOS scroll behavior */
}

/* Popup box */
.popup-box {
  background: #fff;
  color: #222;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  max-width: 90%;
  width: 350px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  transform: translateY(0);
}

/* Button */
.popup-box button {
  margin-top: 1rem;
  padding: 0.6rem 1.4rem;
  border: none;
  background: #c62828; /* your theme color */
  color: #fff;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

.popup-box button:hover {
  background: #a51e1e;
}

/* Show popup */
.popup-overlay.active {
  display: flex;
}

/* Make sure it’s always above other elements */
body.popup-open {
  overflow: hidden;
  touch-action: none;
}
