/* Portfolio page — enhanced UI */

:root {
  --brand-blue: #6A82FB;
  --brand-red: #F45451;
  --brand-gradient: linear-gradient(135deg, #6A82FB 0%, #F45451 100%);
  --brand-blue-rgb: 106, 130, 251;
  --brand-red-rgb: 244, 84, 81;
}

.portfolio-page {
  background: #f7f8fc;
  overflow-x: hidden;
}

/* Logo-only header */
.portfolio-page nav.navbar.bootsnav.pf-header-logo-only {
  min-height: 0;
  height: auto !important;
  padding: 0;
  margin: 0;
  border: none;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.portfolio-page nav.navbar.bootsnav.pf-header-logo-only.navbar-transparent {
  background: transparent !important;
  box-shadow: none !important;
}

.portfolio-page nav.navbar.bootsnav.pf-header-logo-only:not(.navbar-transparent) {
  background: #fff !important;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.07) !important;
}

.portfolio-page nav.navbar.bootsnav.pf-header-logo-only > .container {
  padding-top: 0;
  padding-bottom: 0;
}

.portfolio-page .pf-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 0;
  margin: 0;
}

.portfolio-page .pf-logo-link {
  display: block;
  line-height: 0;
  padding: 0 !important;
  height: auto !important;
}

.portfolio-page .pf-logo-link img {
  max-height: 72px !important;
  width: auto;
  margin: 0;
  padding: 0;
}

/* Hero */
.pf-hero {
  position: relative;
  padding: 100px 0 100px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
  overflow: hidden;
}

.pf-hero .shapes-wrap {
  pointer-events: none;
}

.pf-hero-label {
  letter-spacing: 3px;
  font-size: 13px;
  animation: pfFadeUp 0.7s ease both;
}

.pf-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 20px;
  animation: pfFadeUp 0.7s 0.1s ease both;
}

.pf-hero-sub {
  font-size: 17px;
  opacity: 0.85;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
  animation: pfFadeUp 0.7s 0.2s ease both;
}

/* Filter bar */
.pf-filter-section {
  padding: 40px 0 10px;
  position: sticky;
  top: 74px;
  z-index: 100;
  background: rgba(247, 248, 252, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pf-filter-wrap {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pf-filter-btn {
  border: 2px solid #e0e4ef;
  background: #fff;
  color: #444;
  padding: 10px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.pf-filter-btn i {
  margin-right: 6px;
  vertical-align: middle;
}

.pf-filter-btn:hover {
  border-color: #6A82FB;
  color: #6A82FB;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--brand-blue-rgb), 0.15);
}

.pf-filter-btn.active {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 25px rgba(var(--brand-blue-rgb), 0.35);
}

/* Grid */
.pf-grid-section {
  padding-top: 30px;
}

.pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

.pf-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
}

.pf-card.pf-visible {
  opacity: 1;
  transform: translateY(0);
}

.pf-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.pf-card.pf-hidden {
  display: none;
}

/* Card visual */
.pf-card-visual {
  position: relative;
  overflow: hidden;
  background: var(--brand-gradient);
  aspect-ratio: 16 / 10;
}

.pf-card-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pf-card-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s ease;
}

.pf-card:hover .pf-card-img-wrap img {
  transform: scale(1.05);
}

.pf-img-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-img-placeholder i {
  font-size: 36px;
  color: rgba(255, 255, 255, 0.7);
}

.pf-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pf-badge-web {
  background: rgba(76, 175, 80, 0.9);
  color: #fff;
}

.pf-badge-app {
  background: rgba(124, 77, 255, 0.9);
  color: #fff;
}

/* Card body */
.pf-card-body {
  padding: 24px 26px 28px;
}

.pf-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1a1a2e;
}

.pf-category {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #F45451;
  font-weight: 600;
  margin: 0 0 10px;
}

.pf-app-type {
  font-size: 13px;
  color: #6A82FB;
  margin: 0 0 10px;
}

.pf-app-type i {
  margin-right: 4px;
}

.pf-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.65;
  margin: 0 0 14px;
}

.pf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.pf-tag {
  background: #f0f2f8;
  color: #555;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.pf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pf-actions .btn {
  font-size: 12px;
  padding: 8px 18px;
}

.pf-share {
  margin-left: auto;
}

/* CTA */
.pf-cta h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

/* Toast */
.pf-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1a2e;
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.35s ease;
  pointer-events: none;
}

.pf-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pf-empty {
  padding: 60px 0;
  color: #aaa;
}

.pf-empty i {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

/* Alternating accent on cards — brand blue/red only */
.pf-card.website:nth-child(3n+1) .pf-card-visual,
.pf-card.application:nth-child(3n+1) .pf-card-visual {
  background: var(--brand-gradient);
}

.pf-card.website:nth-child(3n+2) .pf-card-visual,
.pf-card.application:nth-child(3n+2) .pf-card-visual {
  background: linear-gradient(225deg, #6A82FB 0%, #F45451 100%);
}

.pf-card.website:nth-child(3n) .pf-card-visual,
.pf-card.application:nth-child(3n) .pf-card-visual {
  background: linear-gradient(135deg, #F45451 0%, #6A82FB 100%);
}

@keyframes pfFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .portfolio-page .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .portfolio-page .pf-logo-link img {
    max-height: 56px !important;
  }

  .pf-hero {
    padding: 88px 0 64px;
  }

  .pf-hero-title {
    font-size: clamp(1.6rem, 7vw, 2rem) !important;
    line-height: 1.25 !important;
  }

  .pf-hero-sub {
    font-size: 15px;
    line-height: 1.65;
    padding: 0 4px;
  }

  .pf-filter-section {
    top: 60px;
    padding: 20px 0 8px;
  }

  .pf-filter-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .pf-filter-btn {
    padding: 10px 16px;
    font-size: 12px;
    margin: 0 !important;
  }

  .pf-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pf-card-body {
    padding: 18px 16px;
  }

  .pf-card-title {
    font-size: 1rem;
  }

  .pf-share {
    margin-left: 0;
  }

  .portfolio-page .shapes-wrap {
    display: none;
  }

  .portfolio-page .footer-main .widget {
    text-align: center;
    margin-bottom: 24px;
  }
}

@media (max-width: 480px) {
  .pf-hero {
    padding: 80px 0 52px;
  }

  .pf-hero-label {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .pf-filter-btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    justify-content: center;
  }
}
