/* Admin Styles */
.sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    z-index: 1000;
}
.main-content {
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
    overflow-x: auto;
    box-sizing: border-box;
    flex-grow: 1;
}
.nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 2px 15px;
    transition: all 0.3s;
}
.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-link i {
    width: 20px;
    text-align: center;
}
/* General Styles */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 80px; /* Adjust if navbar height changes */
    box-sizing: border-box;
    /* Removed: margin-left: 250px;  This caused public pages to shift right */
}

a {
    color: var(--bs-primary);
    text-decoration: none;
}

a:hover {
    color: var(--bs-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand img {
    max-height: 40px; /* Adjust as needed */
    margin-right: 10px;
}

.navbar-custom {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar-custom.scrolled {
    background-color: #fff !important; /* Ensure white background on scroll */
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.nav-link {
    padding: 0.8rem 1rem;
}

/* Sections */
.section-padding {
    padding: 60px 0;
}

.section-title {
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title span {
    border-bottom: 3px solid var(--bs-primary);
    padding-bottom: 5px;
}

.section-title::after {
    content: '';
    position: absolute;
    display: block;
    width: 60px;
    height: 3px;
    background: var(--bs-primary);
    bottom: 0;
    left: calc(50% - 30px);
}

/* Hero Section (from index.php, can be generalized or kept specific) */
.hero-slider .swiper-slide {
    height: calc(100vh - 80px); /* Full viewport height minus navbar */
    min-height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-slider .slide-content {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 30px;
    border-radius: 10px;
    max-width: 700px;
}

.hero-slider .slide-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero-slider .slide-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Statistics Section (from index.php) */
.stats-card {
    background-color: #f8f9fa;
    border: none;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.1);
}

.stats-card .icon {
    font-size: 2.5rem;
    color: var(--bs-primary);
    margin-bottom: 15px;
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
}

/* Homepage stat cards override to improve contrast */
.stat-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  transition: transform .25s ease, box-shadow .25s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}
.stat-card .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-right: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.stat-card h3 {
  color: #111;
}
.stat-card p {
  color: #6c757d;
}
/* News Card (from index.php and public/berita.php) */
.news-card, .news-public-card {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover, .news-public-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15)!important;
}

.news-card .card-img-top, .news-public-card .card-img-top {
    border-bottom: 1px solid #eee;
}

.news-card .card-title, .news-public-card .card-title {
    font-size: 1.15rem;
}

.news-public-card .card-title a:hover {
    color: var(--bs-primary) !important;
}

/* Gallery (from index.php and public/galeri.php) */
.gallery-container-masonry .gallery-item-masonry img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-container-masonry .gallery-item-masonry a:hover img {
    transform: scale(1.05);
    filter: brightness(0.8);
}

.gallery-public-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-public-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15)!important;
}

/* Footer */
footer a:hover {
    color: #adb5bd !important;
    text-decoration: none;
}

/* Utility Classes */
.fw-medium {
    font-weight: 500 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    body {
        padding-top: 70px; /* Adjust if navbar height changes on mobile */
    }
    .hero-slider .swiper-slide {
        height: auto;
        min-height: 400px;
        padding: 40px 0;
    }
    .hero-slider .slide-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .section-title {
        font-size: 1.8rem;
    }
    .stats-card h3 {
        font-size: 1.8rem;
    }
}


/* Adjust when using fixed-top navbar from includes/header.php */
body.navbar-fixed {
    padding-top: 70px; /* approximate navbar height */
}

/* Ensure hero slide content not clipped */
.hero-slider {
    overflow: hidden;
}
.hero-slider .slide-content {
    overflow: visible;
}