/* ==============================
   ROOT VARIABLES — Tema Pertanian
   ============================== */
:root {
    --primary-color: #166534;
    --primary-light: #15803d;
    --accent-color: #f59e0b;
    --accent-hover: #d97706;
    --bg-color: #fdfbf7;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --dark-nav: #0f172a;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.15), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { color: var(--primary-color); font-weight: 700; }
a { text-decoration: none; color: inherit; }

/* ==============================
   NAVBAR
   ============================== */
.navbar {
    background-color: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Brand / Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.3);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 1rem; font-weight: 700; color: var(--primary-color); }
.brand-subtitle { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }

/* Nav Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.nav-links > li { position: relative; }

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    background-color: rgba(22, 101, 52, 0.07);
}

.nav-links a.active { font-weight: 600; }

.arrow { font-size: 0.7rem; opacity: 0.6; }

/* Dropdown */
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    min-width: 200px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.07);
}

.dropdown li a {
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.875rem;
    display: block;
}

.dropdown li a:hover {
    background: rgba(22, 101, 52, 0.07);
    color: var(--primary-color);
}

/* CTA Button */
.btn-cta {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white !important;
    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    flex-shrink: 0;
}

.btn-cta:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Hamburger */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger .bar {
    display: block; width: 24px; height: 2.5px;
    background-color: var(--primary-color); border-radius: 2px;
    transition: var(--transition);
}

/* ==============================
   MAIN CONTENT
   ============================== */
.content-wrapper { margin-top: 68px; }

/* ==============================
   HERO SECTION
   ============================== */
.hero {
    background: linear-gradient(160deg, rgba(22,101,52,0.92) 0%, rgba(21,128,61,0.88) 40%, rgba(245,158,11,0.6) 100%);
    color: var(--white);
    padding: 5rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    opacity: 0.2;
    z-index: 0;
}

.hero-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

/* Hero Left */
.hero-left { animation: fadeInLeft 0.8s ease; }

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.95);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(4px);
}

.hero-left h1 {
    font-size: 3rem;
    line-height: 1.15;
    color: white;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.hero-highlight {
    color: var(--accent-color);
    position: relative;
}

.hero-left p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.75;
}

.hero-subtitle-text {
    white-space: pre-line;
}

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero Right */
.hero-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInRight 0.8s ease;
}

.hero-image-box {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.3);
    height: 300px; /* Dikurangi ukurannya */
    position: relative;
    background: rgba(0,0,0,0.1);
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 2s ease-in-out, transform 8s linear; /* slowmo transition */
    will-change: opacity, transform;
}

.hero-slide-img.active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
}

/* Announcement Box */
.hero-announcement {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.announcement-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.announcement-header h4 {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
}

.ann-icon { font-size: 1.1rem; }

.ann-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }

.ann-list li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ann-date {
    font-size: 0.7rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ann-list p {
    color: rgba(255,255,255,0.9);
    font-size: 0.82rem;
    line-height: 1.4;
}

.ann-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}
.ann-link:hover { color: white; }

/* ==============================
   BUTTONS
   ============================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.7rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220,38,38,0.4);
}

.btn-ghost {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(4px);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    color: var(--white);
    padding: 0.55rem 1.25rem;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
    transform: translateY(-2px);
}

/* ==============================
   HERO INFO TABS
   ============================== */
.hero-info-tabs {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.85);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
}

.tab-btn:hover { background: rgba(255,255,255,0.2); color: white; }
.tab-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(245,158,11,0.4);
    font-weight: 600;
}

.tab-content-container { min-height: 120px; }

.tab-slide { display: none; animation: fadeIn 0.35s ease; }
.tab-slide.active { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }

.tab-slide h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
    flex: 0 0 auto;
}
.tab-slide p { color: rgba(255,255,255,0.85); font-size: 0.9rem; }

.slide-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-left: auto;
}

/* ==============================
   LAYANAN SECTION
   ============================== */
.section {
    padding: 5rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0.75rem auto 2.5rem;
    border-radius: 2px;
}

.section-tag {
    display: inline-block;
    background: rgba(22,101,52,0.08);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.layanan-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.layanan-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.layanan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(22,101,52,0.15);
}

.layanan-card--more {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: rgba(22,101,52,0.1);
}

.layanan-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    background: rgba(22,101,52,0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.layanan-card h3 {
    font-size: 0.875rem;
    color: var(--text-main);
    font-weight: 600;
}

.layanan-card p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.layanan-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
    transition: var(--transition);
}
.layanan-link:hover { color: var(--accent-color); gap: 0.5rem; }

/* ==============================
   STATS BAR
   ============================== */
.stats-bar {
    background: var(--dark-nav);
    padding: 2.5rem 2rem;
}

.stats-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 3rem;
    flex: 1;
    min-width: 180px;
    justify-content: center;
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.85;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    font-weight: 400;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

/* ==============================
   SAMBUTAN KEPALA DESA
   ============================== */
.sambutan-section { margin-bottom: 4rem; }

.sambutan-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 3rem;
    align-items: center;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.sambutan-img {
    position: relative;
    height: 100%;
    min-height: 320px;
}

.sambutan-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sambutan-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: var(--accent-color);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.sambutan-text {
    padding: 2.5rem 2.5rem 2.5rem 0;
}

.sambutan-text h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* ==============================
   FOOTER
   ============================== */
.footer {
    background: var(--dark-nav);
    color: var(--white);
    padding: 4rem 2rem 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer-section p {
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
    color: #94a3b8;
    font-size: 0.875rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.footer-links a:hover { color: var(--accent-color); padding-left: 4px; }

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    color: #475569;
    font-size: 0.875rem;
}

/* ==============================
   ANIMATIONS
   ============================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

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

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 1024px) {
    .layanan-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-wrapper { grid-template-columns: 1fr; }
    .hero-right { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        right: auto;
        flex-direction: column;
        background-color: var(--white);
        width: 70%;
        max-width: 320px;
        height: 100vh;
        max-height: 100vh;
        text-align: left;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0,0,0,0.15);
        padding: 85px 1.25rem 2rem;
        gap: 0.5rem;
        align-items: stretch;
        overflow-y: auto;
        border-radius: 0 24px 24px 0;
        z-index: 990;
    }
    .nav-container { position: relative; z-index: 1000; }
    .nav-links::-webkit-scrollbar {
        width: 5px;
    }
    .nav-links::-webkit-scrollbar-thumb {
        background-color: #cbd5e1;
        border-radius: 10px;
    }
    .nav-links.active { left: 0; right: auto; }
    .nav-links a { justify-content: space-between; padding: 0.9rem 1rem; border-bottom: 1px solid #f1f5f9; font-size: 0.95rem; }
    .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: rgba(22,101,52,0.05); border-radius: 12px; margin-top: 0.5rem; padding: 0.5rem; }
    .dropdown li a { padding: 0.6rem 0.8rem; font-size: 0.85rem; border-bottom: none; }
    
    .hamburger { position: relative; z-index: 1001; }
    .btn-cta { display: none; }

    .hero-left h1 { font-size: 2rem; }
    .hero-right { grid-template-columns: 1fr; }

    .layanan-grid { grid-template-columns: repeat(2, 1fr); }

    .stat-item { padding: 0.75rem 1.5rem; min-width: 140px; }
    .stat-number { font-size: 1.4rem; }
    .stat-divider { display: none; }

    .sambutan-wrapper { grid-template-columns: 1fr; }
    .sambutan-img { min-height: 200px; }
    .sambutan-text { padding: 1.5rem; }

    .tab-slide.active { flex-direction: column; align-items: flex-start; }
    .slide-actions { margin-left: 0; }
}

@media (max-width: 480px) {
    .layanan-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-btns { flex-direction: column; }
    .stat-item { min-width: 100px; }
}
