body, html {
  margin: 0; padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  color: white;
}


/* Full screen fixed background video */
#myVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.6);
  transition: opacity 0.5s ease;
  opacity: 1;
  pointer-events: none;
}

header nav a {
  color: white;
  transition: color 0.3s ease;
}

header.nav-scrolled nav a {
  color: black;
}

.normal-section {
  position: relative; /* NOT fixed by default */
  margin-top: 0; /* Avoids pushing below viewport */
  padding: 60px 20px;
  background: #fff;
  color: #222;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  z-index: 5;
}


/* When visible */
.content.visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.content.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 30px));
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



/* Toggle button styling */
#myBtn {
  margin-top: 15px;
  padding: 10px 20px;
  font-size: 18px;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
}
#myBtn:hover {
  background: #ddd;
  color: black;
}

/* Logo fixed top-left */
.logo {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 20;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.logo.visible {
  opacity: 1;
  transform: translateY(0);
}
.logo img {
  height: 100px;
  width: auto;
  display: block;
}

/* Side header nav */
.side-header {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 20;
  user-select: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.side-header.visible {
  opacity: 1;
  transform: translateY(0);
}
.side-header ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}
.side-header ul li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.side-header.dark-text ul li a {
  color: black !important;
  text-shadow: none !important;
}

/* Stagger nav items */
.side-header.visible ul li {
  opacity: 1;
  transform: translateY(0);
}
.side-header.visible ul li:nth-child(1) { transition-delay: 0.1s; }
.side-header.visible ul li:nth-child(2) { transition-delay: 0.2s; }
.side-header.visible ul li:nth-child(3) { transition-delay: 0.3s; }
.side-header.visible ul li:nth-child(4) { transition-delay: 0.4s; }

.side-header ul li a {
  color: #eee;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  transition: color 0.3s ease;
  text-shadow: 0 0 6px rgba(255,255,255,0.2);
}
.side-header ul li a:hover,
.side-header ul li a:focus {
  color: #ff6347;
  outline: none;
  cursor: pointer;
}


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

/* This is the fullscreen overlay style applied when visible */
.normal-section.fullscreen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: #000;
  color: #fff;
  z-index: 15;
  overflow-y: auto;
  padding: 40px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* To ensure trainers info layout */
.trainers-container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1000px;
  justify-content: center;
}

.trainer-card {
  background: #222;
  border-radius: 12px;
  padding: 20px;
  align-items: flex-start;
  width: 800px;  /* extend width to be rectangular */
  text-align: left; /* left align text for better look */
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
  color: white;
  display: flex;            /* make the card a flex container */
  gap: 30px;     /* spacing between image and text */
}




.left-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 200px; /* match image width */
  min-width: 200px;
}


.trainer-card h4 {
   font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

trainer-card h4,
.trainer-card p:not(.achievements) {
  margin: 5px 0;
  font-family: Arial, Helvetica, sans-serif;
  font-style: italic;
  color: #ccc;
}

.trainer-card > div {
  display: flex;
  flex-direction: column;
  justify-content: center;  /* center vertically the text content */
  flex-grow: 1;
}


.trainer-card .achievements {
  color: #ccc;
  font-style: bold;
  font-family: 'Impact, "Arial Black", "Franklin Gothic Heavy", sans-serif';
  margin-top: 8px;          /* keep spacing from above text */
  align-self: flex-start;   /* left align achievements inside the flex column */
  text-align: left;

}

/* Fighters container and card styling (copy from trainers, just rename) */
.fighters-container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1000px;
  justify-content: center;
}

.fighter-card {
  background: #222;
  border-radius: 12px;
  padding: 20px;
  align-items: flex-start;
  width: 800px;
  text-align: left;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
  color: white !important;
  display: flex;
  gap: 30px;

}

.fighter-card .left-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 280px;
}



.fighter-card h4 {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  color: white !important;
}

.fighter-card h4,
.fighter-card p:not(.achievements) {
  margin: 5px 0;
  font-family: Arial, Helvetica, sans-serif;
  font-style: italic;
  color: #ccc;
}

.fighter-card > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

.fighter-card img {
  flex-shrink: 0;
  margin-bottom: 0;
  border-radius: 10px;
}

.fighter-card .achievements {
  color: #ccc;
  font-weight: normal;
  font-family: 'Impact, "Arial Black", "Franklin Gothic Heavy", sans-serif';
  margin-top: 8px;
  align-self: flex-start;
  text-align: left;
}

#fighters-wrapper {
  margin-top: 100px; /* push fighters down so they're not overlapping trainers */
}


/* Overlay content styling */
.content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 600px;
  width: 90%;
  text-align: center;
  z-index: 100; /* default high to appear on top at home */
  transition: z-index 0.3s ease;
  color: white;
  font-size: 1.8rem;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(0,0,0,0.7);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 20px;
  border-radius: 10px;

  /* Animate start */
  opacity: 0;
  transform: translate(-50%, calc(-50% + 30px));
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Smooth slide-up animation for all animated elements */
.slide-up-content,
.normal-section,
.logo,
.side-header ul li {
  opacity: 0;
  transform: translateY(30px);
  transition-property: opacity, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); /* smooth ease */
  transition-duration: 700ms; /* longer duration */
}

/* When visible, reset transform and opacity */
.slide-up-content.visible,
.normal-section.visible,
.logo.visible,
.side-header.visible ul li.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Special for logo and side-header */
.logo,
.side-header {
  transition-duration: 700ms;
}

/* Stagger the nav items smoothly */
.side-header ul li {
  transition-duration: 700ms;
  transition-delay: 0s; /* default no delay */
}

/* Apply staggered delays when parent has visible class */
.side-header.visible ul li:nth-child(1) {
  transition-delay: 0.1s;
  opacity: 1;
  transform: translateY(0);
}
.side-header.visible ul li:nth-child(2) {
  transition-delay: 0.25s;
  opacity: 1;
  transform: translateY(0);
}
.side-header.visible ul li:nth-child(3) {
  transition-delay: 0.4s;
  opacity: 1;
  transform: translateY(0);
}
.side-header.visible ul li:nth-child(4) {
  transition-delay: 0.55s;
  opacity: 1;
  transform: translateY(0);
}

.slide-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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


/* Trainers background, hidden by default */
#trainers-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('assets/trainers-bg.jpg'); /* your trainers bg image */
  background-size: cover;
  background-position: center;
  z-index: -1;
  opacity: 0;
  pointer-events: none; /* so it doesn't block clicks */
  transition: opacity 0.7s ease;
}

/* When active, show the trainers bg */
#trainers-bg.active {
  opacity: 1;
  pointer-events: auto;
}

#trainers-wrapper {
  margin-top: 100vh; /* push trainers section down by 1 viewport height */
}


/* Hide video when trainers bg is active */
#myVideo.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

#scroll-arrow {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  width: 14px;
  height: 14px;
  border-left: 3px solid white;
  border-bottom: 3px solid white;
  animation: bounce 1.5s infinite;
  cursor: pointer;
  z-index: 999;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-45deg); }
  50% { transform: translateX(-50%) translateY(5px) rotate(-45deg); }
}

#scroll-arrow.black {
  border-left-color: black;
  border-bottom-color: black;
}

.scroll-arrow {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.scroll-arrow.black-arrow {
  filter: invert(1); /* turns white arrow black */
}

.scroll-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Hide scroll arrow at last section */
.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Gallery container styling */
/* Gallery container using grid */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 images per row */
  gap: 20px;
  justify-items: center;
  margin-top: 20px;
}

/* Gallery images container */
.gallery-container img {
  width: 300px;
  height: 200px; /* fixed height for uniform cards */
  object-fit: cover; /* crop to fill container */
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-container img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0,0,0,0.7);
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .gallery-container {
    grid-template-columns: repeat(2, 1fr); 
  }
}

@media (max-width: 640px) {
  .gallery-container {
    grid-template-columns: 1fr; 
  }
}

/*Profile Picture Resize to Standard in Fighter and Trainer cards*/

/* Force fixed 200x200 frame for trainer/fighter images */
.trainer-card .left-section img,
.fighter-card .left-section img {
  width: 200px !important;
  height: 200px !important;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  flex-shrink: 0;
  margin-bottom: 0;
  display: block;
}

.trainer-card .left-section,
.fighter-card .left-section {
  width: 200px !important;
  min-width: 200px !important;
  max-width: 200px !important;
}


.trainer-card > div,
.fighter-card > div {
  flex-grow: 1; /* text column grows, image stays fixed */
}


/* Branches page - desktop fighter card layout */
body.branches-page .fighter-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 30px;
  min-height: 200px;  /* match iframe height */
}

body.branches-page .fighter-card .left-section {
  flex: 0 0 280px;    /* fix map width */
  height: 200px;      /* match iframe height */
}

body.branches-page .fighter-card > div:nth-child(2) { /* info div */
  flex: 1;            /* take remaining space */
}

