/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Memberi jarak agar judul section tidak tertutup header */
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-link {
    text-decoration: none;
    color: #fff; /* Mewarisi warna dari parent (putih) */
}

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

.logo-img {
    height: 45px;
    width: auto;
}

.logo h1 {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 1.5em;
    margin-bottom: 0px;
    color: #fff;
}

.tagline {
    font-size: 0.8em;
    opacity: 0.9;
    color: #fff;
    margin-top: -10px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 400;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Sembunyikan di desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger-menu span {
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 5px;
    transition: all 0.3s linear;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: white;
    color: #1e3c72;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #2a5298;
    color: white;
}

.btn-secondary:hover {
    background: #1e3c72;
}

/* Products Section */
.products {
    padding: 50px 0 50px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 1.7em;
    margin-top: -15px;
    margin-bottom: 40px;
    color: #1e3c72;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.product-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.product-card h3 {
    color: #1e3c72;
    margin-bottom: 15px;
}

.product-card p {
    margin-bottom: 20px;
    color: #666;
}

/* Features Section */
.features {
    padding: 20px 0 80px 0;
    background: white;
}

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

.feature-item {
    text-align: center;
}

.feature-icon {
    font-size: 3em;
    color: #2a5298;
    margin-bottom: 15px;
}

.feature-item h3 {
    color: #1e3c72;
    margin-bottom: 10px;
}

.feature-item p {
    color: #666;
}

/* About Section */
.about {
    padding: 20px 0 80px 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.about .section-title {
    color: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1em;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Contact Section */
.contact {
    padding: 20px 0 80px 0;
    background: #f8f9fa;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item h3 {
    color: #1e3c72;
    margin-bottom: 10px;
}

.contact-item p {
    color: #666;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2a5298;
}

.contact-form button {
    width: 100%;
    background-color: #356ac4;
    color: #fff;
}

/* Footer */
footer {
    background: #1e3c72;
    color: white;
    text-align: center;
    padding: 30px 0;
}

footer p {
    margin: 5px 0;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Tombol Kembali ke Atas */
.to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1e3c72; /* Warna sama dengan footer */
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s;
}

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

/* Promo Popup */
.promo-popup {
    /* Posisi diatur oleh container */
    position: absolute;
    bottom: 0;
    right: 0;
    background: #203D43;
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    max-width: 320px;
    width: calc(100vw - 40px); /* Lebar popup di mobile */
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.promo-popup.show {
    transform: translateY(0);
    opacity: 1;
}

.promo-popup p {
    margin-bottom: 1rem;
    line-height: 1.4;
}

#closePromo {
    background: #DC4E4E;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#closePromo:hover {
    background: #c74242; /* A slightly darker shade of primary */
}

.popup-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.popup-link {
    color: #F8C674;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.popup-link:hover {
    color: white;
    text-decoration: underline;
}

/* Sembunyikan tombol ke atas saat popup promo muncul */
.promo-popup.show + #toTopBtn.show {
    opacity: 0;
    pointer-events: none;
}

.promo-popup p {
    font-size: 14px;
    text-align: center;
}

/* Wadah untuk elemen fixed */
.fixed-elements-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Responsive */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px; /* Menyesuaikan jarak untuk header mobile yang lebih tipis */
    }

    header {
        padding: 10px 0;
    }

    .logo h1 {
        font-size: 1.5em;
    }

    .tagline {
        font-size: 0.7em;
    }

    .hamburger-menu {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 50%;
        max-width: 300px;
        height: 100vh;
        background: #1e3c72;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        transition: right 0.3s ease-in-out;
        padding-top: 80px;
    }

    nav.open {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    nav li {
        width: 100%;
        text-align: center;
    }

    nav a {
        display: block;
        padding: 10px 10px;
        margin: 0 20px;
        font-size: 1.2em;
        background: #2a5298;
        border-radius: 10px;
        color: white;
        text-decoration: none;
        transition: background 0.3s;
    }

    nav a:hover {
        background: #356ac4;
    }

    .hamburger-menu.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hero-content h2 {
        font-size: 1.8em;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .hamburger-menu.open span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.open span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}