/* ========================================================
   PORTFOLIO PAGE STYLES - GGRL GENERAL SERVICES
   ======================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* ========================================================
   ESTILO 2025 (3 FOTOS POR PROYECTO)
   ======================================================== */
.portfolio-section {
  padding: 6rem 5%;
  background: #f8f9fa;
  text-align: center;
}

.portfolio-section h2 {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 3rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.portfolio-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: all 0.4s ease;
}

.portfolio-item:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}

.portfolio-item img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portfolio-item:hover img {
  transform: scale(1.08);
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem 1.5rem;
  background: linear-gradient(transparent, rgba(19,72,102,0.95));
  color: white;
  transform: translateY(30%);
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.view-photos {
  font-size: 1rem;
  opacity: 0.9;
}

/* ========================================================
   MODAL / LIGHTBOX
   ======================================================== */
.portfolio-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.portfolio-modal.active {
  display: flex;
}

#modalImage {
  max-width: 95%;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 40px;
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  z-index: 10;
}

.modal-prev, .modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  font-size: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.modal-prev { left: 30px; }
.modal-next { right: 30px; }
.modal-prev:hover, .modal-next:hover { background: var(--accent); transform: scale(1.1); }

.modal-counter {
  position: absolute;
  bottom: 30px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-weight: 600;
}

/* ========================================================
   RESPONSIVE PORTFOLIO - MÓVIL
   ======================================================== */
@media (max-width: 768px) {
  .portfolio-item img {
    height: 320px;
  }
  .portfolio-overlay h3 {
    font-size: 1.35rem;
  }
  .portfolio-modal #modalImage {
    max-height: 78vh;
  }
}