/* =========================
   1. Reset & Box Sizing
   ========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =========================
     2. Base Typography & Layout
     ========================= */
html,
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px; /* Default for desktops */
  overflow-x: hidden;
  background-color: black;
}

/* =========================
     3. Responsive Font Sizes
     ========================= */
@media screen and (min-width: 1600px), screen and (min-height: 1024px) {
  html {
    font-size: 20px;
  }
}
@media screen and (max-width: 1024px), screen and (max-height: 768px) {
  html {
    font-size: 14px;
  }
}
@media screen and (max-width: 768px), screen and (max-height: 576px) {
  html {
    font-size: 12px;
  }
}
@media screen and (max-width: 480px), screen and (max-height: 480px) {
  html {
    font-size: 10px;
  }
}

/* =========================
     4. Video Background Container
     ========================= */
.video-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: url("bg.jpg") center center / cover no-repeat;
}

/* Background video element */
.background-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

/* Video sizing modes */
.background-video.background-fill {
  object-fit: cover;
}
.background-video.background-aspect {
  object-fit: contain;
  background-color: black; /* bars around the video */
}

/* =========================
     5. Header & Logo
     ========================= */
.header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}
.logo {
  width: 7rem;
  margin-right: 1rem; /* Space between logo and title */
}
h1 {
  margin: 0;
  font-size: 2rem;
}

/* =========================
     6. Top-Centered Content Box
     ========================= */
.content-box {
  position: absolute;
  top: 1%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  text-align: center;
  padding: 1rem;
  border-radius: 1rem;
}
.content-box p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* =========================
     7. Button Groups & Styles
     ========================= */
/* Shared button styles */
.button-group1 button,
.button-group2 button {
  padding: 0.75rem;
  font-size: 1.1rem;
  font-weight: bolder;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  min-width: 6rem;
  background-color: #007bff;
  color: #ffffff;
}
.button-group1,
.button-group2 {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

/* Group-specific overrides */
.button-group1 button {
  background-color: rgba(255, 255, 255, 0.25);
}
.button-group2 .icon-button {
  min-width: 3rem;
  width: 3rem;
  height: 3rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
}

/* Icon buttons */
.button-group2 .nextdoor {
  background-image: url("nextdoor.png");
}
.button-group2 .facebook {
  background-image: url("facebook.png");
}

/* Hover states */
.button-group1 button:hover,
.button-group2 button:hover,
.button-group2 .icon-button:hover {
  background-color: #ffffff;
  color: #007bff;
}
.button-group2 .icon-button:hover {
  filter: brightness(1.25);
}

/* =========================
     8. Join Link
     ========================= */
.join-link {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background-color: #007bff;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: bolder;
  text-decoration: none;
  border-radius: 0.5rem;
  text-align: center;
}
.join-link:hover {
  background-color: #dddddd;
  color: #007bff;
}

/* =========================
     9. Overlay & Modal
     ========================= */
/* Overlay backdrop */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  padding: 1rem;
  overflow-y: auto; /* scrolling on small screens */
  z-index: 1000;
}

/* Common overlay content styles */
.overlay-content,
.overlay-terms-content {
  background: white;
  padding: 1rem;
  width: 75%;
  max-height: 80vh;
  text-align: center;
  font-size: 1rem;
  border-radius: 0.75rem;
  position: relative;
  overflow-y: auto;
}

/* Headings */
.overlay-content h2,
.overlay-terms-content h2 {
  color: #007bff;
  font-size: 2rem;
  margin-bottom: 1rem;
}
.overlay-terms-content h2 {
  font-size: 1.25rem;
}
.overlay-terms-content h3 {
  color: #666666;
  font-size: 0.85rem;
  text-align: left;
  margin-top: 0.5rem;
}

/* Text & lists */
.overlay-content p {
  color: #333333;
  margin-bottom: 1.25rem;
}
.overlay-content ol li,
.overlay-terms-content li {
  text-align: left;
  margin-left: 1rem;
}
.overlay-terms-content p,
.overlay-terms-content li {
  font-size: 0.75rem;
  color: #444444;
  margin-bottom: 0;
  text-align: justify;
}

/* Close button */
.close {
  position: absolute;
  top: 0;
  right: 10px;
  font-size: 2rem;
  cursor: pointer;
  color: #555555;
  transition: color 0.5s ease;
}
.close:hover {
  color: #ff0000;
}

/* =========================
     10. Video Controls & Stats
     ========================= */
.video-controls,
.terms-etc {
  position: absolute;
  bottom: 20px;
  display: flex;
  gap: 0.75rem;
  z-index: 2;
}
.video-controls {
  left: 5%;
}
.terms-etc {
  right: 5%;
}

.video-controls button,
.terms-etc button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  font-size: 1.5rem;
  border: none;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.4);
  color: #007bff;
  cursor: pointer;
}
.video-controls button:hover,
.terms-etc button:hover {
  background-color: #007bff;
  color: #ffffff;
}

/* Video stats box */
.video-stats {
  position: absolute;
  bottom: 80px;
  left: 5%;
  background: rgba(255, 255, 255, 0.4);
  color: #007bff;
  padding: 0.75rem;
  font-size: 0.75rem;
  border-radius: 5px;
  display: none; /* Hidden by default */
  z-index: 5;
}
.video-stats:hover {
  background-color: #007bff;
  color: #ffffff;
}

/* =========================
     11. Attribution & Footer
     ========================= */
.video-attribution {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: 0.75rem;
  color: #9aafc5;
  font-size: 0.5rem;
  /* Hidden for now */
  z-index: -1;
}

.page-footer {
  position: fixed;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #007bff;
  font-size: 0.75rem;
  z-index: 10;
}

/* =========================
     12. Session Cards (About Us)
     ========================= */
/* Container with perspective */
.session-cards {
  perspective: 1000px;
}

/* Base card style */
.session-card {
  position: relative;
  background: #eee;
  border: 2px solid #ccc;
  border-radius: 0.5rem;
  overflow: hidden;
  z-index: 1;
  margin-bottom: -2rem;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 0.4s ease, z-index 0.4s ease, box-shadow 1s ease,
    margin 0.3s ease;
}

/* Clickable title bar */
.session-card .card-title {
  background: #999;
  padding: 0.25rem;
  height: 4rem;
  border-bottom: 1px solid #ccc;
  z-index: 2;
  position: relative;
  cursor: pointer;
}

/* Collapsed body hidden via height and opacity */
.session-card .card-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 1rem;
  background: #f9f9f9;
  transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.3s ease;
}

/* Active (bottom) card */
.session-card.active {
  z-index: 10 !important;
  transform: translateZ(0px) scale(1);
  margin-bottom: 0;
  width: 100%;
  font-size: 1rem;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.5);
}

.session-card.active .card-body {
  max-height: 1000px;
  opacity: 1;
  padding: 1rem;
}

.session-card.active .card-title {
  background: #ccc;
  font-weight: bold;
}

/* Z-stack depth styles */
.session-card:nth-child(1):not(.active) {
  transform: translateZ(-60px) scale(0.85);
  width: 85%;
  font-size: 0.85rem;
  margin-left: auto;
  margin-right: auto;
  z-index: 1;
}

.session-card:nth-child(2):not(.active) {
  transform: translateZ(-40px) scale(0.9);
  width: 90%;
  font-size: 0.9rem;
  margin-left: auto;
  margin-right: auto;
  z-index: 2;
}

.session-card:nth-child(3):not(.active) {
  transform: translateZ(-20px) scale(0.95);
  width: 95%;
  font-size: 0.95rem;
  margin-left: auto;
  margin-right: auto;
  z-index: 3;
}

/* iframe map styling */
.session-card iframe {
  width: 100%;
  height: 30vh;
  border: none;
  margin-bottom: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.session-card.active iframe {
  opacity: 1;
  pointer-events: auto;
}

.session-card .session-details {
  color: #007bff;
  font-size: 1.25rem;
}

/* Animation for outgoing card */
.session-card.anim-out {
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: transform 0.5s ease, opacity 0.5s ease;
}
/* Animation for incoming (active) card */
.session-card.anim-in {
  opacity: 0;
  transform: translateY(20px) scale(1.05);
}
.session-card.anim-in-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: transform 0.5s ease, opacity 0.5s ease;
}
