/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  font-family: 'Open Sans', sans-serif;
  background-color: rgb(201,40,45);
  background: url('images/red-bg.jpeg') center center / cover no-repeat;
  color: black;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.carousel-outer {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 30px 20px;
  background-color: transparent;
}

.carousel-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.title {
  font-weight: 900;
  font-size: 2.5rem;
  text-align: center;
  color: white;
  margin-bottom: 10px;
  margin-top:20px;
}

.subtitle {
  font-style: italic;
  font-weight: 500;
  color: white;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 2rem;
}

.carousel-track-wrapper {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.gallery-item {
  position: relative;
  flex: 0 0 320px;
  border-radius: 8px;
  overflow: hidden;
  height: 240px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Entire card is clickable */
.event-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
  position: relative;
}

/* Subtle hover effect */
.event-link:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.event-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hover-link {
  font-weight: 900;
  color: white;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.hover-link:hover {
  color: #c9282d; /* light gold or choose another */
  border-bottom: 2px solid black;
}

.hover-link2 {
  color: #c9282d; /* SAC red */
  text-decoration: underline;
  font-weight: bold;
}

.hover-link2:hover {
  color: #0072cf; /* SAC blue on hover */
}

.card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 12px 16px;
  z-index: 1;
}

.card-caption h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.card-caption time {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Event icons inside captions */
.icon.tiny {
  width: 12px;
  height: 12px;
  vertical-align: middle;
  margin-right: 4px;
  margin-left: 4px;
  opacity: 1;
  filter: brightness(0) invert(1); /* keeps icons white on dark caption */
}

.card-caption time {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: 500;
}

.card-caption h3 {
  margin-bottom: 2px;
}


.gallery-heading {
  color: white;
  margin: 0;
}

/* Hide mobile version by default, show on small screens */
.mobile-heading {
  font-size:1.3rem;
  display: none;
}

.desktop-heading {
  display: block;
  font-size:1.8rem;
}

.date-box {
  position: absolute;
  bottom: 12px;      /* was top: 8px; */
  right: 12px;       /* was left: 8px; */
  width: 50px;
  height: 50px;
  background: white;
  color: black;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(0,0,0,0.25);
  z-index: 3;        /* stays above the caption (z-index: 1) */
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.date-box .day {
  font-size: 1.8rem;
  line-height: 0.9;
}

.date-box .month {
  font-size: 1.1rem;
  line-height: 1;
}

.read-more-btn-2 {
  display: block;
  margin: 35px auto 0;
  padding: 12px 28px;
  background: white;
  color: #222;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  transition: background 0.3s ease, color 0.3s ease;
}

.read-more-btn-2:hover {
  background: rgb(142, 27, 30);
  color: white;
}


/* Navigation Arrows */
.arrow {
  position: absolute;
  top: 60%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

/* Arrow icons */
.arrow img {
  width: 30px;  /* adjust if needed */
  height: auto;
  display: block;
}

/* Subtle slide motion on hover */
#prev:hover {
  transform: translate(-4px, -50%);
}

#next:hover {
  transform: translate(4px, -50%);
}

/* Position arrows outside container */
#prev {
  left: -60px;
}

#next {
  right: -60px;
}

/* Hide arrows on small screens */
@media (max-width: 600px) {
  .arrow {
    display: none;
  }
}


.photo-btn {
  white-space: nowrap;
  background: none;
  color: white;
  text-decoration: none;
  padding: 12px 28px;
  border: 1px solid white;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

.photo-btn:hover {
  background: white;
  color: #c9282d;
  border: 1px solid c9282d;
  transform: translateY(-2px);
}

.photo-btn:active {
  transform: translateY(0);
}

/* Hide arrows on small screens */
@media (max-width: 600px) {
  .arrow {
    display: none;
  }
}

.carousel-nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
}

.carousel-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #666;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-indicator[aria-selected="true"] {
  background-color: white;
}

@media only screen and (max-width: 479px) {
  .gallery-item {
    flex: 0 0 100%;
  }

  .gallery-item img:not(.corner-icon) {
    height: 200px;
  }

  .title {
    font-size: 1.8rem;
    margin-top:20px;
    margin-bottom:20px;
  }

.subtitle {
  font-style: italic;
  font-weight: 500;
  color: white;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

  .mobile-heading {
    display: block;
  }

  .desktop-heading {
    display: none;
  }

}

@media (max-width: 479px) {
  .date-box {
    width: 44px;
    height: 44px;
    bottom: 10px;
    right: 10px;
  }
  .date-box .day { font-size: 1.6rem; }
  .date-box .month { font-size: 1rem; }
}

@media only screen and (max-width: 479px) {

  /* Keep full width safely without breaking positioning */
  .gallery-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Let image scale naturally, but cap height if needed */
  .gallery-item img:not(.corner-icon) {
    width: 100%;
    height: auto;
    max-height: 260px; /* adjustable but SAFE */
    object-fit: cover;
  }

  .title {
    font-size: 1.8rem;
    margin-top:0px;
    margin-bottom:10px;
  }

  .subtitle {
    font-style: italic;
    font-weight: 500;
    color: white;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .mobile-heading {
    display: block;
  }

  .desktop-heading {
    display: none;
  }
}

@media only screen and (max-width: 479px) {

  /* Full-width cards */
  .gallery-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Image fills the card */
  .gallery-item img:not(.corner-icon) {
    width: 100%;
    height: 100%; /* keeps 240px fixed */
    object-fit: cover;
  }

  /* Card caption overlay: smaller height, content at bottom */
  .card-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    padding: 6px 12px; /* slightly smaller padding */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* push content to bottom */
    min-height: 60px; /* overlay doesn’t go too high */
    z-index: 1;
  }

  /* Title slightly smaller and bottom-aligned */
  .card-caption h3 {
    font-size: 0.95rem;
    line-height: 1.2;
    margin-bottom: 2px;
    word-break: break-word;
  }

  /* Time/date line stacked neatly under title */
  .card-caption time {
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    overflow: visible;
  }

  /* Icons smaller */
  .card-caption .icon.tiny {
    width: 10px;
    height: 10px;
    margin: 0 2px;
    flex-shrink: 0;
  }

  /* Date box sizing */
  .date-box {
    width: 44px;
    height: 44px;
    bottom: 10px;
    right: 10px;
  }

  .date-box .day { font-size: 1.6rem; }
  .date-box .month { font-size: 1rem; }

}

@media only screen and (max-width: 479px) {

  /* Wrapper shows partial previous card */
  .carousel-track-wrapper + {
    padding-left: 12%;   /* ~1/8 of width */
    padding-right: 0;
  }

  /* Track aligns to the start */
  .carousel-track {
    padding-left: 0;
    gap: 0.75rem; /* small gap between cards */
  }

  /* Keep cards full width */
  .gallery-item {
    flex: 0 0 100%;
    max-width: 100%;
    overflow: visible;  /* date box still visible */
  }

  /* Date box smaller */
  .date-box {
    width: 44px;
    height: 44px;
    bottom: 10px;
    right: 10px;
  }

  .date-box .day { font-size: 1.6rem; }
  .date-box .month { font-size: 1rem; }
}


