/* Dark Theme Gallery Styles */
#gallery {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.gallery-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.1;
    transition: all 0.5s ease;
    animation: float 15s infinite ease-in-out;
}

.bg-circle.circle-1 {
    width: 300px;
    height: 300px;
    background: #a56cff;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.bg-circle.circle-2 {
    width: 400px;
    height: 400px;
    background: #5d9dff;
    bottom: 10%;
    right: 5%;
    animation-delay: 3s;
}

.bg-circle.circle-3 {
    width: 200px;
    height: 200px;
    background: #ec4899;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 6s;
}

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

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

.gallery-item:hover::after {
    background: rgba(0,0,0,0.1);
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

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

/* Set Navigation Buttons */
.set-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(212, 175, 55, 0.7);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
    color: #0f172a;
    transition: all 0.3s ease;
    opacity: 0;
}

.set-nav-btn:hover {
    background: var(--prem-gold);
    transform: translateY(-50%) scale(1.1);
}

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

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

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

/* Full Gallery Modal Dark Theme */
#fullGalleryModal .modal-content {
    background: #0f172a;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

#fullGalleryModal .modal-header,
#fullGalleryModal .modal-footer {
    border-color: rgba(255,255,255,0.1);
}

#fullGalleryModal .gallery-item {
    height: 200px;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-20px) translateX(20px);
    }
}

/* Particle Background for About Section */
#about-premangan {
    position: relative;
    overflow: hidden;
    background: #000;
    z-index: 1;
}

.particle-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.8;
}

/* Add this if you want the content to stand out more */
#about-premangan .container {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 15px;
}

#about-premangan h2,
#about-premangan p,
#about-premangan li {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Mobile Compatibility Improvements */
@media (max-width: 768px) {
  /* Facilities Section Improvements */
  #facilities .facility-card {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  #facilities .facility-img-container {
    height: 200px;
    overflow: hidden;
  }
  
  #facilities .facility-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }
  
  #facilities .facility-card:hover .facility-img {
    transform: scale(1.05);
  }
  
  #facilities .facility-body {
    padding: 1.25rem;
  }
  
  #facilities .facility-body h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  
  #facilities .facility-features {
    padding-left: 1rem;
    margin-bottom: 0;
  }
  
  #facilities .facility-features li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  #facilities .facility-features li:last-child {
    margin-bottom: 0;
  }
  
  /* Testimonials Section Improvements */
  #testimonials-fixed {
    padding: 2rem 0 !important;
  }
  
  #testimonials-fixed .testimonial-carousel {
    padding: 0 15px;
  }
  
  #testimonials-fixed .testimonial-card {
    padding: 0.5rem !important;
  }
  
  #testimonials-fixed .testimonial-card > div {
    padding: 1.5rem !important;
  }
  
  #testimonials-fixed blockquote {
    font-size: 1rem !important;
    margin: 1rem 0 !important;
    line-height: 1.6;
  }
  
  #testimonials-fixed img {
    width: 80px !important;
    height: 80px !important;
  }
  
  #testimonials-fixed .carousel-prev,
  #testimonials-fixed .carousel-next {
    width: 35px !important;
    height: 35px !important;
    font-size: 0.8rem;
  }
  
  #testimonials-fixed .carousel-prev {
    left: 5px !important;
  }
  
  #testimonials-fixed .carousel-next {
    right: 5px !important;
  }
  
  /* Admission Section Improvements */
  #admission .accordion-button {
    padding: 0.75rem;
    font-size: 0.95rem;
  }
  
  #admission .badge {
    font-size: 0.7rem;
    padding: 0.35em 0.65em;
  }
  
  #admission .card {
    margin-top: 1.5rem;
  }
  
  /* Gallery Improvements for Mobile */
  .gallery-set {
    margin: 0 -5px;
  }
  
  .gallery-set .gallery-item {
    padding: 5px;
  }
  
  .set-nav-btn {
    width: 40px !important;
    height: 40px !important;
    opacity: 0.8 !important;
  }
  
  /* Text size adjustments for mobile */
  #about-premangan h2 {
    font-size: 1.8rem;
  }
  
  #about-premangan .lead {
    font-size: 1.1rem;
  }
  
  #facilities h2.display-5 {
    font-size: 1.8rem;
  }
  
  #facilities .lead.text-muted {
    font-size: 1.1rem;
  }
}

/* Additional improvements for very small devices */
@media (max-width: 576px) {
  #facilities .facility-img-container {
    height: 180px;
  }
  
  #testimonials-fixed h2 {
    font-size: 1.75rem !important;
  }
  
  #testimonials-fixed > div > p {
    font-size: 1.1rem !important;
  }
  
  #testimonials-fixed blockquote {
    font-size: 0.95rem !important;
  }
  
  .prem-footer-main {
    flex-direction: column;
  }
  
  .prem-footer-links {
    flex-direction: column;
    margin: 1.5rem 0;
  }
  
  .prem-links-column {
    margin-bottom: 1.5rem;
  }
}

/* Fix for iOS Safari specific issues */
@supports (-webkit-touch-callout: none) {
  .facility-card {
    -webkit-transform: translateZ(0);
  }
  
  .testimonial-card > div {
    -webkit-backface-visibility: hidden;
  }
}

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