/* =========================================
   RESET & VARIABEL GLOBAL
========================================= */
:root {
    /* Brand Colors */
    --primary-blue: #0A2540;
    --accent-blue: #00D4FF;
    --merah: #ff0000;
    --jingga-tua: #ff4e00;
    --jingga-muda: #fd8946;
    
    /* Neutral & Text Colors */
    --dark: #050505;
    --text-dark: #141414;
    --text-grey: #666666;
    --text-light: #fce9e0;
    --bg-light: #ffffff;
    
    /* Utilities */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sansation', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* =========================================
   TIPOGRAFI & UTILITY CLASSES
========================================= */
/* Utility Classes Sansation */
.sansation-light { font-family: "Sansation", sans-serif; font-weight: 300; font-style: normal; }
.sansation-regular { font-family: "Sansation", sans-serif; font-weight: 400; font-style: normal; }
.sansation-bold { font-family: "Sansation", sans-serif; font-weight: 700; font-style: normal; }
.sansation-light-italic { font-family: "Sansation", sans-serif; font-weight: 300; font-style: italic; }
.sansation-regular-italic { font-family: "Sansation", sans-serif; font-weight: 400; font-style: italic; }
.sansation-bold-italic { font-family: "Sansation", sans-serif; font-weight: 700; font-style: italic; }

/* Global Headings */
h1, h2, h3, .logo {
    font-weight: 700;
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--jingga-tua);
    font-size: 2rem;
}

/* Global Texts */
.product-category, .copyright {
    font-weight: 300;
}

/* =========================================
   NAVIGASI (HEADER)
========================================= */
nav {
    position: sticky;
    top: 0;
    background-color: var(--dark);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo {
    color: var(--jingga-tua);
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--jingga-tua);
}

/* Hamburger Menu (Sembunyi di Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: var(--transition);
}

/* =========================================
   LAYOUT SECTION UMUM
========================================= */
section,
header,
footer {
    padding: 5rem 10%;
}

/* =========================================
   HERO SECTION (BERANDA)
========================================= */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5)), url('images/hero-bg-maximatech1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-light);
    min-height: 80vh;
}

.hero-content {
    max-width: 50%;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--jingga-tua);
}

.hero-content p {
    line-height: 1.6; /* Memberi rongga antar baris agar lebih mudah dibaca */
}

.btn-primary {
    display: inline-block;
    padding: 10px 25px;
    margin-top: 20px;
    background-color: var(--jingga-tua);
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--jingga-muda);
    transform: translateY(-3px);
}

/* Animasi Server Mengambang */
.hero-graphic {
    width: 500px;
    height: 500px;
}

.floating-server {
    width: 100%;
    height: 100%;
    background: url('images/hero-img-maximatech1.png') no-repeat center center;
    filter: drop-shadow(0px 10px 8px rgba(0, 0, 0, 0.5));
    background-size: contain;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* =========================================
   TENTANG KAMI
========================================= */
#tentang p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: var(--text-dark);
}

/* Menghilangkan margin pada paragraf terakhir agar tidak ada ruang kosong berlebih di bawah */
#tentang p:last-child {
    margin-bottom: 0;
}

.keunggulan-grid {
    display: grid;
    /* Mengatur grid agar otomatis ke bawah di HP, berjejer 3 di Desktop */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem; /* Memberi jarak batas dengan paragraf di atasnya */
}

.keunggulan-card {
    background-color: var(--bg-light);
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.keunggulan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
    border-bottom: 4px solid var(--jingga-tua); /* Garis aksen muncul saat di-hover */
}

.keunggulan-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem auto;
    color: var(--jingga-tua);
}

.keunggulan-icon svg {
    width: 100%;
    height: 100%;
}

.keunggulan-card h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

/* Mengesampingkan aturan paragraf khusus untuk teks di dalam kartu ini */
#tentang .keunggulan-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 100%; 
    color: var(--text-grey);
}



/* =========================================
   KATALOG PRODUK
========================================= */
/* Tab Navigasi Kategori */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 20px;
    border: 2px solid var(--primary-blue);
    background: transparent;
    color: var(--primary-blue);
    cursor: pointer;
    font-weight: bold;
    border-radius: 20px;
    transition: var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-blue);
    color: var(--text-light);
}

/* Grid & Kartu Produk */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 2px solid var(--bg-light);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--jingga-tua);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.product-info p {
    font-size: 0.9rem;
    color: var(--text-grey);
}

/* =========================================
   BRAND MITRA
========================================= */
.brand-grid {
    display: flex;
    justify-content: center;
    align-items: center; /* Memastikan semua kotak sejajar vertikal */
    gap: 2rem;
    flex-wrap: wrap;
}

.brand-item {
    background: var(--bg-light);
    padding: 20px 40px;
    border-radius: 8px;
    font-weight: bold;
    color: var(--primary-blue);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.brand-item {
    background: var(--bg-light);
    width: 160px;  /* Membuat lebar kotak seragam */
    height: 100px; /* Membuat tinggi kotak seragam */
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mengatur agar gambar logo pas di dalam kotak */
.brand-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* PENTING: Mencegah logo melar atau terpotong */
}

/* Efek hover diganti dari ubah warna menjadi efek melayang */
.brand-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* =========================================
   FOOTER
========================================= */
footer {
    line-height: 1.8;
    background-color: var(--text-dark);
    color: var(--text-light);
    text-align: center;
}

footer h2 {
    color: var(--text-light);
}

.copyright {
    margin-top: 2rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* =========================================
   MEDIA QUERIES (RESPONSIF MOBILE)
========================================= */
@media (max-width: 768px) {
    /* Navigasi Mobile */
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: -100%; 
        width: 100%;
        background-color: var(--text-dark);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s ease-in-out; 
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0; 
    }

    .nav-links li {
        margin: 1rem 0;
    }

    /* Animasi Silang Hamburger */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hero Section Mobile */
    .hero-section {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        padding: 6rem 5% 3rem 5%; 
    }
    
    .hero-content {
        max-width: 100%;
        width: 80%; /* PENTING: Memaksa kontainer merentang penuh ke kiri-kanan */
        padding: 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem; /* Mengecilkan dari 3rem menjadi 1.8rem */
        line-height: 1.3;
        margin-bottom: 1rem;
        margin: 0 auto 1rem auto; /* Mengunci margin agar benar-benar di tengah */
        text-align: center;
    }
    
    .hero-content p {
        color: var(--text-light);
        font-size: 0.95rem; 
        line-height: 1.6; /* Memberi rongga antar baris agar lebih mudah dibaca */
        margin: 0 auto 2rem auto;
        width: 100%; /* Membiarkan paragraf merentang lebar */
        text-align: center;
    }

    .hero-graphic {
        margin-top: 2rem;
        width: 100%;       /* Memaksa lebar agar tidak melebihi layar HP */
        max-width: 350px;  /* Batas maksimal besarnya di HP */
        height: 350px;     /* Menyesuaikan tinggi agar proporsional */
        margin-left: auto; /* Memastikan gambar presisi di tengah layar */
        margin-right: auto;
    }
    
    /* =========================================
       KATALOG PRODUK (KHUSUS MOBILE)
    ========================================= */
    .product-grid {
        /* Memaksa grid produk menjadi 2 kolom sama besar */
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; /* Mengecilkan jarak antar produk agar tidak memakan tempat */
    }

    .product-info {
        padding: 1rem; /* Mengurangi ruang kosong di dalam kartu */
    }

    /* Menyesuaikan tinggi gambar agar tidak terlalu lonjong ke bawah */
    .product-image img {
        height: 150px; 
    }

    /* Mengecilkan ukuran teks agar proporsional di kotak yang sempit */
    .product-category {
        font-size: 0.7rem;
    }

    .product-info h3 {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 0.3rem;
    }

    .product-info p {
        font-size: 0.75rem;
        line-height: 1.4;
        /* Opsional: Memotong teks spesifikasi yang terlalu panjang menjadi 3 baris saja dengan titik-titik (...) */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* =========================================
       BRAND MITRA (KHUSUS MOBILE)
    ========================================= */
    .brand-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* Memaksa membagi ruang menjadi 3 kolom rata */
        gap: 10px; /* Memperkecil jarak antar kotak agar muat di layar HP */
    }

    .brand-item {
        width: 100%;  /* Menghapus batasan kaku 160px, sekarang ukurannya fleksibel mengikuti grid */
        height: 70px; /* Sedikit dipendekkan agar proporsional di layar kecil */
        padding: 8px; /* Mengurangi padding agar logo punya ruang lebih */
    }
}