/* ==============================
   GLOBAL
============================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #570000;
    color: #eee;
    font: 16px system-ui, sans-serif;
}

/* ==============================
   HEADER
============================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #570000;
    border-bottom: 3px solid #c92536;
    padding: 12px 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1052px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.site-header a {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

/* ==============================
   LOGO
============================== */

.site-header .site-logo {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-header .site-logo img {
    display: block;
    width: 180px;
    height: auto;
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}

/* ==============================
   TOMBOL LOGIN
============================== */

.site-header .login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #d90000;
    color: #ffffff;
    padding: 11px 32px;
    border: 1px solid #ff5555;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-decoration: none;
    animation: redPulse 1.4s ease-in-out infinite;
    transition: transform 0.2s ease;
}

.site-header .login-btn:hover {
    transform: scale(1.05);
}

@keyframes redPulse {
    0%, 100% {
        background-color: #a80000;
        box-shadow: 0 0 5px #ff0000;
    }

    50% {
        background-color: #ff3030;
        box-shadow:
            0 0 10px #ff0000,
            0 0 20px #ff3333,
            0 0 30px rgba(255, 0, 0, 0.4);
    }
}

/* ==============================
   MAIN CONTENT
============================== */

main {
    max-width: 1100px;
    margin: auto;
    padding: 24px;
}

h1 {
    font-size: clamp(24px, 4vw, 36px);
}

p,
small {
    color: #bbb;
    line-height: 1.6;
}

/* ==============================
   MASONRY GRID
============================== */

.grid {
    display: block;
    columns: 3;
    column-gap: 20px;
    margin-top: 0;
}

.grid article {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin: 0 0 20px;
    vertical-align: top;
}

.grid > p {
    column-span: all;
}

/* ==============================
   CARD ARSIP PEMBAYARAN
============================== */

article {
    background: #570000;
    border: 2px solid #ffc700;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(255, 199, 0, 0.35);
}

article img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    background: #080809;
}

.grid article img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.photo-link {
    display: block;
}

.body {
    padding: 18px;
}

strong {
    color: #ff5965;
    font-size: 26px;
}

/* ==============================
   FORM ADMIN
============================== */

form {
    display: grid;
    gap: 12px;
    max-width: 600px;
    margin: 16px 0;
}

label {
    display: grid;
    gap: 6px;
}

input,
button {
    font: inherit;
    padding: 12px;
    border-radius: 7px;
    border: 1px solid #45454a;
}

input {
    background: #222;
    color: #fff;
    min-width: 0;
}

input[type="checkbox"] {
    width: 20px;
}

button {
    background: #b91c32;
    color: white;
    border: 0;
    cursor: pointer;
    font-weight: 700;
}

.error {
    color: #ff7777;
}

/* ==============================
   RESPONSIVE TABLET
============================== */

@media (max-width: 900px) {
    .grid {
        columns: 2;
    }
}

/* ==============================
   RESPONSIVE HP
============================== */

@media (max-width: 600px) {

    .site-header {
        padding: 12px 14px;
    }

    .header-container {
        gap: 12px;
    }

    .site-header .site-logo img {
        width: 150px;
        max-height: 50px;
    }

    .site-header .login-btn {
        padding: 10px 24px;
        font-size: 13px;
    }

    .grid {
        columns: 1;
    }

    main {
        padding: 14px;
    }
}

/* ==============================
   AKSESIBILITAS ANIMASI
============================== */

@media (prefers-reduced-motion: reduce) {
    .site-header .login-btn {
        animation: none;
        transition: none;
    }
}

/* ==============================
   HEADER BUTTONS
============================== */

.header-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 140px;
    flex-shrink: 0;
}

.header-buttons .login-btn,
.header-buttons .livechat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 8px;
    text-decoration: none;
}

/* TOMBOL LIVECHAT */

.header-buttons .livechat-btn {
    background: #128c45;
    color: #ffffff;
    border: 1px solid #35e878;
    animation: greenPulse 1.8s ease-in-out infinite;
    transition: transform 0.2s ease;
}

.header-buttons .livechat-btn:hover {
    transform: scale(1.05);
}

@keyframes greenPulse {
    0%, 100% {
        background-color: #087a35;
        box-shadow: 0 0 4px #00c853;
    }

    50% {
        background-color: #16b85c;
        box-shadow:
            0 0 10px #00c853,
            0 0 20px rgba(0, 255, 100, 0.5);
    }
}

/* TAMPILAN HP */

@media (max-width: 600px) {
    .header-buttons {
        width: 115px;
        gap: 6px;
    }

    .header-buttons .login-btn,
    .header-buttons .livechat-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-buttons .livechat-btn {
        animation: none;
        transition: none;
    }
}
/* ==============================
   STICKY FOOTER MOBILE
============================== */

.footer-mobile {
    display: none;
}

@media (max-width: 600px) {

    body {
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }

    .footer-mobile {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999;
        background: linear-gradient(
            180deg,
            #570000,
            #260000
        );
        border-top: 2px solid #ffc700;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
        padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
        align-items: flex-end;
        justify-content: space-around;
    }

    .footer-mobile .footer-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        color: #ffc700;
        text-decoration: none;
    }

    .footer-mobile .footer-icon {
        font-size: 27px;
        line-height: 1;
    }

    .footer-mobile .footer-title {
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.5px;
    }

    /* TOMBOL MASUK TENGAH */

    .footer-mobile .footer-login .footer-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 55px;
        height: 55px;
        margin-top: -25px;
        background: linear-gradient(
            135deg,
            #fff09a,
            #ffc700,
            #d99500
        );
        border: 3px solid #570000;
        border-radius: 50%;
        box-shadow: 0 0 12px rgba(255, 199, 0, 0.6);
        animation: footerGlow 1.5s ease-in-out infinite;
    }
}

@keyframes footerGlow {
    0%, 100% {
        box-shadow: 0 0 5px #ffc700;
    }

    50% {
        box-shadow: 0 0 20px #ffc700;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-mobile .footer-login .footer-icon {
        animation: none;
    }
}
.footer-mobile .footer-icon i {
    font-size: 26px;
    color: #ffc700;
}

.footer-mobile .footer-login .footer-icon i {
    color: #570000;
}
