/* ==========================================*

*&#xA0;  CODEWORD HACKATHON EVENT GALLERY*

*========================================== */

.hgallery-hero,

.hgallery-main,

.hgallery-lightbox {

  --hg-navy: #101b3d;

  --hg-blue: #24458b;

  --hg-orange: #ff7900;

  --hg-muted: #69758a;

  font-family: "Poppins", sans-serif;

}

/* HERO SECTION WITH BACKGROUND IMAGE */

.hgallery-hero {

  position: relative;

  isolation: isolate;

  overflow: hidden;

  padding: 95px 20px 90px;

  color: #fff;

  text-align: center;

  background:

    linear-gradient(120deg,

      rgba(16, 27, 61, 0.93),

      rgba(29, 57, 118, 0.84),

      rgba(16, 27, 61, 0.90)),

    url("../event-images/CodeWord-Event-01.jpeg");

  background-size: cover;

  background-position: center 45%;

  background-repeat: no-repeat;

  background-attachment: scroll;

}

/* Keep hero content above the background */

.hgallery-hero-content {

  position: relative;

  z-index: 2;

  max-width: 820px;

  margin: 0 auto;

}

/* Responsive background */

@media (max-width: 600px) {

  .hgallery-hero {

    padding: 70px 18px;

    background-position: center center;

  }

}

.hgallery-hero *,

.hgallery-main *,

.hgallery-lightbox * {

  box-sizing: border-box;

}

/* HERO */

.hgallery-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 95px 20px 90px;
    color: #fff;
    text-align: center;
    background-image:
    linear-gradient(
      120deg,
      rgb(16 27 61 / 32%),
      rgb(29 57 118 / 48%),
      rgb(16 27 61 / 30%)
    ),
    url("../event-images/CodeWord-Event-01.jpeg");
    background-size: cover;
    background-position: center 45%;
    background-repeat: no-repeat;
    background-attachment: scroll;
    }

.hgallery-hero-content {

  position: relative;

  z-index: 2;

  max-width: 820px;

  margin: 0 auto;

}

.hgallery-eyebrow {

  display: inline-flex;

  align-items: center;

  gap: 9px;

  padding: 9px 16px;

  border: 1px solid rgba(255, 255, 255, .22);

  border-radius: 50px;

  background: rgba(255, 255, 255, .08);

  color: #ffb46e;

  font-size: 11px;

  font-weight: 700;

  letter-spacing: 1.5px;

}

.hgallery-hero h1 {

  margin: 24px 0 17px;

  font-size: clamp(32px, 5vw, 58px);

  line-height: 1.2;

  font-weight: 800;

  letter-spacing: -1.5px;

}

.hgallery-hero h1 span {

  color: #ff922e;

}

.hgallery-hero p {

  max-width: 650px;

  margin: 0 auto;

  color: #d8deed;

  font-size: 14px;

  line-height: 1.9;

}

.hgallery-hero-btn {

  display: inline-flex;

  align-items: center;

  gap: 12px;

  margin-top: 28px;

  padding: 14px 22px;

  border-radius: 9px;

  background: #ff7900;

  color: #fff;

  text-decoration: none;

  font-size: 13px;

  font-weight: 700;

  transition: transform .25s, background .25s;

}

.hgallery-hero-btn:hover {

  background: #ed6900;

  transform: translateY(-3px);

}

.hgallery-hero-decoration {

  position: absolute;

  z-index: 1;

  width: 300px;

  height: 300px;

  border: 1px solid rgba(255, 255, 255, .08);

  border-radius: 50%;

  pointer-events: none;

}

.hgallery-decoration-one {

  top: -160px;

  left: -100px;

  box-shadow: 0 0 0 35px rgba(255, 255, 255, .025),

    0 0 0 75px rgba(255, 255, 255, .02);

}

.hgallery-decoration-two {

  right: -160px;

  bottom: -190px;

  width: 420px;

  height: 420px;

  box-shadow: 0 0 0 35px rgba(255, 121, 0, .04),

    0 0 0 75px rgba(255, 121, 0, .025);

}

/* MAIN SECTION */

.hgallery-main {

  padding: 75px 22px 60px;

  background: #f5f7fc;

  color: #101b3d;

}

.hgallery-section-heading {

  display: flex;

  align-items: flex-end;

  justify-content: space-between;

  gap: 20px;

  max-width: 1250px;

  margin: 0 auto 30px;

}

.hgallery-section-label {

  color: #ff7900;

  font-size: 11px;

  font-weight: 800;

  letter-spacing: 2px;

}

.hgallery-section-heading h2 {

  margin: 10px 0;

  font-size: clamp(28px, 3.5vw, 42px);

  line-height: 1.2;

  letter-spacing: -1px;

}

.hgallery-section-heading h2 span {

  color: #ff7900;

}

.hgallery-section-heading p {

  margin: 0;

  color: #69758a;

  font-size: 13px;

  line-height: 1.8;

}

.hgallery-count {

  display: flex;

  align-items: center;

  gap: 10px;

  flex-shrink: 0;

  padding: 12px 15px;

  border: 1px solid #e4e8f1;

  border-radius: 10px;

  background: #fff;

  color: #101b3d;

  font-size: 12px;

  font-weight: 700;

}

.hgallery-count i {

  color: #ff7900;

  font-size: 17px;

}

/* FILTERS */

.hgallery-filters {

  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 10px;

  max-width: 1250px;

  margin: 0 auto 32px;

}

.hgallery-filter {

  padding: 10px 17px;

  border: 1px solid #e1e6f0;

  border-radius: 50px;

  background: #fff;

  color: #45516a;

  font-family: inherit;

  font-size: 11px;

  font-weight: 700;

  cursor: pointer;

  transition: all .25s;

}

.hgallery-filter:hover,

.hgallery-filter.active {

  border-color: #101b3d;

  background: #101b3d;

  color: #fff;

}

.hgallery-filter.active {

  box-shadow: 0 5px 15px rgba(16, 27, 61, .15);

}

/* IMAGE GRID */

.hgallery-grid {

  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 25px;

  max-width: 1250px;

  margin: 0 auto;

  align-items: stretch;

}

.hgallery-card {

  min-width: 0;

  overflow: hidden;

  border: 1px solid #e6eaf2;

  border-radius: 17px;

  background: #fff;

  box-shadow: 0 7px 24px rgba(16, 27, 61, .055);

  transition: transform .3s, box-shadow .3s, border-color .3s;

}

.hgallery-card:hover {

  transform: translateY(-6px);

  border-color: rgba(255, 121, 0, .45);

  box-shadow: 0 18px 38px rgba(16, 27, 61, .12);

}

.hgallery-card[hidden] {

  display: none !important;

}

.hgallery-image-button {

  position: relative;

  display: block;

  width: 100%;

  height: 245px;

  padding: 0;

  overflow: hidden;

  border: 0;

  background: #e4e9f3;

  cursor: zoom-in;

  text-align: left;

}

.hgallery-image-button img {

  display: block;

  width: 100%;

  height: 100%;

  object-fit: cover;

  object-position: center;

  transition: transform .6s ease;

}

.hgallery-card:hover .hgallery-image-button img {

  transform: scale(1.07);

}

.hgallery-image-overlay {

  position: absolute;

  inset: 0;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 10px;

  background: rgba(10, 22, 53, .5);

  color: #fff;

  opacity: 0;

  transition: opacity .3s;

}

.hgallery-card:hover .hgallery-image-overlay,

.hgallery-image-button:focus-visible .hgallery-image-overlay {

  opacity: 1;

}

.hgallery-zoom {

  display: grid;

  width: 48px;

  height: 48px;

  place-items: center;

  border: 1px solid rgba(255, 255, 255, .55);

  border-radius: 50%;

  background: #ff7900;

  font-size: 16px;

}

.hgallery-image-label {

  font-size: 10px;

  font-weight: 800;

  letter-spacing: 2px;

}

.hgallery-number {

  position: absolute;

  top: 13px;

  left: 13px;

  z-index: 1;

  display: grid;

  width: 38px;

  height: 38px;

  place-items: center;

  border: 1px solid rgba(255, 255, 255, .3);

  border-radius: 10px;

  background: rgba(16, 27, 61, .85);

  color: #fff;

  font-size: 12px;

  font-weight: 700;

}

.hgallery-card-info {

  padding: 21px 20px 24px;

}

.hgallery-category {

  display: inline-block;

  margin-bottom: 10px;

  color: #ff7900;

  font-size: 10px;

  font-weight: 800;

  letter-spacing: 1.3px;

}

.hgallery-card-info h3 {

  margin: 0 0 9px;

  color: #101b3d;

  font-size: 17px;

  font-weight: 700;

  line-height: 1.5;

}

.hgallery-card-info p {

  margin: 0;

  color: #69758a;

  font-size: 12px;

  line-height: 1.85;

}

.hgallery-empty {

  max-width: 1250px;

  margin: 30px auto;

  color: #69758a;

  text-align: center;

}

.hgallery-bottom-note {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 14px;

  margin: 55px auto 0;

  color: #69758a;

  font-size: 10px;

  font-weight: 800;

  letter-spacing: 1.5px;

  text-align: center;

}

.hgallery-bottom-note span {

  width: 35px;

  height: 3px;

  flex-shrink: 0;

  border-radius: 10px;

  background: #ff7900;

}

/* LIGHTBOX */

.hgallery-lightbox {

  position: fixed;

  inset: 0;

  z-index: 99999;

  display: none;

  align-items: center;

  justify-content: center;

  gap: 18px;

  padding: 65px 25px 25px;

  background: rgba(5, 10, 25, .94);

}

.hgallery-lightbox.open {

  display: flex;

}

.hgallery-lightbox-content {

  width: min(100%, 1000px);

  max-height: 100%;

  overflow: auto;

  text-align: center;

}

.hgallery-lightbox-content img {

  display: block;

  width: auto;

  max-width: 100%;

  height: auto;

  max-height: 70vh;

  margin: 0 auto;

  object-fit: contain;

  border-radius: 8px;

  box-shadow: 0 15px 55px rgba(0, 0, 0, .3);

}

.hgallery-lightbox-caption {

  padding: 17px 10px;

  color: #fff;

}

.hgallery-lightbox-caption h3 {

  margin: 0 0 7px;

  font-size: 19px;

}

.hgallery-lightbox-caption p {

  margin: 0 0 10px;

  color: #c9d0e0;

  font-size: 12px;

  line-height: 1.7;

}

.hgallery-lightbox-caption span {

  color: #ff9a40;

  font-size: 11px;

  font-weight: 700;

}

.hgallery-lightbox-close,

.hgallery-lightbox-prev,

.hgallery-lightbox-next {

  position: absolute;

  display: grid;

  place-items: center;

  width: 44px;

  height: 44px;

  padding: 0;

  border: 1px solid rgba(255, 255, 255, .25);

  border-radius: 50%;

  background: #18264a;

  color: #fff;

  font-size: 16px;

  cursor: pointer;

  transition: background .2s;

}

.hgallery-lightbox-close:hover,

.hgallery-lightbox-prev:hover,

.hgallery-lightbox-next:hover {

  background: #ff7900;

}

.hgallery-lightbox-close {

  top: 18px;

  right: 20px;

}

.hgallery-lightbox-prev {

  left: 20px;

  top: 45%;

}

.hgallery-lightbox-next {

  right: 20px;

  top: 45%;

}

.hgallery-lightbox button:focus-visible {

  outline: 3px solid #ff7900;

  outline-offset: 3px;

}

/* TABLET */

@media (max-width: 950px) {

  .hgallery-grid {

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;

  }

  .hgallery-image-button {

    height: 230px;

  }

  .hgallery-main {

    padding: 60px 20px 45px;

  }

}

/* MOBILE */

@media (max-width: 600px) {

  .hgallery-hero {

    padding: 70px 18px;

  }

  .hgallery-hero h1 {

    letter-spacing: -.8px;

  }

  .hgallery-hero p {

    font-size: 13px;

  }

  .hgallery-main {

    padding: 45px 15px;

  }

  .hgallery-section-heading {

    align-items: flex-start;

    flex-direction: column;

    margin-bottom: 23px;

  }

  .hgallery-count {

    padding: 10px 12px;

  }

  .hgallery-filters {

    justify-content: flex-start;

    gap: 8px;

    margin-bottom: 23px;

  }

  .hgallery-filter {

    padding: 9px 13px;

    font-size: 10px;

  }

  .hgallery-grid {

    grid-template-columns: minmax(0, 1fr);

    gap: 20px;

  }

  .hgallery-image-button {

    height: 250px;

  }

  .hgallery-card-info {

    padding: 19px;

  }

  .hgallery-bottom-note {

    gap: 8px;

    font-size: 8px;

    letter-spacing: .8px;

    line-height: 1.8;

  }

  .hgallery-bottom-note span {

    width: 15px;

  }

  .hgallery-lightbox {

    gap: 8px;

    padding: 60px 12px 20px;

  }

  .hgallery-lightbox-prev {

    left: 8px;

  }

  .hgallery-lightbox-next {

    right: 8px;

  }

  .hgallery-lightbox-prev,

  .hgallery-lightbox-next {

    top: 40%;

    width: 36px;

    height: 36px;

  }

  .hgallery-lightbox-content img {

    max-height: 62vh;

  }

}

@media (prefers-reduced-motion: reduce) {

  .hgallery-hero *,

  .hgallery-main *,

  .hgallery-lightbox * {

    transition-duration: .01ms !important;

  }

}

.hgallery-video-section {
    max-width: 1240px;
    margin: 60px auto;
    padding: 24px;
}

.hgallery-video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.hgallery-video-card {
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hgallery-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.hgallery-video-card video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #111;
}

.hgallery-video-info {
    padding: 16px;
}

.hgallery-video-info h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.hgallery-video-info p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

@media (max-width: 800px) {
    .hgallery-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .hgallery-video-section {
        padding: 16px;
    }

    .hgallery-video-grid {
        grid-template-columns: 1fr;
    }
}

.hgallery-download-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin: 20px 0;
}

.hgallery-download-wrap p {
    margin: 0;
    color: #737b8c;
    font-size: 12px;
    text-align: right;
}

.hgallery-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff8a00, #ff5e00);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(255, 111, 0, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hgallery-download-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(255, 111, 0, 0.3);
}

.hgallery-download-btn:focus-visible {
    outline: 3px solid #1f2937;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .hgallery-download-wrap {
        align-items: stretch;
    }

    .hgallery-download-btn {
        width: 100%;
        box-sizing: border-box;
    }

    .hgallery-download-wrap p {
        text-align: center;
    }
}
