.h2 {
    color: var(--black);
}

.bg-primary {
    background-color: var(--primary-blue) !important;
}

/* section */
section.bg-primary h2 {
    color: var(--white);
}

section.bg-primary p {
    color: var(--white);
}

/* Section Styling */
.upcoming-confs-section {
    background-color: var(--light-gray-1);
}

.upcoming-event {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.event-date {
    min-width: 60px;
}

.event-month {
    font-size: 0.75rem;
    color: #6c757d;
}

.event-day {
    font-size: 1.75rem;
    color: #000;
}

.event-image img {
    border-radius: 8px;
    object-fit: cover;
    width: 160px;
    height: 100px;
}

.event-info h5 {
    margin-bottom: 0.5rem;
    color: #212529;
}

.view-details-link {
    color: #1958BD;
    font-weight: 500;
    text-decoration: none;
}

.view-details-link:hover {
    text-decoration: underline;
}

/* Hero section */
.hero-section {
    background-image: url('../images/home_background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 400px;
    overflow: hidden;
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 50% black */
    z-index: 0;
}

.hero-section h1 {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.overview-section h2 {
    font-size: 2rem;
    border-bottom: 3px solid var(--black);
    display: inline-block;
    padding-bottom: 8px;
}

.overview-section p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Latest Conference Section */
.latest-hero-section {
  background-image: url('../images/latest_conference_background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.latest-hero-section .overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* 50% black */
  z-index: 0;
}

.latest-hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* dark overlay */
  z-index: 1;
}

.latest-hero-section .container {
  position: relative;
  z-index: 2;
}

.latest-hero-section h2 {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.latest-conference-section h4 {
    color: white;
}

.latest-conference-section p {
    font-size: 1rem;
    line-height: 1.6;
}

.btn-pill-reverse {
    background-color: white;
    color: var(--primary-blue-dark);
    border-radius: 50px;
    padding: 8px 24px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-pill-reverse:hover {
    background-color: var(--primary-blue-dark);
    color: white;
    text-decoration: none;
}

.latest-section h2 {
    font-size: 2rem;
    border-bottom: 3px solid var(--black);
    display: inline-block;
    padding-bottom: 8px;
}

/* Gallery Section */
.gallery-hero {
  background-image: url('../images/gallery_background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gallery-hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* 50% black */
  z-index: 0;
}

.gallery-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* dark overlay */
  z-index: 1;
}

.gallery-hero .container {
  position: relative;
  z-index: 2;
}

/* === Gallery (carousel: arrows + dots + swipe) === */
.gallery-section { background-color: var(--white); }

/* outer wrapper (keeps arrows on top on all browsers) */
.gallery-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--black);
  isolation: isolate; /* new stacking context so arrows can sit above */
}

/* viewport (auto height via aspect-ratio; 16/9 default) */
.gallery-viewport {
  width: 100%;
  aspect-ratio: var(--gallery-ar, 16/9);
  height: auto;
  overflow: hidden;
  position: relative; /* local stacking context for track & arrows */
  display: block;
}

/* sliding track (must fill viewport height so slides can be 100%) */
.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 300ms ease;
  will-change: transform;
  position: relative;
  z-index: 0; /* arrows will sit above */
}

/* each slide fills the viewport and centers its content */
.gallery-slide {
  flex: 0 0 100%;
  max-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  overflow: hidden; /* hide overflow if any */
}

/* image scales without cropping and is always centered */
.gallery-slide img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;      /* no cropping; even letterboxing */
  object-position: center;  /* center horizontally & vertically */
  display: block;

  /* better mobile interactions */
  -webkit-user-drag: none;
  user-select: none;
  touch-action: pan-y;
}

/* ensure vertical page scroll is allowed; horizontal swipe is ours */
.gallery-carousel,
.gallery-viewport,
.gallery-track,
.gallery-slide {
  touch-action: pan-y;
}

/* arrows */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  color: #000;
  font-size: 22px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  z-index: 1000;          /* above viewport/track/slides */
  pointer-events: auto;   /* ensure clicks land on the button */
  -webkit-tap-highlight-color: transparent;
}

.gallery-arrow:hover { background: #fff; }
.gallery-arrow.prev { left: 10px; }
.gallery-arrow.next { right: 10px; }

/* make sure icon itself doesn't steal the click */
.gallery-arrow i,
.gallery-nav i { pointer-events: none; }

/* dots */
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.gallery-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: #cfcfcf;
  cursor: pointer;
  padding: 0;
}

.gallery-dots .dot.active {
  background: var(--primary-blue-dark);
  transform: scale(1.1);
}