/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #009688; /* Teal */
    --primary-dark: #00796b; /* Darker Teal */
    --primary-light: rgba(0, 150, 136, 0.1);
    --secondary-color: #f8f9fa;
    --text-dark: #333;
    --text-muted: #6c757d;
    --border-color: #e0e0e0;
}

body {
    font-family: "Inter", sans-serif;
    background-color: #f4f6f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
#top {
    background: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    padding: 4px 0;
}
#top a {
    color: white;
    transition: 0.3s;
}
#top a:hover {
    text-decoration: underline;
}

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0;
}

.navbar-brand img {
    height: 65px;
    transition: all 0.3s;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem !important;
    transition: color 0.3s;
}
.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Mega Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 10px;
}
.megamenu h5 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 15px;
}
.megamenu a {
    color: var(--text-muted);
    padding: 5px 0;
    display: block;
    font-size: 0.9rem;
}
.megamenu a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* =========================================
   3. SIDEBAR COMPONENT
   ========================================= */
.sidebar-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    background-color: #fff;
    overflow: hidden;
    margin-bottom: 20px;
}

.sidebar-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    font-weight: 600;
}

.sidebar-group-title {
    color: #8a8a8a;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px 20px 5px;
}

.profile-link {
    display: block;
    padding: 10px 20px;
    color: var(--text-muted);
    border-left: 3px solid transparent;
    transition: all 0.25s ease;
    font-size: 0.95rem;
}
.profile-link i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    color: #889997;
}
.profile-link:hover,
.profile-link.active {
    background-color: #d1f2eb; /* Mint */
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}
.profile-link:hover i,
.profile-link.active i {
    color: var(--primary-color);
}

/* Sidebar Links (News Widget) */
.sidebar-link {
    color: var(--text-dark);
    transition: 0.2s;
}
.sidebar-link:hover {
    color: var(--primary-color);
    padding-left: 5px;
}
.sidebar-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =========================================
   4. GENERAL UI COMPONENTS
   ========================================= */
/* Content Cards (Main Containers) */
.content-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    padding: 40px;
    height: 100%;
}

/* Typography */
.article-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #4a5568;
    text-align: justify;
}
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--text-dark);
}
.section-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    margin: 8px auto 0;
    border-radius: 2px;
}
h3.page-title {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--primary-color);
    padding-left: 1rem;
}

/* Images & Captions */
.figure-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
    display: inline-block;
}

/* Cards (Contact & Info) */
.contact-card {
    border: none;
    border-radius: 8px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: transform 0.2s;
}
.contact-card:hover {
    transform: translateY(-3px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 15px;
}

.hover-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
}
.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    margin-bottom: 15px;
}

/* Accordion (FAQ) */
.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: var(--primary-light);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
}
.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 150, 136, 0.25);
}
.accordion-item {
    border-radius: 8px !important;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.accordion-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Tables */
.table-custom thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 500;
    vertical-align: middle;
    text-align: center;
}
.table-custom tbody td {
    vertical-align: middle;
    font-size: 0.9rem;
}
.table-custom tbody tr:hover {
    background-color: var(--primary-light);
}
.table-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}
.table-list {
    padding-left: 15px;
    margin-bottom: 0;
}

/* =========================================
   5. PAGE SPECIFIC STYLES
   ========================================= */
/* Banner / Landing Page */
.banner-wrapper {
    position: relative;
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.banner-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.owl-prev,
.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(4px);
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 16px;
    transition: 0.3s;
    opacity: 0;
}
.banner-wrapper:hover .owl-prev,
.banner-wrapper:hover .owl-next {
    opacity: 1;
}
.owl-prev:hover,
.owl-next:hover {
    background: var(--primary-color) !important;
    transform: translateY(-50%) scale(1.1);
}
.owl-prev {
    left: 15px;
}
.owl-next {
    right: 15px;
}

/* Lists (Scope, Documents) */
.custom-list-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
}
.custom-list-item::before {
    content: "\f00c"; /* FontAwesome Check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary-color);
    font-size: 14px;
}

.scope-list {
    padding-left: 0;
    list-style: none;
}
.scope-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 12px;
    background-color: #f8f9fa;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.scope-item:hover {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateX(5px);
}
.scope-badge {
    min-width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 150, 136, 0.3);
}
.scope-text {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 500;
}

.doc-list-item {
    border: 1px solid #eef0f3;
    border-left: 4px solid transparent;
    margin-bottom: 10px;
    border-radius: 8px !important;
    transition: all 0.3s ease;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    text-decoration: none !important;
    background: #fff;
}
.doc-list-item:hover {
    border-left-color: var(--primary-color);
    background-color: #fcfcfc;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateX(5px);
}
.doc-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #cbd5e0;
    margin-right: 20px;
    min-width: 30px;
}
.doc-content h6 {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 5px;
    font-weight: 500;
}
.doc-list-item:hover .doc-content h6 {
    color: var(--primary-color);
}
.doc-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.doc-icon {
    margin-left: auto;
    color: #cbd5e0;
    align-self: center;
}
.doc-list-item:hover .doc-icon {
    color: var(--primary-color);
}

/* Goal Box (Tujuan) */
.goal-box {
    background: linear-gradient(
        to right,
        var(--primary-light),
        rgba(255, 255, 255, 0)
    );
    border-left: 5px solid var(--primary-color);
    padding: 30px;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.goal-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.8;
}
.goal-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    font-weight: 500;
}

/* Help Page (Bantuan) */
.help-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 25px;
}
.help-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}
.help-text {
    color: #6c757d;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Article Detail */
.article-card {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    padding: 40px;
    overflow: hidden;
}
.article-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.article-title {
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 25px;
}
.article-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4a5568;
    text-align: justify;
}
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 10px 0;
}

/* Gallery (Video & Foto) */
.video-card,
.photo-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    cursor: pointer;
}
.video-card:hover,
.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.thumbnail-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background: #000;
}
.thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.video-card:hover .thumbnail-wrapper img {
    opacity: 1;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.photo-wrapper {
    position: relative;
    padding-bottom: 75%; /* 4:3 */
    height: 0;
    background: #f0f0f0;
}
.photo-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.photo-card:hover .photo-wrapper img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 20px 15px 10px;
    opacity: 0;
    transition: opacity 0.3s;
}
.photo-card:hover .overlay {
    opacity: 1;
}

/* Spreadsheet Wrapper (Narahubung) */
.spreadsheet-wrapper {
    position: relative;
    padding-bottom: 100%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.spreadsheet-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Map Wrapper */
.map-container {
    position: relative;
    padding-bottom: 40%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
    margin-top: auto;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 20px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* =========================================
   7. RESPONSIVE UTILITIES
   ========================================= */
@media (min-width: 992px) {
    .megamenu {
        width: 600px;
        padding: 20px;
    }
}

@media (max-width: 991px) {
    .megamenu {
        width: 100%;
        padding: 15px;
    }
    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: 8px;
        margin-top: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }
    .navbar-brand img {
        height: 40px;
    }
    .dropdown-menu-end {
        text-align: left !important;
    }
}

@media (max-width: 576px) {
    .banner-wrapper {
        aspect-ratio: 4/3;
    }
    .map-container {
        padding-bottom: 75%;
    }
}
