/* ============================================================
   PROJECTS PAGE — STYLES
   Extends the main site design system from ../style.css
   ============================================================ */

/* ----------------------------------------------------
   1. PAGE HERO (Compact Banner)
   ---------------------------------------------------- */
.projects-page-hero {
  position: relative;
  padding: 140px 0 60px;
  background-color: var(--primary-dark);
  overflow: hidden;
  text-align: center;
}

.projects-page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/tree.webp') center/cover no-repeat fixed;
  opacity: 0.65;
  z-index: 1;
}

.projects-page-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(8, 75, 23, 0.3) 0%,
    rgba(8, 75, 23, 0.45) 100%
  );
  z-index: 2;
}

.projects-hero-content {
  position: relative;
  z-index: 3;
}

.projects-hero-content .section-title {
  color: var(--text-light);
  margin-bottom: 12px;
  font-size: 2.6rem;
}

.projects-hero-content .section-subtitle {
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.breadcrumb .breadcrumb-sep {
  font-size: 0.7rem;
  opacity: 0.5;
  display: inline-flex;
  align-items: center;
}

.breadcrumb .breadcrumb-current {
  color: #ffffff;
  font-weight: 500;
}

/* ----------------------------------------------------
   2. PROJECTS LISTING GRID
   ---------------------------------------------------- */
.projects-listing-section {
  background-color: #F4F6F4;
  padding: 60px 0 80px;
}

.projects-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 1.5px solid #d0d8d0;
  background-color: transparent;
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  border-color: var(--primary-accent);
  background-color: rgba(74, 155, 95, 0.06);
  color: var(--primary-dark);
}

.filter-btn.active {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--text-light);
}

/* 3-Column Grid */
.project-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.project-grid-3col .project-card {
  height: 340px;
}

/* Individual Project Card */
.project-listing-card {
  background-color: #ffffff;
  border: 1px solid #e2e8e2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 20px rgba(8, 75, 23, 0.02);
}

.project-listing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(8, 75, 23, 0.08);
  border-color: rgba(74, 155, 95, 0.3);
}

/* Card Image */
.project-listing-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 10.5;
  overflow: hidden;
  position: relative;
}

.project-listing-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-listing-card:hover .project-listing-img {
  transform: scale(1.06);
}

/* Card Content */
.project-listing-content {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-listing-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
  transition: color 0.3s ease;
}

.project-listing-card:hover .project-listing-title {
  color: var(--primary-dark);
}

.project-listing-excerpt {
  font-family: var(--font-main);
  font-size: 0.92rem;
  color: #555555;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-listing-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid #f0f4f0;
  padding-top: 16px;
  margin-top: auto;
}

.project-read-link {
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-accent);
  transition: all 0.3s ease;
}

.project-listing-card:hover .project-read-link {
  color: var(--primary-dark);
}

.project-read-link i {
  font-size: 0.95rem;
  transition: transform 0.3s ease;
}

.project-listing-card:hover .project-read-link i {
  transform: translate(3px, -3px);
}

/* ----------------------------------------------------
   3. PROJECT DETAIL PAGE
   ---------------------------------------------------- */

/* Detail Hero */
.project-detail-hero {
  position: relative;
  background-color: var(--primary-dark);
  padding: 130px 0 48px;
}

.project-detail-hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
}

.project-detail-hero-content .breadcrumb {
  margin-bottom: 16px;
}

.project-detail-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.2;
  max-width: 700px;
  margin-bottom: 16px;
}

.project-detail-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.project-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.project-detail-meta-item i {
  font-size: 1rem;
  opacity: 0.8;
}

/* Detail Article Body */
.project-detail-section {
  background-color: #F4F6F4;
  padding: 60px 0 80px;
}

.project-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

/* Main Content Column */
.project-detail-article {
  background-color: #ffffff;
  border: 1px solid #e2e8e2;
  border-radius: var(--radius-lg);
  padding: 40px;
}

.project-detail-article h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 36px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.project-detail-article h2:first-child {
  margin-top: 0;
}

.project-detail-article p {
  font-size: 0.98rem;
  color: #444;
  line-height: 1.75;
  margin-bottom: 18px;
}

.project-detail-article img {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

/* Article Highlight Box */
.article-highlight {
  background-color: #f0f8f2;
  border-left: 4px solid var(--primary-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.article-highlight p {
  color: var(--primary-dark);
  font-weight: 500;
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Article Stats Grid */
.article-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}

.article-stat-card {
  background-color: #f8faf8;
  border: 1px solid #e2e8e2;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: var(--transition-smooth);
}

.article-stat-card:hover {
  border-color: var(--primary-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.article-stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.1;
  margin-bottom: 4px;
}

.article-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
}

/* Sidebar Column */
.project-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 96px;
}

.sidebar-card {
  background-color: #ffffff;
  border: 1px solid #e2e8e2;
  border-radius: var(--radius-lg);
  padding: 28px;
}

.sidebar-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f4f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-card-title i {
  font-size: 1.1rem;
  color: var(--primary-accent);
}

/* Sidebar Info List */
.sidebar-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-info-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sidebar-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--accent-light);
  border: 1px solid rgba(74, 155, 95, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-info-icon i {
  font-size: 1rem;
  color: var(--primary-accent);
}

.sidebar-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 2px;
}

.sidebar-info-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.3;
}

/* Sidebar CTA */
.sidebar-cta {
  background: linear-gradient(135deg, var(--primary-dark), #0a6a22);
  color: var(--text-light);
  border: none;
  text-align: center;
}

.sidebar-cta .sidebar-card-title {
  color: var(--text-light);
  border-bottom-color: rgba(255, 255, 255, 0.15);
  justify-content: center;
}

.sidebar-cta .sidebar-card-title i {
  color: rgba(255, 255, 255, 0.8);
}

.sidebar-cta-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin-bottom: 20px;
}

.sidebar-cta .btn {
  width: 100%;
}

/* Related Projects in Sidebar */
.related-project-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f4f0;
  transition: var(--transition-fast);
}

.related-project-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.related-project-item:first-child {
  padding-top: 0;
}

.related-project-thumb {
  width: 64px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.related-project-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.related-project-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.related-project-item:hover .related-project-name {
  color: var(--primary-accent);
}

.related-project-loc {
  font-size: 0.75rem;
  color: #888;
}

/* Tags List */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background-color: #f0f4f0;
  color: #555;
  border: 1px solid #e2e8e2;
  transition: var(--transition-fast);
}

.tag-item:hover {
  border-color: var(--primary-accent);
  background-color: var(--accent-light);
  color: var(--primary-dark);
}

/* Image Slider / Carousel */
.project-image-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  background-color: #ffffff; /* White background for empty space */
}

.slider-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Display original size without cropping */
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.slider-btn:hover {
  background: #ffffff;
  color: var(--primary-dark);
  transform: translateY(-50%) scale(1.08);
}

.prev-btn {
  left: 16px;
}

.next-btn {
  right: 16px;
}

/* Indicators */
.slider-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition-fast);
}

.indicator.active {
  background: #ffffff;
  transform: scale(1.2);
  width: 16px;
  border-radius: var(--radius-full);
}

/* Project Info Block (In-Article) */
.project-info-block {
  background-color: #f8faf8;
  border: 1px solid #e2e8e2;
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 28px 0;
}

.info-block-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8e2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-block-title i {
  font-size: 1.25rem;
  color: var(--primary-accent);
}

.info-block-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
}

.info-block-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.info-block-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-light);
  border: 1px solid rgba(74, 155, 95, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-block-icon i {
  font-size: 0.9rem;
  color: var(--primary-accent);
}

.info-block-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 2px;
}

.info-block-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
}

@media (max-width: 480px) {
  .info-block-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ----------------------------------------------------
   4. RESPONSIVE — PROJECTS PAGES
   ---------------------------------------------------- */
@media (max-width: 1024px) {
  .projects-listing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .project-detail-layout {
    grid-template-columns: 1fr 300px;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .projects-page-hero {
    padding: 120px 0 48px;
  }

  .projects-hero-content .section-title {
    font-size: 2rem;
  }

  .project-grid-3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .project-detail-section .container {
    padding: 0;
  }

  .project-detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-detail-sidebar {
    position: static;
    padding: 0 16px;
  }

  .project-detail-hero-title {
    font-size: 2rem;
  }

  .project-detail-article {
    padding: 28px 16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .article-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .projects-page-hero {
    padding: 110px 0 40px;
  }

  .projects-hero-content .section-title {
    font-size: 1.7rem;
  }

  .project-grid-3col {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .project-grid-3col .project-card {
    height: 260px;
  }

  .projects-filter-bar {
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .project-detail-hero {
    padding-top: 110px;
  }

  .project-detail-hero-title {
    font-size: 1.6rem;
  }

  .project-detail-article {
    padding: 24px 16px;
  }

  .project-detail-article h2 {
    font-size: 1.3rem;
  }

  .article-stats-grid {
    grid-template-columns: 1fr;
  }

    .sidebar-card {
      padding: 20px;
    }
  }
}

/* Hero detail overrides for same blog article layout */
.projects-page-hero .breadcrumb-trail {
  justify-content: flex-start;
  margin-bottom: 16px;
}

.article-category-wrap {
  margin-bottom: 16px;
}

.article-title-main {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 24px;
  max-width: 900px;
}

.article-author-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-details-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name-meta {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.publish-date-meta {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1024px) {
  .article-title-main {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .article-title-main {
    font-size: 1.8rem;
    margin-bottom: 16px;
  }
}
