:root {
    /* Palet Granodiorit Lebak */
    --profil-primary: #6B7280;   /* Granodiorit Grey - warna utama */
    --profil-secondary: #3B5E4A; /* Moss Green Geosite - aksen alam */
    --profil-bg: #F2F4F5;       /* Quartz White - latar bersih */
    --text-dark: #1F2937;       /* Biotite Black - teks utama */
    --text-muted: #6B7280;      /* Granodiorit Grey - teks sekunder */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: var(--profil-bg);
    color: var(--text-dark);
}

.profil-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    backdrop-filter: blur(8px);
}

.profil-nav .container {
    max-width: 1200px;
    margin: auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--profil-primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 12px 30px rgba(29, 78, 216, 0.25);
}

.nav-links {
    display: flex;
    gap: 18px;
    font-weight: 500;
    color: var(--text-muted);
}

.hero-profil {
    /* Background gambar hero dari assets/images */
    background-image: url('../images/gambar-hero.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    height: 300px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-profil::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Overlay gelap untuk kontras teks - menggunakan Biotite Black */
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.75) 0%, rgba(107, 114, 128, 0.65) 100%);
    z-index: 1;
}

.hero-profil::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(59, 94, 74, 0.15);
    border-radius: 50%;
    animation: float-bg 10s ease-in-out infinite reverse;
    z-index: 1;
}

@keyframes float-bg {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.1); }
}

.hero-profil .container {
    max-width: var(--saphira-content-width, calc(100vw - 400px));
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    z-index: 2;
}

@media (max-width: 992px) {
    .hero-profil .container {
        gap: 20px;
    }
    
    .stats-grid {
        min-width: 200px;
        max-width: 280px;
    }
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(217, 119, 6, 0.25);
    border: 2px solid rgba(217, 119, 6, 0.5);
    border-radius: 0;
    margin-bottom: 12px;
    animation: pulse-icon 2s ease-in-out infinite;
}

.hero-icon {
    font-size: 1.8rem;
    color: #D97706;
    animation: rotate-slow 20s linear infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(217, 119, 6, 0); }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-tagline {
    margin: 0 0 8px;
    font-size: 0.9rem;
    opacity: 0.9;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-profil h1 {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
}

.hero-description {
    margin: 0;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    opacity: 0.9;
    line-height: 1.5;
    max-width: 800px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex-shrink: 0;
    width: auto;
    min-width: 240px;
    max-width: 320px;
}

.stat-card {
    background: rgba(242, 244, 245, 0.3);
    padding: 10px 8px;
    border-radius: 0; /* kotak, tidak rounded */
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3), 0 4px 12px rgba(0,0,0,0.2);
}

.stat-card:hover::before {
    left: 100%;
}

.stat-icon {
    width: 28px;
    height: 28px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(217, 119, 6, 0.2);
    border: 1px solid rgba(217, 119, 6, 0.4);
    border-radius: 0;
    color: #D97706;
    font-size: 0.85rem;
    animation: icon-bounce 2s ease-in-out infinite;
    flex-shrink: 0;
}

.stat-card:nth-child(2) .stat-icon {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) .stat-icon {
    animation-delay: 0.4s;
}

.stat-card:nth-child(4) .stat-icon {
    animation-delay: 0.6s;
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.stat-card .value {
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.stat-card .label {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    opacity: 0.9;
    text-transform: uppercase;
}

.profil-content {
    /* Lebar konten full setelah dikurangi sidebar, sama dengan hero */
    max-width: var(--saphira-content-width, calc(100vw - 400px));
    margin: 40px auto 60px;
    padding: 0 24px;
    width: 100%;
}

.section-card {
    background: var(--profil-bg);
    border-radius: 0; /* kotak, tidak rounded */
    padding: 32px;
    border: 1px solid rgba(107, 114, 128, 0.15);
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.08);
    margin-bottom: 28px;
}

.section-card h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--profil-secondary);
}

.section-card h2 i {
    color: var(--profil-primary);
}

.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-card {
    padding: 16px;
    border-radius: 0;
    background: var(--profil-bg);
    border: 1px solid rgba(0,0,0,0.04);
}

.timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    border-left: 2px solid rgba(0,0,0,0.08);
    padding-left: 18px;
    margin-left: 10px;
    margin-bottom: 16px;
    position: relative;
}

.timeline li::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--profil-secondary);
    position: absolute;
    left: -6px;
    top: 4px;
}

.batas-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.batas-card {
    padding: 16px;
    border-radius: 0;
    border: 1px solid rgba(107, 114, 128, 0.2);
    background: var(--profil-bg);
}

.batas-card strong {
    color: var(--profil-secondary);
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.contact-card:last-child {
    border-bottom: none;
}

.contact-card i {
    width: 36px;
    height: 36px;
    border-radius: 0;
    background: rgba(217, 119, 6, 0.15);
    color: #D97706;
    display: flex;
    align-items: center;
    justify-content: center;
}

.html-content p {
    margin-top: 0;
    line-height: 1.7;
    color: var(--text-dark);
}

.html-content ul {
    padding-left: 18px;
}

/* Tabel Identitas Desa - Responsive */
.section-card table {
    width: 100%;
    border-collapse: collapse;
}

.section-card table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.section-card table td:first-child {
    width: 35%;
    font-weight: 600;
    color: var(--text-dark);
}

.section-card table td:last-child {
    color: var(--text-muted);
}

.section-card table tr:last-child td {
    border-bottom: none;
}

/* Responsive: Tabel jadi card layout di mobile */
@media (max-width: 1200px) {
    .hero-profil .container,
    .profil-content {
        max-width: 100%;
        padding: 0 24px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    /* Hero layout jadi column di mobile */
    .hero-profil .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .hero-content {
        width: 100%;
    }
    
    .stats-grid {
        width: 100%;
        min-width: auto;
    }

    .section-card {
        padding: 24px;
    }
    
    /* Tabel Identitas Desa jadi card di mobile */
    .section-card table,
    .section-card table tbody,
    .section-card table tr,
    .section-card table td {
        display: block;
        width: 100%;
    }
    
    .section-card table tr {
        margin-bottom: 12px;
        padding: 12px;
        background: #f5f3ef;
        border: 1px solid rgba(196, 122, 59, 0.2);
        border-radius: 0;
    }
    
    .section-card table td {
        padding: 4px 0;
        border-bottom: none;
    }
    
    .section-card table td:first-child {
        width: 100%;
        margin-bottom: 4px;
        color: var(--profil-primary);
        font-size: 0.9rem;
    }
    
    .section-card table td:last-child {
        font-size: 1rem;
        color: var(--text-dark);
    }
    
    /* Two column jadi single column di mobile */
    .two-column {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Hero stats grid lebih compact di mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        max-width: 100%;
        min-width: auto;
    }
    
    .stat-card {
        padding: 8px 6px;
    }
    
    .stat-icon {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
    
    .stat-card .value {
        font-size: 0.7rem;
        line-height: 1.2;
    }
    
    .stat-card .label {
        font-size: 0.6rem;
    }
    
    /* Batas list lebih compact */
    .batas-list {
        grid-template-columns: 1fr;
    }
}

