@import url('https://fonts.googleapis.com/css2?family=Baloo+Thambi+2:wght@400;500;600;700&display=swap');
/* Reset page spacing so full-bleed banners can reach edges */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: #FFF5E9;
  color: #333;
  font-family: 'Abhaya Libre', sans-serif;
  line-height: 1.5;
}

header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  pointer-events: auto;
  background-color: #ffbb3f;
}

.headerNavContainer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  margin: 0;
  pointer-events: auto;
}

.headerNavContainer nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.headerNavContainer nav a {
  color: #742b00;
  text-decoration: none;
  margin-left: 20px;
  font-size: 40px;
  font-family: "Sinhala MN", "Abhaya Libre", serif;
  font-weight: 200;
  transition: color 0.2s ease-in-out;
}

.headerNavContainer nav a:hover {
  color: #E88B0C;
}

.logoImage {
  width: 100px;
  height: 100px;
  object-fit: cover;
  margin-right: 16px;
  float: left;
}

.border img {
  display: block;
  margin: 0 auto;
  width: 25%;
  height:120px;
  object-fit: cover;
  object-position: top;
}

.pageTitle {
  text-align: center;
  margin: 20px 0 30px;
}

.pageTitle h1 {
  font-size: 48px;
  color: #742b00;
  font-family: "Sinhala MN", "Abhaya Libre", serif;
  margin: 0;
}

.pageTitle p {
  margin: 10px 0 0;
  color: #742b00;
  font-size: 24px;
  font-weight: 350;
  text-align: center;
  font-family: 'Baloo Thambi 2', sans-serif;
}

.itemContainer {
  display: grid;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.projectNav {
  position: fixed;
  top: 140px;
  left: 18px;
  width: 220px;
  padding: 18px;
  border-radius: 24px;
  z-index: 5;
}

.projectNavButton {
  display: block;
  width: 100%;
  padding: 12px 24px;
  background-color: #6f9bc5;
  color: white;
  border-radius: 40px;
  text-decoration: none;
  font-family: "Sinhala MN", "Abhaya Libre", serif;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  box-shadow: 6px 6px 2px 0 rgba(232, 139, 12, 0.4);
  transition: background-color 0.2s ease;
  margin-bottom:20px;
}

.projectNavButton:hover {
  background-color: #ffd596;
}

main {
  margin-left: 270px;
  padding: 24px;
}

.gallerySection {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(232, 139, 12, 0.2);
  border-radius: 24px;
  padding: 24px;
}

.gallerySection h2 {
  color: #4E60A0;
  font-family: "Sinhala MN", "Abhaya Libre", serif;
  font-size: 32px;
  margin: 0 0 20px;
}

.gallerySection > p {
  color: #e8680c;
  font-family: "Baloo Thambi 2", sans-serif;
  font-size: 24px;
  margin: 0 0 24px;
}

.galleryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.item {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease;
  display: grid;
  grid-template-rows: auto auto;
}

.item img {
  width: 100%;
  height: auto;
  max-height: 320px;
  display: block;
  object-fit: contain;
  object-position: center;
}

.pixelAsset img {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  max-height: 360px;
}

.pdfPreview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: #f5f1e8;
  color: #742b00;
  font-family: 'Baloo Thambi 2', sans-serif;
  font-size: 22px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.modalPdf {
  width: 100%;
  height: 80vh;
  border: none;
  background: #fff;
}

.modalPdf.pixelAsset {
  width: 90vw;
}

.item p {
  margin: 0;
  padding: 12px 0;
  color: #742b00;
  font-weight: 700;
  text-align: center;
  font-family: 'Baloo Thambi 2', sans-serif;
  font-size: 18px;
  background: transparent;
}

.item:hover {
  transform: translateY(-2px);
}

body.modalOpen {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.modal.open {
  display: flex;
}

.modalContent {
  max-width: 1000px;
  width: 100%;
  text-align: center;
  position: relative;
}

.modal img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.modal img.pixelAsset {
  width: min(90vw, 760px);
  height: auto;
  image-rendering: pixelated;
}

.modal p {
  color: #fff;
  margin-top: 12px;
  font-size: 20px;
  font-family: 'Baloo Thambi 2', sans-serif;
}

.modalClose,
.modalNav {
  position: absolute;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 24px;
  cursor: pointer;
  color: #742b00;
  background: #fff;
}

.modalClose {
  top: 20px;
  right: 20px;
}

.modalNav {
  top: 50%;
  transform: translateY(-50%);
}

.modalNav.prev {
  left: -12px;
}

.modalNav.next {
  right: -12px;
}

.cuteFooter {
  text-align: center;
  margin-top: 24px;
  padding: 24px;
  background-color: #ffd596;
  color: #742b00;
  font-family: 'Abhaya Libre', sans-serif;
  font-size: 16px;
}

.cuteFooter p {
  margin: 0;
}

@media (max-width: 1024px) {
  .projectNav {
    width: 200px;
    left: 12px;
    padding: 16px;
  }

  main {
    margin-left: 240px;
  }
}

@media (max-width: 768px) {
  .projectNav {
    position: static;
    width: auto;
    margin: 0 auto 24px;
    padding: 14px;
    border-radius: 20px;
  }

  .projectNavButton {
    width: 100%;
  }

  main {
    margin-left: 0;
    padding: 24px;
  }

  .headerNavContainer {
    justify-content: center;
  }

  .headerNavContainer nav {
    justify-content: center;
  }

  .headerNavContainer nav a {
    font-size: 24px;
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  main {
    padding: 12px;
  }

  .headerNavContainer nav a {
    font-size: 18px;
  }
}