/* ============================= Portfolio Section ============================= */
.portfolio-section {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

body.night-mode .portfolio-section {
  background: linear-gradient(160deg, #1a1a2e 0%, #162447 100%);
}

.portfolio-section h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 30px;
  display: inline-block;
  position: relative;
  background: linear-gradient(120deg, #ff8a00, #ff5e62);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.portfolio-section h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ff8a00, #ff5e62);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.portfolio-section h2:hover::after {
  transform: scaleX(1);
}

.portfolio-intro {
  font-size: 18px;
  max-width: 850px;
  margin: 0 auto 80px auto;
  line-height: 1.8;
  color: #333;
  letter-spacing: 0.5px;
  opacity: 0.9;
  text-rendering: optimizeLegibility;
}

body.night-mode .portfolio-intro {
  color: #ddd;
  opacity: 0.85;
}
/* ---------- Category ---------- */
.portfolio-category {
  margin-bottom: 60px;
}
.portfolio-category-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  color: var(--primary-color-night);
}
body.day-mode .portfolio-category-title {
  color: var(--primary-color-day);
}
.portfolio-category-title::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: var(--secondary-color-night);
}
body.day-mode .portfolio-category-title::after {
  background: var(--secondary-color-day);
} 

/* ---------- Slider Wrapper ---------- */
.portfolio-slider-wrapper {
  position: relative;
  padding: 10px 0;
}

.portfolio-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto; 
  scroll-behavior: smooth;
  -ms-overflow-style: none; 
  scrollbar-width: none;      
}

.portfolio-slider::-webkit-scrollbar {
  display: none; 
}

/* ---------- Card ---------- */
.portfolio-card {
  width: 350px;
  background: var(--card-bg-night);
  border-radius: 3px;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  flex-shrink: 0;
  text-align: center;
  padding-bottom: 15px;
  cursor: pointer;
}
body.day-mode .portfolio-card {
  background: var(--card-bg-day);
}
.portfolio-card img {
  width: 350px;
  height:350pX;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
body.day-mode .portfolio-card img {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.portfolio-card:hover img {
  transform: scale(1.05);
}
.portfolio-card h4 {
  margin: 12px 15px 5px;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color-night);
}
body.day-mode .portfolio-card h4 {
  color: var(--primary-color-day);
}
.portfolio-text {
  margin: 0 15px 10px;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
}
body.day-mode .portfolio-text {
  color: rgba(0, 0, 0, 0.7);
}
.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
} 

/* ---------- Slider Buttons ---------- */
.portfolio-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #fff;
  font-size: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: 0.3s;
}
.portfolio-slider-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}
body.day-mode .portfolio-slider-btn {
  background: rgba(255, 255, 255, 0.3);
  color: #000;
}
body.day-mode .portfolio-slider-btn:hover {
  background: rgba(255, 255, 255, 0.6);
}
.portfolio-slider-btn.prev {
  left: 10px;
}
.portfolio-slider-btn.next {
  right: 10px;
} 

/* ============================= Portfolio Details Button ============================= */
.btn-details {
  display: inline-block;
  margin: 10px 0 0 0;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 25px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Day mode */
body.day-mode .btn-details {
  background: linear-gradient(120deg, #ff8a00, #ff5e62);
  color: #fff;
  border-color: transparent;
}

body.day-mode .btn-details:hover {
  background: transparent;
  color: #ff5e62;
  border-color: #ff5e62;
  box-shadow: 0 4px 15px rgba(255, 138, 0, 0.4);
}

/* Night mode */
body.night-mode .btn-details {
  background: linear-gradient(120deg, #ff8a00, #ff5e62);
  color: #fff;
  border-color: transparent;
}

body.night-mode .btn-details:hover {
  background: transparent;
  color: #ff8a00;
  border-color: #ff8a00;
  box-shadow: 0 4px 15px rgba(255, 138, 0, 0.4);
}

/* Center align inside card */
.portfolio-card .btn-details {
  display: inline-block;
  margin-top: 10px;
}


/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .portfolio-card {
    min-width: 200px;
  }
  .portfolio-section h2 {
    font-size: 30px;
  }
  .portfolio-category-title {
    font-size: 24px;
  }
}
@media (max-width: 480px) {
  .portfolio-card {
    min-width: 170px;
  }
  .portfolio-section h2 {
    font-size: 26px;
  }
  .portfolio-category-title {
    font-size: 20px;
  }
}
