:root {
    --primary: #065f46; /* Emerald 800 */
    --primary-light: #10b981;
    --primary-dark: #022c22;
    --accent: #f59e0b; /* Amber 500 */
    --text-main: #0f172a;
    --text-muted: #475569;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --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;
}

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

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 4rem auto;
    font-size: 1.1rem;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo i {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(2, 44, 34, 0.7), rgba(2, 44, 34, 0.4)), url('../images/hero_kopo_1776842603076.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    animation: fadeInDown 1s ease-out;
}

.hero h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    font-weight: 300;
    opacity: 0.9;
}

.btn {
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(6, 95, 70, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.3);
}

.btn-accent {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
    background-color: #fbbf24;
    transform: translateY(-3px);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Sections */
section {
    padding: 6rem 5%;
}

/* Pelayanan Desa */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Transparansi Keuangan */
.finance-section {
    background-color: var(--primary-dark);
    color: white;
    border-radius: 30px;
    margin: 0 5%;
    padding: 5rem 10%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.finance-section .section-title {
    color: white;
}

.finance-section .section-subtitle {
    color: rgba(255,255,255,0.8);
}

.finance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card h4 {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.stat-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary-light);
    border-radius: 10px;
    position: relative;
    animation: fillProgress 1.5s ease-out forwards;
}

.stat-card:nth-child(1) .progress-bar { width: 100%; }
.stat-card:nth-child(2) .progress-bar { width: 85%; }

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

/* BUMDes Showcase */
.bumdes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.bumdes-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.bumdes-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.bumdes-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.bumdes-card:hover .bumdes-img {
    transform: scale(1.05);
}

.bumdes-img-wrapper {
    overflow: hidden;
    position: relative;
}

.bumdes-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.bumdes-content {
    padding: 2rem;
}

.bumdes-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.bumdes-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-light);
    gap: 10px;
}

/* Footer & Contact */
footer {
    background: var(--primary-dark);
    color: white;
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-info p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-info i {
    color: var(--accent);
    margin-top: 5px;
}

.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    height: 300px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
    .footer-content { grid-template-columns: 1fr; }
    .finance-section { padding: 3rem 5%; margin: 0 1rem; }
    .modal-container { width: 95%; max-height: 95vh; }
    .modal-img-wrapper { height: 200px; }
    .modal-content { padding: 1.5rem; }
    .modal-title { font-size: 1.4rem; }
}

/* Berita Section */
.berita-section {
    background-color: #f1f5f9;
}

.berita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.berita-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.berita-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.12);
}

.berita-img-wrapper {
    overflow: hidden;
    position: relative;
    height: 220px;
}

.berita-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.berita-card:hover .berita-img {
    transform: scale(1.06);
}

.berita-date {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(2, 44, 34, 0.85);
    backdrop-filter: blur(5px);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.berita-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.berita-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
    line-height: 1.3;
}

.berita-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.btn-read-more {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    align-self: flex-start;
    transition: var(--transition);
    padding: 0;
}

.btn-read-more:hover {
    color: var(--primary-light);
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px dashed rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-muted);
    font-weight: 500;
}

/* Modal Overlay & Details */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-card);
    width: 90%;
    max-width: 750px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: rgba(255,255,255,0.85);
    border: none;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    z-index: 10;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.modal-close-btn:hover {
    background: var(--accent);
    color: white;
}

.modal-img-wrapper {
    height: 350px;
    width: 100%;
}

.modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content {
    padding: 2.5rem;
    overflow-y: auto;
}

.modal-meta {
    margin-bottom: 1rem;
}

.modal-date-tag {
    background: #e2e8f0;
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.modal-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.modal-desc-body {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* Navbar Auth Enhancements */
.login-btn {
    background-color: var(--primary);
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 50px;
    box-shadow: 0 4px 6px -1px rgba(6, 95, 70, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-btn:hover {
    background-color: var(--primary-light) !important;
    color: white !important;
}

.login-btn::after {
    display: none !important;
}

.admin-badge {
    background-color: var(--accent);
    color: white !important;
    padding: 6px 14px !important;
    border-radius: 8px;
    font-size: 0.9rem !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-badge:hover {
    background-color: #fbbf24 !important;
}

.admin-badge::after {
    display: none !important;
}

.nav-user-name {
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn {
    color: var(--text-muted) !important;
    transition: var(--transition);
}

.logout-btn:hover {
    color: #ef4444 !important;
}

.logout-btn::after {
    display: none !important;
}

