/* General Resets & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff; /* Biru */
    --secondary-color: #6c757d; /* Abu-abu */
    --accent-color: #28a745; /* Hijau */
    --text-color: #333;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --white: #fff;
    --gray-light: #e9ecef;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: darken(var(--primary-color), 10%); /* Perlu fungsi darken, tapi ini ilustrasi */
    /* Atau langsung: color: #0056b3; */
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Menghilangkan spasi di bawah gambar */
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0056b3; /* Sedikit lebih gelap */
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-primary-outline {
    display: inline-block;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 25px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    background-color: transparent;
}

.btn-primary-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-download {
    display: inline-block;
    margin: 10px;
}

.btn-download img {
    height: 44px; /* Tetapkan tinggi untuk konsistensi */
    width: auto;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px; /* Atur tinggi logo */
    width: auto;
}

nav .nav-links {
    display: flex;
}

nav .nav-links li {
    margin-left: 30px;
}

nav .nav-links a {
    color: var(--text-color);
    font-weight: 600;
    position: relative;
}

nav .nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

nav .nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Menu Toggle Animation */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Sections */
section {
    padding: 80px 0;
    text-align: center;
}

section:nth-child(even) {
    background-color: var(--light-bg);
}

h1, h2 {
    color: #212529;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.2em;
}

h2 {
    font-size: 2.5em;
}

h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
}

p {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.7;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/topjitu-hero.jpg') no-repeat center center/cover;
    color: var(--white);
    padding: 150px 0;
    text-align: center;
    min-height: 600px; /* Minimal tinggi */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.8em;
    margin-bottom: 25px;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content .tagline {
    font-size: 1.5em;
    margin-bottom: 30px;
    color: var(--gray-light);
}

.hero-content .btn-primary {
    padding: 15px 35px;
    font-size: 1.2em;
}

.hero-content .disclaimer {
    font-size: 0.9em;
    margin-top: 20px;
    opacity: 0.8;
}

/* About Section */
.about-section .about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: left;
    align-items: center;
}

.about-section .about-image img {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Features Section */
.features-section .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.feature-item img {
    margin: 0 auto 20px auto;
    width: 64px;
    height: 64px;
}

.feature-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Games Section */
.games-section .game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 50px;
}

.game-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.game-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.game-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.game-item h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
    padding: 0 20px;
}

.game-item p {
    font-size: 1em;
    padding: 0 20px 20px 20px;
    margin-bottom: 0;
}


/* CTA Section */
.cta-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 80px 0;
}

.cta-section h2 {
    color: var(--white);
    font-size: 3em;
}

.cta-section p {
    font-size: 1.3em;
    margin-bottom: 40px;
    color: var(--gray-light);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-note {
    margin-top: 30px;
    font-size: 1em;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--gray-light);
    padding: 60px 0 20px 0;
    font-size: 0.9em;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    text-align: left;
}

.footer-grid h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.4em;
}

.footer-grid ul {
    padding: 0;
}

.footer-grid ul li {
    margin-bottom: 10px;
}

.footer-grid ul li a {
    color: var(--gray-light);
    transition: color 0.3s ease;
}

.footer-grid ul li a:hover {
    color: var(--white);
}

.footer-contact .social-links {
    margin-top: 20px;
}

.footer-contact .social-links a {
    display: inline-block;
    margin-right: 15px;
    transition: transform 0.2s ease;
}

.footer-contact .social-links a:hover {
    transform: translateY(-3px);
}

.footer-contact .social-links img {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* Responsive Design */
@media (min-width: 768px) {
    .about-section .about-grid {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    .about-section .about-image {
        order: 1; /* Pindahkan gambar ke kanan */
    }
    .about-section .about-text {
        order: 0; /* Pindahkan teks ke kiri */
    }
}

@media (max-width: 992px) {
    h1 {
        font-size: 2.8em;
    }
    h2 {
        font-size: 2em;
    }
    .hero-content h1 {
        font-size: 3em;
    }
    .hero-content .tagline {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
    }

    nav .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        position: absolute;
        top: 80px; /* Sesuaikan dengan tinggi header */
        left: 0;
        padding: 20px 0;
        transition: all 0.3s ease-in-out;
        opacity: 0;
        pointer-events: none;
    }

    nav .nav-links.active {
        display: flex;
        opacity: 1;
        pointer-events: all;
    }

    nav .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    nav .nav-links a {
        padding: 10px 0;
        display: block;
        font-size: 1.2em;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-section {
        padding: 100px 0;
    }
    .hero-content h1 {
        font-size: 2.5em;
    }
    .hero-content .tagline {
        font-size: 1em;
    }

    section {
        padding: 50px 0;
    }

    .about-section .about-grid {
        grid-template-columns: 1fr;
    }
    .about-section .about-text, .about-section .about-image {
        text-align: center;
    }

    .feature-grid, .game-grid, .footer-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }
    h2 {
        font-size: 1.8em;
    }
    .hero-content h1 {
        font-size: 2em;
    }
    .btn-primary {
        padding: 10px 20px;
        font-size: 1em;
    }
}