@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700;900&family=Open+Sans:wght@400;600;700;800&display=swap');

/* --- Reset & Core --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body { 
    font-family: 'Open Sans', sans-serif; 
    background: #000; 
    color: #fff; 
    overflow-x: hidden; 
    width: 100%;
}

/* ==========================================
   SECTION 1: MAIN PAGE (HERO FULLSCREEN)
   ========================================== */
#mainpage {
    position: relative;
    min-height: 100vh;
    /* Overlay gelap & merah sangat minimum */
    background: linear-gradient(135deg, rgba(40, 5, 5, 0.75) 0%, rgba(0, 0, 0, 0.85) 100%), 
                url('../images/main.JPG') no-repeat center center / cover !important;
    display: flex;  
    align-items: center;  
    justify-content: center;  
    text-align: center;
    padding: 80px 20px 40px;
    border-bottom: 2px solid #E6A100;
}

#mainpage::after {
    content: ""; 
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 1;
}

.jpa-logo { 
    position: absolute; 
    top: 25px; 
    left: 40px; 
    width: 110px;
    height: 100px;
    z-index: 10 !important; 
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

/* --- PAKSA ELEMEN HERO SENTIASA CENTER --- */
.hero-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    
    /* Gunakan Flex Column & Align Items Center */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Bekas Logo di Tengah */
.logo-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 25px;
}

/* Tetapan Saiz Logo */
.main-logo {  
    height: 110px; 
    width: auto; 
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}

/* TAJUK DENGAN TONA IVORY/CHAMPAGNE (BEBAS SILAU) */
.hero-text h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(24px, 3.8vw, 44px); 
    font-weight: 900; 
    color: #EFE5D2; /* Tona gading/champagne lembut menggantikan putih silau */
    letter-spacing: 1.5px; 
    text-transform: uppercase; 
    line-height: 1.25;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9),
                 0 0 15px rgba(213, 84, 0, 0.25);  
}

.hero-text .highlight-title {
    color: #E6A100; /* Warna Emas Muted Warm Gold */
    display: inline-block;
    margin-left: 8px;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* --- HERO BUTTONS --- */
.hero-btn { 
    margin-top: 40px; 
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

/* 1. Butang Pengenalan (Solid Maroon / Terracotta) */
.btn-scroll { 
    display: inline-block; 
    padding: 14px 35px; 
    background: #8B0000; 
    color: #ffffff; 
    text-decoration: none; 
    font-weight: 700; 
    border-radius: 6px; 
    font-size: 14px; 
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: none;
}

.btn-scroll:hover { 
    background: #E65100; 
    color: #ffffff;
    transform: translateY(-2px); 
    box-shadow: 0 6px 18px rgba(230, 81, 0, 0.5);
}

/* 2. Butang Log Masuk (Solid Crimson Gelap) */
.btn-login-hero {
    display: inline-block; 
    padding: 14px 35px; 
    background: #8B0000; 
    color: #ffffff; 
    text-decoration: none; 
    font-weight: 700; 
    border-radius: 6px; 
    font-size: 14px; 
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-login-hero:hover {
    background: #A71D1D;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(167, 29, 29, 0.5);
}

/* ==========================================
   SECTION 2: ABOUT US (PENGENALAN)
   ========================================== */
#about-us {
    position: relative;
    min-height: 100vh;
    background: url('../images/main.JPG') no-repeat center center / cover !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
}

#about-us::before {
    content: ""; 
    position: absolute; 
    inset: 0;
    background: rgba(0, 0, 0, 0.85); 
    z-index: 1;
}

#about-us .container { 
    position: relative; 
    z-index: 2; 
    width: 100%; 
    max-width: 1150px;
}

.content-box-minimal { 
    width: 100%;
    background: rgba(74, 4, 4, 0.35); 
    padding: 50px 60px; 
    border-radius: 16px;
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

.content-box-minimal h1 { 
    color: #E6A100; 
    font-size: 26px; 
    margin-bottom: 25px; 
    font-weight: 800; 
    text-align: center; 
    text-transform: uppercase;
    letter-spacing: 2px;
}

.text-content p { 
    font-size: 15.5px; 
    line-height: 1.8; 
    text-align: justify; 
    color: #f0f0f0; 
    margin-bottom: 18px; 
}

.text-content p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   SECTION 3 & 4: GALLERY & LOGIN
   ========================================== */
#gallery {
    padding: 100px 20px;
    background: linear-gradient(135deg, #800000 0%, #2b0202 100%) !important;
    position: relative;
    border-top: 2px solid rgba(230, 161, 0, 0.2);
}

#gallery::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 75%);
    pointer-events: none;
}

.gallery-title { 
    text-align: center;
    color: #E6A100;
    margin-bottom: 50px;
    font-weight: 800; 
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 4px 10px rgba(0,0,0,0.5);
}

.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    max-width: 1200px;
    width: 95%;
    margin: 0 auto;
    justify-content: center;
}

.photo-item { 
    flex: 0 0 calc(25% - 25px); 
    aspect-ratio: 4 / 3; 
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.4s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    background: #000;
}

.photo-item img { 
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: 0.6s ease; 
}

.photo-item:hover {
    transform: translateY(-8px);
    border-color: #E6A100;
    box-shadow: 0 15px 30px rgba(0,0,0,0.6);
}

.section-login { 
    min-height: 100vh; 
    background: url('../images/gambar_api.jpg') no-repeat center center / cover !important;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    position: relative;
    padding: 60px 20px;
}

.section-login::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35); 
    z-index: 1;
}

.login-box { 
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.75); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    width: 100%; 
    max-width: 520px; 
    padding: 50px 40px; 
    border-radius: 12px; 
    border-top: 10px solid #4a0404; 
    color: #333; 
    text-align: center; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.5); 
}

.login-box h1 { 
    margin-bottom: 25px; 
    color: #4a0404; 
    font-weight: 800; 
    font-size: 26px;
    text-transform: uppercase; 
}

.input-group-custom { 
    display: flex; 
    align-items: center; 
    background: rgba(255, 255, 255, 0.9); 
    padding: 12px 16px; 
    border-radius: 8px; 
    margin-bottom: 18px; 
    border: 1px solid #ccc; 
}

.input-group-custom ion-icon { 
    font-size: 22px; 
    color: #4a0404; 
    margin-right: 12px; 
    display: flex;
}

.input-group-custom input { 
    border: none; 
    background: transparent; 
    outline: none; 
    width: 100%; 
    font-size: 15px; 
    color: #333; 
    padding-right: 35px; /* Ruang supaya teks input tidak bertindih di bawah ikon mata */
}

.btn-action { 
    width: 100%; 
    padding: 14px; 
    background: #4a0404; 
    color: #fff; 
    border: none; 
    border-radius: 8px; 
    font-weight: 800; 
    font-size: 15px;
    cursor: pointer; 
    text-transform: uppercase; 
    transition: 0.3s;
}

.btn-action:hover {
    background: #6b0606;
}

.login-footer {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.login-link {
    text-decoration: none;
    color: #4a0404;
    font-weight: 700;
    transition: 0.2s ease;
}

.login-link.highlight {
    color: #800000;
}

.login-link:hover {
    text-decoration: underline;
}

.divider {
    color: #888;
}

/* ==========================================
   SIDE NAVIGATION & FOOTER
   ========================================== */
.side-nav {
    position: fixed;
    right: 25px; 
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav li {
    position: relative;
    margin: 22px 0;
    display: flex;
    align-items: center;
    justify-content: flex-end; 
}

.side-nav span {
    display: block;
    width: 11px;
    height: 11px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.5);
    transition: 0.3s all ease;
    cursor: pointer;
    z-index: 5;
}

.side-nav a::after {
    content: attr(title); 
    position: absolute;
    right: 25px; 
    background: rgba(74, 4, 4, 0.95); 
    color: #E6A100; 
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    border: 1px solid rgba(230, 161, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.side-nav li:hover span {
    background: #E6A100;
    border-color: #E6A100;
    transform: scale(1.5);
    box-shadow: 0 0 10px rgba(230, 161, 0, 0.6);
}

.side-nav li:hover a::after {
    opacity: 1;
    visibility: visible;
}

.side-nav span.active {
    background: #E6A100;
    border-color: #E6A100;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(230, 161, 0, 0.8);
}

footer { 
    padding: 35px 20px; 
    background: linear-gradient(180deg, #2b0202 0%, #000000 100%) !important; 
    text-align: center; 
    border-top: 1px solid rgba(230, 161, 0, 0.2); 
    position: relative;
}

footer p { 
    font-size: 13px; 
    color: #bbb; 
    margin-bottom: 8px; 
}

.disclaimer { 
    font-size: 11px; 
    color: #777; 
    max-width: 850px; 
    margin: 0 auto; 
    line-height: 1.6; 
}

.terhad-top-right {
    position: fixed !important;
    top: 10px !important; 
    left: 10px !important; 
    right: auto !important; 
    z-index: 99999 !important;
    width: 55px !important; 
    height: auto !important;
    pointer-events: none !important;
    opacity: 0.8; 
}

.terhad-bottom-left {
    position: fixed !important;
    bottom: 10px !important; 
    right: 10px !important; 
    left: auto !important;
    z-index: 99999 !important;
    width: 55px !important; 
    height: auto !important;
    pointer-events: none !important;
    opacity: 0.8; 
}

/* ==========================================
   RESPONSIF MOBILE & TABLET (< 1024px)
   ========================================== */
@media (max-width: 1024px) {
    .side-nav {
        display: none !important;
    }

    .jpa-logo {
        width: 70px !important;
        top: 15px;
        left: 15px;
    }

    #mainpage {
        padding-top: 100px;
    }

    .main-logo {
        height: 80px !important;
    }

    #about-us {
        padding: 60px 15px;
    }

    .content-box-minimal {
        padding: 30px 25px !important;
    }

    .text-content p {
        font-size: 14px;
        text-align: left;
    }

    .photo-item { 
        flex: 0 0 calc(50% - 15px); 
    }
}

@media (max-width: 540px) {
    .jpa-logo {
        width: 55px !important;
        top: 12px;
        left: 12px;
    }

    .hero-text h2 {
        font-size: 20px !important;
    }

    .hero-text .highlight-title {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }

    .main-logo {
        height: 65px !important;
    }

    .hero-btn {
        flex-direction: column;
        gap: 10px;
    }

    .btn-scroll, .btn-login-hero {
        width: 100%;
        padding: 12px 0;
    }

    .content-box-minimal p {
        font-size: 13px;
    }

    .login-box {
        padding: 30px 18px !important;
    }
}