/* ============================================
   Dinas Perhubungan Kab. Sumba Tengah
   Premium Government Website Theme
   ============================================ */

:root {
    --primary: #1a237e;
    --primary-dark: #0d1452;
    --primary-light: #283593;
    --gold: #c9a84c;
    --gold-light: #d4b96a;
    --gold-dark: #a88a2e;
    --white: #ffffff;
    --light: #f5f6fa;
    --gray: #6c757d;
    --dark: #212529;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* ---- TOP BAR ---- */
.top-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
}
.top-bar a { color: var(--gold); }
.top-bar a:hover { color: var(--gold-light); }
.top-bar .social-links a { margin-left: 12px; font-size: 1rem; }

/* ---- NAVBAR ---- */
.navbar-main {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 0;
    transition: var(--transition);
    z-index: 1050;
}
.navbar-main.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.navbar-main .navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}
.navbar-main .navbar-brand img {
    height: 50px;
    width: auto;
}
.navbar-main .brand-text {
    line-height: 1.2;
}
.navbar-main .brand-text .brand-title {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.navbar-main .brand-text .brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.navbar-main .nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    padding: 20px 16px !important;
    font-size: 0.9rem;
    position: relative;
    transition: var(--transition);
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
    color: var(--primary) !important;
}
.navbar-main .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gold);
    transition: var(--transition);
    border-radius: 2px;
}
.navbar-main .nav-link:hover::after,
.navbar-main .nav-link.active::after {
    width: 60%;
}
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 10px;
    border-top: 3px solid var(--gold);
}
.dropdown-item {
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    transition: var(--transition);
}
.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
    padding-left: 20px;
}

/* ---- HERO ---- */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../img/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.2;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%23ffffff' d='M0,50 C360,100 1080,0 1440,50 L1440,100 L0,100 Z'/%3E%3C/svg%3E") center/cover no-repeat;
}
.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}
.hero-content .badge-hero {
    background: rgba(201,168,76,0.2);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}
.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}
.hero-content h1 span { color: var(--gold); }
.hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin-bottom: 30px;
}
.hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}
.hero-stat-item {
    text-align: center;
    padding: 20px 30px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
}
.hero-stat-item .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
}
.hero-stat-item .stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- BUTTONS ---- */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(201,168,76,0.4);
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(201,168,76,0.5);
    color: var(--white);
}
.btn-outline-gold {
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    background: transparent;
    transition: var(--transition);
}
.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--white);
}
.btn-primary-custom {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-primary-custom:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
}

/* ---- SECTIONS ---- */
.section-padding { padding: 80px 0; }
.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title .subtitle {
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 10px;
}
.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}
.section-title .divider {
    width: 60px;
    height: 4px;
    background: var(--gold);
    margin: 15px auto 0;
    border-radius: 2px;
}
.bg-light-custom { background: var(--light); }
.bg-primary-custom { background: var(--primary); }

/* ---- SAMBUTAN ---- */
.sambutan-section .sambutan-img {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.sambutan-section .sambutan-img img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}
.sambutan-section .sambutan-img .img-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(26,35,126,0.9));
    padding: 30px 20px 20px;
    color: var(--white);
}
.sambutan-section .sambutan-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray);
}
.sambutan-section .sambutan-text .quote-icon {
    font-size: 3rem;
    color: var(--gold);
    opacity: 0.3;
}

/* ---- LAYANAN CARDS ---- */
.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
    height: 100%;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}
.service-card .service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--gold);
    transition: var(--transition);
}
.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    transform: scale(1.1);
}
.service-card h5 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}
.service-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ---- BERITA CARDS ---- */
.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.news-card .news-img {
    height: 200px;
    overflow: hidden;
}
.news-card .news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.news-card:hover .news-img img {
    transform: scale(1.1);
}
.news-card .news-body {
    padding: 20px;
}
.news-card .news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 10px;
}
.news-card .news-meta i { color: var(--gold); }
.news-card h5 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card h5:hover { color: var(--primary); }
.news-card p {
    color: var(--gray);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- STATISTIK ---- */
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid var(--gold);
}
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.stat-card .stat-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}
.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}
.stat-card .stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ---- GALERI ---- */
.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item .gallery-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent 40%, rgba(26,35,126,0.8));
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item .gallery-overlay h6 { color: var(--white); font-weight: 600; }

/* ---- FOOTER ---- */
.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 0;
}
.footer h5 {
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
}
.footer p, .footer li { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer a { color: rgba(255,255,255,0.7); transition: var(--transition); }
.footer a:hover { color: var(--gold); padding-left: 5px; }
.footer ul { list-style: none; padding: 0; }
.footer ul li { padding: 5px 0; }
.footer ul li i { color: var(--gold); margin-right: 8px; width: 20px; }
.footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 0.85rem;
}
.footer .footer-bottom span { color: var(--gold); }

/* ---- BACK TO TOP ---- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--gold);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(201,168,76,0.4);
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); background: var(--gold-dark); }

/* ---- PAGE HEADER ---- */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 120px 0 60px;
    text-align: center;
    color: var(--white);
    position: relative;
}
.page-header::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23ffffff' d='M0,30 C360,60 1080,0 1440,30 L1440,60 L0,60 Z'/%3E%3C/svg%3E") center/cover no-repeat;
}
.page-header h1 { font-size: 2.5rem; font-weight: 800; }
.page-header .breadcrumb {
    justify-content: center;
    background: none;
    margin-top: 10px;
}
.page-header .breadcrumb-item a { color: var(--gold); }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,0.7); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* ---- FORMS ---- */
.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(201,168,76,0.25);
}
.form-floating label { color: var(--gray); }

/* ---- PAGINATION ---- */
.pagination .page-link {
    color: var(--primary);
    border-radius: 8px;
    margin: 0 3px;
    border: none;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    color: var(--white);
}

/* ---- ANIMATIONS ---- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 991px) {
    .hero-content h1 { font-size: 2rem; }
    .hero-stats { flex-wrap: wrap; gap: 15px; }
    .hero-stat-item { padding: 15px 20px; }
    .navbar-main .nav-link { padding: 10px 16px !important; }
    .navbar-main .nav-link::after { display: none; }
}
@media (max-width: 767px) {
    .hero-section { min-height: 70vh; }
    .hero-content h1 { font-size: 1.6rem; }
    .section-padding { padding: 50px 0; }
    .section-title h2 { font-size: 1.6rem; }
    .hero-stats { justify-content: center; }
}

/* ---- DETAIL PAGE ---- */
.detail-content { line-height: 1.9; font-size: 1rem; }
.detail-content img { border-radius: var(--radius); margin: 20px 0; }
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.sidebar-widget h5 {
    font-weight: 700;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
    margin-bottom: 15px;
}

/* ---- SEARCH ---- */
.search-box {
    position: relative;
    max-width: 400px;
}
.search-box input {
    border-radius: 50px;
    padding: 10px 20px;
    padding-right: 45px;
    border: 2px solid #eee;
}
.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

/* ---- LOADING ---- */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.loading-overlay.hide { opacity: 0; pointer-events: none; }
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- PENGADUAN STATUS ---- */
.status-badge { padding: 5px 15px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; }
.status-masuk { background: #fff3cd; color: #856404; }
.status-diproses { background: #cce5ff; color: #004085; }
.status-selesai { background: #d4edda; color: #155724; }
.status-ditolak { background: #f8d7da; color: #721c24; }

/* ---- STRUKTUR ORGANISASI ---- */
.org-card {
    text-align: center;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
}
.org-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.org-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--gold);
    margin-bottom: 15px;
}
.org-card h6 { font-weight: 700; color: var(--primary); }
.org-card small { color: var(--gray); }
