/* Pramuka — tema halaman publik */
:root {
    --pub-primary: #5e2750;
    --pub-primary-dark: #451c3b;
    --pub-primary-light: #7a3a68;
    --pub-accent: #f4d03f;
    --pub-bg: #f3f5f8;
    --pub-surface: #ffffff;
    --pub-text: #2b2f36;
    --pub-muted: #6c757d;
    --pub-border: rgba(15, 23, 42, 0.08);
    --pub-shadow: 0 8px 30px rgba(30, 20, 40, 0.08);
    --pub-radius: 14px;
    --pub-font-head: 'Poppins', sans-serif;
    --pub-font-body: 'Inter', sans-serif;
    --pub-nav-h: 72px;
}

* { box-sizing: border-box; }

body.public-site {
    font-family: var(--pub-font-body);
    background: var(--pub-bg);
    color: var(--pub-text);
    padding-top: var(--pub-nav-h);
    line-height: 1.6;
}

body.public-site h1,
body.public-site h2,
body.public-site h3,
body.public-site h4,
body.public-site h5,
body.public-site h6,
body.public-site .btn,
body.public-site .navbar-brand {
    font-family: var(--pub-font-head);
}

/* --- Navbar --- */
.pub-navbar {
    height: var(--pub-nav-h);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--pub-border);
    transition: box-shadow 0.25s ease, background 0.25s ease;
    z-index: 1030;
}

.pub-navbar.scrolled {
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.pub-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--pub-primary) !important;
    max-width: min(280px, 55vw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pub-navbar .brand-logo {
    height: 42px;
    width: 42px;
    object-fit: contain;
}

.pub-navbar .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--pub-text) !important;
    padding: 0.45rem 0.75rem !important;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.pub-navbar .nav-link:hover,
.pub-navbar .nav-link.active {
    color: var(--pub-primary) !important;
    background: rgba(94, 39, 80, 0.07);
}

.pub-btn-login {
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-primary-light));
    border: none;
    color: #fff !important;
    font-weight: 600;
    padding: 0.45rem 1.1rem !important;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(94, 39, 80, 0.25);
}

.pub-btn-login:hover {
    background: linear-gradient(135deg, var(--pub-primary-dark), var(--pub-primary));
    color: #fff !important;
    transform: translateY(-1px);
}

/* --- Hero (dalam kolom tengah, bukan full-width) --- */
.pub-hero--contained {
    position: relative;
    margin: 0 0 1.25rem;
    border-radius: var(--pub-radius);
    overflow: hidden;
    border: 1px solid var(--pub-border);
    box-shadow: var(--pub-shadow);
}

.pub-hero--contained .carousel-item {
    min-height: 0;
}

.pub-hero--contained .carousel-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    filter: brightness(0.58);
}

.pub-hero--contained .carousel-caption {
    bottom: 0;
    left: 0;
    right: 0;
    text-align: left;
    padding: 1.25rem 1.35rem 1.5rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.78) 100%);
}

.pub-hero .hero-kicker {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pub-accent);
    margin-bottom: 0.35rem;
}

.pub-hero .hero-title {
    font-size: clamp(1.15rem, 2.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    max-width: none;
}

.pub-hero .hero-lead {
    font-size: 0.88rem;
    opacity: 0.92;
    margin: 0.35rem 0 0;
    max-width: none;
}

.pub-hero--page.pub-hero--contained {
    background: linear-gradient(135deg, var(--pub-primary-dark) 0%, var(--pub-primary) 55%, #8b4a75 100%);
    color: #fff;
    padding: 1.35rem 1.5rem;
    min-height: 0;
    margin-top: 0;
}

.pub-hero--page .hero-breadcrumb {
    font-size: 0.78rem;
    opacity: 0.88;
    margin-bottom: 0.4rem;
}

.pub-hero--page .hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
}

.pub-hero--page .hero-lead {
    font-size: 0.88rem;
    opacity: 0.9;
}

/* --- 3 kolom: kiri | tengah | kanan --- */
.pub-shell {
    padding: 1.25rem 0 2.5rem;
}

.pub-container {
    max-width: 1400px;
}

@media (min-width: 992px) {
    .pub-col--main {
        background: var(--pub-surface);
        border: 1px solid var(--pub-border);
        border-radius: calc(var(--pub-radius) + 2px);
        box-shadow: var(--pub-shadow);
        padding: 1.15rem 1.15rem 1.35rem;
    }

    .pub-col--side .pub-widget {
        margin-bottom: 1rem;
    }
}

@media (max-width: 991.98px) {
    .pub-col--main {
        background: var(--pub-surface);
        border: 1px solid var(--pub-border);
        border-radius: var(--pub-radius);
        padding: 1rem;
        margin-bottom: 0.5rem;
    }

    .pub-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .pub-sidebar .pub-widget {
        margin-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .pub-sidebar {
        grid-template-columns: 1fr;
    }
}

.pub-sidebar {
    position: sticky;
    top: calc(var(--pub-nav-h) + 0.75rem);
}

.pub-widget--cta {
    background: linear-gradient(145deg, var(--pub-primary-dark), var(--pub-primary));
    color: #fff;
    border: none;
}

.pub-widget--cta .pub-widget__head {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.pub-widget--cta .pub-widget__body {
    color: rgba(255, 255, 255, 0.92);
}

.pub-info-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 0.65rem;
    line-height: 1.4;
}

.pub-info-row i {
    color: var(--pub-primary);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.pub-mini-galeri {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
}

.pub-mini-galeri img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.pub-quote {
    font-size: 0.78rem;
    font-style: italic;
    color: var(--pub-muted);
    border-left: 3px solid var(--pub-primary);
    padding-left: 0.65rem;
    margin: 0;
}

.pub-widget {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    box-shadow: var(--pub-shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.pub-widget__head {
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pub-primary);
    background: linear-gradient(90deg, rgba(94, 39, 80, 0.08), transparent);
    border-bottom: 1px solid var(--pub-border);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pub-widget__body { padding: 1rem; }

.pub-widget__body--flush { padding: 0; }

.pub-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    text-align: center;
}

.pub-stat {
    background: rgba(94, 39, 80, 0.05);
    border-radius: 10px;
    padding: 0.65rem 0.35rem;
}

.pub-stat strong {
    display: block;
    font-size: 1.1rem;
    color: var(--pub-primary);
    line-height: 1.2;
}

.pub-stat span {
    font-size: 0.68rem;
    color: var(--pub-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pub-list-item {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--pub-border);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.pub-list-item:last-child { border-bottom: none; }

.pub-list-item:hover { background: rgba(94, 39, 80, 0.04); }

.pub-list-item img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.pub-list-item .title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pub-list-item .meta {
    font-size: 0.72rem;
    color: var(--pub-muted);
    margin-top: 0.15rem;
}

.pub-quick-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0;
    font-size: 0.88rem;
    color: var(--pub-text);
    text-decoration: none;
    border-bottom: 1px dashed var(--pub-border);
}

.pub-quick-link:last-child { border-bottom: none; }

.pub-quick-link i { color: var(--pub-primary); }

.pub-quick-link:hover { color: var(--pub-primary); }

/* --- Main content --- */
.pub-main { min-width: 0; }

.pub-section {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 1.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--pub-border);
}

.pub-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

@media (min-width: 992px) {
    .pub-col--main .pub-section {
        padding: 0.25rem 0.35rem 1.5rem;
    }
}

.pub-section__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pub-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.65rem;
    border-bottom: 3px solid rgba(94, 39, 80, 0.15);
    position: relative;
}

.pub-section__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 56px;
    height: 3px;
    background: var(--pub-primary);
}

.pub-card {
    border: 1px solid var(--pub-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.pub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    color: inherit;
}

.pub-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.pub-card .body { padding: 1rem; flex-grow: 1; }

.pub-card .title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pub-galeri-thumb {
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
    border-radius: 10px;
    transition: transform 0.2s;
}

.pub-galeri-link:hover .pub-galeri-thumb { transform: scale(1.03); }

.pub-jadwal-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--pub-border);
}

.pub-jadwal-item:last-child { border-bottom: none; }

.pub-jadwal-date {
    flex-shrink: 0;
    width: 52px;
    text-align: center;
    background: rgba(94, 39, 80, 0.08);
    border-radius: 10px;
    padding: 0.35rem 0.25rem;
    line-height: 1.1;
}

.pub-jadwal-date .day {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--pub-primary);
    display: block;
}

.pub-jadwal-date .mon {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--pub-muted);
}

.pub-pancasila-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.pub-sila {
    text-align: center;
    padding: 1rem 0.75rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(94, 39, 80, 0.06), transparent);
    border: 1px solid var(--pub-border);
}

.pub-sila .num {
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    background: var(--pub-primary);
    color: #fff;
    font-weight: 700;
    margin: 0 auto 0.5rem;
    font-size: 0.9rem;
}

.pub-sila p {
    font-size: 0.78rem;
    margin: 0;
    font-weight: 500;
}

/* --- Article (berita detail) --- */
.pub-article-cover {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: var(--pub-radius);
    margin-bottom: 1.25rem;
}

.pub-article-meta {
    font-size: 0.85rem;
    color: var(--pub-muted);
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--pub-border);
}

.pub-article-body img { max-width: 100%; height: auto; border-radius: 8px; }

.pub-article-body { font-size: 1rem; line-height: 1.75; }

/* --- Footer --- */
.pub-footer {
    background: linear-gradient(180deg, #1a1d24 0%, #12141a 100%);
    color: #adb5bd;
    padding: 3rem 0 1.5rem;
    margin-top: 1rem;
}

.pub-footer h5,
.pub-footer h6 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pub-footer a {
    color: #ced4da;
    text-decoration: none;
    font-size: 0.9rem;
}

.pub-footer a:hover { color: var(--pub-accent); }

.pub-footer .footer-brand img { max-height: 56px; margin-bottom: 0.75rem; }

.pub-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 2rem;
    padding-top: 1.25rem;
    font-size: 0.82rem;
    text-align: center;
}

.pub-social a {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    margin-right: 0.5rem;
    transition: background 0.2s;
}

.pub-social a:hover { background: var(--pub-primary); }

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .pub-sidebar { position: static; }
}

@media (max-width: 767.98px) {
    :root { --pub-nav-h: 64px; }
    .pub-hero--contained .carousel-item img { height: 200px; }
    .pub-stat-grid { grid-template-columns: 1fr 1fr; }
}
