/* ============================================
   PORTFOLIO GALLERY VIEW - USER SIDE
   Clean and flexible gallery layout
   ============================================ */

/* View All Button (used in index.php) */
.view-all-btn {
  position: relative;
  overflow: hidden;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 2px solid var(--primary);
  color: var(--primary);
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(149, 44, 45, 0.2);
}

.view-all-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #952c2d 0%, #7a2425 100%);
  transition: left 0.4s ease;
  z-index: -1;
}

.view-all-btn:hover::before {
  left: 0;
}

.view-all-btn:hover {
  color: white;
  border-color: #952c2d;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(149, 44, 45, 0.3);
}

.view-all-btn i {
  transition: transform 0.3s ease;
}

.view-all-btn:hover i.fa-arrow-right {
  transform: translateX(5px);
}

/* Portfolio Gallery Page */
.portfolio-gallery-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 2rem 0;
}

.portfolio-header {
  position: relative;
  text-align: center;
  margin-bottom: 3rem;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #952c2d 0%, #7a2425 100%);
  color: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(149, 44, 45, 0.3);
}

.portfolio-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.portfolio-header p {
  font-size: 1.2rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* Back Button in Header */
.back-btn-header {
  position: absolute;
  top: 50%;
  left: 2rem;
  transform: translateY(-50%);
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  font-size: 1.3rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.back-btn-header:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateY(-50%) translateX(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-btn-header i {
  transition: transform 0.3s ease;
}

.back-btn-header:hover i {
  transform: translateX(-3px);
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.75rem 2rem;
  border: 2px solid #952c2d;
  background: white;
  color: #952c2d;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, #952c2d 0%, #7a2425 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(149, 44, 45, 0.3);
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.portfolio-item {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(149, 44, 45, 0.25);
}

.portfolio-item-image {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.portfolio-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-item-image img {
  transform: scale(1.1);
}

.portfolio-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(149, 44, 45, 0.85) 0%, rgba(33, 37, 41, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-item-overlay {
  opacity: 1;
}

.portfolio-item-overlay-content {
  text-align: center;
  color: white;
  padding: 1.5rem;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-item-overlay-content {
  transform: translateY(0);
}

.portfolio-item-overlay-content i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.portfolio-item-content {
  padding: 1.5rem;
}

.portfolio-item-category {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: linear-gradient(135deg, #952c2d 0%, #7a2425 100%);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portfolio-item-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.portfolio-item-description {
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty State */
.portfolio-empty-state {
  text-align: center;
  padding: 5rem 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.portfolio-empty-state i {
  font-size: 5rem;
  color: #952c2d;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.portfolio-empty-state h3 {
  font-size: 1.8rem;
  color: #212529;
  margin-bottom: 0.75rem;
}

.portfolio-empty-state p {
  color: #6c757d;
  font-size: 1.1rem;
}

/* Back to Home Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 2.5rem;
  background: white;
  border: 2px solid #952c2d;
  color: #952c2d;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-btn:hover {
  background: linear-gradient(135deg, #952c2d 0%, #7a2425 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(149, 44, 45, 0.3);
}

.back-btn i {
  transition: transform 0.3s ease;
}

.back-btn:hover i {
  transform: translateX(-5px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  .portfolio-header {
    padding: 2.5rem 1rem;
  }

  .portfolio-header h1 {
    font-size: 2.25rem;
  }

  .portfolio-header p {
    font-size: 1rem;
  }

  .back-btn-header {
    width: 45px;
    height: 45px;
    left: 1.25rem;
    font-size: 1.1rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .portfolio-item-image {
    height: 220px;
  }

  .filter-buttons {
    gap: 0.75rem;
  }

  .filter-btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .portfolio-header {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
  }

  .portfolio-header h1 {
    font-size: 1.75rem;
  }

  .portfolio-header p {
    font-size: 0.95rem;
  }

  .back-btn-header {
    width: 40px;
    height: 40px;
    left: 1rem;
    font-size: 1rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .portfolio-item-image {
    height: 200px;
  }

  .portfolio-item-title {
    font-size: 1.2rem;
  }

  .portfolio-item-description {
    font-size: 0.9rem;
  }

  .filter-buttons {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
  }

  .portfolio-empty-state {
    padding: 3rem 1.5rem;
  }

  .portfolio-empty-state i {
    font-size: 3.5rem;
  }

  .portfolio-empty-state h3 {
    font-size: 1.4rem;
  }

  .portfolio-empty-state p {
    font-size: 1rem;
  }

  .view-all-btn {
    padding: 0.75rem 2rem !important;
    font-size: 0.95rem;
  }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
  .portfolio-header h1 {
    font-size: 1.5rem;
  }

  .portfolio-header p {
    font-size: 0.875rem;
  }

  .back-btn-header {
    width: 38px;
    height: 38px;
    left: 0.75rem;
    font-size: 0.95rem;
  }

  .portfolio-item-content {
    padding: 1.25rem;
  }

  .filter-btn {
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
  }
}

/* ============================================
   PORTFOLIO MODAL STYLES
   ============================================ */

.portfolio-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.portfolio-modal.active {
  opacity: 1;
  visibility: visible;
}

.portfolio-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.portfolio-modal-content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  max-height: 90vh;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  z-index: 10000;
}

.portfolio-modal.active .portfolio-modal-content {
  transform: scale(1);
  animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.portfolio-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: none;
  background: rgba(149, 44, 45, 0.95);
  color: white;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.portfolio-modal-close:hover {
  background: #7a2425;
  transform: rotate(90deg) scale(1.1);
}

.portfolio-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: 90vh;
  overflow: hidden;
}

.portfolio-modal-image {
  position: relative;
  height: 100%;
  min-height: 400px;
  background: #f8f9fa;
  overflow: hidden;
}

.portfolio-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-modal-category {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, #952c2d 0%, #7a2425 100%);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(149, 44, 45, 0.4);
}

.portfolio-modal-details {
  padding: 3rem;
  overflow-y: auto;
  max-height: 90vh;
}

/* Custom Scrollbar */
.portfolio-modal-details::-webkit-scrollbar {
  width: 8px;
}

.portfolio-modal-details::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.portfolio-modal-details::-webkit-scrollbar-thumb {
  background: #952c2d;
  border-radius: 4px;
}

.portfolio-modal-details::-webkit-scrollbar-thumb:hover {
  background: #7a2425;
}

.portfolio-modal-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.portfolio-modal-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #f1f1f1;
}

.portfolio-modal-meta-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #6c757d;
  font-size: 1rem;
}

.portfolio-modal-meta-item i {
  color: #952c2d;
  font-size: 1.2rem;
}

.portfolio-modal-description {
  margin-bottom: 2.5rem;
}

.portfolio-modal-description h4,
.portfolio-modal-features h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.portfolio-modal-description h4 i,
.portfolio-modal-features h4 i {
  color: #952c2d;
}

.portfolio-modal-description p {
  color: #495057;
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: justify;
}

.portfolio-modal-features {
  margin-bottom: 2.5rem;
}

.portfolio-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.portfolio-feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border-left: 4px solid #952c2d;
  transition: all 0.3s ease;
}

.portfolio-feature-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(149, 44, 45, 0.15);
}

.portfolio-feature-item i {
  font-size: 1.5rem;
  color: #952c2d;
  min-width: 30px;
  text-align: center;
}

.portfolio-feature-item span {
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.portfolio-modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.portfolio-action-btn {
  flex: 1;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portfolio-btn-primary {
  background: linear-gradient(135deg, #952c2d 0%, #7a2425 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(149, 44, 45, 0.3);
}

.portfolio-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(149, 44, 45, 0.4);
}

.portfolio-btn-secondary {
  background: white;
  color: #6c757d;
  border: 2px solid #dee2e6;
}

.portfolio-btn-secondary:hover {
  background: #f8f9fa;
  color: #495057;
  border-color: #adb5bd;
}

/* ============================================
   MODAL RESPONSIVE DESIGN
   ============================================ */

/* Tablet & Below */
@media (max-width: 992px) {
  .portfolio-modal-body {
    grid-template-columns: 1fr;
  }

  .portfolio-modal-image {
    min-height: 350px;
    max-height: 350px;
  }

  .portfolio-modal-details {
    padding: 2rem;
  }

  .portfolio-modal-header h2 {
    font-size: 1.8rem;
  }

  .portfolio-features-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .portfolio-modal-content {
    width: 95%;
    max-height: 95vh;
    border-radius: 15px;
  }

  .portfolio-modal-close {
    width: 40px;
    height: 40px;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
  }

  .portfolio-modal-image {
    min-height: 280px;
    max-height: 280px;
  }

  .portfolio-modal-category {
    top: 15px;
    left: 15px;
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
  }

  .portfolio-modal-details {
    padding: 1.5rem;
  }

  .portfolio-modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .portfolio-modal-meta {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .portfolio-modal-meta-item {
    font-size: 0.9rem;
  }

  .portfolio-modal-description,
  .portfolio-modal-features {
    margin-bottom: 2rem;
  }

  .portfolio-modal-description h4,
  .portfolio-modal-features h4 {
    font-size: 1.15rem;
  }

  .portfolio-modal-description p {
    font-size: 0.95rem;
  }

  .portfolio-modal-actions {
    flex-direction: column;
  }

  .portfolio-action-btn {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
  }

  .portfolio-feature-item {
    padding: 0.85rem;
  }

  .portfolio-feature-item i {
    font-size: 1.3rem;
  }

  .portfolio-feature-item span {
    font-size: 0.875rem;
  }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
  .portfolio-modal-image {
    min-height: 220px;
    max-height: 220px;
  }

  .portfolio-modal-details {
    padding: 1.25rem;
  }

  .portfolio-modal-header h2 {
    font-size: 1.3rem;
  }

  .portfolio-modal-category {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
  }
}

