/* =============================================
   Website Desa Jimbaran – Public CSS
   ============================================= */

:root {
    --primary:       #1a7a4a;
    --primary-dark:  #155f39;
    --primary-light: #e8f5ee;
    --accent:        #f59e0b;
    --text-dark:     #1a202c;
    --text-muted:    #6b7280;
    --border:        #e5e7eb;
    --radius:        12px;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
    --shadow:        0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
}

/* ---- Base ---- */
* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--text-dark);
    background: #f8fafc;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; }

img { max-width: 100%; height: auto; }

/* ---- Utilities ---- */
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.text-primary { color: var(--primary) !important; }
.bg-primary  { background-color: var(--primary) !important; }
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    padding: .5rem 1.25rem;
    transition: all .2s;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}
.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    border-radius: 8px;
    font-weight: 600;
    padding: .5rem 1.25rem;
    transition: all .2s;
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
}

/* ---- Navbar ---- */
.navbar {
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
}
.navbar-brand .fw-700 { color: var(--text-dark) !important; }
.nav-link {
    font-weight: 500;
    color: var(--text-muted) !important;
    padding: .5rem .75rem !important;
    border-radius: 8px;
    transition: all .2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background: var(--primary-light);
}
.dropdown-menu {
    border-radius: var(--radius);
    padding: .5rem;
    min-width: 200px;
}
.dropdown-item {
    border-radius: 8px;
    font-weight: 500;
    padding: .5rem .75rem;
    color: var(--text-dark);
    transition: all .15s;
}
.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }

/* ---- Hero Section ---- */
.hero-section {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(rgba(26, 122, 74, 0.6), rgba(21, 95, 57, 0.8)), url('/images/cover.jpg') center/cover no-repeat;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; color: #fff; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50px;
    padding: .35rem 1rem;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.25rem;
}

/* ---- Section Titles ---- */
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-label {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .3rem .9rem;
    border-radius: 50px;
    margin-bottom: .75rem;
}
.section-title { font-size: clamp(1.5rem, 4vw, 2rem); color: var(--text-dark); margin-bottom: .5rem; }
.section-desc { color: var(--text-muted); max-width: 520px; margin: 0 auto; }

/* ---- Cards ---- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all .25s;
    overflow: hidden;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-img-top { object-fit: cover; width: 100%; }

.news-card .card-img-top { height: 200px; }
.news-card .card-body { padding: 1.25rem; }
.news-card .card-title { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.4; }
.news-card .card-title a { color: var(--text-dark); text-decoration: none; }
.news-card .card-title a:hover { color: var(--primary); }

/* ---- Stats Bar ---- */
.stats-section { background: var(--primary); color: #fff; padding: 2.5rem 0; }
.stat-item { text-align: center; }
.stat-number { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .85rem; opacity: .85; margin-top: .25rem; }

/* ---- Official Card ---- */
.official-card { text-align: center; }
.official-card .photo {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
    margin: 0 auto 1rem;
    display: block;
}
.official-card .no-photo {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

/* ---- Badge ---- */
.badge-category {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .65rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ---- Pagination ---- */
.page-link { color: var(--primary); border-radius: 8px !important; margin: 0 2px; }
.page-item.active .page-link { background-color: var(--primary); border-color: var(--primary); }

/* ---- Forms ---- */
.form-control, .form-select {
    border-radius: 8px;
    border-color: var(--border);
    padding: .6rem .9rem;
    font-size: .9rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,122,74,.15);
}

/* ---- Footer ---- */
.footer { font-size: .875rem; }

/* ---- Page Header ---- */
.page-header {
    background: linear-gradient(rgba(21, 95, 57, 0.85), rgba(26, 122, 74, 0.95)), url('/images/overlay-header.jpg') center/cover no-repeat;
    color: #fff;
    padding: 3rem 0;
}
.page-header h1 { font-size: clamp(1.6rem, 5vw, 2.25rem); }

/* ---- Document List ---- */
.doc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .2s;
}
.doc-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.doc-icon { font-size: 2rem; color: var(--primary); flex-shrink: 0; }

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .hero-section { min-height: 420px; }
    .stat-number { font-size: 1.5rem; }
}

@media (max-width: 575px) {
    .news-card .card-img-top { height: 160px; }
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .5s ease forwards; }
