/* ========================================
   PORTFOLIO STYLES
   Tahoe Brothers Construction
   
   Structure:
   1. Base Styles (Mobile-First)
   2. Desktop Styles (min-width: 1025px)
   3. Tablet Styles (768px - 1024px)
   4. Mobile Styles (max-width: 767px)
======================================== */


/* ========================================
   1. BASE STYLES (Mobile-First)
======================================== */

/* Portfolio Hero */
.portfolio-hero {
  position: relative;
  min-height: 460px;
  padding: 180px 0 80px;
  background: var(--background-dark);
  color: white;
  text-align: center;
  overflow: hidden;
}

.portfolio-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  z-index: 0;
}

.portfolio-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
}

.portfolio-hero .container {
  position: relative;
  z-index: 10;
}

.portfolio-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.portfolio-hero p {
  font-size: 1.125rem;
  color: var(--gray-100);
  max-width: 600px;
  margin: 0 auto;
}

/* Portfolio Grid Section */
.portfolio-grid-section {
  padding: 4rem 0 6rem;
  background: var(--gray-100);
}

.portfolio-grid-section .portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.portfolio-grid-section .portfolio-card {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.portfolio-grid-section .portfolio-card-image {
  width: 100%;
  height: 100%;
}

.portfolio-grid-section .portfolio-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-grid-section .portfolio-card:hover .portfolio-card-image img {
  transform: scale(1.05);
}

/* Always-visible title gradient at bottom */
.portfolio-grid-section .portfolio-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 7, 6, 0.95) 0%, rgba(4, 7, 6, 0.7) 25%, rgba(4, 7, 6, 0.3) 45%, transparent 65%);
  transition:  0.7s ease;
  display: flex;
  align-items: flex-end;
}

/* Expand gradient on hover to show more content */
.portfolio-grid-section .portfolio-card:hover .portfolio-card-overlay {
  background: linear-gradient(to top, rgba(4, 7, 6, 0.98) 0%, rgba(4, 7, 6, 0.9) 45%, rgba(4, 7, 6, 0.5) 70%, transparent 100%);
}

.portfolio-grid-section .portfolio-card-content {
  padding: 1.5rem;
  color: white;
  width: 100%;
}

.portfolio-grid-section .portfolio-card-category {
  display: block;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.portfolio-grid-section .portfolio-card:hover .portfolio-card-category {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-grid-section .portfolio-card-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.portfolio-grid-section .portfolio-card-content p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin-bottom: 1rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease, max-height 0.5s ease;
}

.portfolio-grid-section .portfolio-card:hover .portfolio-card-content p {
  opacity: 1;
  max-height: 100px;
}

.portfolio-grid-section .portfolio-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-size: 0.875rem;
  font-weight: bold;
  padding:.25rem 1rem;
  background: var(--primary);
  border:2px solid var(--primary);
  border-radius: var(--border-radius);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: 0.3s ease;
}

.portfolio-grid-section .portfolio-card-link:hover{
  background: var(--background-dark);
}

.portfolio-grid-section .portfolio-card:hover .portfolio-card-link {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-grid-section .portfolio-card-link svg {
  transition: transform 0.3s ease;
}

.portfolio-grid-section .portfolio-card:hover .portfolio-card-link svg {
  transform: translateX(4px);
}

/* Portfolio CTA */
.portfolio-cta {
  padding: 4rem 0;
  background: var(--background-dark);
  text-align: center;
  color: white;
}

.portfolio-cta h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.portfolio-cta p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.portfolio-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.portfolio-cta-buttons .btn {
  min-width: 200px;
}

/* ========================================
   INDIVIDUAL PROJECT PAGE STYLES
======================================== */

/* Project Hero */
.project-hero {
  position: relative;
  padding: 140px 0 60px;
  background: var(--background-dark);
  color: white;
  overflow: hidden;
}

.project-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  z-index: 0;
}

.project-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hero .container {
  position: relative;
  z-index: 10;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--primary);
}

.project-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.project-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.project-location,
.project-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.project-location svg,
.project-count svg {
  color: var(--primary);
}

/* Project Gallery Section */
.project-gallery-section {
  padding: 3rem 0 6rem;
  background: white;
}

.project-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.project-gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
}

.project-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 6, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-overlay svg {
  color: white;
}

/* Project Navigation */
.project-navigation {
  padding: 3rem 0;
  background: var(--slate-100);
}

.project-navigation .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.project-navigation .btn-outline{
  color:black;
}

.project-navigation .btn-outline:hover{

}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10000;
  padding: 0.5rem;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--primary);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  transition: background 0.3s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}


/* ========================================
   2. DESKTOP STYLES (min-width: 1025px)
======================================== */

@media (min-width: 1025px) {
  /* Portfolio Page */
  .portfolio-hero h1 {
    font-size: 4.25rem;
  }

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

  .portfolio-cta-buttons {
    flex-direction: row;
  }

  /* Project Page */
  .project-hero h1 {
    font-size: 3.5rem;
  }

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

  .project-navigation .container {
    flex-direction: row;
  }
}


/* ========================================
   3. TABLET STYLES (768px - 1024px)
======================================== */

@media (min-width: 768px) and (max-width: 1024px) {
  /* Portfolio Page */
  .portfolio-hero h1 {
    font-size: 3.5rem;
  }

  .portfolio-grid-section .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Project Page */
  .project-hero h1 {
    font-size: 3rem;
  }

  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ========================================
   4. MOBILE STYLES (max-width: 767px)
======================================== */

@media (max-width: 767px) {
  /* Portfolio Page */
  .portfolio-hero h1 {
    font-size: 2.5rem;
  }

  .portfolio-grid-section .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .portfolio-cta-buttons .btn {
    width: 100%;
  }

  /* Project Page */
  .project-hero h1 {
    font-size: 2rem;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-navigation .container {
    flex-direction: column;
  }

  .project-navigation .btn {
    width: 100%;
  }

  /* Lightbox */
  .lightbox-nav {
    padding: 0.5rem;
    font-size: 1.5rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}
