/*
Theme Name: custom-theme
Template: twentytwentyfive
Version: 1.0
*/

@import url("../custom-theme/style.css");

/* === Custom Project Showcase Styling === */
/* Required for footer year display */
.global-footer{
font-size:0.8rem;
}

/* Remove top margin of the home page*/
.home .wp-block-group {
    margin-top: 0 !important;
}

/* Sticky footer */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body > .wp-site-blocks {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}



/* === Project Grid === */
.project-showcase {
  display: grid;
  grid-template-columns: 1fr;
}

/* === Project Card === */
.project-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-family: system-ui, sans-serif;
}

/* === Header: Title + Logo + Date === */
.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.project-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-grow: 1;
}

.project-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 0.25rem;
}

@media (max-width: 600px) {
  .project-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-title-wrap {
    flex-direction: row;
  }
}

.project-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}

.project-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-date {
  font-size: 0.9rem;
  color: #666;
  white-space: nowrap;
}

/* === Description === */
.project-description p {
  margin: 0;
  line-height: 1.5;
}

/* === Button Row === */
.project-buttons {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s ease;
  line-height: 1.4;
}

.project-button:hover {
  background: #333;
}

.project-button:focus {
  outline: none;
}

/* === Modal Overlay === */
.project-modal {
  display: none;
  position: fixed;
  top: -19px;  /*Lok: Should be 0, but not able to cover top*/
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center; /* center vertically again */
  padding-top: 0; /* reset if we used padding for nav before */
}

/* Show modal when [open] */
.project-modal[open] {
  display: flex;
}

/* === Modal Box === */
.project-modal-content {
  background: #fff;
  padding: 1rem;
  border-radius: 0.5rem;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.2);
padding-bottom: 2rem;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: transparent;
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
}

/* === Modal Carousel === */
.modal-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-top: 2rem;
  -webkit-overflow-scrolling: touch;
}

.modal-carousel img {
  flex: 0 0 100%;
  max-width: 100%;
  max-height: 70vh;
  scroll-snap-align: center;
  border-radius: 0.5rem;
  object-fit: contain;
  background: #f8f8f8;
  display: block;
  margin: 0 auto;
}

/* === Indicator Dots === */
.project-carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.project-carousel-indicators .dot {
  width: 8px;
  height: 8px;
  background-color: #ccc;
  border-radius: 50%;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.project-carousel-indicators .dot.active {
  opacity: 1;
  background-color: #000;
}

.project-modal-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.carousel-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  user-select: none;
}

.carousel-arrow.left {
  left: 1rem;
}

.carousel-arrow.right {
  right: 1rem;
}

@media (min-width: 768px) {
  .carousel-arrow {
    display: block;
  }
}


#project-modal {
  max-width: none !important;
  max-height: none !important;
}

body > #project-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
}

body > #project-modal[open] {
  display: flex;
}

#modal-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
