/* ==============================
   Reset dasar & Global
============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: #f4f4f4;
}

/* Container */
.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* ==============================
   Header & Navbar
============================== */
header {
    background: #2c7a4b;
    color: white;
    padding: 15px 0;
    position: relative;
    z-index: 1000; /* pastikan header di atas hero */
}

header h1 {
    display: inline;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

/* Responsive Mobile Navbar */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        background: #2c7a4b;
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        padding: 10px;
        z-index: 999; /* menu muncul di atas hero */
    }

    nav ul.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* ==============================
   Button
============================== */
.btn {
    display: inline-block;
    background: #fff;
    color: #2c7a4b;
    padding: 10px 20px;
    margin-top: 15px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

/* ==============================
   Grid & Card
============================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* ==============================
   Hero Section
============================== */
.hero {
    position: relative;
    background-image: url('https://kecamatansamalantan.com/assets/images/hero-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1; /* pastikan hero di bawah menu */
}

.hero-overlay {
    background-color: rgba(0,0,0,0.5);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    color: white;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 20px;
}

/* ==============================
   Quick Access
============================== */
.quick-card {
    text-decoration: none;
    color: inherit;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quick-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    background: #e8f5e9;
}

.icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* ==============================
   Berita Card
============================== */
.berita-card {
    text-align: left;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.berita-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.berita-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    margin: 10px 0;
    font-size: 18px;
}

.card-content small {
    color: gray;
}

/* ==============================
   Animasi Fade-in
============================== */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================
   Galeri Foto
============================== */
.galeri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.galeri-item {
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galeri-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.galeri-item:hover img {
    transform: scale(1.05);
}

.galeri-item:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ==============================
   Reset dasar & Global
============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: #f4f4f4;
}

/* Container */
.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* ==============================
   Header & Navbar
============================== */
header {
    background: #2c7a4b;
    color: white;
    padding: 15px 0;
    position: relative;
    z-index: 1000; /* pastikan header di atas hero */
}

header h1 {
    display: inline;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

/* Responsive Mobile Navbar */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        background: #2c7a4b;
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        padding: 10px;
        z-index: 999; /* menu muncul di atas hero */
    }

    nav ul.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* ==============================
   Button
============================== */
.btn {
    display: inline-block;
    background: #fff;
    color: #2c7a4b;
    padding: 10px 20px;
    margin-top: 15px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

/* ==============================
   Grid & Card
============================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* ==============================
   Hero Section
============================== */
.hero {
    position: relative;
    background-image: url('https://kecamatansamalantan.com/assets/images/hero-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1; /* pastikan hero di bawah menu */
}

.hero-overlay {
    background-color: rgba(0,0,0,0.5);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    color: white;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 20px;
}

/* ==============================
   Quick Access
============================== */
.quick-card {
    text-decoration: none;
    color: inherit;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quick-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    background: #e8f5e9;
}

.icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* ==============================
   Berita Card
============================== */
.berita-card {
    text-align: left;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.berita-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.berita-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    margin: 10px 0;
    font-size: 18px;
}

.card-content small {
    color: gray;
}

/* ==============================
   Animasi Fade-in
============================== */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================
   Galeri Foto
============================== */
.galeri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.galeri-item {
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galeri-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.galeri-item:hover img {
    transform: scale(1.05);
}

.galeri-item:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

