/* =========================================
   JEJAK NUSANTARA - MODERN GLASSMORPHISM UI
   ========================================= */

/* --- CSS VARIABLES & TOKENS --- */
:root {
    /* Colors */
    --primary: #f1c40f;      /* Gold/Yellow accent */
    --primary-hover: #f39c12;
    --secondary: #00c3ff;    /* Cyan accent */
    --bg-dark: #0a0f18;      /* Deep dark background */
    --text-main: #f8f9fa;
    --text-muted: #a0aec0;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(12px);
    
    /* Gradients */
    --grad-1: linear-gradient(135deg, #FF6B6B, #C0392B);
    --grad-2: linear-gradient(135deg, #4facfe, #00f2fe);
    --grad-3: linear-gradient(135deg, #b02e0c, #eb4d4b); /* Related to history / terracotta */
    --grad-4: linear-gradient(135deg, #11998e, #38ef7d);
    
    /* Typography */
    --font-sans: 'Outfit', 'Segoe UI', sans-serif;
}

/* --- RESET & GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    /* Base background image with heavy overlay to ensure text readability */
    background: linear-gradient(rgba(10, 15, 24, 0.85), rgba(10, 15, 24, 0.95)), 
                url('https://upload.wikimedia.org/wikipedia/commons/7/7e/Borobudur.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* --- BACKGROUND ANIMATIONS --- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatOrb 10s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* --- UTILITIES --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.highlight {
    color: var(--primary);
    background: -webkit-linear-gradient(45deg, var(--primary), #ffeaa7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-radius: 0 0 20px 20px;
}

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

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    padding: 10px 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links li a:hover, .nav-links li a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links li a.active {
    border-bottom: 2px solid var(--primary);
    border-radius: 12px 12px 0 0;
    background: linear-gradient(to top, rgba(241, 196, 15, 0.2), transparent);
}

.profil-link {
    background: var(--primary) !important;
    color: var(--bg-dark) !important;
    border-radius: 20px !important;
    margin-left: 10px;
}

.profil-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.4);
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
}

/* --- HERO SECTION --- */
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 100px 5% 50px;
    gap: 40px;
}

.hero-content {
    flex: 1;
    animation: fadeUp 1s ease-out forwards;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(241, 196, 15, 0.4);
}

.btn-secondary {
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.hero-image-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.5s ease-out forwards;
}

.hero-visual {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--primary), transparent);
    animation: spin 10s linear infinite;
    opacity: 0.2;
}

.main-hero-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
    animation: float 6s ease-in-out infinite;
}

.floating-card {
    position: absolute;
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    z-index: 3;
    transition: transform 0.1s;
}

.floating-card i {
    font-size: 20px;
    color: var(--primary);
}

.card-hindu {
    top: 10%;
    left: 0;
    animation: float 5s ease-in-out infinite 1s;
}

.card-islam {
    bottom: 15%;
    right: -20px;
    animation: float 7s ease-in-out infinite 2s;
}

/* --- FEATURES / MENU SECTION --- */
.features-section {
    padding: 80px 5%;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.feature-card {
    padding: 30px 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255,255,255,0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.gradient-1 { background: var(--grad-1); }
.gradient-2 { background: var(--grad-2); }
.gradient-3 { background: var(--grad-3); }
.gradient-4 { background: var(--grad-4); }

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.card-action {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s;
}

.feature-card:hover .card-action {
    gap: 10px;
}

/* --- LEGACY CONTENT SUPPORT (Materi, Profil dll) --- */
.content {
    max-width: 900px;
    margin: 120px auto 50px;
    padding: 40px;
    border-radius: 20px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    animation: fadeUp 1s ease;
}

.content h1 {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.content h2 {
    color: var(--secondary);
    margin: 30px 0 15px;
    font-size: 1.5rem;
}

.content p {
    margin-bottom: 15px;
    color: var(--text-main);
    font-size: 1.05rem;
}

.content ul {
    margin: 15px 0 15px 40px;
    color: var(--text-muted);
}

.content ul li {
    margin-bottom: 8px;
}

.img-box {
    margin: 25px 0;
    text-align: center;
}

.content img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.img-caption {
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
    margin-top: 10px !important;
    font-style: italic;
}

/* Legacy profile support */
.biodata-card {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    margin-top: 30px;
}

.foto img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.3);
}

.data table td {
    padding: 10px;
    font-size: 1.1rem;
}
.data table td:first-child {
    font-weight: bold;
    color: var(--primary);
}

/* --- ANIMATIONS --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-subtitle {
        margin: 0 auto 30px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .floating-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 15, 24, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        clip-path: circle(0% at 100% 0);
        transition: clip-path 0.4s ease-out;
    }
    
    .nav-links.active {
        clip-path: circle(150% at 100% 0);
    }
    
    .nav-links li a {
        padding: 15px;
        justify-content: center;
    }
    
    .profil-link {
        margin-left: 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }

    .biodata-card {
        flex-direction: column;
        text-align: center;
    }
}