/* === GOOGLE FONTS (Clean & Modern) === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&family=Roboto:wght@400;700&display=swap');

/* === CSS VARIABLES (Easy to Change Colors) === */
:root {
    --primary-color: #2E7D32; /* Deep Green */
    --primary-dark: #1B5E20; /* Darker Green */
    --secondary-color: #795548; /* Earthy Brown */
    --light-bg: #F5F5F5; /* Light Gray Background */
    --text-color: #333333;
    --white-color: #FFFFFF;
    --border-color: #E0E0E0;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
}

/* === GENERAL RESET & BODY STYLES === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.8;
    background-color: var(--white-color);
    color: var(--text-color);
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--primary-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* === HEADER & NAVIGATION === */
#main-header {
    background: var(--white-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

#main-header nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

#main-header nav ul li {
    margin-left: 30px;
}

#main-header nav a {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1rem;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

#main-header nav a:hover {
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary-color);
}

.cta-button-nav {
    background: var(--primary-color);
    color: var(--white-color) !important;
    padding: 12px 24px;
    border-radius: 50px; /* Pill-shaped button */
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.cta-button-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    text-decoration: none;
    color: var(--white-color) !important;
}


/* === HERO SECTION === */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                      url('http://localhost/peternakan/public/cover.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 100px 20px;
    text-align: center;
}

.hero .container {
    /* Bagian terpenting untuk perataan tengah */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Rata tengah vertikal */
    align-items: center;   /* Rata tengah horizontal */
    text-align: center;      /* Rata tengah untuk teks di dalamnya */
    min-height: 400px;       /* Beri tinggi minimal agar perataan vertikal terlihat */
}

.hero h2 {
    font-size: 3.2rem; /* Sedikit sesuaikan ukuran font */
    color: var(--white-color);
    margin-bottom: 1.5rem; /* Tambah jarak bawah */
    font-weight: 700;
    max-width: 850px;
    line-height: 1.3;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 2.5rem; /* Tambah jarak bawah */
    opacity: 0.95;
}

/* Main button in Hero */
.hero .cta-button-nav {
    font-size: 1.2rem;
    padding: 15px 35px;
}


/* === CONTENT SECTIONS (For Landing Page & Articles) === */
.content-section {
    padding: 80px 0;
}

.content-section.bg-light {
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

/* Style for Article Lists */
.article-item {
    background: var(--white-color);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* To keep image corners rounded */
}

.article-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.article-item-content {
    padding: 25px;
}

.article-item h3 {
    margin-top: 0;
}

.article-item h3 a {
    color: var(--primary-dark);
}

.article-item p {
    margin-bottom: 1rem;
}

.article-item small {
    color: #777;
    font-size: 0.9rem;
    font-family: var(--font-secondary);
}


/* === FOOTER === */
footer {
    background: #212121;
    color: #a0a0a0;
    padding: 3rem 0;
    margin-top: 40px;
    text-align: center;
}

footer p {
    margin: 0;
}

footer a {
    color: var(--white-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsif otomatis */
    gap: 30px; /* Jarak antar item */
    margin-top: 3rem;
}

.feature-item {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.feature-item .icon {
    font-size: 3rem; /* Ukuran ikon */
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Bagian CTA (Call to Action) di Tengah Halaman */
.cta-section {
    background-color: var(--primary-dark);
    color: var(--white-color);
    padding: 80px 0;
    text-align: center;
    border-radius: 10px;
    margin: 40px 0;
}
.cta-section h2 {
    color: var(--white-color);
    font-size: 2.5rem;
}

/* Grid untuk Testimoni */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.testimonial-card {
    background: var(--light-bg);
    border-left: 5px solid var(--primary-color);
    padding: 30px;
    border-radius: 5px;
}
.testimonial-card .quote {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}
.testimonial-card .author {
    display: flex;
    align-items: center;
}
.testimonial-card .author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}
.testimonial-card .author-info h4 {
    margin: 0;
    font-size: 1.1rem;
}
.testimonial-card .author-info p {
    margin: 0;
    color: #777;
}
.vision-mission-section {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Kolom kiri lebih kecil dari kanan */
    gap: 50px; /* Jarak antar kolom */
    align-items: center; /* Membuat kedua kolom rata tengah secara vertikal */
}

.vision-mission-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.vision-mission-content h2 {
    font-size: 2.2rem; /* <-- UKURAN FONT DIKECILKAN */
    margin-bottom: 1.5rem;
    text-align: left; /* <-- DIBUAT RATA KIRI */
}

.vision-mission-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem; /* Tambah jarak bawah */
    display: flex;
    align-items: center;
    text-align: left; /* <-- DIBUAT RATA KIRI */
}

.vision-mission-content h3 .icon {
    font-size: 1.2rem;
    margin-right: 15px; /* Sedikit tambah jarak ikon */
}

.vision-mission-content p {
    font-size: 1.05rem; /* Sedikit sesuaikan ukuran font paragraf */
    color: #555;
    text-align: left; /* <-- DIBUAT RATA KIRI */
}

@media (max-width: 768px) {
    .vision-mission-section {
        grid-template-columns: 1fr;
        text-align: left; /* Ubah menjadi rata kiri juga di mobile */
    }
    .vision-mission-image {
        margin-bottom: 30px;
    }
    .vision-mission-content h2, .vision-mission-content h3 {
        text-align: center; /* Judul tetap di tengah saat di mobile */
    }
}
.mission-list {
    margin-top: 1.5rem;
}

.mission-item {
    display: flex; /* Menggunakan flexbox untuk ikon dan teks berdampingan */
    align-items: flex-start; /* Rata atas */
    margin-bottom: 1.5rem;
}

.mission-item:last-child {
    margin-bottom: 0;
}

.mission-icon {
    font-size: 1.5rem;
    color: var(--secondary-color); /* Menggunakan warna coklat tanah */
    margin-right: 20px;
    margin-top: 5px; /* Sedikit ke bawah agar sejajar dengan teks */
    width: 30px; /* Beri lebar tetap agar rapi */
    text-align: center;
}

.mission-text h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.mission-text p {
    margin: 0;
    font-size: 1rem; /* Sedikit kecilkan font deskripsi misi */
    line-height: 1.6;
}

.article-card {
    background-color: var(--white-color); /* Latar belakang putih */
    padding: 40px; /* Jarak dari konten ke tepi card */
    border-radius: 12px; /* Sudut yang melengkung */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); /* Bayangan yang lembut dan dalam */
    border: 1px solid var(--border-color); /* Garis tepi tipis */
    margin-top: 40px; /* Jarak dari atas */
}

/* Penyesuaian untuk layar kecil */
@media (max-width: 768px) {
    .article-card {
        padding: 25px; /* Kurangi padding di layar kecil */
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    aspect-ratio: 1 / 1; /* Membuat item menjadi kotak */
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Gambar akan mengisi kotak tanpa distorsi */
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.1); /* Efek zoom saat hover */
}
.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 40px 20px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}
.gallery-item:hover .overlay {
    transform: translateY(0);
}
.gallery-item .overlay h4 {
    color: white;
    margin: 0;
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}
.article-nav-link {
    color: var(--text-color);
    font-family: var(--font-primary);
    font-weight: 500;
    max-width: 48%;
}
.article-nav-link span {
    display: block;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 5px;
}
.article-nav-link.next {
    text-align: right;
}
.main-content-area {
    padding: 60px 0; /* Memberi padding atas & bawah */
}

.two-column-layout {
    display: flex;
    gap: 40px; /* Jarak antara konten utama dan sidebar */
}

/* Kolom Kiri - Konten Utama */
.main-column {
    flex: 1; /* Biarkan kolom ini mengambil sisa ruang */
    min-width: 0; /* Perbaikan untuk flexbox */
}

/* Kolom Kanan - Sidebar Artikel */
.sidebar-column {
    width: 320px; /* Lebar tetap untuk sidebar */
    flex-shrink: 0; /* Mencegah sidebar menyusut */
}
.sidebar-widget {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    position: sticky; /* Membuat sidebar menempel */
    top: 100px; /* Jarak dari atas saat menempel (sesuaikan dengan tinggi header) */
}
.sidebar-widget h3 {
    font-size: 1.3rem;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}
.sidebar-article-list ul {
    list-style: none;
    padding: 0;
}
.sidebar-article-list li {
    margin-bottom: 20px;
}

.sidebar-article-list .sidebar-article-link {
    display: flex;
    align-items: flex-start; /* Rata atas */
    gap: 15px; /* Jarak antara gambar dan teks */
    text-decoration: none;
}
/* Gaya untuk gambar thumbnail */
.sidebar-article-list .sidebar-article-image {
    width: 80px; /* Lebar tetap */
    height: 60px; /* Tinggi tetap */
    object-fit: cover; /* Gambar akan mengisi kotak tanpa distorsi */
    border-radius: 5px;
    flex-shrink: 0; /* Mencegah gambar menyusut */
}
/* Gaya untuk judul */
.sidebar-article-list .sidebar-article-title {
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
    display: block; /* Agar bisa menempati satu baris penuh */
    transition: color 0.2s ease;
}
.sidebar-article-list .sidebar-article-link:hover .sidebar-article-title {
    color: var(--primary-color);
}
/* Gaya untuk tanggal */
.sidebar-article-list small {
    display: block;
    color: #777;
    font-size: 0.8rem;
    margin-top: 5px;
}

.sidebar-article-list a {
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
}
.sidebar-article-list a:hover {
    color: var(--primary-color);
    text-decoration: none;
}
.sidebar-article-list small {
    display: block;
    color: #777;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Penyesuaian untuk layar kecil (Mobile Responsiveness) */
@media (max-width: 992px) {
    .two-column-layout {
        flex-direction: column; /* Ubah menjadi satu kolom */
    }
    .sidebar-column {
        width: 100%; /* Sidebar mengambil lebar penuh */
        margin-top: 40px;
    }
    .sidebar-widget {
        position: static; /* Hapus efek sticky di mobile */
    }
}

.logo-link {
    text-decoration: none;
}

.logo-container {
    display: flex; /* Sejajarkan gambar dan teks secara horizontal */
    align-items: center; /* Sejajarkan secara vertikal di tengah */
}

.logo-image {
    height: 40px; /* Atur tinggi logo, lebar akan menyesuaikan */
    width: auto;
    margin-right: 12px; /* Jarak antara logo dan teks */
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    /* Ganti class .logo menjadi .logo-text jika Anda punya style khusus sebelumnya */
}

.hamburger {
    display: none; /* Sembunyikan di desktop */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-dark);
    cursor: pointer;
}

/* Terapkan gaya ini pada layar dengan lebar 992px atau lebih kecil */
@media (max-width: 992px) {
    .hamburger {
        display: block; /* Tampilkan ikon hamburger */
        order: 2; /* Pindahkan ke kanan */
    }

    .logo-link {
        order: 1; /* Logo tetap di kiri */
    }
    
    /* Ganti class #main-header nav menjadi .main-nav agar lebih spesifik */
    .nav-menu {
        display: none; /* Sembunyikan pembungkus menu di mobile */
        position: absolute;
        top: 75px; 
        left: 0;
        right: 0;
        background: var(--white-color);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: block; /* Tampilkan jika punya kelas active */
    }
    
    .nav-menu ul {
        flex-direction: column;
    }

    .main-nav ul li {
        margin: 10px 0;
        margin-left: 0 !important; /* Hapus margin kiri */
        padding-left: 0 !important;
        border-left: none !important; /* Hapus garis pemisah */
        width: 100%;
        text-align: center;
    }

    .main-nav ul li a.cta-button-nav {
        display: block;
    }
}

.page-header {
    background-color: var(--light-bg);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.page-header h1 {
    font-size: 3rem;
}

.about-us-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-us-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}
.about-us-image img {
    width: 100%;
    border-radius: 12px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}
.team-member {
    text-align: center;
}
.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid var(--white-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.team-member h4 {
    margin-bottom: 5px;
}
.team-member p {
    color: #777;
}

/* Penyesuaian untuk mobile */
@media (max-width: 768px) {
    .about-us-container {
        grid-template-columns: 1fr;
    }
    .about-us-image {
        order: -1; /* Pindahkan gambar ke atas di mobile */
        margin-bottom: 30px;
    }
}