/* =======================================
  PROJECTS HERO
======================================= */
.projects-hero {
  position: relative;
  min-height: 800px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.projects-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.projects-hero .row {
  max-width: 1560px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.projects-hero__content {
  max-width: 650px;
  color: #fff;
}

.projects-hero__eyebrow {
  color: var(--Red, #ed1c24);

  /* Section Title */
  font-family: Lato;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 24px; /* 120% */
  margin-bottom: 30px;
}

.projects-hero__title {
  color: #fff;

  /* H1 */
  font-family: Poppins;
  font-size: 50px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin-bottom: 20px;
}

.projects-hero__text {
  color: #fafbfc;

  /* P */
  font-family: Lato;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px; /* 150% */
}

/* =======================================
  PRACTICAL APPLICATIONS HEADER
======================================= */
.projects-applications .row {
  max-width: 1560px;
  margin: 0 auto;
}

.projects-applications__header {
  display: flex;
  justify-content: space-between;
  align-items: center; /* keeps desc vertically centered */
  gap: 40px;
  margin-bottom: 60px;
}

.projects-applications__title {
  max-width: 650px;
}

.projects-applications__title .red_text {
  display: inline-block;
  color: #ed1c24;
  font-family: "Lato", sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 30px;
}

.projects-applications__h2 {
  margin: 0;
  color: #151515;
  font-family: "Poppins", sans-serif;
  font-size: clamp(26px, 2.2vw, 40px);
  font-weight: 700;
  line-height: normal;
}

.projects-applications__desc {
  max-width: 650px;
}

.projects-applications__desc p {
  margin: 0;
  color: #4a4a4a;
  font-family: Lato;
  font-size: 16px;
  line-height: 24px;
}

/* =======================================
  PROJECTS GRID (4 cards)
======================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

/* Card */
.proj-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f3f3;
  height: 500px;
}

.proj-card__media {
  position: absolute;
  inset: 0;
}

.proj-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  transform: scale(1);
  transition: transform 0.3s ease;
}

.proj-card:hover .proj-card__img {
  transform: scale(1.2);
}

/* PROJECT CARD CONTENT (MATCH REF) */
.proj-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  /* give it a “panel” height like the reference */
  min-height: 260px; /* desktop ref feel */
  padding: 30px;
  z-index: 2;
  color: #fff;

  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* H3 */
.proj-card__content h3 {
  margin: 0;
  color: #fff;

  font-family: Poppins;
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

/* P */
.proj-card__content p {
  margin: 0;
  color: #fff;

  font-family: "DM Sans", sans-serif;

  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

/* Button */
.proj-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #ed1c24;

  background: #ed1c24;
  color: #fff;
  text-decoration: none;

  font-family: "Lato", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 24px;

  width: fit-content;

  margin-top: auto; /* key */
  align-self: flex-start; /* key */
}

.proj-card__btn:hover {
  background: #000;
  border: 1px solid #ed1c24;
}

/* =======================================
  RESPONSIVE
======================================= */
@media (max-width: 991px) {
  .projects-hero {
    min-height: 460px;
  }

  .projects-applications__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .projects-applications__desc {
    max-width: 100%;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .proj-card {
    height: 260px;
  }
}

@media (max-width: 575px) {
  .projects-hero {
    min-height: 420px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .proj-card {
    height: 280px;
  }

  .proj-card__content {
    min-height: 200px;
    padding: 20px;
  }
}

@media (max-width: 991px) {
  .proj-card__content {
    padding: 22px;
    gap: 14px;
    min-height: 190px;
    padding: 22px;
  }

  .proj-card__content h3 {
    font-size: 20px;
  }

  .proj-card__content p {
    font-size: 14px;
  }

  .proj-card__btn {
    height: 34px;
    font-size: 14px;
    padding: 0 14px;
  }
}

@media (max-width: 575px) {
  .proj-card__content {
    padding: 20px;
  }
}

/* =========================
   FEATURED BUILDS (REFERENCE)
   - 1 row / 3 columns
   - whole card clickable
   - image zoom on hover
   - title + "View Project →" bottom-left
   - NO gradient overlay
========================= */

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

/* clickable card */
.fb-card {
  -webkit-appearance: none;
  appearance: none;

  border: 0 !important;
  outline: none;
  box-shadow: none;
  background: transparent;

  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;

  position: relative;
  overflow: hidden;
  border-radius: 14px;

  /* closer to your reference */
  height: 500px;

  display: block;
  width: 100%;
}

/* remove any inherited button focus ring from frameworks */
.fb-card:focus {
  outline: none;
}

/* (optional) keep accessible focus, but clean */
.fb-card:focus-visible {
  outline: 3px solid rgba(237, 28, 36, 0.9);
  outline-offset: 3px;
}

/* image fills card */
.fb-card__media {
  position: absolute;
  inset: 0;
}

.fb-card__img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;
  object-fit: cover;

  transform: scale(1);
  transition: transform 260ms ease;
}

.fb-card:hover .fb-card__img {
  transform: scale(1.08);
}

.fb-card::after {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.3) 35%,
    rgba(0, 0, 0, 0) 60%
  );

  pointer-events: none;
  z-index: 1;
}

/* content pinned bottom-left */
.fb-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 18px;
  z-index: 2;

  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fb-card__title {
  margin: 0;
  color: #fff;

  font-family: "Poppins", sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: normal;
}

.fb-card__cta {
  color: #fff;

  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
}

/* =========================
   MODAL GALLERY
========================= */

.fb-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.fb-modal.is-open {
  display: block;
}

.fb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.fb-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(980px, calc(100% - 32px));
  background: #0f0f0f;
  border-radius: 16px;
  overflow: hidden;
}

.fb-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;

  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fb-modal__title {
  margin: 0;
  color: #fff;
  font-family: Poppins;
  font-size: 16px;
  font-weight: 700;
}

.fb-modal__counter {
  color: rgba(255, 255, 255, 0.75);
  font-family: Lato;
  font-size: 14px;
}

.fb-modal__img {
  position: absolute;
  inset: 0;
  margin: auto;

  max-width: 100%;
  max-height: 100%;

  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fb-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;

  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 26px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fb-modal__prev {
  left: 12px;
}
.fb-modal__next {
  right: 12px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 991px) {
  .featured-builds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .fb-card {
    height: 260px;
  }
}

@media (max-width: 575px) {
  .featured-builds {
    grid-template-columns: 1fr;
  }

  .fb-card {
    height: 240px;
  }
}

.fb-modal__close,
.fb-modal__header {
  z-index: 3;
}

/* =========================
   WIDE FEATURED CARD
========================= */
.wide-featured {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 30px;
}

/* Whole card clickable */
.wide-card {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;

  position: relative;
  overflow: hidden;
  border-radius: 18px;

  width: 100%;
  height: 420px;
}

/* media fills card */
.wide-card__media {
  position: absolute;
  inset: 0;
}

.wide-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  transform: scale(1);
  transition: transform 300ms ease;
}

.wide-card:hover .wide-card__img {
  transform: scale(1.08);
}

/* content */
.wide-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 32px;
  color: #fff;
  z-index: 2;

  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wide-card__title {
  margin: 0;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: normal;
}

.wide-card__cta {
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
}

/* keyboard focus */
.wide-card:focus-visible {
  outline: 3px solid rgba(237, 28, 36, 0.95);
  outline-offset: 4px;
}

/* =========================
   MODAL GALLERY
========================= */
.wide-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.wide-modal.is-open {
  display: block;
}

.wide-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.wide-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(1080px, calc(100% - 32px));
  border-radius: 16px;
  overflow: hidden;
}

.wide-modal__close {
  position: absolute;
  top: -20px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 2;
}

/* .wide-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;

  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
} */

.wide-modal__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: transparent !important;
}

.wide-modal__img {
  position: absolute;
  inset: 0;
  margin: auto;

  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wide-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: auto;
  height: 35px;
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;

  color: #fff;
  font-size: 26px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wide-modal__prev {
  left: 12px;
  background: transparent;
  border: 1px solid #fff;
}

.wide-modal__prev:hover {
  left: 12px;
  background: #ed1c24;
  border: 1px solid #fff;
  color: #fff;
}

.wide-modal__next {
  right: 12px;
  background: #ed1c24;
  border: 1px solid #ed1c24;
}

.wide-modal__next:hover {
  right: 12px;
  background: transparent;
  border: 1px solid #ed1c24;
  color: #ed1c24;
}

.wide-modal__prev svg,
.wide-modal__next svg {
  fill: currentColor;
}

.wide-modal__prev,
.wide-modal__next {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.wide-modal__prev,
.wide-modal__next {
  z-index: 5;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 991px) {
  .wide-card {
    height: 340px;
  }

  .wide-card__content {
    padding: 24px;
  }

  .wide-card__title {
    font-size: 22px;
  }
}

@media (max-width: 575px) {
  .wide-card {
    height: 300px;
  }

  .wide-card__content {
    padding: 20px;
  }

  .wide-card__title {
    font-size: 20px;
  }
}

/* =======================================
   FB MODAL -> MATCH WIDE MODAL LOOK
======================================= */

.fb-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}
.fb-modal.is-open {
  display: block;
}

.fb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

/* match wide: transparent panel, no bg, centered */
.fb-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(1080px, calc(100% - 32px));
  border-radius: 16px;
  overflow: hidden;

  background: transparent; /* key */
}

/* match wide close button placement */
.fb-modal__close {
  position: absolute;
  top: 0px;
  right: 12px;

  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  z-index: 6;
}

/* stage */
.fb-modal__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
}

.fb-modal__img {
  position: absolute;
  inset: 0;
  margin: auto;

  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* nav buttons match wide */
.fb-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: auto;
  height: 35px;
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;

  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  z-index: 5;
}

/* prev */
.fb-modal__prev {
  left: 40px;
  background: transparent;
  border: 1px solid #fff;
}
.fb-modal__prev:hover {
  background: #ed1c24;
  border-color: #fff;
  color: #fff;
}

/* next */
.fb-modal__next {
  right: 40px;
  background: #ed1c24;
  border: 1px solid #ed1c24;
}
.fb-modal__next:hover {
  background: transparent;
  border-color: #ed1c24;
  color: #ed1c24;
}

/* make your SVG inherit hover color */
.fb-modal__prev svg,
.fb-modal__next svg {
  fill: currentColor;
}

/* smooth hover like wide */
.fb-modal__prev,
.fb-modal__next {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}
