/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
    color: #0066cc;
}

/* Header Styles for Desktop */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Penting untuk positioning nav dan hamburger */
    z-index: 100; /* Default z-index untuk header */
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.8;
}

nav ul {
    display: flex; /* Default: flex untuk desktop */
    list-style: none;
}

nav ul li a {
    color: white;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    background-color: #3498db;
}

/* Hamburger Menu - Hidden by default on Desktop */
.hamburger-menu {
    display: none; /* Sembunyikan di desktop */
    font-size: 1.8rem;
    cursor: pointer;
    color: white;
    padding: 0.5rem;
    background-color: #3498db; /* Warna background agar menonjol */
    border-radius: 4px;
    line-height: 1; /* Penting untuk pemusatan ikon */
    z-index: 101; /* Pastikan di atas header dan nav di mobile */
}

/* Dropdown Menu (Desktop) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 0 0 4px 4px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #3498db;
    color: white;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Banner Styles */
.banner {
    position: relative;
    height: 400px;
    overflow: hidden;
    background-color: #1C2C3B;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-text {
    position: absolute;
    bottom: 50px;
    left: 50px;
    color: white;
    padding: 1.5rem;
    border-radius: 5px;
    max-width: 70%;
}

.banner-text h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.btn {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #c0392b;
}

/* Product Styles */
.featured {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.featured h2, .category-section h2, .tutorial-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: #2c3e50;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.product-card h3 {
    padding: 0.8rem;
    font-size: 1.1rem;
    min-height: 5.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-card p {
    padding: 0 0.8rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.product-card button {
    display: block;
    width: 90%;
    margin: 1rem auto;
    padding: 0.6rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Tutorial Section */
.tutorial-section {
    padding: 2rem;
    background-color: #f1f1f1;
    margin: 2rem 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}

.tutorial-card {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.tutorial-card img {
    width: 40%;
    object-fit: cover;
}

.tutorial-content {
    padding: 1.5rem;
    width: 60%;
}

.tutorial-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section a {
    color: #3498db;
    margin-right: 1rem;
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    background-color: rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
}

/* Page Specific Styles (News, About, Career) */
main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.news-article {
    background: white;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.news-article h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-article img {
    width: 50%;
    max-height: 400px;
    margin: auto;
    display: block;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: bold;
}

.tutorial-steps {
    margin-top: 1.5rem;
}

.tutorial-steps h3 {
    margin: 1rem 0 0.5rem;
    color: #3498db;
}

.profile-card {
    background: white;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 2rem auto;
}

.profile-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 5px solid #3498db;
}

.job-card {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.apply-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
}

.application-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.application-form input,
.application-form select,
.application-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.application-form button[type="submit"] {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

/* Isi page About */
.about-isi {
    background: white;
    padding: 1rem;
    text-align: justify;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin: 1rem auto;
    max-width: 900px;
}

/* Utility classes to replace inline styles */
.page-title {
    text-align: center;
    padding: 1rem;
}

.author-link {
    color: yellowgreen;
    font-weight: bold;
}

/* --- Responsive Styles --- */

@media (max-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        flex-wrap: nowrap;
        height: 60px;
        z-index: 100; /* Match header z-index */
    }

    .logo {
        width: auto;
        text-align: left;
        margin-bottom: 0;
    }

    /* CRITICAL: Ensure hamburger menu is visible and on top */
    .hamburger-menu {
        display: block !important; /* Added !important for debugging */
        position: relative;
        z-index: 101 !important; /* Added !important for debugging */
    }

    /* CRITICAL: Nav must be hidden by default and appear on 'show' class */
    nav {
        display: none !important; /* Hidden by default */
        position: absolute;
        top: 60px; /* Place it right below the header's height */
        left: 0;
        width: 100%;
        background-color: #2c3e50;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        z-index: 99 !important; /* Below hamburger but above regular content */
        overflow-y: auto; /* Allow scrolling if menu is too long */
        max-height: calc(100vh - 60px); /* Limit height to viewport - header height */
    }


    nav ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;

        display: none !important; /* Sembunyikan juga ul secara default di mobile */
    }

    nav.show {
        display: flex !important; /* Make it visible when 'show' class is added */
        flex-direction: column;
        text-align: center;
    }

    nav.show ul {
        display: flex !important; 
    }

    nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul li a {
        padding: 1rem;
        width: 100%;
        text-align: center;
        display: block;
        color: white;
    }

    /* Dropdown in Mobile */
    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: #3a536b;
        width: 100%;
        display: none !important; /* Added !important for debugging */
    }

    .dropdown-content.show-dropdown {
        display: block !important;
    }

    .dropdown-content a {
        padding-left: 2rem;
        color: white;
    }

    /* Banner Styles for Mobile */
    .banner {
        height: 250px;
    }

    .banner-text {
        left: 20px;
        bottom: 20px;
        padding: 1rem;
        max-width: 90%;
        text-align: center;
        width: calc(100% - 40px);
    }

    .banner-text h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .banner-text p {
        font-size: 0.9rem;
        display: none;
    }
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    /* Product Grid for Mobile */
    .products {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-card h3 {
        min-height: 0;
    }

    /* Footer for Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    /* Page Specific Styles for Mobile */
    main {
        margin: 1.5rem 1rem;
        padding: 0;
    }

    .profile-card, .about-isi {
        padding: 1.5rem;
        margin: 1.5rem 1rem;
    }

    .news-article img {
        width: 100%;
        height: auto;
    }

    .tutorial-card {
        flex-direction: column;
    }

    .tutorial-card img,
    .tutorial-content {
        width: 100%;
    }
    .tutorial-section {
        padding: 1rem;
        margin: 1rem;
    }
}

/* Desktop-specific styles (Override mobile styles for larger screens) */
@media (min-width: 769px) {
    .hamburger-menu {
        display: none; /* Sembunyikan hamburger di desktop */
    }
    nav {
        display: block !important; /* Pastikan nav selalu terlihat di desktop */
        position: static;
        background-color: transparent;
        box-shadow: none;
        z-index: auto;
        overflow-y: visible;
        max-height: none;
    }
    nav ul {
        display: flex; /* Pastikan nav ul flex di desktop */
    }
    .dropdown-content {
        position: absolute;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        display: none;
    }
    /* Untuk konten utama di desktop, pastikan max-width dan centering */
    .featured, .tutorial-section, main {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        padding: 2rem;
    }
    .about-isi {
        max-width: 900px;
    }
}