/* --- GLOBAL & HERO STYLES --- */

.hero-section {
  background-color: rgb(195, 6, 6);
  /*height: 100vh;*/
  width: 100%;
  display: flex;
  flex-direction: column;
/*  justify-content: center;*/
  align-items: center;
  color: white;
  padding-top: 3rem;
  position: relative;            
 /* --- ADD THIS LINE --- */
  flex-grow: 1; 
}

.hero-logo {
  width: 65px; 
  height: 65px; 
  border: none;
  display: flex; 
  justify-content: center; 
  align-items: center; 
  position: absolute; 
  top: 1.5rem; 
  left: 1.5rem; 
/*  z-index: 20;*/
}

/* Main container for all animated central content */
.content-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  /* overflow-x: hidden; */
  width: 100%;
  height: 100%;
}

/* --- MAPLE LEAF STYLING & ANIMATION --- */
.hero-maple-leaf {
  color: white;
  position: absolute;
  font-size: 150px; 
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: top 0.7s ease-in-out, font-size 0.7s ease-in-out;
  z-index: 5;
}

/* NEW: Keyframes for the pulse animation */
@keyframes pulse-effect {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* NEW: Apply pulse animation on hover ONLY when hub is NOT active */
.hero-section:not(.hub-active) .hero-maple-leaf:hover {
    animation: pulse-effect 2s infinite ease-in-out;
}

.hub-active .hero-maple-leaf {
  font-size: 325px;
  top: 52%; /* Animates to center */
}

/* --- KEYWORDS & BUTTON STYLES (Initial View) --- */
.initial-view-elements {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  opacity: 1;
  transition: opacity 0.4s ease-out;
  z-index: 20; /* FIX: On top of everything except the main navbar */
}

.keywords-container {
  display: flex; 
  flex-direction: row; 
  justify-content: center; 
  align-items: center; 
  flex-wrap: nowrap; 
  width: 100%; 
  margin-top: 20rem; 
  white-space: nowrap;
  
  /*
  display: grid;
  grid-template-columns: 18% 18% 18% 18% 18%;
  justify-content: space-evenly;
  margin-top: 25rem; 
  width: 100%;
  padding: 5px;
  margin-top: 22rem; 
  margin-left: 10px;
  margin-right: 10px;
  */
}

.keywords-container > div {
  font-family: 'Jost', sans-serif;
  text-transform: uppercase; 
  font-weight: 500; 
  font-size: 0.8rem; 
  letter-spacing: 1.5px; 
  
  /*margin: 0 5vw;*/
  --animate-duration: 2s;

  padding: 0px;
  text-align: center;
  margin: 0 0.5rem; /* 👈 this adds space left and right */
}
  
.keyword-peace { --animate-delay: 0.2s; }
.keyword-freedom { --animate-delay: 0.4s; }
.keyword-inclusion { --animate-delay: 0.6s; }
.keyword-home { --animate-delay: 0.8s; }

.btn-join-celebration {
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-weight: 700;
  font-size: 14px;
  border: none;
  margin-bottom: 2rem; /* Space at the bottom */
  margin-top: 3rem; /* Adjusted spacing */

  text-transform: uppercase;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: .25rem;
  border: none;
  cursor: pointer;
  background-color: black;
  color: white;
  padding: 0.5rem 1.5625rem 0.5rem 1.5625rem;
  transition: all 0.3s ease;

}

  .btn-join-celebration:hover {
    /*animation: pulse-cont 500ms infinite ease-in-out;*/
    background-color: #4f4f4f !important;
    opacity: 0.8;
    transform: translateY(-3px); /* Move the button up slightly */
    box-shadow: 0 4px 8px rgba(0,0,0,0.4); /* Add a subtle shadow */
  }

.btn-join-celebration:focus-visible {
  background-color: black !important;
}

/* --- Hover styles ONLY for devices that can truly hover --- */
@media (hover: hover) {
  .btn-join-celebration:hover {
    /*animation: pulse-cont 500ms infinite ease-in-out;*/
    background-color: #4f4f4f !important;
    opacity: 0.8;
    transform: translateY(-3px); /* Move the button up slightly */
    box-shadow: 0 4px 8px rgba(0,0,0,0.4); /* Add a subtle shadow */
  }
}

@keyframes pulse-cont {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}


/* --- LANDSCAPE STYLES FOR SMALL DEVICES--- */
/* This block of code will automatically apply ONLY when the 
   viewport is wider than it is tall (i.e., in landscape mode)
   and the device is a phone */
@media (orientation: landscape) and (max-height: 500px) {
  
  .hero-section {
    padding-top: 0vh;
    width: 100vw;
    width: 100%;
  }

  .hero-maple-leaf {
    top: 5%;
  }

  .keywords-container {    
    display: grid;
    grid-template-columns: 18% 18% 18% 18% 18%;
    justify-content: space-evenly;
    width: 100%;
    padding: 5px;
    margin-top: 2rem; 
    margin-left: 10px;
    margin-right: 10px;    
  }

  .btn-join-celebration {
    margin-top: 2rem; /* Adjusted spacing */
  }
}


/* --- CATEGORY HUB STYLES (Second View) --- */
/* Tablets and desktops only  */
.hub-wrapper {
  position: absolute; 
  box-sizing: border-box;
  /* overflow: hidden; */
  top: 52%; 
  left: 50%;
  width: 600px; 
  height: 600px;
  display: flex; 
  justify-content: center; 
  align-items: center;
  pointer-events: none;
  z-index: 15; /* FIX: Starts behind the button */
  transform: translate(-50%, -50%) scale(0.85);
}

.category-item {
  position: absolute; 
  width: 105px; height: 105px;
  background-color: white; 
  border-radius: 50%;
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center; 
  text-align: center; 
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
  text-decoration: none; 
  color: #343a40; 
  padding: 5px;
  
  opacity: 0;
  transform: var(--transform-initial);
  transition: transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease-in;
  pointer-events: auto; /* FIX: Ensure circles are always clickable */
}

.category-item i { margin-bottom: 5px; font-size: 2rem; }
.category-item span { 
  font-family: 'Segoe UI', sans-serif; 
  font-weight: bold; 
  font-size: 0.8rem; 
  line-height: 1.2; 
}

.text-purple { color: #6f42c1; }

/* .category-item:hover {  */
    /* Let the final state handle the hover transform to avoid conflicts */
/* } */

/* --- INTERACTION STYLES --- */
.hub-active .initial-view-elements {
  opacity: 0;
  pointer-events: none;
}

/* Stage 1: Gather at the center */
.hub-active .category-item {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stage 3: Expand to final positions */
.hub-expanded .category-item {
  transform: var(--transform-final);
  transition: transform 1.2s ease-out;
}
.hub-expanded .category-item:hover {
  transform: var(--transform-final) scale(1.15) !important;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* FIX: This class will now bring the circles above the navbar */
.hub-active .hub-wrapper {
  opacity: 1;
  pointer-events: auto;
  overscroll-behavior-y: none;
  z-index: 101; /* Higher than the navbar's z-index */
}

/* Define initial (off-screen) and final (symmetrical) positions */
#cat-1  { --transform-initial: translateY(-50vh); --transform-final: translate(0px, -270px); }
#cat-2  { --transform-initial: translate(50vw, -50vh); --transform-final: translate(146px, -227px); }
#cat-3  { --transform-initial: translateX(50vw); --transform-final: translate(246px, -112px); }
#cat-4  { --transform-initial: translate(50vw, 50vh); --transform-final: translate(267px, 39px); }
#cat-5  { --transform-initial: translateY(50vh); --transform-final: translate(204px, 177px); }
#cat-6  { --transform-initial: translateY(50vh); --transform-final: translate(76px, 259px); }
#cat-7  { --transform-initial: translateY(50vh); --transform-final: translate(-76px, 259px); }
#cat-8  { --transform-initial: translate(-50vw, 50vh); --transform-final: translate(-204px, 177px); }
#cat-9  { --transform-initial: translateX(-50vw); --transform-final: translate(-267px, 39px); }
#cat-10 { --transform-initial: translate(-50vw, -50vh); --transform-final: translate(-246px, -112px); }
#cat-11 { --transform-initial: translateY(-50vh); --transform-final: translate(-146px, -227px); }


/* Small portrait phones (360px - 479px) */
@media (min-width: 360px) {
  /* Styles for small portrait phones */

  .hero-maple-leaf {
    font-size: 200px; 
    top: 35%; /* Adjusted initial position */
    left: 50%;
  }

  .keywords-container {
    display: flex; 
    flex-direction: row; 
    justify-content: center; 
    align-items: center; 
    flex-wrap: nowrap; 
    width: 100%; 
    margin-top: 20rem; 
    white-space: nowrap;

    margin-top: 20rem; 
    padding: 5px;
    margin-left: 10px;
    margin-right: 10px;
  }

  .keywords-container > div {
    font-size: 0.8rem; 
    letter-spacing: 1.5px; 
    /*margin: 0 5vw;*/
    padding: 0px;
    margin: 0 0.5rem; /* 👈 this adds space left and right */
  }

  .btn-join-celebration {
    font-size: 0.8rem;
    letter-spacing: .25rem;
    padding: 0.5rem 1.5625rem 0.5rem 1.5625rem;
  }

}

/* Upper-range phones in portrait (480px - 575.98px) */
/* this is narrowest Chrome on Surface Pro */
@media (min-width: 480px) {
  /* Styles for larger portrait phones */

  .hero-maple-leaf {
    font-size: 200px; 
    top: 35%; /* Adjusted initial position */
    left: 50%;
  }
/*
  .keywords-container {
    margin-top: 25rem; 
    padding: 5px;
    display: flex; 
    flex-direction: row; 
    justify-content: center; 
    align-items: center; 
    flex-wrap: nowrap; 
    width: 100%; 
    margin-top: 25rem; 
    white-space: nowrap;
  }

  .keywords-container > div {
    font-size: 12px; 
    letter-spacing: 1.5px; 
    padding: 0px;
  }
*/


  .keywords-container {
    display: grid;
    grid-template-columns: 18% 18% 18% 18% 18%;
    justify-content: space-evenly;
    margin-top: 25rem; 
    width: 100%;

    padding: 5px;
    margin-top: 22rem; /* Adjusted spacing */
    margin-left: 10px;
    margin-right: 10px;

    margin-top: 25rem; 
    padding: 5px;
  }

  .keywords-container > div {
    font-size: 14px; 
    letter-spacing: 1.5px; 
    /*margin: 0 5vw;*/
    padding: 0px;
  }

  .btn-join-celebration {
    font-size: 0.8rem;
    letter-spacing: .25rem;
    padding: 0.5rem 1.5625rem 0.5rem 1.5625rem;
  }

}

@media (min-width: 576px) {
  /* SM landscape styles */

  .hero-maple-leaf {
    font-size: 250px; 
    top: 40%; /* Adjusted initial position */
    left: 50%;
  }
/*
  .keywords-container {
    display: flex; 
    flex-direction: row; 
    justify-content: center; 
    align-items: center; 
    flex-wrap: nowrap; 
    width: 100%; 
    margin-top: 20rem; 
    white-space: nowrap;
    margin-top: 25rem; 
    padding: 5px;
  }

  .keywords-container > div {
    font-size: 14px; 
    letter-spacing: 1.5px; 
    padding: 0px;
  }
*/


  .keywords-container {
    display: grid;
    grid-template-columns: 18% 18% 18% 18% 18%;
    justify-content: space-evenly;
    margin-top: 25rem; 
    width: 100%;

    margin-top: 22rem; /* Adjusted spacing */
    margin-left: 10px;
    margin-right: 10px;

    margin-top: 25rem; 
    padding: 5px;
  }

  .keywords-container > div {
    font-size: 14px; 
    letter-spacing: 1.5px; 
    /*margin: 0 5vw;*/
    padding: 0px;
  }

  .btn-join-celebration {
    font-size: 0.8rem;
    letter-spacing: .25rem;
    padding: 0.5rem 1.5625rem 0.5rem 1.5625rem;
  }

}

/* --- MD: 768px to 991.98px --- */
@media (min-width: 768px) {
  /* MD portrait styles */

  .hero-section {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }

  .hero-maple-leaf {
    font-size: 200px; 
    top: 40%; /* Adjusted initial position */
    left: 50%;
  }

  .keywords-container {
    display: grid;
    grid-template-columns: 18% 18% 18% 18% 18%;
    justify-content: space-evenly;
    width: 100%;
    padding: 5px;
    margin-top: 25rem; /* Adjusted spacing */
    margin-left: 10px;
    margin-right: 10px;
  }

  .keywords-container > div {
    font-size: 14px; 
    letter-spacing: 1.5px; 
    /*margin: 0 5vw;*/
    padding: 0px;
  }

  .btn-join-celebration {
    font-size: 1rem;
    letter-spacing: .25rem;
    padding: 0.5rem 1.5625rem 0.5rem 1.5625rem;
    margin-top: 2rem;
  }
}

/* --- LG: 992px to 1199.98px --- */
@media (min-width: 992px) {
  /* LG portrait styles */
  
  .hero-section {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }
  
  .hero-maple-leaf { 
    top: 40%; /* Adjusted initial position */
    font-size: 250px; 
  } 

  .hub-active .hero-maple-leaf { 
    font-size: 350px; 
  }

  .hub-wrapper { 
    transform: translate(-50%, -50%) scale(1.0); 
  }

  .hero-logo { 
    width: 80px; 
    height: 80px; 
    font-size: 30px; 
    top: 2rem; 
    left: 2rem; 
  }
  
  .keywords-container {
    grid-template-columns: 18% 18% 18% 18% 18%;
    margin-top: 25rem; 
    padding: 5px;
  }

  .keywords-container > div {
    font-size: 16px; 
    letter-spacing: 1.5px; 
    /*margin: 0 5vw;*/
    padding: 0px;
  }

  .btn-join-celebration {
    font-size: 1rem;
    letter-spacing: .25rem;
    padding: 0.5rem 1.5625rem 0.5rem 1.5625rem;
  }

}

@media (min-width: 1020px) {
  .hero-section {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }
  
  
  .keywords-container {
    grid-template-columns: 18% 18% 18% 18% 18%;
    margin-top: 25rem; 
    padding: 5px;
  }

  .keywords-container > div {
    font-size: 20px; 
    letter-spacing: 1.5px; 
    /*margin: 0 5vw;*/
    padding: 0px;
  }

}

/* --- XL: 1200px to 1399.98px --- */
@media (min-width: 1200px) {
  /* XL portrait styles */
  .hero-section {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }
  

  .keywords-container {
    grid-template-columns: 18% 18% 18% 18% 18%;
    margin-top: 25rem; 
    padding: 5px;
  }

  .keywords-container > div {
    font-size: 20px; 
    letter-spacing: 1.5px; 
    /*margin: 0 5vw;*/
    padding: 0px;
  }

  .btn-join-celebration {
    font-size: 1rem;
    letter-spacing: .25rem;
    padding: 0.5rem 1.5625rem 0.5rem 1.5625rem;
  }

}

/* --- XXL: 1400px and up --- */
@media (min-width: 1400px) {
  /* XXL portrait styles */
  .hero-section {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }
  

  .keywords-container {
    grid-template-columns: 18% 18% 18% 18% 18%;
    margin-top: 25rem; 
    padding: 5px;
  }

  .keywords-container > div {
    font-size: 20px; 
    letter-spacing: 1.5px; 
    /*margin: 0 5vw;*/
    padding: 0px;
  }

}

@media (min-width:2100px) {
  .hero-section {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }
  

  .keywords-container {
    grid-template-columns: 18% 18% 18% 18% 18%;
    margin-top: 25rem; 
    padding: 5px;
  }
  
  .keywords-container > div {
    font-size: 20px; 
    letter-spacing: 1.5px; 
    /*margin: 0 5vw;*/
    padding: 0px;
  }

}
