/* Custom Styles */
:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --accent-color: #F59E0B;
    --bg-dark: #111827;
    --text-dark: #f9fafb;
    --card-dark: #1f2937;
    --border-dark: #374151;
}

/* Light Mode Global Overrides */
html.light {
    --bg-dark: #f9fafb;
    /* Gray 50 */
    --text-dark: #111827;
    /* Gray 900 */
    --card-dark: #ffffff;
    --border-dark: #e5e7eb;
}

html.light .text-white {
    color: #111827 !important;
}

html.light .text-gray-300 {
    color: #374151 !important;
}

/* Gray 700 - Much darker for readability */
html.light .text-gray-400 {
    color: #4b5563 !important;
}

/* Gray 600 */
html.light .text-gray-500 {
    color: #6b7280 !important;
}

/* Gray 500 */

/* Background Overrides */
html.light .bg-gray-900 {
    background-color: #f3f4f6 !important;
    /* Gray 100 */
    color: #1f2937 !important;
}

html.light .bg-gray-800 {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb;
    color: #1f2937 !important;
}

html.light .bg-gray-800\/50,
html.light .bg-gray-800\/80,
html.light .bg-gray-900\/30,
html.light .bg-gray-900\/50 {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb;
}

html.light .bg-gray-700\/50,
html.light .bg-gray-700\/80 {
    background-color: #f9fafb !important;
    /* Gray-50 */
    border: 1px solid #d1d5db;
    color: #1f2937 !important;
}

html.light .bg-gray-700 {
    background-color: #e5e7eb !important;
    /* Gray 200 */
    color: #1f2937 !important;
}

html.light .border-gray-700 {
    border-color: #d1d5db !important;
    /* Gray 300 */
}

/* Light Mode Text Contrast Fixes */
html.light .text-blue-300,
html.light .text-blue-400 {
    color: #2563eb !important;
    /* blue-600 */
}

html.light .text-green-300,
html.light .text-green-400 {
    color: #16a34a !important;
    /* green-600 */
}

html.light .text-red-300,
html.light .text-red-400 {
    color: #dc2626 !important;
    /* red-600 */
}

html.light .text-purple-300,
html.light .text-purple-400 {
    color: #9333ea !important;
    /* purple-600 */
}

html.light .text-yellow-300,
html.light .text-yellow-400 {
    color: #d97706 !important;
    /* yellow-600 */
}

html.light .text-gray-500 {
    color: #6b7280 !important;
    /* gray-500 (Ensure visibility) */
}

/* Light Mode Background Pill Fixes */
html.light .bg-blue-500\/20 {
    background-color: #dbeafe !important;
    /* blue-100 */
    border-color: #bfdbfe !important;
    /* blue-200 */
}

html.light .bg-green-500\/20 {
    background-color: #dcfce7 !important;
    /* green-100 */
    border-color: #bbf7d0 !important;
    /* green-200 */
}

html.light .bg-red-500\/20 {
    background-color: #fee2e2 !important;
    /* red-100 */
    border-color: #fecaca !important;
    /* red-200 */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.card {
    background-color: var(--card-dark);
    border: 1px solid var(--border-dark);
}

.privacy-locked::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 8px;
    color: var(--accent-color);
    cursor: pointer;
}

.privacy-shield {
    filter: blur(5px);
    cursor: pointer;
    transition: filter 0.3s;
}

.privacy-shield:hover {
    filter: blur(3px);
}

mark {
    background-color: #facc15;
    color: #111827;
    padding: 0 2px;
    border-radius: 3px;
}

.collapsible-header .chevron-icon {
    transition: transform 0.3s ease-in-out;
}

.collapsible-content {
    transition: max-height 0.5s ease-in-out, visibility 0.5s, opacity 0.5s, padding 0.5s;
    max-height: 2000px;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
}

.collapsible-content.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
}

.collapsible-header.collapsed .chevron-icon {
    transform: rotate(-90deg);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;

    /* Button Reset & A11y */
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    border-radius: 4px;
}

.lightbox .close:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 1.1px;
    background: conic-gradient(#0000 10%, #3B82F6) content-box;
    -webkit-mask: repeating-conic-gradient(#0000 0deg, #000 1deg 20deg, #0000 21deg 36deg),
        radial-gradient(farthest-side, #0000 calc(100% - 9px), #000 calc(100% - 9px));
    mask: repeating-conic-gradient(#0000 0deg, #000 1deg 20deg, #0000 21deg 36deg),
        radial-gradient(farthest-side, #0000 calc(100% - 9px), #000 calc(100% - 9px));
    -webkit-mask-composite: destination-in;
    mask-composite: intersect;
    animation: spinner-d5559d 1s infinite steps(10);
}

@keyframes spinner-d5559d {
    to {
        transform: rotate(1turn);
    }
}

.skill-bar-container {
    width: 100%;
    background-color: #374151;
    border-radius: 9999px;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 1.5s ease-in-out;
    width: 0%;
}

.is-visible .skill-bar {
    width: var(--skill-level);
}

/* Pill Navigation (Advanced) */
#pill-navigation-container {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#pill-navigation-container.nav-hidden {
    transform: translateY(150%);
}

#pill-navigation {
    background: rgba(15, 23, 42, 0.65);
    /* Slate-900 with opacity */
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.pill-btn {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    /* gray-400 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none !important;
}

.pill-btn i {
    font-size: 1.25rem;
    transition: color 0.3s;
    z-index: 10;
}

/* Label Animation */
.pill-btn .nav-label {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 0;
}

/* Active State */
.pill-btn.active {
    width: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    background-color: rgba(59, 130, 246, 0.2);
    /* var(--primary-color) alpha */
    color: white;
}

.pill-btn.active .nav-label {
    max-width: 100px;
    /* Adjust based on max label length */
    opacity: 1;
    margin-left: 0.5rem;
}

.pill-btn.active i {
    color: var(--primary-color);
}

/* Position Indicator (Glowing Dot) */
.pill-btn.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-color);
    opacity: 0;
    /* Hidden by default, maybe show if we want styling variation */
}

/* We are using the expanded label as the main indicator, so dot might be noisy. 
   Let's keep the dot hidden for now or redesign it. 
   Actually, let's use a subtle bottom border or glow instead of width change? 
   No, user asked for "Label Aktif" which implies text reveal.
*/

.pill-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
    color: #f3f4f6;
}

/* Overlay Modal (Umum) */
.overlay-modal {
    transition: opacity 0.3s ease-out;
    will-change: opacity;
}

.overlay-modal:not(.visible) {
    opacity: 0;
    pointer-events: none;
}

.overlay-modal .modal-content {
    /* Subtle unified transform */
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    /* Standard Smooth Easing (FastOutSlowIn) */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-out;
    will-change: transform, opacity;
}

.overlay-modal.visible .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Mencegah body di background ter-scroll saat modal aktif */
html.body-lock-scroll,
body.body-lock-scroll {
    overflow: hidden;
}

/* Mencegah "scroll chaining" di modal AI */
#ai-qa-overlay .card {
    overscroll-behavior: contain;
}

/* Mencegah "scroll chaining" di modal Navigasi & Pencarian */
#nav-overlay,
#search-overlay {
    overscroll-behavior: contain;
}


/* Layout Grid Navigasi */
.nav-links-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    /* 1 kolom default */
    gap: 1rem;
    /* Jarak antar item (diperbesar) */
}

@media (min-width: 768px) {

    /* md breakpoint */
    .nav-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        /* 2 kolom di layar medium+ */
        gap: 1.5rem;
        /* Jarak lebih besar di desktop */
    }
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* Jarak ikon dan teks */
    padding: 0.75rem 1rem;
    /* Padding internal */
    border-radius: 0.75rem;
    /* rounded-xl */
    transition: background-color 0.2s;
    color: #9ca3af;
    /* gray-400 */
    font-size: 1.125rem;
    /* text-lg */
    font-weight: 600;
    /* font-semibold */
}

.nav-link-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    /* gray-200 */
}

.nav-link-item i {
    width: 20px;
    /* Lebar tetap untuk ikon */
    text-align: center;
    color: var(--primary-color);
}

/* Layout Hasil Pencarian */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    transition: background-color 0.2s;
    color: #9ca3af;
    /* gray-400 */
}

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    /* gray-200 */
}

.search-result-item i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.search-result-item strong {
    color: #f9fafb;
    /* gray-100 */
    font-weight: 600;
}

/* Style untuk Dots Slider */
.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4b5563;
    /* gray-600 */
    transition: background-color 0.3s;
    border: none;
    padding: 0;
    cursor: pointer;
}

.testimonial-dot.active {
    background-color: var(--primary-color);
}

/* ▼▼▼ STYLE BARU UNTUK KONSISTENSI SLIDER GALERI ▼▼▼ */
.gallery-container {
    /* Mirip dengan .testimonial-container jika ada style spesifik */
    position: relative;
    /* Diperlukan jika tombol next/prev dibuat absolute lagi */
}

/* ▲▲▲ SELESAI ▲▲▲ */


/* Media Print */
@media print {

    body,
    .card {
        background-color: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }

    .no-print {
        display: none !important;
    }

    .privacy-shield {
        filter: none;
    }

    section {
        margin-bottom: 2rem;
        page-break-inside: avoid;
    }

    a {
        text-decoration: none;
        color: inherit;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* Scrollbar Hiding Utilities */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Marquee Animation */
.marquee-container {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.animate-marquee {
    animation: marquee 25s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Flip Card 3D Effect */
.perspective-1000 {
    perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

.flip-card-container.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* --- Smooth Theme Transition --- */
html,
body {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smoothness for common containers key to the theme */
.card,
.bg-gray-800,
.bg-gray-900,
.bg-gray-700,
.bg-gray-800\/50,
.bg-gray-800\/30,
.bg-gray-700\/50,
.bg-gray-700\/80,
.border-gray-700,
.border-gray-700\/50,
.pill-btn,
.nav-link-item,
.search-result-item {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Text color smoothing */
.text-white,
.text-gray-300,
.text-gray-400,
.text-gray-500,
h1,
h2,
h3,
h4,
p,
span,
i {
    transition-property: color, text-decoration-color, fill, stroke;
    transition-duration: 0.5s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}