/* --- Core Reset & Variables --- */
:root {
    --primary: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-light: #e8f5e9;
    --text-main: #2d3748;
    --text-muted: #718096;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --whatsapp: #25d366;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

body {
    color: var(--text-main);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* --- Navigation Bar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 8%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.02);
    transition: var(--transition);
}

.navbar.scroll-shadow {
    padding: 15px 8%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 35px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* Hamburger Menu (Mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.menu-toggle span {
    height: 2px;
    width: 25px;
    background-color: var(--text-main);
    transition: var(--transition);
    border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 0 8%;
    background: linear-gradient(135deg, #f0f7f1 0%, #ffffff 100%);
    position: relative;
}

.hero-content {
    max-width: 650px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a202c;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 35px;
    line-height: 1.7;
}

/* --- Buttons --- */
.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background-color: var(--whatsapp);
    color: var(--white);
    gap: 8px;
}

.btn-whatsapp:hover {
    background-color: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* --- Global Section Layout --- */
section {
    padding: 100px 8%;
}

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

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* --- Visi Misi Cards --- */
.grid-visimisi {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
}

.card-about {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.card-about h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--primary);
}

.card-about ul {
    list-style: none;
}

.card-about ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    color: var(--text-main);
}

.card-about ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* --- Services Section --- */
.grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid e2e8f0;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.service-card .icon {
    font-size: 32px;
    margin-bottom: 20px;
    display: inline-block;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* --- Implementation Table --- */
.table-wrapper {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 20px 25px;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 2px solid #edf2f7;
}

td {
    border-bottom: 1px solid #edf2f7;
    font-size: 15px;
}

tr:last-child td {
    border-bottom: none;
}

/* --- Floating WhatsApp Button --- */
.whatsapp-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--whatsapp);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-floating:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
}

.whatsapp-floating svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* --- Footer --- */
footer {
    background-color: #1a202c;
    color: #a0aec0;
    padding: 40px 8%;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #2d3748;
}

/* --- Responsive Styles (Media Queries) --- */
@media (max-width: 992px) {
    .grid-visimisi {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 38px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 20px 5%;
    }
    .menu-toggle {
        display: flex;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 5%;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: var(--transition);
    }
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .nav-links li {
        margin: 15px 0;
        width: 100%;
    }
    /* Hamburger Animation State */
    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 5px);
    }
    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -5px);
    }
    .hero {
        padding: 60px 5%;
        text-align: center;
    }
    .btn-group {
        justify-content: center;
    }
    table, thead, tbody, th, td, tr {
        display: block;
    }
    th {
        display: none;
    }
    td {
        position: relative;
        padding-left: 45%;
        border-bottom: 1px solid #edf2f7;
    }
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 20px;
        width: 40%;
        font-weight: 600;
        color: var(--text-main);
    }
    .row-container {
        flex-direction: column; /* Mengubah susunan menjadi atas-bawah */
    }
}
/* --- Grid Artikel --- */
.grid-artikel { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.artikel-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.artikel-card:hover { transform: translateY(-5px); }
.artikel-img { width: 100%; height: 200px; object-fit: cover; }
.artikel-body { padding: 25px; }
.artikel-date { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.artikel-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: #1a202c; }
.artikel-excerpt { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* --- Grid Galeri --- */
.grid-galeri { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.galeri-item { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
.galeri-item img, .galeri-item iframe { width: 100%; height: 220px; display: block; border: none; }
.galeri-caption { padding: 15px; font-size: 14px; font-weight: 600; text-align: center; background: var(--white); }

/* CSS Styling */
.row-container {
  display: flex;        /* Activates flexbox layout */
  width: 100%; /* Mengisi seluruh lebar layout */
  gap: 20px;           /* Adds space between the two blocks */
}

.block-item {
  flex: 1;             /* Forces both blocks to take up equal width */
  /*background-color: lightblue;*/
  padding: 20px;
  box-sizing: border-box;
  align-content: center;
}
/* --- CSS Modal Window Pop-up Gambar --- */
.galeri-item img {
    cursor: zoom-in; /* Mengubah kursor agar menandakan gambar bisa diperbesar */
    transition: filter 0.3s ease;
}
.galeri-item img:hover {
    filter: brightness(0.85); /* Efek redup tipis saat disorot mouse */
}

.modal-window {
    display: none; /* Tersembunyi secara default */
    position: fixed;
    z-index: 9999; /* Posisi di atas floating WhatsApp */
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9); /* Latar belakang hitam transparan */
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80vh;
    border-radius: 8px;
    animation: zoomAnimation 0.3s ease;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 500;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.modal-close:hover {
    color: #bbb;
}

@keyframes zoomAnimation {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .modal-content { max-width: 95%; }
}

/* --- CSS Modal Window untuk Detail Artikel --- */
.modal-artikel {
    display: none;
    position: fixed;
    z-index: 10000; /* Lebih tinggi dari navbar dan modal gambar */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-artikel-content {
    background-color: var(--white);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.modal-artikel-header {
    padding: 20px 25px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.modal-artikel-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    padding-right: 20px;
}

.close-artikel {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-artikel:hover {
    color: #1a202c;
}

.modal-artikel-body {
    padding: 25px;
    overflow-y: auto; /* Agar konten panjang bisa di-scroll di dalam modal */
}

.modal-artikel-img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-artikel-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.modal-artikel-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-main);
    white-space: pre-line; /* Menjaga format enter/paragraf dari database */
}

/* Tombol Baca Selengkapnya di Kartu Artikel */
.btn-baca {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.btn-baca:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}