/* === CSS Variables for Easy Theming === */
:root {
    --primary-color: #FFD700; /* Warna kuning khas konstruksi/safety */
    --secondary-color: #2c3e50;
    --dark-color: #1a1a1a;
    --light-color: #f4f4f4;
    --text-color: #333;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --fontlogo: #062d81; 
}

/* === General Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--secondary-color);
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

section {
    padding: 4rem 0;
}

/* === Header & Navbar === */
.navbar {
    background: rgba(26, 26, 26, 0.8);
    color: #fff;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: background 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Memberi jarak antara logo dan teks */
}

.navbar .logo img {
    height: 40px; /* Atur tinggi logo sesuai kebutuhan */
    width: auto; /* Lebar akan menyesuaikan secara otomatis */
}

.navbar .logo span {
    color: var(--primary-color); /* Memberi warna pada teks */
}


.navbar ul {
    display: flex;
    list-style: none;
}

.navbar ul li a {
    color: #fff;
    padding: 0.75rem;
    margin: 0 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar ul li a:hover,
.navbar ul li a.active {
    color: var(--primary-color);
}

/* Style tambahan untuk link aktif agar lebih menonjol */
.navbar ul li a.active {
    font-weight: 700; /* Membuat teks sedikit lebih tebal, sama seperti heading */
}

/* === Hero Section === */
.hero-slider-container {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-slides {
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-content h1 {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 1rem;
}

.slide-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
}

.slider-nav.prev { left: 20px; }
.slider-nav.next { right: 20px; }

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    transition: transform 0.3s ease, background 0.3s ease;
}

.btn:hover {
    transform: scale(1.05);
    background: #ffed4a;
}

/* === Categories Section === */
#categories {
    background: var(--light-color);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: #fff;
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.category-card .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* === Featured Products Section === */
#featured-products {
    background-color: #fff; /* Latar belakang putih agar kontras */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    overflow: hidden; /* Agar gambar tidak keluar dari border-radius */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card img {
    width: 100%;
    height: 200px; /* Tinggi gambar yang konsisten */
    object-fit: cover; /* Memastikan gambar terisi penuh tanpa distorsi */
    display: block;
}

.product-card-content {
    padding: 1.5rem;
}

.product-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.product-title {
    font-size: 1.25rem;
    color: var(--secondary-color);
}

/* === Footer === */
.footer {
    background: var(--dark-color);
    color: #fff;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    font-size: 0.9rem;
}

/* === Hamburger Menu (Hidden on Desktop) === */
.nav-toggle {
    display: none;
    position: relative;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 5px;
    transition: transform 0.25s ease-in-out;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-active .hamburger {
    transform: rotate(45deg);
}
.nav-active .hamburger::before {
    transform: rotate(90deg) translate(-8px, 0px);
}
.nav-active .hamburger::after {
    opacity: 0;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    h2 {
        font-size: 2rem;
    }

    /* --- Mobile Navigation --- */
    .nav-toggle {
        display: block;
    }

    .navbar nav {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 70%;
        height: 100vh;
        background: var(--dark-color);
        padding-top: 6rem;
        transition: right 0.3s ease-in-out;
        z-index: 1001;
    }

    .nav-active .navbar nav {
        right: 0; /* Slide in */
    }

    .navbar ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .navbar .dropdown-menu {
        position: static;
        display: block;
        width: auto;
        min-width: 0;
        border-radius: 0;
        border-top: none;
        box-shadow: none;
        background: transparent;
        padding-left: 2rem;
    }

    /* --- Hero & Search --- */
    .slide-content h1 {
        font-size: 2.5rem;
    }

    .main-search-form {
        flex-direction: column;
    }

    /* --- Grids --- */
    .category-grid, .product-grid {
        grid-template-columns: 1fr;
    }
    .video-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-about, .footer-socials {
        width: 100%;
    }
}

/* === Contact Page & Form === */
.contact-page section {
    /* Beri jarak dari atas agar tidak tertutup navbar */
    padding-top: 120px; 
    padding-bottom: 4rem;
    background: var(--light-color);
}

.contact-page .subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.contact-form .btn {
    width: 100%;
    font-size: 1.2rem;
}

.form-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid transparent;
}

.form-message.success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.form-message.error { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }

/* === Product Detail Page === */
.product-detail-page {
    padding-top: 120px;
    padding-bottom: 4rem;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: flex-start;
}

.product-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-info h1 {
    font-size: 2.8rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.product-info .product-category {
    font-size: 1rem;
}

.product-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.product-specs {
    list-style: none;
    padding: 0;
    font-size: 1rem;
}

.product-specs li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.product-not-found {
    text-align: center;
    padding: 4rem 0;
}

@media (max-width: 900px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

.product-image #main-product-image {
    margin-bottom: 1rem;
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.thumbnail-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s, opacity 0.3s;
    opacity: 0.7;
}

.thumbnail-image:hover {
    opacity: 1;
}

.thumbnail-image.active-thumbnail {
    border-color: var(--primary-color);
    opacity: 1;
}

/* === YouTube Video Section === */
#youtube-video {
    background-color: var(--light-color);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* === About Us Page === */
.about-page #about-hero {
    background: var(--light-color);
    padding-top: 120px;
    padding-bottom: 2rem;
    text-align: center;
}

.about-page #about-hero h1 {
    font-size: 3rem;
}

.about-page #about-hero .subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0.5rem auto 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: center;
}

.mission-card, .vision-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.mission-card h3, .vision-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.mission-card .icon, .vision-card .icon {
    font-size: 2rem;
    margin-right: 0.5rem;
}

@media (max-width: 900px) {
    .about-grid, .mission-vision {
        grid-template-columns: 1fr;
    }
    .about-image {
        order: -1; /* Pindahkan gambar ke atas pada layar kecil */
    }
    .about-text h2 {
        text-align: center;
    }
}

/* === Video Gallery Page === */
#gallery-content {
    padding: 4rem 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.video-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-info {
    padding: 1.5rem;
    flex-grow: 1;
}

.video-info h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.video-info p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

/* === Main Search Section (Below Hero) === */
#main-search {
    background-color: var(--light-color);
    padding: 3rem 0;
    border-bottom: 1px solid #e0e0e0;
}

#main-search h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.main-search-form {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.main-search-form input[type="text"] {
    flex-grow: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1rem;
    outline: none;
}


/* === Search Page === */
.search-page .subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
}

/* === Dropdown Menu === */
.navbar ul li.dropdown {
    position: relative; /* Diperlukan untuk posisi absolut menu anak */
}

.navbar .dropdown-menu {
    display: none; /* Sembunyikan secara default */
    position: absolute;
    top: 100%; /* Posisikan tepat di bawah induknya */
    left: 0;
    background-color: var(--dark-color);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 220px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1001;
    border-top: 3px solid var(--primary-color);
}

.navbar .dropdown:hover .dropdown-menu {
    display: block; /* Tampilkan saat di-hover */
}

.navbar .dropdown-menu li a {
    padding: 0.75rem 1.5rem;
    display: block;
    width: 100%;
    white-space: nowrap;
}

.navbar .dropdown-menu li a:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.navbar .dropdown-menu li a.active {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-weight: bold;
}

/* === Tombol Naik ke Atas (Scroll to Top) === */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 24px;
    text-decoration: none;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    transform: translateY(20px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* === WhatsApp Floating Button === */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 90px; /* Posisikan di atas tombol scroll-to-top */
    right: 20px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.25);
    z-index: 100;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 35px;
    margin-top: 12px;
}
