/* Modern Color Palette - Dark Theme */
:root {
  --primary: #2563eb;
  --secondary: #1e40af;
  --accent: #ec4899;
  --dark: #0f172a;
  --darker: #020617;
  --light: #f8fafc;
  --gray: #94a3b8;
}

/* Base Styles */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--darker);
  color: var(--light);
  line-height: 1.6;
}

/* Navigation */
/* ===== Ultra Premium Navbar ===== */
.navbar {
  background: linear-gradient(135deg, 
    rgba(30, 15, 45, 0.85) 0%, 
    rgba(15, 25, 65, 0.85) 100%) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* More transparent when scrolled */
.navbar.scrolled {
  background: rgba(20, 15, 45, 0.7) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Logo with animated pulse effect */
.logo-glow {
  position: relative;
  transition: all 0.4s ease;
}

.logo-glow img {
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.logo-pulse {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(45deg, 
    rgba(150, 70, 255, 0.4), 
    rgba(70, 150, 255, 0.4));
  border-radius: 10px;
  z-index: 1;
  opacity: 0;
  transition: all 0.6s ease;
}

.logo-glow:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px rgba(150, 70, 255, 0.4));
}

.logo-glow:hover .logo-pulse {
  opacity: 1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 0.3; }
  100% { transform: scale(1); opacity: 0.6; }
}

/* Nav Links with Gradient Underline */
.nav-link {
  margin: 0 0.75rem;
  position: relative;
}

.nav-link-underline {
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-link-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(90deg, 
    #a56cff, 
    #5d9dff);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover .nav-link-underline {
  color: white;
}

.nav-link:hover .nav-link-underline::after {
  width: 100%;
}

/* Active State */
.nav-link.active .nav-link-underline {
  color: white;
  text-shadow: 0 0 8px rgba(165, 108, 255, 0.4);
}

.nav-link.active .nav-link-underline::after {
  width: 100%;
  background: linear-gradient(90deg, 
    #a56cff, 
    #5d9dff);
}

/* Special Donate Button */
.donate-btn .nav-link-underline {
  color: #ffcc66;
}

.donate-btn:hover .nav-link-underline {
  color: #ffdd99;
  text-shadow: 0 0 12px rgba(255, 204, 102, 0.4);
}

.donate-btn .nav-link-underline::after {
  background: linear-gradient(90deg, 
    #ff9d5d, 
    #ffcc66);
}

/* Dropdown Menu - Glass Effect */
.dropdown-menu {
  background: rgba(30, 20, 50, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 8px;
  overflow: hidden;
}

.dropdown-item {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.dropdown-item:hover {
  color: white;
  background: rgba(165, 108, 255, 0.15);
}

.dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #a56cff, #5d9dff);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dropdown-item:hover::before {
  opacity: 1;
}

.dropdown-divider {
  border-color: rgba(255, 255, 255, 0.08);
  margin: 0.25rem 0;
}

/* Mobile Menu Button */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(165, 108, 255, 0.3);
}

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



    /* Section Styling */
    .journey-section {
        background: linear-gradient(to right, #f8fafc 0%, #ffffff 50%);
    }
    
    .section-border-top {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, rgba(30, 64, 175, 0.2) 50%, transparent 100%);
    }
    
    /* Counter Styling */
    .counter-box {
        background: rgba(30, 64, 175, 0.05);
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    
    .counter-box:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(30, 64, 175, 0.1);
    }
    
    .counter-label {
        font-size: 0.8rem;
        color: #64748b;
    }
    



    /* Premium Gallery Styles */
:root {
    --prem-gold: #D4AF37;
    --prem-gold-light: #FFDF6B;
    --prem-gold-dark: #B78D3D;
    --prem-gold-lighter: #FFECA0;
    --bg-dark: #0F172A;
    --bg-darker: #0A1120;
    --bg-texture: linear-gradient(135deg, rgba(15,23,42,0.95) 0%, rgba(11,17,33,0.98) 100%), 
                  url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><path fill="%231E293B" d="M60,0L120,0L120,60L60,60L60,120L0,120L0,60L60,60Z"/></svg>');
    --section-width: 94%;
}

.journey-section {
    background: var(--bg-texture);
    color: white;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid #000;
    width: var(--section-width);
    max-width: 2000px;
    margin: 0 auto;
    border-radius: 0 0 20px 20px;
    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        20px 100%,
        0 calc(100% - 20px)
    );
}

.section-border-top, .section-border-bottom {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.3) 50%, transparent 100%);
}

.section-border-top {
    top: 0;
}

.section-border-bottom {
    bottom: 0;
    height: 5px;
    background: #000;
}

/* PREM Foundation Styling */
.acronym-display {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
    position: relative;
}

.acronym-display .letter-p,
.acronym-display .letter-r,
.acronym-display .letter-e,
.acronym-display .letter-m {
    display: inline-block;
    margin-right: 2px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
}

.acronym-display .letter-p { color: var(--prem-gold); }
.acronym-display .letter-r { color: var(--prem-gold); }
.acronym-display .letter-e { color: var(--prem-gold); }
.acronym-display .letter-m { color: var(--prem-gold); }

.foundation-text {
    display: inline-block;
    font-size: 1.8rem;
    color: white;
    margin-left: 5px;
    vertical-align: bottom;
    background: linear-gradient(to right, var(--prem-gold), var(--prem-gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

/* Glow Effect */
.acronym-display:hover .letter-p,
.acronym-display:hover .letter-r,
.acronym-display:hover .letter-e,
.acronym-display:hover .letter-m {
    text-shadow: 0 0 5px var(--prem-gold-light);
}


.text-prem-light {
    color: var(--prem-gold-light);
    opacity: 0.9;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
}

.acronym-display:hover .text-prem-light {
    opacity: 1;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.text-prem {
    color: var(--prem-gold);
    font-weight: 600;
}

/* Floating Badges */
.floating-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.5rem 0;
}

.badge-item {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--prem-gold-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
    transform: translateY(0);
    opacity: 0.9;
    transition: all 0.5s ease var(--delay);
}

.badge-item i {
    margin-right: 5px;
}

.journey-section:hover .badge-item {
    transform: translateY(-5px);
    opacity: 1;
    background: rgba(212, 175, 55, 0.15);
}

/* Button Styles */
.btn-prem {
    background: linear-gradient(135deg, var(--prem-gold), var(--prem-gold-dark));
    border: none;
    color: #0F172A;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.btn-prem:hover {
    background: linear-gradient(135deg, var(--prem-gold-light), var(--prem-gold));
    color: #0F172A;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.btn-initiatives {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: white;
    font-weight: 500;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.btn-initiatives::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: all 0.6s ease;
}

.btn-initiatives:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--prem-gold);
    color: var(--prem-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.4);
}

.btn-initiatives:hover::before {
    left: 100%;
}

.btn-outline-prem {
    border: 1px solid var(--prem-gold);
    color: var(--prem-gold);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-prem:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--prem-gold-light);
    border-color: var(--prem-gold-light);
    transform: translateY(-2px);
}

/* Premium Gallery Styles */
.premium-gallery {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.main-slider {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease;
    transform: scale(0.95);
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    transition: transform 0.5s ease;
    filter: brightness(0.95) contrast(1.05);
}

.slide:hover img {
    transform: scale(1.03);
    filter: brightness(1) contrast(1.1);
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    opacity: 0;
    font-size: 0.95rem;
}

.slide:hover .slide-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Navigation Arrows */
.slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2;
}

.prev-btn, .next-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--prem-gold);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(212, 175, 55, 0.7);
    color: #0F172A;
    transform: scale(1.1);
}

/* Thumbnail Strip */
.thumbnail-strip {
    display: flex;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    backdrop-filter: blur(5px);
}

.thumbnail-strip::-webkit-scrollbar {
    display: none;
}

.thumb {
    flex: 0 0 80px;
    height: 60px;
    margin-right: 10px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.thumb.active, .thumb:hover {
    opacity: 1;
    border-color: var(--prem-gold);
}

.thumb.active::after, .thumb:hover::after {
    background: transparent;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gold Accent Elements */
.gold-accent-1, .gold-accent-2 {
    position: absolute;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.15);
    z-index: 0;
}

.gold-accent-1 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    top: -50px;
    right: -50px;
    animation: pulse 8s infinite alternate;
}

.gold-accent-2 {
    width: 150px;
    height: 150px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: -30px;
    left: -30px;
    animation: float 12s infinite ease-in-out;
}

/* Enhanced Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: float-particle 15s infinite linear;
    box-shadow: 0 0 10px 2px rgba(212, 175, 55, 0.4);
}

/* Full Screen Modal */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.97);
    z-index: 1000;
    overflow: hidden;
}

.modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    margin: 2% auto;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--prem-gold);
    transform: scale(1.2);
}

.modal-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.modal-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-slide.active {
    opacity: 1;
}

.modal-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

/* Video placeholder and play CTA */

/* Video placeholder: place the video as a full-bleed background and center the overlay CTA */
.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.28));
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Make the preview video fill the container but keep it behind the overlay; positioning fixes vertical centering issues */
.video-placeholder video.preview-video,
.video-thumb video,
.media-grid-item video,
.preview-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center center;
}

/* Overlay wrapper that's centered both horizontally and vertically */
.video-placeholder .video-overlay { position: absolute; inset: 0; display:flex; align-items:center; justify-content:center; z-index: 2; pointer-events: none; }
/* Allow clicks on the placeholder but not on the overlay decorative layer */
.video-placeholder .play-overlay { pointer-events: auto; }

.video-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.03), transparent 20%);
    pointer-events: none;
}

.play-overlay {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(0,0,0,0.45));
    border: 2px solid rgba(212,175,55,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 6px 18px rgba(212,175,55,0.08) inset;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    z-index: 2;
}

.play-overlay i {
    color: var(--prem-gold-light);
    font-size: 32px;
    margin-left: 0;
    line-height: 1;
}

.video-placeholder:hover .play-overlay {
    transform: scale(1.06);
    box-shadow: 0 14px 40px rgba(0,0,0,0.7), 0 8px 24px rgba(212,175,55,0.12) inset;
}

/* Thumbnails video play */
.video-thumb { background: rgba(0,0,0,0.25); }
.video-thumb .thumb-overlay { position: absolute; inset: 0; display:flex; align-items:center; justify-content:center; }
.video-thumb .play-btn { font-size: 18px; color: var(--prem-gold); }

/* Lightbox content - ensure controls are visible and close/download buttons are comfortable */
#mediaLightbox .modal-body { padding: 0; }
#mediaLightbox .modal-content { background: transparent; box-shadow: none; }
#mediaLightbox .btn-outline-light { z-index: 3; }
/* Move fullscreen to the right of download and keep the close on left; increase z-index */
#mediaLightbox .btn[title] { opacity: 0.98; z-index: 1065; }
/* Desktop: place download at the far right and fullscreen to its left so they don't overlap */
#downloadMedia { right: 12px !important; top: 12px !important; z-index: 1080; }
#fullscreenMedia { right: 72px !important; top: 12px !important; z-index: 1068; }
#mediaLightbox .btn.position-absolute.top-0.start-0.m-3 { left: 12px !important; top: 12px !important; z-index: 1081; }

/* Small screens: stack the control buttons vertically on the right so they remain tappable */
@media (max-width: 576px) {
    #downloadMedia { right: 12px !important; top: 12px !important; }
    #fullscreenMedia { right: 12px !important; top: 56px !important; }
}

/* Soft background for the overlay controls so they remain visible above video controls */
#mediaLightbox .btn-outline-light { background: rgba(0,0,0,0.45); border-color: rgba(255,255,255,0.12); }

/* Hover polish */
.play-overlay, .play-btn { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.play-overlay:hover { transform: scale(1.08); box-shadow: 0 12px 30px rgba(0,0,0,0.6); }

/* Ensure enlarged images are centered and aligned */
.lightbox-content img, .modal-slide img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* Make download/close buttons slightly spaced from browser fullscreen control edges */
.btn.position-absolute.top-0.start-0.m-3 { left: 12px !important; top: 12px !important; }
.btn.position-absolute.top-0.end-0.m-3 { right: 12px !important; top: 12px !important; }

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.1; }
    100% { transform: scale(1.2); opacity: 0.2; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-particle {
    0% { 
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.3;
    }
    25% { 
        transform: translateY(-50px) translateX(20px) rotate(90deg);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(0) translateX(40px) rotate(180deg);
        opacity: 0.3;
    }
    75% { 
        transform: translateY(50px) translateX(20px) rotate(270deg);
        opacity: 0.6;
    }
    100% { 
        transform: translateY(0) translateX(0) rotate(360deg);
        opacity: 0.3;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    :root {
        --section-width: 95%;
    }
}

@media (max-width: 992px) {
    .main-slider {
        height: 380px;
    }
    
    .acronym-display {
        font-size: 2.4rem;
    }
    
    .foundation-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-width: 100%;
    }
    
    .journey-section {
        border-radius: 0;
        clip-path: none;
    }
    
    .main-slider {
        height: 300px;
    }
    
    .acronym-display {
        font-size: 2rem;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .main-slider {
        height: 250px;
    }
    
    .slide-caption {
        font-size: 0.8rem;
        padding: 10px;
    }
    
    .prev-btn, .next-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .acronym-display {
        font-size: 1.8rem;
    }
    
    .foundation-text {
        font-size: 1.2rem;
    }
    
    .full-form {
        font-size: 0.8rem;
    }
}




/* About Section - Dark Cards */
.about-section {
  padding: 5rem 0;
  background-color: var(--dark);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.card-dark {
  background-color: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  backdrop-filter: blur(10px);
}

.card-dark:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

.card-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

/* ===== Premium Footer CSS ===== */
/* Scoped with prem- prefix to prevent conflicts */
.prem-footer {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    padding-top: 40px;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.prem-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer Main Grid */
.prem-footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

/* Brand Section */
.prem-footer-brand {
    position: relative;
    z-index: 2;
}

.prem-logo-wrapper {
    position: relative;
    width: fit-content;
    margin-bottom: 20px;
}

.prem-logo {
    height: 60px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.prem-logo:hover {
    transform: scale(1.05);
}

.prem-logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 1;
    animation: prem-pulse 4s infinite alternate;
}

.prem-tagline {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    position: relative;
    padding-left: 18px;
}

.prem-tagline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #e94560, #533483);
    border-radius: 3px;
}

.prem-social-proof {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prem-trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.prem-trust-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.prem-trust-badge i {
    color: #e94560;
    font-size: 16px;
}

/* Links Section */
.prem-footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.prem-links-column {
    display: flex;
    flex-direction: column;
}

.prem-links-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 18px;
    position: relative;
    color: #fff;
}

.prem-links-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 35px;
    height: 2px;
    background: linear-gradient(to right, #e94560, #533483);
}

.prem-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prem-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 7px 0;
    position: relative;
}

.prem-link i {
    color: #e94560;
    font-size: 15px;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.prem-link::before {
    content: '';
    position: absolute;
    left: 30px;
    bottom: 0;
    width: 0;
    height: 1px;
    background: #e94560;
    transition: width 0.3s ease;
}

.prem-link:hover {
    color: #fff;
    transform: translateX(5px);
}

.prem-link:hover i {
    transform: scale(1.2);
}

.prem-link:hover::before {
    width: calc(100% - 30px);
}

/* Contact Section */
.prem-footer-contact {
    position: relative;
}

.prem-contact-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 18px;
    position: relative;
    color: #fff;
}

.prem-contact-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 35px;
    height: 2px;
    background: linear-gradient(to right, #e94560, #533483);
}

.prem-contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.prem-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
}

.prem-contact-item i {
    color: #e94560;
    font-size: 15px;
    margin-top: 3px;
}

.prem-contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.prem-call-button, .prem-whatsapp-button, .prem-email-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.prem-call-button {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.prem-whatsapp-button {
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
    color: white;
}

.prem-email-button {
    background: linear-gradient(135deg, #BB001B 0%, #E94560 100%);
    color: white;
}

.prem-call-button:hover, .prem-whatsapp-button:hover, .prem-email-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Maps Section */
.prem-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prem-maps-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.prem-map-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
}

.prem-map-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
    display: flex;
    align-items: center;
}

.prem-map-title i {
    margin-right: 8px;
    color: #e94560;
    font-size: 14px;
}

.prem-map-address {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
    line-height: 1.5;
    padding-left: 2px;
}

.prem-map-address i {
    color: #e94560;
    margin-right: 6px;
    font-size: 12px;
}

.prem-map-ratio {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
}

.prem-map-ratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Legal & Copyright */
.prem-legal-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.prem-legal-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.prem-legal-links a:hover {
    color: #e94560;
}

.prem-copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    padding-bottom: 15px;
}

.prem-credits {
    margin-top: 5px;
    font-size: 12px;
}

.prem-copyright i {
    color: #e94560;
}

/* Animations */
@keyframes prem-pulse {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 0.3;
        transform: scale(1.05);
    }
}

/* Ripple Effect for Buttons */
.prem-ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: prem-ripple 0.6s linear;
    pointer-events: none;
}

@keyframes prem-ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .prem-footer-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .prem-footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .prem-footer-brand {
        text-align: center;
        align-items: center;
    }
    
    .prem-logo-wrapper {
        margin-left: auto;
        margin-right: auto;
    }
    
    .prem-tagline {
        padding-left: 0;
        text-align: center;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .prem-tagline::before {
        display: none;
    }
    
    .prem-contact-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .prem-maps-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .prem-footer {
        padding-top: 30px;
    }
}

@media (max-width: 576px) {
    .prem-contact-buttons {
        flex-direction: column;
    }
    
    .prem-call-button, .prem-whatsapp-button, .prem-email-button {
        justify-content: center;
    }
    
    .prem-legal-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .prem-footer-main {
        gap: 25px;
    }
    
    .prem-footer-links {
        gap: 15px;
    }
}


/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .counter {
    font-size: 2.8rem;
  }
  
  .navbar-collapse {
    background-color: rgba(2, 6, 23, 0.95);
    padding: 1rem;
    margin-top: 0.5rem;
    border-radius: 8px;
  }
}

/* Add smooth scrolling to html element */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed navbar */
}

/* Improve hero overlay performance */
.hero-overlay {
  will-change: opacity; /* Hint for browser optimization */
}

/* Better focus states for accessibility */
a:focus, button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}





/* Projects Section */
.projects-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('../images/projects-bg.jpg') center/cover no-repeat;
    min-height: 55vh;
}

.project-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    transition: all 0.3s ease;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.filter-buttons .btn {
    margin: 0 5px;
    border-width: 2px;
}

/* Hide projects by default (filtering will show them) */
.projects-grid [data-category] {
    display: none;
}

.projects-grid [data-category].show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* Premangan Page Styles */

/* Force smooth scrolling behavior */
html {
    scroll-behavior: smooth !important;
}

/* Reset any conflicting styles on sections */
#facilities, 
#gallery, 
#testimonials, 
#admission {
    scroll-margin-top: 100px !important;
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Quick links button styles */
.quick-links {
    position: relative;
    z-index: 100;
}
.quick-links a {
    pointer-events: auto !important;
}


.premangan-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('../images/premangan/hero-bg.jpg') center/cover no-repeat;
    min-height: 65vh;
}

/* Facility Modal Styles */
.facility-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.facility-modal .modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.facility-modal img {
    max-width: 100%;
    max-height: 80vh;
    border: 3px solid white;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    cursor: pointer;
}

.download-btn {
    display: block;
    text-align: center;
    background: #1e40af;
    color: white;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
}


/* ===== Facilities Section ===== */
#facilities {
    background-color: #f8f9fa; /* Light gray background */
    padding: 5rem 0;
}

#facilities .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Section Header */
.facilities-header {
    text-align: center;
    margin-bottom: 3rem;
}

.facilities-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529; /* Dark gray */
    margin-bottom: 0.5rem;
}

.facilities-header p {
    font-size: 1.25rem;
    color: #495057; /* Medium gray */
    margin-bottom: 0;
}

/* Facility Cards */
.facility-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.facility-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* Facility Image */
.facility-img-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.facility-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.facility-card:hover .facility-img {
    transform: scale(1.05);
}

/* Facility Content */
.facility-body {
    padding: 1.75rem;
}

.facility-body h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.facility-body h3 i {
    margin-right: 0.75rem;
    font-size: 1.2em;
    color: #4361ee; /* Primary color */
}

.facility-features {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.facility-features li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: #495057;
    line-height: 1.5;
}

.facility-features li:before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #4361ee; /* Primary color */
    font-size: 0.9em;
}

/* View Button (Optional) */
.view-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #4361ee;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.facility-card:hover .view-btn {
    opacity: 1;
    transform: translateY(0);
}

.view-btn:hover {
    background: #4361ee;
    color: white;
}

/* Responsive Design */
@media (max-width: 992px) {
    .facility-body {
        padding: 1.5rem;
    }
    
    .facility-features li {
        padding-left: 1.5rem;
    }
}

@media (max-width: 768px) {
    #facilities {
        padding: 4rem 0;
    }
    
    .facilities-header h2 {
        font-size: 2rem;
    }
    
    .facility-img-container {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .facility-img-container {
        height: 180px;
    }
    
    .facility-body {
        padding: 1.25rem;
    }
    
    .facility-body h3 {
        font-size: 1.25rem;
    }
    
    .facility-features li {
        font-size: 0.95rem;
    }
}

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

.facility-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.facility-card:nth-child(1) { animation-delay: 0.1s; }
.facility-card:nth-child(2) { animation-delay: 0.2s; }
.facility-card:nth-child(3) { animation-delay: 0.3s; }

.admin-gallery-placeholder {
    background: rgba(255,255,255,0.1);
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 10px;
}


/* Testimonials */
.testimonial-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.testimonial-img img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

blockquote p {
    position: relative;
    font-style: italic;
    line-height: 1.6;
}

blockquote p:before,
blockquote p:after {
    content: '"';
    color: var(--primary);
    font-size: 1.5em;
    line-height: 0;
    opacity: 0.8;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    color: var(--primary);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    background-size: 60%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Admission Section */
.accordion-button {
    font-weight: 500;
    padding: 1rem 1.25rem;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.accordion-body {
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
}

/* Updated Admission Section CSS */
#admissionForm {
    grid-column: 1 / -1; /* Makes the form span all columns */
    width: 100%;
}

/* Adjust the card layout */
.card.shadow-sm:last-child { /* Targets the "Begin Admission" card */
    grid-column: 1 / -1;
    margin-top: 1rem; /* Adds spacing between forms */
}

/* Optional: Adjust form element widths if needed */
#admissionForm .col-md-6 {
    width: 48%; /* Makes the two columns fit better in full width */
    margin-right: 2%;
}

#admissionForm .col-md-6:last-child {
    margin-right: 0;
}

/* Gallery Section */
.gallery-grid {
    min-height: 300px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-upload {
    background: rgba(248,249,250,0.8);
    backdrop-filter: blur(10px);
}

/* Progress bar */
.upload-progress {
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .gallery-item {
        height: 200px;
    }
}


/* Map Section */
.map-container {
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
}

.map-container iframe {
    border: none;
}

/* Contact Info */
.contact-method {
    margin-bottom: 1rem;
}


/* ===== PREMIUM GALLERY ===== */
.gallery-section {
  padding: 4rem 0;
  background: #f8f9fa;
}

.gallery-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.gallery-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 500px; /* Adjust as needed */
}

.gallery-track img {
  min-width: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

/* Navigation Arrows */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(67, 97, 238, 0.7);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.gallery-nav:hover {
  background: #4361ee;
}

.gallery-prev {
  left: 20px;
}

.gallery-next {
  right: 20px;
}

/* Thumbnails */
.thumbnail-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
  padding: 0 10px;
}

.thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.thumbnail:hover, .thumbnail.active {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(67, 97, 238, 0.3);
}

/* Auto-rotate toggle */
.auto-rotate-toggle {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  background: rgba(255,255,255,0.8);
  padding: 5px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auto-rotate-toggle input {
  cursor: pointer;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox-image {
  max-height: 80vh;
  max-width: 90vw;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}

.lightbox-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.lightbox-download {
  background: #4361ee;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-track {
    height: 350px;
  }
  
  .gallery-nav {
    width: 40px;
    height: 40px;
  }
  
  .thumbnail {
    width: 60px;
    height: 45px;
  }
}

/* ===== Gallery Styles ===== */
/* ===== Gallery Styles ===== */
/* Rotating Set Container */
.rotating-gallery {
    position: relative;
    margin-bottom: 2rem;
}

/* Image Set Grid */
.gallery-set {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 0 auto;
    max-width: 1200px;
}

.gallery-set .gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1/1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.gallery-set img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.gallery-set .gallery-item:hover {
    transform: scale(1.03);
}

/* Navigation Arrows */
.set-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.set-nav-btn:hover {
    background: rgba(0,0,0,0.7);
}

.prev-set-btn {
    left: 15px;
}

.next-set-btn {
    right: 15px;
}

.rotating-gallery:hover .set-nav-btn {
    opacity: 1;
}

/* Premium Toggle Button */
#galleryToggleBtn {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    min-width: 200px;
}

#galleryToggleBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

#galleryToggleBtn:active {
    transform: translateY(0);
}

#galleryToggleBtn .btn-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

#galleryToggleBtn.active .btn-icon {
    transform: rotate(180deg);
}

/* Ripple Effect */
#galleryToggleBtn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

#galleryToggleBtn:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

/* Full Gallery */
.full-gallery {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.full-gallery.expanded {
    max-height: 5000px;
}

.full-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.full-gallery .gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1/1;
}

.full-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    cursor: pointer;
}

.full-gallery .gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.download-btn {
    position: absolute;
    top: 25px;
    right: 85px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 1200px) {
    .gallery-set {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-set,
    .full-gallery .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .set-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .gallery-set,
    .full-gallery .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    #galleryToggleBtn {
        min-width: 180px;
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Footer */
footer a {
    transition: all 0.2s ease;
}

footer a:hover {
    color: var(--accent) !important;
    padding-left: 3px;
}

footer iframe {
    filter: grayscale(30%) contrast(90%);
    border-radius: 4px;
}

.prem-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 1.5rem 0;
}

.prem-legal-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.prem-legal-links a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

/* Mobile Compatibility Improvements for Projects Page */
@media (max-width: 768px) {
  /* Reduce hero height and adjust text positioning */
  .projects-hero {
    min-height: 40vh !important;
    padding-top: 70px;
  }
  
  .projects-hero .container {
    padding-top: 2rem;
  }
  
  .projects-hero h1 {
    font-size: 2.2rem !important;
    margin-bottom: 0.8rem !important;
  }
  
  .projects-hero p {
    font-size: 1.1rem !important;
  }
  
  /* Adjust filter buttons for mobile */
  .filter-buttons {
    gap: 4px !important;
    padding: 0 5px !important;
    margin-bottom: 1.5rem !important;
  }
  
  .filter-buttons .btn {
    min-width: 70px !important;
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
    margin: 2px !important;
    flex: 0 0 calc(33.333% - 8px) !important;
  }
  
  /* Adjust project cards for mobile */
  .project-card {
    height: 220px !important;
    margin-bottom: 15px;
  }
  
  .project-overlay {
    padding: 1.2rem 1rem 1rem !important;
  }
  
  .project-overlay h3 {
    font-size: 1.1rem !important;
    margin-bottom: 0.4rem !important;
  }
  
  .project-overlay p {
    font-size: 0.85rem !important;
    margin-bottom: 0.8rem !important;
    line-height: 1.3;
  }
  
  .project-overlay .btn {
    padding: 4px 10px !important;
    font-size: 0.8rem !important;
  }
  
  /* Ensure proper grid layout on mobile */
  .projects-grid .col-lg-4 {
    padding: 0 8px;
  }
  
  /* Adjust spacing between sections */
  section.py-5.bg-dark {
    padding: 2rem 0 !important;
  }
}

@media (max-width: 576px) {
  /* Further adjustments for very small screens */
  .projects-hero {
    min-height: 35vh !important;
  }
  
  .projects-hero h1 {
    font-size: 1.8rem !important;
  }
  
  .projects-hero p {
    font-size: 1rem !important;
  }
  
  .filter-buttons .btn {
    min-width: 65px !important;
    font-size: 0.7rem !important;
    padding: 5px 6px !important;
    flex: 0 0 calc(50% - 8px) !important;
  }
  
  .project-card {
    height: 200px !important;
  }
  
  .project-overlay {
    padding: 1rem 0.8rem 0.8rem !important;
  }
  
  .project-overlay h3 {
    font-size: 1rem !important;
  }
  
  .project-overlay p {
    font-size: 0.8rem !important;
  }
}

/* Prevent horizontal scrolling on mobile */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}