/* ===== PORTFOLIO DETAILS PAGE (BASE STYLES - DESKTOP FIRST) ===== */

.item-hero {
  height: 80vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  position: relative;
  margin-bottom: 0;
}

.item-hero-content h1 {
  font-size: 3.5rem;
  color: white;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  max-width: 900px;
  padding: 0 20px;
}

.item-info-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px 20px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: start;
}

.item-details-list ul {
  list-style: none;
  padding: 0;
}

.item-details-list li {
  margin-bottom: 15px;
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}

.item-details-list li strong {
  color: #4a6fa5;
  display: block;
  margin-bottom: 2px;
}

.item-challenge-text h2 {
  font-size: 2.2rem;
  color: #000;
  margin-bottom: 20px;
  font-weight: 700;
}

.item-challenge-text .text-blue {
  color: #3b5d8f;
}

.item-challenge-text p {
  color: #666;
  line-height: 1.7;
  font-size: 1.05rem;
}

/* Gallery Section */
.item-gallery-section {
  text-align: center;
  padding: 20px 20px 60px;
  background-color: #EDECEC;
}

.item-gallery-section h2 {
  font-size: 2.5rem;
  color: #3b5d8f;
  margin-bottom: 10px;
  font-weight: 700;
}

.item-gallery-section p {
  color: #777;
  margin-bottom: 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 15px;
  overflow: hidden;
  background-color: #ddd;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

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

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.gallery-overlay i {
  color: white;
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Performance Section */
.item-performance-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.item-performance-section h2 {
  font-size: 2.8rem;
  color: #162f4e;
  margin-bottom: 60px;
  font-weight: 700;
  letter-spacing: -1px;
}

.performance-content {
  display: block;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.performance-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.performance-feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 30px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.performance-feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(59, 93, 143, 0.1);
  border-color: rgba(59, 93, 143, 0.2);
}

.performance-feature-card i {
  font-size: 2rem;
  color: #3b5d8f;
  background: rgba(59, 93, 143, 0.1);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.performance-feature-info h4 {
  font-size: 1.25rem;
  color: #162f4e;
  margin-bottom: 8px;
  font-weight: 700;
}

.performance-feature-info p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.lightbox.active {
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 5px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.3s;
}

.close-lightbox:hover {
  color: #3b5d8f;
}

/* CTA Section (Reusing or creating specific style) */
.cta-section {
  padding: 60px 20px;
  text-align: center;
}

.cta-container {
  background: linear-gradient(135deg, #05182d 0%, #162f4e 100%);
  border-radius: 30px;
  padding: 60px 40px;
  max-width: 1000px;
  margin: 0 auto;
  color: white;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.cta-container h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.cta-container p {
  color: #c0d4ec;
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.btn-cta {
  display: inline-block;
  padding: 15px 35px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.btn-cta:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Partner Logos Section */
.partner-details-list {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.partner-details-list h4 {
  color: #4a6fa5;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.partner-logos-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.partner-logo-item {
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  background-color: #f9f9f9;
  transition: all 0.3s ease;
}

.partner-logo-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.partner-logo-item img {
  height: 40px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.partner-logo-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Portfolio Page Unification (Fallback/Legacy) */
.portfolio-intro {
  text-align: center;
  padding: 60px 20px 40px;
  background-color: #EDECEC;
}

.portfolio-intro h1 {
  font-size: 2.5rem;
  color: #162f4e;
  font-weight: 700;
  margin-bottom: 15px;
}

.portfolio-intro p {
  color: #555;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 1rem;
}

.portfolio-filters {
  padding: 0 20px 40px;
  text-align: center;
}

.filter-btn {
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 50px;
  padding: 8px 25px;
  margin: 5px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: #3b5d8f;
  color: white;
  border-color: #3b5d8f;
}

.portfolio-grid-section {
  padding: 0 20px 80px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-item {
  background-color: #d9d9d9;
  border-radius: 15px;
  aspect-ratio: 1 / 1;
  transition: transform 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-5px);
}

.hidden {
  display: none !important;
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */

/* Tablet Improvements (iPad Mini, Pro, Air) */
@media (max-width: 1100px) {
  .item-hero {
    height: 60vh;
    padding-top: 120px;
  }

  .item-hero-content h1 {
    font-size: 3rem;
    max-width: 85%;
    margin: 0 auto;
    letter-spacing: -1px;
    line-height: 1.1;
  }

  .item-info-container {
    grid-template-columns: 1fr 1.8fr;
    gap: 50px;
    padding: 80px 40px 30px;
    max-width: 1000px;
  }

  .item-challenge-text h2 {
    font-size: 2rem;
  }

  .item-challenge-text p {
    font-size: 1.1rem;
    line-height: 1.8;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 0 10px;
  }

  .performance-content {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
    gap: 40px;
    text-align: center;
  }

  .performance-features-grid {
    grid-template-columns: repeat(3, 1fr);
    /* Side-by-side on tablet */
    gap: 20px;
  }

  .performance-feature-card {
    padding: 20px;
  }

  .item-performance-section {
    padding: 120px 40px;
    background: linear-gradient(to bottom, #f9f9f9 0%, #EDECEC 100%);
  }

  .item-performance-section h2 {
    font-size: 2.2rem;
    margin-bottom: 60px;
  }

  .partner-details-list h4,
  .partner-logos-container {
    display: flex;
    justify-content: center;
    text-align: center;
  }

  .partner-logos-container {
    gap: 20px;
  }
}

/* Medium Tablets / Large Phones */
@media (max-width: 768px) {
  .item-hero-content h1 {
    font-size: 2.2rem;
  }
}

/* Small Screens / Phones */
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .gallery-item {
    aspect-ratio: 1/1;
  }

  .item-info-container {
    grid-template-columns: 1fr;
    padding: 60px 20px;
  }

  .performance-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 50px;
  }

  .performance-features-grid {
    grid-template-columns: 1fr;
    /* Force stack on small screens */
  }

  .performance-feature-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
  }

  .performance-feature-card i {
    margin-bottom: 10px;
  }
}

@media (min-width: 992px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}