/* Modern Portfolio Page - Impressive Design */

.portfolio-page {
  background: #000;
  color: #fff;
  min-height: 100vh;
}

/* ==================== HERO SECTION ==================== */
.portfolio-hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 4rem 2rem;
  overflow: hidden;
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1rem;
  white-space: nowrap;
  justify-content: center;
  align-items: center;
}

.title-line {
  display: inline-block;
  white-space: nowrap;
  background: linear-gradient(135deg, #ffffff 0%, #b0b0b0 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out, gradientShift 3s ease infinite;
}

.title-line.highlight {
  background: linear-gradient(135deg, #100961 0%, #2d2da3 50%, #100961 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out 0.2s both, gradientShift 3s ease infinite 0.2s;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #b0b0b0;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: #100961;
  line-height: 1;
  margin-bottom: 0.5rem;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== PORTFOLIO CONTAINER ==================== */
.portfolio-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* ==================== CONTROLS & FILTERS ==================== */
.portfolio-controls {
  margin-bottom: 4rem;
}

.search-filter-section {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: center;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 300px;
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: #100961;
  box-shadow: 0 0 0 3px rgba(16, 9, 97, 0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
}

.filter-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  min-width: 160px;
}

.filter-select:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-select:focus {
  outline: none;
  border-color: #100961;
  box-shadow: 0 0 0 3px rgba(16, 9, 97, 0.1);
}

.results-info {
  color: #888;
  font-size: 0.9rem;
  text-align: right;
}

.results-info strong {
  color: #fff;
}

/* ==================== PORTFOLIO GRID ==================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.portfolio-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(16, 9, 97, 0.3);
  box-shadow: 0 8px 32px rgba(16, 9, 97, 0.15);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .card-link {
  transform: translateY(-4px);
}

.card-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #1a1a1a;
  aspect-ratio: 16 / 10;
  margin-bottom: 1.5rem;
}

.card-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.project-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  pointer-events: none;
}

.portfolio-card:hover .project-image {
  opacity: 0;
}

.portfolio-card:hover .project-video {
  opacity: 1;
}

.video-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.play-icon {
  font-size: 0.75rem;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* Show overlay on hover for cards WITHOUT videos */
.portfolio-card:hover .card-overlay {
  opacity: 1;
}

/* Completely hide overlay for cards with videos */
.portfolio-card.has-video .card-overlay {
  display: none !important;
}

.overlay-content {
  width: 100%;
}

.overlay-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.overlay-client {
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.overlay-location {
  font-size: 0.95rem;
  color: #b0b0b0;
  margin-bottom: 1rem;
}

.view-project-btn {
  display: inline-block;
  color: #100961;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.portfolio-card:hover .view-project-btn {
  transform: translateX(8px);
}

.card-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.client-logo-wrapper {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-info {
  flex: 1;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
  line-height: 1.3;
}

.card-client {
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.card-location {
  font-size: 0.9rem;
  color: #888;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
  text-align: center;
  padding: 6rem 2rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.empty-state h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.empty-state p {
  font-size: 1.1rem;
  color: #888;
  margin-bottom: 2rem;
}

/* ==================== PAGINATION ==================== */
.pagination-modern {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 4rem;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination-btn:hover:not(.disabled) {
  background: rgba(16, 9, 97, 0.1);
  border-color: rgba(16, 9, 97, 0.3);
  color: #100961;
  transform: translateY(-2px);
}

.pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pagination-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination-number:hover {
  background: rgba(16, 9, 97, 0.1);
  border-color: rgba(16, 9, 97, 0.3);
  color: #100961;
  transform: translateY(-2px);
}

.pagination-number.active {
  background: linear-gradient(135deg, #100961 0%, #2d2da3 100%);
  border-color: #100961;
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 9, 97, 0.3);
}

.pagination-ellipsis {
  color: #888;
  padding: 0 0.5rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
  }

  .hero-stats {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .portfolio-hero {
    min-height: 50vh;
    padding: 4rem 1.5rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .portfolio-container {
    padding: 3rem 1.5rem;
  }

  .search-filter-section {
    flex-direction: column;
  }

  .search-box {
    width: 100%;
    min-width: auto;
  }

  .filter-group {
    width: 100%;
  }

  .filter-select {
    flex: 1;
    min-width: auto;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .results-info {
    text-align: center;
    margin-top: 1rem;
  }
}

@media (max-width: 480px) {
  .portfolio-hero {
    padding: 3rem 1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .portfolio-container {
    padding: 2rem 1rem;
  }

  .card-content {
    flex-direction: column;
  }

  .client-logo-wrapper {
    align-self: flex-start;
  }

  .pagination-modern {
    flex-direction: column;
  }

  .pagination-numbers {
    order: -1;
    width: 100%;
    justify-content: center;
  }
}
