/* ============================================================
   PPID - Stylesheet Utama (Kemenag Green Theme)
   ============================================================ */

:root {
    --primary:       #1a7b3e;
    --primary-dark:  #155d2f;
    --primary-light: #2daa57;
    --primary-pale:  #e8f5ed;
    --accent:        #f0a500;
    --text-dark:     #1e2d23;
    --text-muted:    #6c7a72;
    --border:        #d4e6da;
    --bg-light:      #f5faf7;
    --white:         #ffffff;
    --shadow-sm:     0 2px 8px rgba(26,123,62,.12);
    --shadow-md:     0 6px 24px rgba(26,123,62,.15);
    --shadow-lg:     0 12px 40px rgba(26,123,62,.18);
    --radius:        12px;
    --radius-lg:     20px;
    --transition:    all .25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background: var(--white);
}

/* ---- Header Top ----------------------------------------- */
.header-top {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    color: rgba(255,255,255,.9);
    padding: 7px 0;
    font-size: .82rem;
}

/* ---- Header Main ---------------------------------------- */
.header-main {
    background: var(--white);
    padding: 16px 0;
    border-bottom: 3px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.logo-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.logo-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.logo-inst {
    font-size: .72rem;
    color: var(--primary-light);
    font-weight: 500;
}

.btn-login-admin {
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-weight: 600;
    font-size: .82rem;
    transition: var(--transition);
    padding: 7px 14px;
}
.btn-login-admin:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

/* ---- Navbar --------------------------------------------- */
.main-navbar {
    background: linear-gradient(90deg, var(--primary), var(--primary-light)) !important;
    padding: 0;
    box-shadow: 0 4px 12px rgba(26,123,62,.25);
}

.main-navbar .navbar-nav .nav-link {
    color: rgba(255,255,255,.92) !important;
    padding: 14px 18px !important;
    font-weight: 500;
    font-size: .9rem;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.main-navbar .navbar-nav .nav-link:hover,
.main-navbar .navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,.12);
    border-bottom-color: var(--accent);
}

.main-navbar .dropdown-menu {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 8px 0;
    margin-top: 0;
    animation: dropIn .2s ease;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.main-navbar .dropdown-item {
    padding: 9px 20px;
    font-size: .88rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

.main-navbar .dropdown-item:hover {
    background: var(--primary-pale);
    color: var(--primary);
}

/* ---- Slider --------------------------------------------- */
.slider-section { position: relative; overflow: hidden; }

.carousel-item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    filter: brightness(.88);
}

.carousel-caption {
    background: linear-gradient(135deg, rgba(21,93,47,.85), rgba(26,123,62,.7));
    padding: 20px 28px;
    border-radius: var(--radius);
    bottom: 60px;
    backdrop-filter: blur(4px);
    border-left: 4px solid var(--accent);
}

.carousel-caption h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,.3);
}

/* ---- Section Wrapper ------------------------------------ */
.section-wrapper {
    padding: 70px 0;
}

.section-wrapper.bg-alt {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.section-header .divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 0 auto;
    border-radius: 2px;
}

/* ---- Stat Cards ----------------------------------------- */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary);
    transition: var(--transition);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 64px; height: 64px;
    background: var(--primary-pale);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}

.stat-card .stat-icon i {
    font-size: 1.6rem;
    color: var(--primary);
}

.stat-card .stat-number {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: .88rem;
    margin: 0;
    font-weight: 500;
}

/* ---- Instansi Cards ------------------------------------- */
.instansi-link { text-decoration: none; color: inherit; display: block; height: 100%; }

.instansi-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: var(--transition);
    height: 100%;
}

.instansi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.instansi-card .inst-logo {
    height: 70px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 12px;
}

.instansi-card .inst-icon {
    width: 60px; height: 60px;
    background: var(--primary-pale);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}

.instansi-card .inst-icon i {
    font-size: 1.4rem;
    color: var(--primary);
}

.instansi-card h5 {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

/* ---- Breadcrumb ----------------------------------------- */
.breadcrumb-section {
    background: var(--primary-pale);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.breadcrumb {
    margin: 0;
    background: transparent;
}

.breadcrumb-item a { color: var(--primary); text-decoration: none; font-weight: 500; }
.breadcrumb-item.active { color: var(--text-muted); }

/* ---- Content Page --------------------------------------- */
.content-section { padding: 50px 0; }

.content-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary);
}

.content-card h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.content-card h3, .content-card h4 {
    color: var(--primary);
    margin: 20px 0 10px;
}

.content-body ul, .content-body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

/* ---- File Download -------------------------------------- */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.file-item:hover { background: var(--primary-pale); border-color: var(--primary); }

.file-item .file-icon { font-size: 1.8rem; color: #e74c3c; margin-right: 14px; }

.file-info h6 { margin: 0; font-weight: 600; color: var(--text-dark); }
.file-info small { color: var(--text-muted); }

.btn-download {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-download:hover { background: var(--primary-dark); color: #fff; }

/* ---- Regulasi Table ------------------------------------- */
.regulasi-wrap {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.regulasi-wrap thead {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    color: #fff;
}

.regulasi-wrap thead th { font-weight: 600; border: none; padding: 14px 16px; }
.regulasi-wrap tbody tr:hover { background: var(--primary-pale); }

/* ---- Footer --------------------------------------------- */
.site-footer {
    background: linear-gradient(160deg, var(--primary-dark) 0%, #0d3d1f 100%);
    color: rgba(255,255,255,.85);
    padding: 50px 0 0;
    margin-top: 70px;
}

.site-footer h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 18px;
    font-size: 1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255,255,255,.15);
}

.site-footer p, .site-footer li, .site-footer a {
    color: rgba(255,255,255,.8);
    font-size: .88rem;
    text-decoration: none;
}

.site-footer a:hover { color: var(--accent); }

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    margin-right: 8px;
    font-size: .95rem;
    transition: var(--transition);
}

.footer-social a:hover { background: var(--accent); color: #fff !important; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: 30px;
    padding: 16px 0;
    text-align: center;
    font-size: .82rem;
    color: rgba(255,255,255,.6);
}

/* ---- Buttons -------------------------------------------- */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 22px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(26,123,62,.3);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(26,123,62,.4);
}

/* ---- Admin Panel ---------------------------------------- */
.admin-topbar {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
}

.admin-topbar a { color: rgba(255,255,255,.9); }

.admin-sidebar {
    background: #fff;
    min-height: calc(100vh - 60px);
    border-right: 1px solid var(--border);
    padding: 20px 0;
}

.admin-sidebar .nav-link {
    color: var(--text-dark);
    padding: 11px 20px;
    border-radius: 8px;
    margin: 3px 10px;
    font-weight: 500;
    font-size: .88rem;
    transition: var(--transition);
}

.admin-sidebar .nav-link i { width: 22px; margin-right: 8px; }

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: var(--primary);
    color: #fff;
}

.admin-content { padding: 28px; background: var(--bg-light); min-height: calc(100vh - 60px); }

.card-stat {
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
}

.card-stat h3 { color: var(--primary); font-weight: 700; font-size: 1.8rem; }


/* ---- Halaman Permohonan Publik ----------------------------- */
.permohonan-tab-active {
    background: var(--primary) !important;
    color: #fff !important;
}

.status-timeline-step {
    flex: 1;
    text-align: center;
}

.status-timeline-step .step-circle {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px;
    font-size: .9rem;
    transition: var(--transition);
}

.step-circle.done   { background: var(--primary); color: #fff; }
.step-circle.pending{ background: var(--primary-pale); color: #aaa; }

.timeline-line {
    flex: 1;
    height: 2px;
    margin-bottom: 28px;
    transition: var(--transition);
}

/* Print styles */
@media print {
    .main-navbar, .header-top, .site-footer,
    .breadcrumb-section, .btn, .alert,
    form, .nav { display: none !important; }
}

/* ---- Responsive ----------------------------------------- */
@media (max-width: 768px) {
    .carousel-item img { height: 240px; }
    .carousel-caption { bottom: 20px; padding: 12px 16px; }
    .carousel-caption h3 { font-size: 1rem; }
    .section-wrapper { padding: 45px 0; }
    .content-card { padding: 22px; }
    .stat-card .stat-number { font-size: 1.8rem; }
    .logo-title { font-size: 1.3rem; }
}

@media (max-width: 576px) {
    .header-top { font-size: .75rem; }
    .section-header h2 { font-size: 1.4rem; }
}


/* ---- Logo Custom (upload) ----------------------------- */
.logo-img-custom {
    height: 60px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .logo-img-custom { height: 44px; }
}

/* ---- Submenu Card --------------------------------------- */
.submenu-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}
.submenu-card:hover {
    border-color: var(--primary);
    background: var(--primary-pale);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.submenu-card .submenu-icon {
    width: 56px; height: 56px;
    background: var(--primary-pale);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
}
.submenu-card .submenu-icon i {
    font-size: 1.3rem;
    color: var(--primary);
}
.submenu-card h5 {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 6px;
}

/* ---- Utilities ------------------------------------------ */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom   { background: var(--primary) !important; }
.border-primary-custom { border-color: var(--primary) !important; }

.rounded-custom { border-radius: var(--radius) !important; }
.shadow-custom  { box-shadow: var(--shadow-sm) !important; }

/* Alert override */
.alert-success { border-left: 4px solid #27ae60; }
.alert-danger  { border-left: 4px solid #e74c3c; }
.alert-warning { border-left: 4px solid var(--accent); }
.alert-info    { border-left: 4px solid #3498db; }
