/* Prevent horizontal overflow across the page (keeps arrows from being cut off) */
html, body {
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .carousel {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding-right: 0;
  }
  /* carousel image sizing is controlled by dedicated responsive rules later in the file */
  .carousel-info {
    min-width: 120px;
    max-width: 98vw;
    align-items: center;
    margin-left: 0;
  }
  #carousel-header {
    font-size: 1.1em;
    margin-bottom: 6px;
    text-align: center;
  }
  #carousel-text {
    font-size: 1em;
    line-height: 20px;
    margin-bottom: 10px;
    text-align: center;
    word-break: break-word;
  }
  .carousel button {
    font-size: 1.2em;
    padding: 10px 16px;
    margin: 0 6px;
  }
  /* keep arrows to the sides of the image */
  .carousel-img-arrows {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    flex-wrap: nowrap; /* prevent arrows from wrapping above/below */
  }
  .carousel-img-arrows .carousel-arrow {
    margin: 0 8px;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* stronger enforcement: make image shrink to available space between arrows */
  .carousel-img-arrows #carousel-img {
    flex: 1 1 auto;
    width: auto;
    max-width: calc(100% - 110px);
    min-width: 0;
    margin: 0;
    display: block;
  }
}

@media (max-width: 480px) {
  .carousel {
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding-right: 0;
  }
  /* carousel image sizing is controlled by dedicated responsive rules later in the file */
  .carousel-info {
    min-width: 80px;
    max-width: 98vw;
    align-items: center;
    margin-left: 0;
  }
  #carousel-header {
    font-size: 1em;
    margin-bottom: 2px;
    text-align: center;
  }
  #carousel-text {
    font-size: 0.9em;
    line-height: 14px;
    margin-bottom: 6px;
    text-align: center;
    word-break: break-word;
  }
  .carousel button {
    font-size: 1em;
    padding: 8px 12px;
    margin: 0 4px;
  }
  /* ensure arrows appear left/right of image on small phones */
  .carousel-img-arrows {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap; /* prevent wrapping */
  }
  .carousel-img-arrows .carousel-arrow {
    margin: 0 6px;
    flex: 0 0 36px;
      /* stronger enforcement on this breakpoint */
      .carousel-img-arrows {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
      }
      .carousel-img-arrows .carousel-arrow {
        flex: 0 0 44px !important;
        width: 44px !important;
        height: 44px !important;
      }
      .carousel-img-arrows #carousel-img {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: calc(100% - 110px) !important;
        min-width: 0 !important;
        margin: 0 !important;
        display: block !important;
      }
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* ensure image shrinks to fit between arrows on very small screens */
  .carousel-img-arrows #carousel-img {
    flex: 1 1 auto;
    width: auto;
    max-width: calc(100% - 88px);
    min-width: 0;
    margin: 0;
    display: block;
  }
}
@media (max-width: 768px) {
  .contacts {
    flex-direction: column;
    font-size: 20px;
    gap: 20px;
    text-align: center;
    padding: 20px 0;
    background-size: cover;
    word-break: break-word;
  }
  .contacts img {
    width: 60px;
    height: auto;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .contacts {
    flex-direction: column;
    font-size: 16px;
    gap: 12px;
    text-align: center;
    padding: 10px 0;
    background-size: cover;
    word-break: break-word;
  }
  .contacts img {
    width: 40px;
    height: auto;
    margin-bottom: 8px;
  }
}
@font-face {
    src: url(fonts/BebasNeue-Regular.ttf);
    font-family: BebasNeue;
}
@font-face {
    src: url(fonts/BungeeInline-Regular.ttf);
    font-family: BungeeInline;
}

.fulshear {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background-color: #5d2d83;
    height: 170px;
    text-align: center;
    padding-left: 30px;
    
    
   
}
.FULSHEAR {
    font-size:90px;
    font-family: BebasNeue;
    color: white;
    letter-spacing: 10px;
    
      /* stronger enforcement on very small screens */
      .carousel-img-arrows {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
      }
      .carousel-img-arrows .carousel-arrow {
        flex: 0 0 36px !important;
        width: 36px !important;
        height: 36px !important;
      }
      .carousel-img-arrows #carousel-img {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: calc(100% - 88px) !important;
        min-width: 0 !important;
        margin: 0 !important;
        display: block !important;
      }
}
.tsa {
    font-size:90px;
    font-family: BebasNeue;
    color: white;
    letter-spacing: 10px;

}


.nav {
    display: flex;
    justify-content: center;
    gap: 50px;
    padding-top: 15px;
    font-size: 20px;
    font-family: Roboto;
    background-color:rgb(84, 27, 138);
    height: 35px;
    
}
.nav a {
    color: white;
    padding-bottom: 1px;
    font-weight: 700;
    text-decoration: none;
}
.nav a:hover {
    font-size: 22px;
    font-weight: bolder;
    text-decoration: underline;
}
.whyjoin h1 {
    margin-top: 30px;
    margin-bottom: 18px;
    font-size: 50px;
    font-weight: 700;
    font-family: BungeeInline;
    letter-spacing: 10px;
    border: none;
    color:#5d2d83;
    text-shadow: 2px 2px 5px gray;
    text-align: center;
}

.whyjoin p {
    font-size: 20px;
    font-family: BebasNeue;
    font-weight: bold;
    padding: 30px;
    line-height: 35px;
    letter-spacing: 1.5px;
    background-color: #5d2d83;
    color: white;
}
.funthings {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 items per row */
  gap: 2rem; /* spacing between grid items */
  align-items: start; /* aligns images and text to top */
  max-width: 1000px;
  margin: auto;
}

.grid-item img {
  width: 100%;
  height: auto;
  display: block;
}

.grid-item h2 {
    font-family: BungeeInline;
}
.carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding-right: 0; /* removed offset so content centers */
  width: 100%;
}
.carousel-info {
  min-width: 250px;
  max-width: 350px;
  margin: 0 auto; /* center the text container */
  display: flex;
  flex-direction: column;
  align-items: center; /* center headings and text */
  text-align: center;
}
#carousel-header {
    font-family: BungeeInline;
    color: #5d2d83;
    font-size: 2em;
    margin-bottom: 10px;

}
#carousel-img {
  /* Desktop target size preserved via max-width; image will scale down to fit smaller viewports. */
  width: 100%;
  max-width: 800px; /* desktop target width */
  aspect-ratio: 8 / 7; /* preserves the 800x700 proportion while allowing responsive scaling */
  object-fit: cover; /* crops the image to fill the box */
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin: 0 auto 60px auto; /* bottom spacing so image doesn't touch footer */
  display: block;
}
/* Responsive carousel image sizes - desktop remains at 800x700 */
@media (max-width: 1024px) {
  #carousel-img {
    width: 500px;
    height: 380px;
    margin-bottom: 50px;
  }
}
/* Desktop: add left padding so the competitions text doesn't touch the screen edge */
@media (min-width: 1025px) {
  .carousel {
    padding-left: 40px;
    padding-right: 64px; /* provide extra space on the right so arrows don't hug the edge */
  }
  .carousel-info {
    padding-left: 24px;
  }
}
@media (max-width: 768px) {
  #carousel-img {
    width: 320px;
    height: 240px;
    margin-bottom: 40px;
  }
}
@media (max-width: 480px) {
  #carousel-img {
    width: 220px;
    height: 160px;
    margin: 0 auto 24px auto;
  }
}
/* helper for when arrows+image are wrapped in a row container */
.carousel-img-arrows {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box; /* ensure padding doesn't increase total width */
  padding: 0 48px; /* keep arrows inset from edges so they aren't clipped */
}
/* let the image flex and shrink between the fixed arrow buttons */
.carousel-img-arrows #carousel-img {
  flex: 1 1 auto;
  max-width: calc(100% - 100px); /* leave room for arrows */
  min-width: 0; /* allow to shrink below intrinsic width */
  height: auto;
  display: block;
  margin: 0 auto 40px auto; /* ensure consistent bottom spacing when wrapped in arrows container */
}
#carousel-text {
    font-size: 1.1em;
    font-family: Roboto;
    text-align: justify;
    line-height: 30px;
    margin-bottom: 50px;
}
.carousel button {
    background-color: rgb(84, 27, 138);
    color: #fff;
    border: none;
    padding: 12px 20px;
    margin: 0 10px;
    font-size: 1.5em;
    border-radius: 30%;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.carousel button:hover {
    background-color: rgb(58, 17, 97);
    transform: scale(1.1);
}

.contacts img {
    width: 100px;
}

.contacts {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    background: #000000;
    gap: 60px;
    font-family: BebasNeue;
    font-size: 40px;
    color: white;
   background-image: url("images-home/pattern.png");
   text-shadow: 2px 2px 5px black;
}

.contacts h2 {
    font-family: BungeeInline;
}

@media (max-width: 1024px) {
  .FULSHEAR, .tsa {
    font-size: 60px;
  }
  .nav {
    gap: 20px;
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .fulshear {
    flex-direction: column;
    height: auto;
    padding: 20px;
    gap: 10px;
  }
  .FULSHEAR, .tsa {
    font-size: 40px;
    letter-spacing: 4px;
    text-align: center;
  }
  .nav {
    flex-wrap: wrap;
    gap: 15px;
    font-size: 16px;
    height: auto;
    padding: 10px 0;
  }
}

@media (max-width: 375px) {
  .FULSHEAR, .tsa {
    font-size: 20px;
    letter-spacing: 2px;
  }
  .nav {
    flex-wrap: wrap;
    gap: 15px;
    font-size: 16px;
    height: auto;
    padding: 10px 0;
  }
  .contacts {
    font-size: 12px;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .FULSHEAR, .tsa {
    font-size: 24px;
  }
  .nav {
    font-size: 13px;
    gap: 8px;
  }

  .about, .goals, .contacts {
    padding: 10px;
    gap: 10px;
  }
  /* match contact sizes with index.css for small screens */
  .contacts {
    font-size: 16px;
    gap: 16px;
  }
  /* scale logos to match index.css */
  .contacts img {
    width: 60px;
    height: auto;
  }
}
