
/* =========================================
   4. PROJECTS HERO SECTION
   ========================================= */
.projects_hero {
  min-height: 100vh;
  position: relative;
  background-color: #825532;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* BLURRED BACKGROUND - Desktop */
.projects_hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: var(--bg-image-url);
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.3);
  transform: scale(1.1);
  transition: background-image 0.8s ease-in-out;
}

.projects_container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  padding: 7rem 4rem;
}

/* =========================================
   5. SLIDER LAYOUT - Desktop
   ========================================= */
.projects_layout {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.projects_slider_wrap {
  position: relative;
  width: 100%;
}

/* ASPECT RATIO CONTAINER - 4:5 Portrait */
.projects_image_container {
  aspect-ratio: 4 / 5;
  width: 40vw;
  max-width: 450px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

/* =========================================
   6. SLIDE IMAGES - Fade Transitions
   ========================================= */
.projects_slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* FADE TRANSITION */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  z-index: 1;
}

.projects_slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.projects_slide_link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.projects_slide_link:hover {
  transform: scale(1.02);
}

.projects_slide_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* =========================================
   7. PROJECT TITLES
   ========================================= */
.projects_slide_info {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 90%;
  text-align: center;
}

.projects_slide_title {
  font-family: "PP – Fragment", serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #e6e6e9;
  opacity: 0;
  transition: opacity 0.5s ease 0.3s;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}

.projects_slide.active .projects_slide_title {
  opacity: 1;
}

/* =========================================
   8. NAVIGATION CONTROLS - Desktop
   ========================================= */
.projects_nav_btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: transparent;
  border: none;
  color: #e6e6e9;
  cursor: pointer;
  padding: 1rem;
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.projects_nav_btn:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.projects_nav_btn:active {
  transform: translateY(-50%) scale(0.95);
}

.projects_nav_prev {
  left: 2rem;
}

.projects_nav_next {
  right: 2rem;
}

.projects_nav_btn svg {
  display: block;
  width: 48px;
  height: 48px;
}

/* =========================================
   9. PROGRESS INDICATORS - Desktop (Vertical)
   ========================================= */
.projects_progress_wrap {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.projects_progress_bar {
  width: 4px;
  height: 40px;
  background-color: rgba(230, 230, 233, 0.3);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, height 0.3s ease;
  border-radius: 2px;
  padding: 0;
}

.projects_progress_bar:hover {
  background-color: rgba(230, 230, 233, 0.6);
}

.projects_progress_bar.active {
  background-color: #C1AE7C;
  height: 60px;
}

/* =========================================
   10. COUNTER DISPLAY - Desktop
   ========================================= */
.projects_counter {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  z-index: 10;
  font-family: Aeonik, sans-serif;
  font-size: 1rem;
  color: #e6e6e9;
  opacity: 0.8;
  letter-spacing: 0.05em;
}

.projects_counter_current {
  font-weight: 500;
  color: #C1AE7C;
}

/* =========================================
   11. MOBILE CONTROLS - Hidden on Desktop
   ========================================= */
.projects_mobile_controls {
  display: none;
}

/* =========================================
   11b. LAPTOP FIT (max-width: 1400px)
   ========================================= */
@media screen and (max-width: 1400px) {
  .projects_container {
    padding: 2rem 2rem;
  }

  .projects_image_container {
    width: 50vw;
    aspect-ratio: 4 / 5;
  }
}

/* =========================================
   12. MOBILE LAYOUT (max-width: 991px)
   ========================================= */
@media screen and (max-width: 991px) {

  /* BACKGROUND - Less blur on mobile */
  .projects_hero::before {
    filter: blur(10px) brightness(0.4);
  }

  .projects_container {
    padding: 5rem 2rem 10rem 2rem;
  }

  /* IMAGE - 80% viewport width */
  .projects_image_container {
    width: 80vw;
    max-width: 500px;
    aspect-ratio: 4 / 5;
  }

  /* HIDE DESKTOP CONTROLS */
  .projects_nav_btn,
  .projects_progress_wrap {
    display: none;
  }

  /* COUNTER - Top center */
  .projects_counter {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    bottom: auto;
    font-size: 0.875rem;
  }

  /* PROJECT TITLES - Smaller on mobile */
  .projects_slide_title {
    font-size: 1.25rem;
  }

  /* MOBILE BOTTOM CONTROLS - Fixed bar */
  .projects_mobile_controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: rgba(30, 16, 5, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  }

  .projects_mobile_prev,
  .projects_mobile_next {
    background: transparent;
    border: none;
    color: #e6e6e9;
    padding: 0.75rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .projects_mobile_prev:active,
  .projects_mobile_next:active {
    opacity: 1;
    transform: scale(0.95);
  }

  /* HORIZONTAL PROGRESS BARS */
  .projects_mobile_progress {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
  }

  .projects_mobile_bar {
    width: 40px;
    height: 4px;
    background-color: rgba(230, 230, 233, 0.3);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, width 0.3s ease;
    border-radius: 2px;
    padding: 0;
  }

  .projects_mobile_bar.active {
    background-color: #C1AE7C;
    width: 60px;
  }
}

/* =========================================
   13. SMALL MOBILE (max-width: 479px)
   ========================================= */
@media screen and (max-width: 479px) {
  .projects_container {
    padding: 4rem 1rem 10rem 1rem;
  }

  .projects_image_container {
    width: 90vw;
    aspect-ratio: 3 / 4;
  }

  .projects_mobile_controls {
    padding: 1rem 1rem;
  }

  .projects_mobile_bar {
    width: 30px;
    height: 3px;
  }

  .projects_mobile_bar.active {
    width: 45px;
  }

  .projects_counter {
    font-size: 0.75rem;
    top: 1rem;
  }

  .projects_slide_title {
    font-size: 1rem;
    bottom: 1.5rem;
  }

  .projects_slide_info {
    width: 95%;
  }
}

/* =========================================
   14. DESKTOP - Ensure Mobile Controls Hidden
   ========================================= */
@media screen and (min-width: 992px) {
  .projects_mobile_controls {
    display: none !important;
  }
}

/* =========================================
   15. ACCESSIBILITY & KEYBOARD FOCUS
   ========================================= */
.projects_nav_btn:focus-visible,
.projects_progress_bar:focus-visible,
.projects_mobile_prev:focus-visible,
.projects_mobile_next:focus-visible,
.projects_mobile_bar:focus-visible {
  outline: 2px solid #C1AE7C;
  outline-offset: 4px;
}

/* Remove default focus for mouse users */
.projects_nav_btn:focus:not(:focus-visible),
.projects_progress_bar:focus:not(:focus-visible),
.projects_mobile_prev:focus:not(:focus-visible),
.projects_mobile_next:focus:not(:focus-visible),
.projects_mobile_bar:focus:not(:focus-visible) {
  outline: none;
}

/* =========================================
   16. LOADING STATE
   ========================================= */
.projects_slide_img[data-src]:not([src]) {
  background-color: rgba(0, 0, 0, 0.2);
}

/* =========================================
   17. REDUCED MOTION SUPPORT
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  .projects_hero::before,
  .projects_slide,
  .projects_slide_title,
  .projects_nav_btn,
  .projects_progress_bar,
  .projects_mobile_bar {
    transition-duration: 0.01ms !important;
  }
}

/* =========================================
   18. HIGH CONTRAST MODE
   ========================================= */
@media (prefers-contrast: high) {
  .projects_nav_btn,
  .projects_mobile_prev,
  .projects_mobile_next {
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid currentColor;
  }

  .projects_progress_bar,
  .projects_mobile_bar {
    border: 1px solid currentColor;
  }
}

/* =========================================
   PROJECT DETAIL PAGE STYLES
   ========================================= */

/* =========================================
   19. PROJECT DETAIL HERO SECTION
   ========================================= */
.project_hero {
  min-height: 100vh;
  position: relative;
  background-color: #1e1005;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.project_hero_image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.project_hero_image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Dark overlay for text readability */
.project_hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 2;
}

/* Large Heading - Bottom Left */
.project_hero_content {
  position: absolute;
  bottom: 8rem;
  left: 4rem;
  z-index: 3;
  max-width: 800px;
}

.project_hero_title {
  font-family: var(--font--secondary-family);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 400;
  color: #e6e6e9;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Bottom Info Layer - 3 Zones */
.project_hero_info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  padding: 2rem 4rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

.project_hero_location,
.project_hero_country,
.project_hero_cta {
  font-family: Aeonik, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: #e6e6e9;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.9;
}

.project_hero_location {
  text-align: left;
}

.project_hero_country {
  text-align: center;
}

.project_hero_cta {
  text-align: right;
  opacity: 0.6;
}

/* =========================================
   20. PROJECT CONTENT SECTIONS
   ========================================= */
.project_content {
  background-color: #825532;
  padding: 0;
}

/* =========================================
   21. TWO-COLUMN GRID (50/50 Split)
   ========================================= */
.project_grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* Full-bleed Image Column */
.project_grid_image {
  position: relative;
  overflow: hidden;
}

.project_grid_image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Information Column */
.project_grid_info {
  padding: 7rem 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4rem;
  background-color: #825532;
}

/* =========================================
   22. INFO SECTION (Narrative)
   ========================================= */
.project_info_section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project_info_label {
  font-family: Aeonik, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: #C1AE7C;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.9;
}

.project_info_text {
  font-family: Aeonik, sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  color: #e6e6e9;
  line-height: 1.8;
  letter-spacing: 0.01em;
  opacity: 0.95;
}

/* =========================================
   23. DETAILS SECTION (Data Table)
   ========================================= */
.project_details_section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project_details_label {
  font-family: Aeonik, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: #C1AE7C;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.9;
}

.project_details_table {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project_detail_row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(230, 230, 233, 0.15);
}

.project_detail_row:last-child {
  border-bottom: none;
}

.project_detail_key {
  font-family: Aeonik, sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  color: #e6e6e9;
  opacity: 0.7;
  letter-spacing: 0.02em;
}

.project_detail_value {
  font-family: Aeonik, sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  color: #e6e6e9;
  text-align: right;
  letter-spacing: 0.01em;
}

/* =========================================
   24. CENTERED HERO WITH THICK BORDER
   ========================================= */
.project_featured {
  background-color: #825532;
  padding: 7rem 4rem;
}

.project_featured_container {
  max-width: 1600px;
  margin: 0 auto;
}

.project_featured_frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.project_featured_frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* =========================================
   25. REVERSE GRID LAYOUT
   ========================================= */
.project_grid_reverse {
  grid-template-columns: 1fr 1fr;
}

.project_grid_reverse .project_grid_info {
  order: 1;
}

.project_grid_reverse .project_grid_image {
  order: 2;
}

/* =========================================
   26. BACK TO PROJECTS NAVIGATION
   ========================================= */
.project_nav {
  background-color: #825532;
  padding: 4rem;
  text-align: center;
}

.project_back_link {
  display: inline-block;
  font-family: Aeonik, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #C1AE7C;
  text-decoration: none;
  letter-spacing: 0.05em;
  padding: 1rem 2rem;
  border: 1px solid rgba(193, 174, 124, 0.3);
  transition: all 0.3s ease;
}

.project_back_link:hover {
  background-color: rgba(193, 174, 124, 0.1);
  border-color: #C1AE7C;
  transform: translateX(-4px);
}

/* =========================================
   27. PROJECT DETAIL RESPONSIVE - TABLET
   ========================================= */
@media screen and (max-width: 991px) {
  .project_hero_content {
    bottom: 6rem;
    left: 2rem;
    right: 2rem;
  }

  .project_hero_title {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }

  .project_hero_info {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem 2rem;
  }

  .project_hero_cta {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 0.5rem;
  }

  /* Stack grid on tablet */
  .project_grid,
  .project_grid_reverse {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .project_grid_reverse .project_grid_info,
  .project_grid_reverse .project_grid_image {
    order: initial;
  }

  .project_grid_image {
    min-height: 60vh;
  }

  .project_grid_info {
    padding: 4rem 3rem;
    gap: 3rem;
  }

  .project_featured {
    padding: 4rem 2rem;
  }

  .project_nav {
    padding: 3rem 2rem;
  }
}

/* =========================================
   28. PROJECT DETAIL RESPONSIVE - MOBILE
   ========================================= */
@media screen and (max-width: 479px) {
  .project_hero_content {
    bottom: 5rem;
    left: 1.5rem;
    right: 1.5rem;
  }

  .project_hero_title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .project_hero_info {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
  }

  .project_hero_location,
  .project_hero_country,
  .project_hero_cta {
    text-align: center;
    font-size: 0.75rem;
  }

  .project_grid_image {
    min-height: 50vh;
  }

  .project_grid_info {
    padding: 3rem 1.5rem;
    gap: 2.5rem;
  }

  .project_info_text {
    font-size: 1rem;
    line-height: 1.7;
  }

  .project_detail_row {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .project_detail_value {
    text-align: left;
    opacity: 0.9;
  }

  .project_featured {
    padding: 3rem 1.5rem;
  }

  .project_featured_frame {
    aspect-ratio: 1 / 1;
  }

  .project_nav {
    padding: 2rem 1.5rem;
  }

  .project_back_link {
    font-size: 0.875rem;
    padding: 0.875rem 1.5rem;
  }
}

/* =========================================
   29. PROJECT DETAIL ACCESSIBILITY
   ========================================= */
.project_back_link:focus-visible {
  outline: 2px solid #C1AE7C;
  outline-offset: 4px;
}

.project_back_link:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .project_back_link {
    transition-duration: 0.01ms !important;
  }
}
