/*================================================================
  NRPI Gallery - Custom Premium Stylesheet
  Designed for visual excellence, modern animations, and smooth filtering.
================================================================*/

:root {
  --primary-navy: #00264a;
  --primary-crimson: #ed4266;
  --accent-gold: #ffb703;
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e293b;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg-light: rgba(255, 255, 255, 0.75);
  --glass-border-light: rgba(255, 255, 255, 0.4);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px -15px rgba(0, 38, 74, 0.15);
  --shadow-hover: 0 30px 60px -20px rgba(237, 66, 102, 0.25);
  --transition-smooth: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-card: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --font-heading: 'Outfit', 'Work Sans', sans-serif;
  --font-body: 'Inter', 'Work Sans', sans-serif;
}

/* Custom Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Apply font to elements */
.gallery-section-wrapper {
  font-family: var(--font-body);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
  padding-bottom: 90px;
}

/* Background elements for abstract texture */
.gallery-section-wrapper::before,
.gallery-section-wrapper::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.12;
  pointer-events: none;
  transform: translate3d(0,0,0);
  will-change: transform;
}

.gallery-section-wrapper::before {
  top: 10%;
  left: -10%;
  background: radial-gradient(circle, var(--primary-crimson) 0%, transparent 70%);
}

.gallery-section-wrapper::after {
  bottom: 10%;
  right: -10%;
  background: radial-gradient(circle, var(--primary-navy) 0%, transparent 70%);
}

/* Revamped Hero/Title Area */
.premium-gallery-title-area {
  position: relative;
  z-index: 1;
  padding: 160px 0 100px;
  background: linear-gradient(135deg, #020c1b 0%, #00264a 100%);
  text-align: center;
  color: #ffffff;
  overflow: hidden;
}

.premium-gallery-title-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(237, 66, 102, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(255, 183, 3, 0.1) 0%, transparent 50%);
  z-index: 0;
}

.premium-gallery-title-area .container {
  position: relative;
  z-index: 2;
}

.premium-gallery-title-area h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3rem;
  letter-spacing: -0.03em;
  margin-bottom: 15px;
  background: linear-gradient(to right, #ffffff 30%, #ffd1d8 70%, #ffb703 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease forwards;
}

.premium-gallery-title-area p {
  font-size: 1.15rem;
  font-weight: 400;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 25px;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.premium-gallery-breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 24px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.premium-gallery-breadcrumbs a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.premium-gallery-breadcrumbs a:hover {
  color: var(--primary-crimson);
}

.premium-gallery-breadcrumbs span.separator {
  color: #475569;
  font-size: 0.8rem;
}

.premium-gallery-breadcrumbs span.current {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Unused filter menu styles removed */

/* Premium Card Layout */
.gallery-grid-wrapper {
  position: relative;
  z-index: 1;
}

.gallery-grid-wrapper .row {
  margin-left: -12px;
  margin-right: -12px;
}

.gallery-grid-wrapper [class*="col-"] {
  padding-left: 12px;
  padding-right: 12px;
}

.single-gallery-card {
  display: block;
  text-decoration: none;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition-card);
  height: 350px; /* Fixed proportional height */
  cursor: pointer;
}

/* Card Load / Entrance Animation */
.single-gallery-card.animate-card {
  animation: fadeInUpCard 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(40px);
}

.single-gallery-card.hidden {
  display: none !important;
}

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

.single-gallery-card .card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-card);
}

/* Dynamic Glassmorphic Overlay */
.single-gallery-card .card-glass-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
    rgba(2, 12, 27, 0) 10%, 
    rgba(0, 38, 74, 0.6) 50%, 
    rgba(237, 66, 102, 0.9) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  z-index: 2;
}

/* Glow Borders on Hover */
.single-gallery-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  border: 2px solid transparent;
  pointer-events: none;
  z-index: 3;
  transition: var(--transition-smooth);
}

/* Hover States */
.single-gallery-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.single-gallery-card:hover::after {
  border-color: rgba(237, 66, 102, 0.4);
}

.single-gallery-card:hover .card-image-wrapper img {
  transform: scale(1.08);
}

.single-gallery-card:hover .card-glass-overlay {
  opacity: 1;
}

/* Overlay Text & Content */
.card-details {
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  transition-delay: 0.1s;
}

.single-gallery-card:hover .card-details {
  transform: translateY(0);
  opacity: 1;
}

.card-details .card-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 14px;
  border-radius: 30px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.card-details h3 {
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 6px;
  line-height: 1.25;
}

.card-details p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.4;
  font-weight: 400;
}

/* Premium Plus Button */
.card-zoom-trigger {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 4;
  opacity: 0;
  transform: scale(0.7) rotate(-45deg);
  transition: var(--transition-smooth);
}

.card-zoom-trigger svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2.5;
  transition: var(--transition-smooth);
}

.single-gallery-card:hover .card-zoom-trigger {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition-delay: 0.15s;
}

.card-zoom-trigger:hover {
  background: #ffffff;
  color: var(--primary-crimson);
  box-shadow: 0 8px 20px rgba(237, 66, 102, 0.3);
}

.card-zoom-trigger:hover svg {
  stroke: var(--primary-crimson);
  transform: scale(1.1);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Magnific Popup Premium Custom Dark-Glass Overrides */
.mfp-bg {
  background: #020c1b !important;
  opacity: 0.92 !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mfp-wrap {
  z-index: 99999 !important;
}

.mfp-image-holder .mfp-content {
  max-width: 900px !important;
}

.mfp-figure {
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6) !important;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mfp-figure::after {
  display: none !important;
}

.mfp-figure img.mfp-img {
  padding: 0 !important;
  border-radius: 16px 16px 0 0;
  max-height: 80vh !important;
}

.mfp-bottom-bar {
  background: linear-gradient(180deg, rgba(2, 12, 27, 0.8) 0%, rgba(2, 12, 27, 0.98) 100%) !important;
  margin-top: 0 !important;
  padding: 20px 24px !important;
  position: relative !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mfp-title {
  font-family: var(--font-heading) !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  line-height: 1.4 !important;
  padding-right: 60px !important;
}

.mfp-counter {
  color: #94a3b8 !important;
  font-family: var(--font-body) !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  right: 24px !important;
  top: 24px !important;
}

/* Custom Navigation Buttons for Lightbox */
.mfp-arrow {
  width: 60px !important;
  height: 60px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 50% !important;
  transition: var(--transition-smooth) !important;
  top: 50% !important;
  margin-top: -30px !important;
  opacity: 0.6 !important;
}

.mfp-arrow:hover {
  background: var(--primary-crimson) !important;
  border-color: var(--primary-crimson) !important;
  opacity: 1 !important;
  box-shadow: 0 10px 25px rgba(237, 66, 102, 0.4);
}

.mfp-arrow::before, .mfp-arrow::after {
  display: none !important;
}

.mfp-arrow-left {
  left: 30px !important;
}

.mfp-arrow-right {
  right: 30px !important;
}

/* Custom Vector Arrow Icons inside Navigation */
.mfp-arrow-left::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-left: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  transform: rotate(45deg);
  margin-left: 24px;
  margin-top: 22px;
}

.mfp-arrow-right::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-right: 3px solid #ffffff;
  border-top: 3px solid #ffffff;
  transform: rotate(45deg);
  margin-left: 18px;
  margin-top: 22px;
}

.mfp-close {
  width: 50px !important;
  height: 50px !important;
  line-height: 50px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 50% !important;
  top: 20px !important;
  right: 20px !important;
  opacity: 0.7 !important;
  transition: var(--transition-smooth) !important;
  color: #ffffff !important;
}

.mfp-close:hover {
  background: var(--primary-crimson) !important;
  border-color: var(--primary-crimson) !important;
  opacity: 1 !important;
  transform: rotate(90deg);
}

/* Responsive Overrides */
@media (max-width: 991px) {
  .premium-gallery-title-area h1 {
    font-size: 2.5rem;
  }

}

@media (max-width: 767px) {
  .premium-gallery-title-area {
    padding: 120px 0 80px;
  }
  .premium-gallery-title-area h1 {
    font-size: 2.1rem;
  }

  .single-gallery-card {
    height: 300px;
  }
  .card-details h3 {
    font-size: 1.25rem;
  }
  .mfp-arrow {
    width: 44px !important;
    height: 44px !important;
    margin-top: -22px !important;
  }
  .mfp-arrow-left::before {
    width: 10px;
    height: 10px;
    margin-left: 17px;
    margin-top: 16px;
  }
  .mfp-arrow-right::before {
    width: 10px;
    height: 10px;
    margin-left: 13px;
    margin-top: 16px;
  }
}
