/* --- CSS VARIABLES & THEME CONFIGURATION --- */
:root {
    /* Light Theme (Default) */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-body: #ffffff;
    --bg-surface: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --nav-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
    /* Dark Theme */
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --nav-bg: rgba(15, 23, 42, 0.9);
}

/* --- RESET & BASE STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- LAYOUT UTILITIES --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 40px 0;
}

.text-center {
    text-align: center;
}

/* Grid untuk 5 produk */
.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    justify-items: center;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    border: 2px solid var(--border-color);
    color: var(--text-main);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- HEADER & NAVIGATION --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 10px 0;
    display: block;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* --- DROPDOWN MENU STYLES --- */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-card);
    min-width: 200px;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 10px 20px;
    color: var(--text-main);
    font-size: 0.9rem;
    display: block;
}

.dropdown-menu li a:hover {
    background-color: var(--bg-surface);
    color: var(--primary);
}

.has-dropdown::after {
    content: ' ▼';
    font-size: 0.6rem;
    margin-left: 2px;
    vertical-align: middle;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.1rem;
    padding: 5px;
    border-radius: 50%;
}

.theme-toggle:hover {
    background-color: var(--bg-surface);
}

/* --- PAGE MANAGEMENT --- */
.page-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page-section.active-page {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- HERO SECTION ---  */
.hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

/* Container untuk Background Bergerak */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    
    /* 1. Tentukan 3 Gambar (sesuaikan URL jika perlu) */
    background-image: 
        url('http://localhost/wificepat/non/asset/images/Jheader1-server100023J'),
        url('http://localhost/wificepat/non/asset/images/Jheader1-server100023J.png'), 
        url('http://localhost/wificepat/non/asset/images/Jheader1-server100023J.png');
    
    /* 2. Ukuran gambar diperbesar 3x agar pas untuk 3 slide */
    background-size: 120% 100%;
    
    /* 3. Posisi awal (mulai dari gambar 1) */
    background-position: 0% 50%;
    
    /* 4. Durasi total perputaran (15 detik untuk 3 gambar = 5 detik per gambar) */
    /* Jika ingin lebih lambat, ubah 15s menjadi 30s */
    animation: slideHero 15s ease infinite;
	background-repeat: no-repeat;
	
}

/* 5. Keyframe Animasi Bergerak */
@keyframes slideHero {
    0% {
        background-position: 0% 50%; /* Gambar 1 */
    }
    33% {
        background-position: 50% 50%; /* Pindah ke Gambar 2 */
    }
    66% {
        background-position: 100% 50%; /* Pindah ke Gambar 3 */
    }
    100% {
        background-position: 0% 50%; /* Kembali ke Gambar 1 (Loop) */
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ubah angka 0.6 menjadi 0.8 (lebih gelap) atau 0.3 (lebih terang) */
    background: rgba(0, 0, 0, 0.6); 
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.hero-tags span {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    backdrop-filter: blur(5px);
}

/* --- CARDS --- */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    max-width: 320px;
    text-align: center !important;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto; /* Centered icon */
    font-size: 1.2rem;
}

.card h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
}

.price span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.features-list li {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center; /* Center features */
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.check-icon {
    color: #10b981;
    font-weight: bold;
}

/* --- PAGE 2: SERVICES DETAILED --- */
.service-detail-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 50px;
}

.service-detail-row:nth-child(even) {
    flex-direction: row-reverse;
}

.service-content { flex: 1; }
.service-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.service-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* --- PAGE 3: CONTACT & ABOUT --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-main);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* --- FAQ SECTION --- */
.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.faq-answer {
    margin-top: 8px;
    color: var(--text-muted);
    display: none;
    font-size: 0.9rem;
}

.faq-item.active .faq-answer {
    display: block;
}

/* --- FOOTER --- */
footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.footer-col h4 {
    margin-bottom: 15px;
    font-size: 1rem;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .hero { height: auto; padding: 60px 0; }
    .service-detail-row, .service-detail-row:nth-child(even) {
        flex-direction: column;
        text-align: left;
    }
    .contact-wrapper { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .grid-products { grid-template-columns: 1fr; }
    .card { max-width: 100%; }

    /* Mobile Nav */
    nav {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
        position: relative;
    }

    .logo {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 10px;
    }

    .nav-actions {
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 1002;
    }

    .nav-actions .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        font-size: 1.5rem;
        background: none;
        border: none;
        color: var(--text-main);
        cursor: pointer;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        background-color: var(--bg-card);
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-hover);
        padding: 20px;
        position: absolute;
        top: 60px;
        left: 0;
        z-index: 1001;
    }


    .nav-links.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-item:hover .dropdown-menu {
        display: block;
    }
}