/* ==========================================================================
   ADWHS Solutions - Portfolio Page Styles
   4-Column Responsive Image Grid, Interactive Lightbox & CTA
   ========================================================================== */

/* ── Portfolio Gallery Section ───────────────────────────────────────────── */
.portfolio-gallery-section {
  position: relative;
  background: #f8fafc;
  padding: clamp(48px, 6vw, 50px) 0 clamp(64px, 8vw, 50px);
  overflow: hidden;
}

/* Background atmospheric accents */
.portfolio-gallery-section::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.portfolio-gallery-section::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -120px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Section Header */
.portfolio-gallery__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 52px);
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.portfolio-gallery__header-left {
  max-width: 680px;
}

.portfolio-gallery__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0066FF;
  margin-bottom: 8px;
}

.portfolio-gallery__eyebrow::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 2px;
  background: #0066FF;
  border-radius: 2px;
}

.portfolio-gallery__title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
  font-weight: 800;
  color: #0B1738;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.portfolio-gallery__title span {
  color: #0066FF;
}

.portfolio-gallery__subtitle {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

.portfolio-gallery__header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portfolio-gallery__count-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0B1738;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(11, 23, 56, 0.04);
}

.portfolio-gallery__count-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  display: inline-block;
}

/* ── 4-Column Images Grid ─────────────────────────────────────────────────── */
.portfolio-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 2vw, 28px);
}

/* ── Portfolio Card ──────────────────────────────────────────────────────── */
.portfolio-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #edf2f7;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(11, 23, 56, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 42px rgba(0, 102, 255, 0.12);
  border-color: #0066FF;
}

/* Image Wrap */
.portfolio-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0c1825;
  cursor: pointer;
  display: block;
}

.portfolio-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  will-change: transform;
}

.portfolio-card:hover .portfolio-card__img {
  transform: scale(1.07);
}

/* Country Flag / Tag Badge */
.portfolio-card__country {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(12, 24, 37, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.portfolio-card:hover .portfolio-card__country {
  background: #0066FF;
  transform: translateY(-2px);
}

/* Hover Overlay & Action Buttons */
.portfolio-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(11, 23, 56, 0.1) 0%, rgba(11, 23, 56, 0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.portfolio-card:hover .portfolio-card__overlay {
  opacity: 1;
  visibility: visible;
}

.portfolio-card__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #0B1738;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.85);
  text-decoration: none !important;
}

.portfolio-card:hover .portfolio-card__btn {
  transform: scale(1);
}

.portfolio-card__btn:hover {
  background: #0066FF;
  color: #ffffff;
  transform: scale(1.12);
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.5);
}

/* Card Body / Info */
.portfolio-card__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: #ffffff;
}

.portfolio-card__category {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0066FF;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-card__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0B1738;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.portfolio-card:hover .portfolio-card__title {
  color: #0066FF;
}

/* ── Lightbox Modal ──────────────────────────────────────────────────────── */
.portfolio-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(6, 2, 14, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-lightbox.active {
  display: flex;
  opacity: 1;
}

.portfolio-lightbox__dialog {
  position: relative;
  max-width: 1100px;
  max-height: 90vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portfolio-lightbox__content {
  position: relative;
  max-width: 100%;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #06020e;
}

.portfolio-lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-lightbox.active .portfolio-lightbox__img {
  transform: scale(1);
}

.portfolio-lightbox__footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: #ffffff;
  padding: 0 10px;
}

.portfolio-lightbox__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.portfolio-lightbox__counter {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
}

.portfolio-lightbox__close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.portfolio-lightbox__close:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg);
}

.portfolio-lightbox__nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10;
}

.portfolio-lightbox__nav-btn:hover {
  background: #0066FF;
  border-color: #0066FF;
  transform: translateY(-50%) scale(1.1);
}

.portfolio-lightbox__nav-btn--prev {
  left: -70px;
}

.portfolio-lightbox__nav-btn--next {
  right: -70px;
}

/* ── Full-Width CTA Banner ────────────────────────────────────────────────── */
.portfolio-cta-banner {
  position: relative;
  background: #06020E;
  background-image: linear-gradient(135deg, #06020e 0%, #0a1128 50%, #001f54 100%);
  padding: clamp(60px, 8vw, 100px) 0;
  color: #ffffff;
  overflow: hidden;
  text-align: center;
}

.portfolio-cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 102, 255, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.portfolio-cta-banner__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.portfolio-cta-banner__eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #38bdf8;
  margin-bottom: 14px;
}

.portfolio-cta-banner__title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.portfolio-cta-banner__title span {
  color: #0066FF;
  background: linear-gradient(135deg, #38bdf8 0%, #0066FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portfolio-cta-banner__desc {
  font-size: 1.08rem;
  color: #cbd5e1;
  line-height: 1.65;
  margin: 0 auto 36px;
  max-width: 620px;
}

.portfolio-cta-banner__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.portfolio-cta-btn--primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0066FF;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 34px;
  border-radius: 999px;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(0, 102, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-cta-btn--primary:hover {
  background: #0878F9;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 102, 255, 0.6);
}

.portfolio-cta-btn--secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 30px;
  border-radius: 999px;
  text-decoration: none !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-cta-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  transform: translateY(-3px);
}

/* ── Responsive Breakpoints ──────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .portfolio-lightbox__nav-btn--prev {
    left: 10px;
  }
  .portfolio-lightbox__nav-btn--next {
    right: 10px;
  }
}

@media (max-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-gallery__header {
    flex-direction: column;
    align-items: flex-start;
  }
  .portfolio-lightbox__close {
    top: -44px;
    right: 10px;
  }
}
