/* =========================================
   1. RESET & BASE SETUP
========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background-color: #d6e4f0;
  color: #111111;
  line-height: 1.6;
}

/* =========================================
   2. HEADER & NAVIGATION
========================================= */
header {
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 4%;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #dddddd;
}

.logo {
  font-size: 24px;
  font-weight: 600;
  color: #0b1f33;
}

.arlogo {
  height: 85px;
  width: 200px;
  padding: 10px;
  display: flex;
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: #111111;
  font-size: 20px;
  transition: 0.3s;
}

nav a:hover {
  color: #163a5f;
}

/* =========================================
   3. PROJECT PAGE LAYOUT (SPLIT SCREEN)
========================================= */
.project-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: calc(100vh - 82px - 80px - 70px);
  min-height: 0;
}

/* =========================================
   4. LEFT SIDE: INFO & DETAILS
========================================= */
.project-info {
  padding: 40px 50px;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 75% auto;
  gap: 25px;
  overflow-y: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-details {
  min-height: 0;
  overflow: visible;
}

.project-details h1 {
  font-size: 40px;
  font-weight: 400;
  color: #0b1f33;
  margin-bottom: 5px;
}

.project-date {
  font-size: 15px;
  color: #667085;
  margin-bottom: 15px;
  text-align: justify;
}

.project-description {
  max-width: 600px;
  color: #3f4f5f;
  font-size: 16px;
  overflow: visible;
  padding-right: 0;
  text-align: justify;
}

/* =========================================
   5. RIGHT SIDE: GALLERY
========================================= */
.project-gallery {
  height: 100%;
  padding: 40px 50px;
  min-height: 0;
  overflow-y: auto;
}

.gallery-image {
  width: 100%;
  margin-bottom: 30px;
  overflow: hidden;
}

.gallery-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-image:hover img {
  transform: scale(1.02);
}

/* =========================================
   6. CUSTOM SCROLLBARS 
========================================= */
.project-info::-webkit-scrollbar,
.project-gallery::-webkit-scrollbar {
  width: 7px;
}

.project-info::-webkit-scrollbar-track,
.project-gallery::-webkit-scrollbar-track {
  background-color: #d6e4f0;
}

.project-info::-webkit-scrollbar-thumb,
.project-gallery::-webkit-scrollbar-thumb {
  background-color: #0b1f33;
}

/* =========================================
   7. PROJECT NAVIGATION (Prev / Next)
========================================= */
.project-navigation {
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8%;
  background-color: #d6e4f0;
}

.project-navigation a {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid #0b1f33;
  text-decoration: none;
  color: #0b1f33;
  font-size: 14px;
  transition: 0.3s;
  border-radius: 5px;
}

.project-navigation a:hover {
  background-color: #0b1f33;
  color: #ffffff;
}

/* =========================================
   8. FOOTER
========================================= */
footer {
  height: auto;
  padding: 30px 8%;
  background-color: #111111;
  color: #ffffff;
  text-align: center;
}

/* =========================================
   MOBILE RESPONSIVE STYLES
========================================= */
@media (max-width: 991px) {
  /* 1. Reset the body to allow Sticky Headers */
  html,
  body {
    height: auto !important;
    overflow: visible !important; /* Changed from 'auto' to 'visible' so the sticky header works */
    overflow-x: hidden !important; /* Prevents side-to-side scrolling bugs */
  }

  /* 2. Header & Nav (Mobile) */
  header {
    height: auto;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: sticky; /* Forces it to stay at the top */
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    width: 100%;
    padding: 15px 0; /* Cleans up the spacing */
  }

  .arlogo {
    justify-content: center;
    padding: 0;
    height: 60px;
    width: auto;
  }

  .arlogo img {
    height: 100%;
    width: auto;
  }

  nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 50px;
    gap: 8px;
  }

  /* 3. Force the Split Screen to Stack */
  .project-page {
    display: block !important; /* Overrides the desktop grid */
    height: auto !important;
  }

  /* 4. Left Side (Hero Image & Info) */
  .project-info {
    display: block !important;
    padding: 30px 5%;
    height: auto !important;
    overflow-y: visible !important; /* Disables the internal scrollbar */
  }

  .hero-image {
    width: 100%;
    height: auto;
    max-height: 400px; /* Keeps the hero image from getting too tall */
    margin-bottom: 30px;
  }

  .project-details {
    padding-top: 0;
    padding-bottom: 20px;
  }

  .project-details h1 {
    font-size: 32px;
  }

  .project-description {
    max-width: 100%;
  }

  /* 5. Right Side (Gallery) */
  .project-gallery {
    display: block !important;
    height: auto !important;
    padding: 10px 5% 40px 5%; /* Flows naturally right below the text */
    overflow-y: visible !important; /* Disables the internal scrollbar */
  }

  .gallery-image {
    margin-bottom: 20px;
  }

  /* 6. Navigation & Footer */
  .project-navigation {
    height: auto;
    padding: 25px 5%;
  }

  footer {
    padding: 25px 15px;
    height: auto;
  }
}
