@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --navy: #0b2545;
    --navy-dark: #071a33;
    --navy-light: #13355c;
    --gold: #c9a227;
    --gold-light: #e6c65c;
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1c2b39;
    --muted: #64748b;
    --danger: #c0392b;
    --success: #1e8449;
    --radius: 12px;
    --shadow: 0 6px 20px rgba(11, 37, 69, 0.09);
    --shadow-hover: 0 10px 28px rgba(11, 37, 69, 0.14);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
}

/* Typography Hierarchy */
h1 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 12px;
    color: var(--text);
}

h2 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 16px;
    color: var(--text);
}

h3 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
    color: var(--text);
}

h4 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
    color: var(--text);
}

p {
    margin: 0 0 12px;
    line-height: 1.65;
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.15s ease, text-decoration 0.15s ease;
}

a:hover {
    color: var(--navy-light);
    text-decoration: underline;
}

a:active {
    color: var(--navy-dark);
}

/* ===== Header ===== */
.site-header {
    position: relative;
    color: #ffffff;
    padding: 56px 20px;
    text-align: center;
    border-bottom: 4px solid var(--gold);
    overflow: hidden;

    /* Background dengan overlay gelap */
    background-image:
        linear-gradient(rgba(11, 28, 49, 0.5), rgba(11, 28, 49, 0.5)),
        url('DITUKPA FOTO.png');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* Text shadow untuk kontras */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 40px);
    pointer-events: none;
}

.header-inner {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.site-logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35));
    transition: transform 0.3s ease;
    object-fit: contain;
    display: block;
}

.site-logo:hover {
    transform: scale(1.05);
}

.site-logo[src$=".png"],
.site-logo[src$=".jpg"],
.site-logo[src$=".jpeg"] {
    image-rendering: -webkit-optimize-contrast;
}

.site-header h1 {
    margin: 0;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.85rem;
    letter-spacing: 0.4px;
    line-height: 1.3;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.7);
}

.site-header p {
    margin: 0;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.8);
}

.header-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 16px;
    border: 1.5px solid rgba(230,198,92,0.6);
    border-radius: 100px;
    color: var(--gold-light);
    font-size: 0.75rem;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    font-weight: 700;
    background: rgba(201, 162, 39, 0.08);
}

/* ===== Layout containers ===== */
.container {
    max-width: 840px;
    margin: -30px auto 48px;
    padding: 0 18px;
}

.admin-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 18px 48px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 28px;
    border: 1px solid rgba(11, 37, 69, 0.05);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card:focus-within {
    box-shadow: var(--shadow-hover);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    border-left: 4px solid var(--gold);
    padding-left: 14px;
    margin: 0 0 24px;
    letter-spacing: 0.2px;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

/* ===== Form elements ===== */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--navy-dark);
    letter-spacing: 0.2px;
}

.required-mark {
    color: var(--danger);
    margin-left: 4px;
    font-weight: 700;
}

input[type=text],
input[type=number],
input[type=date],
input[type=email],
input[type=tel],
input[type=password],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d7dee6;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #ffffff;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.15s ease;
    line-height: 1.5;
}

input:disabled,
select:disabled,
textarea:disabled {
    background: #f4f6f8;
    color: var(--muted);
    cursor: not-allowed;
    border-color: #e6eaef;
}

input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
    border-color: #c0cad6;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--navy-light);
    box-shadow: 0 0 0 4px rgba(11, 53, 92, 0.14);
    background: #ffffff;
}

textarea {
    resize: vertical;
    min-height: 110px;
    font-family: 'Inter', 'Segoe UI', monospace;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.radio-group label,
.checkbox-group label {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.radio-group label:hover,
.checkbox-group label:hover {
    color: var(--navy);
}

.radio-group input,
.checkbox-group input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    margin: 0;
    border: 2px solid #c0cad6;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.checkbox-group input {
    border-radius: 6px;
}

.radio-group input {
    border-radius: 50%;
}

.radio-group input:hover,
.checkbox-group input:hover {
    border-color: var(--navy-light);
}

.checkbox-group input:checked {
    background: var(--navy);
    border-color: var(--navy);
}

.checkbox-group input:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.radio-group input:checked {
    border-color: var(--navy);
}

.radio-group input:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--navy);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radio-group input:focus,
.checkbox-group input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(11, 53, 92, 0.14);
}

.hint {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 6px;
    line-height: 1.5;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-size: 0.97rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(11, 37, 69, 0.18);
    user-select: none;
    text-decoration: none;
}

.btn:hover {
    background: var(--navy-light);
    box-shadow: 0 6px 16px rgba(11, 37, 69, 0.26);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(11, 37, 69, 0.15);
}

.btn:focus {
    outline: none;
    box-shadow: 0 3px 10px rgba(11, 37, 69, 0.18), 0 0 0 4px rgba(11, 53, 92, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 6px rgba(11, 37, 69, 0.1);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--navy-dark);
    box-shadow: 0 3px 12px rgba(201, 162, 39, 0.28);
    font-weight: 700;
}

.btn-gold:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 18px rgba(201, 162, 39, 0.35);
    transform: translateY(-1px);
}

.btn-gold:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.2);
}

.btn-navy {
    background: var(--navy);
    color: #fff;
}

.btn-navy:hover {
    background: var(--navy-light);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #a93226;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #176a3b;
}

.btn-warning {
    background: #ffc107;
    color: #333;
    font-weight: 700;
}

.btn-warning:hover {
    background: #e0a800;
    color: #333;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--navy);
    color: var(--navy);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 3px 10px rgba(11, 37, 69, 0.18);
}

.btn-outline:active {
    box-shadow: 0 2px 6px rgba(11, 37, 69, 0.15);
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

/* ===== Alerts ===== */
.alert {
    padding: 16px 18px;
    border-radius: 10px;
    margin-bottom: 22px;
    font-size: 0.95rem;
    line-height: 1.6;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.alert strong {
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
    line-height: 1.7;
}

.alert-success {
    background: #e8f6ee;
    color: #0d5c35;
    border-left-color: var(--success);
    border-color: #b9e4cc;
}

.alert-error {
    background: #fdecea;
    color: #8b1a1a;
    border-left-color: var(--danger);
    border-color: #f5c6c0;
}

.alert-warning {
    background: #fff9e6;
    color: #8b6f00;
    border-left-color: #ffc107;
    border-color: #ffe8a6;
}

.alert-info {
    background: #e3f2fd;
    color: #01579b;
    border-left-color: #2196f3;
    border-color: #90caf9;
}

/* ===== Admin nav ===== */
.admin-nav {
    background: var(--navy-dark);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-nav .brand {
    color: #fff;
    font-weight: 700;
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}

.admin-nav .brand:hover {
    color: var(--gold-light);
}

.admin-nav .brand img {
    width: 36px;
    height: 36px;
    transition: transform 0.2s ease;
}

.admin-nav .brand img:hover {
    transform: scale(1.08);
}

.admin-nav .links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.admin-nav .links a {
    color: #d7e0eb;
    padding: 18px 16px;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.admin-nav .links a:hover {
    color: var(--gold-light);
    text-decoration: none;
    background: rgba(201, 162, 39, 0.08);
}

.admin-nav .links a.active {
    color: var(--gold-light);
    text-decoration: none;
    border-bottom-color: var(--gold);
    background: rgba(201, 162, 39, 0.12);
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
    background: var(--card);
}

th,
td {
    text-align: left;
    padding: 14px 14px;
    border-bottom: 1px solid #e6eaef;
    line-height: 1.5;
}

th {
    background: #f4f7fc;
    color: var(--navy-dark);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.3px;
    text-transform: none;
    border-bottom: 2px solid #d0dae6;
}

td {
    color: var(--text);
}

tbody tr {
    transition: background-color 0.15s ease;
}

tbody tr:hover {
    background: #f9fbfd;
}

tbody tr:nth-child(even) {
    background: #fafbfc;
}

tbody tr:nth-child(even):hover {
    background: #f3f7fb;
}

table a {
    color: var(--navy);
    font-weight: 500;
    transition: color 0.15s ease;
}

table a:hover {
    color: var(--navy-light);
}

/* Table action buttons */
table .btn-sm {
    margin: 0 4px;
}

/* ===== Stat cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border-top: 4px solid var(--gold);
    border-radius: var(--radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-card .num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
    margin-bottom: 6px;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

.stat-card .label {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

/* ===== Question builder ===== */
.question-item {
    border: 1.5px solid #e6eaef;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 14px;
    background: #fbfcfd;
    transition: all 0.2s ease;
}

.question-item:hover {
    border-color: var(--gold);
    background: #fffdf6;
    box-shadow: 0 2px 8px rgba(11, 37, 69, 0.08);
}

.question-item .q-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.badge {
    display: inline-block;
    background: var(--navy-light);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 100px;
    margin-left: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge.status-pending {
    background: #ffc107;
    color: #333;
}

.badge.status-approved {
    background: #28a745;
    color: #fff;
}

.badge.status-rejected {
    background: #dc3545;
    color: #fff;
}

.badge.status-buka {
    background: var(--success);
    color: #fff;
}

.badge.status-tutup {
    background: #6c757d;
    color: #fff;
}

.opsi-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-end;
}

.opsi-row input {
    flex: 1;
}

.opsi-row .btn {
    margin: 0;
}

.login-wrap {
    max-width: 420px;
    margin: 60px auto;
}

.progress-wrap {
    background: #e6eaef;
    border-radius: 100px;
    height: 8px;
    margin-bottom: 28px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.progress-bar {
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    height: 100%;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(201, 162, 39, 0.4);
}

footer.site-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    padding: 28px 20px;
    background: var(--card);
    border-top: 1px solid #e6eaef;
    margin-top: 48px;
    line-height: 1.6;
}

footer.site-footer a {
    color: var(--navy);
    font-weight: 500;
    transition: color 0.15s ease;
}

footer.site-footer a:hover {
    color: var(--navy-light);
}

/* ===== Public nav ===== */
.public-nav {
    background: var(--navy-dark);
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 60px;
    padding: 0 20px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: transparent;
    border: 2px solid var(--gold-light);
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    gap: 5px;
    position: fixed;
    right: 20px;
    top: 8px;
    -webkit-tap-highlight-color: transparent;
    z-index: 100;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--gold-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

.mobile-menu-btn:hover {
    background: rgba(201, 162, 39, 0.1);
    border-color: var(--gold);
}

.nav-menu {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

.nav-menu a {
    color: #d7e0eb;
    padding: 16px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    display: inline-block;
}

.nav-menu a:hover {
    color: var(--gold-light);
    background: rgba(201, 162, 39, 0.08);
    text-decoration: none;
}

.nav-menu a.active {
    color: var(--gold-light);
    border-bottom-color: var(--gold);
    background: rgba(201, 162, 39, 0.12);
}

.nav-menu a.nav-cta {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--navy-dark) !important;
    border-radius: 8px;
    margin: 10px 8px;
    padding: 10px 18px;
    font-weight: 700;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.2);
    display: inline-block;
}

.nav-menu a.nav-cta:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
    transform: translateY(-1px);
    text-decoration: none;
}

/* ===== Hero (halaman portal) ===== */
.hero {
    max-width: 920px;
    margin: 44px auto;
    padding: 0 20px;
    text-align: center;
}

.hero h2 {
    font-size: 2.2rem;
    color: var(--navy);
    margin-bottom: 16px;
    font-weight: 800;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

.hero p.lead {
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 660px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
    text-align: left;
    border-top: 4px solid var(--gold);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.feature-card .icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}

.feature-card h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    color: var(--navy);
    font-weight: 700;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ===== Konten halaman info (Tentang / Visi Misi) ===== */
.content-page {
    max-width: 820px;
    margin: 40px auto;
    padding: 0 20px;
}

.content-page h2.page-title {
    text-align: center;
    color: var(--navy);
    font-size: 1.8rem;
    margin-bottom: 36px;
    font-weight: 800;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

.info-block {
    margin-bottom: 26px;
}

.info-block h3 {
    color: var(--navy);
    font-size: 1.15rem;
    margin-bottom: 10px;
    font-weight: 700;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

.info-block p {
    color: var(--text);
    margin: 0;
    line-height: 1.7;
}

.misi-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.misi-list li {
    background: #fff;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gold);
    transition: all 0.2s ease;
    line-height: 1.7;
}

.misi-list li:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(2px);
}

/* ===== Galeri ===== */
.galeri-page {
    max-width: 1060px;
    margin: 40px auto;
    padding: 0 20px;
}

.galeri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.galeri-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.galeri-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.galeri-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.galeri-item:hover img {
    transform: scale(1.05);
}

.galeri-item .caption {
    padding: 14px 14px;
    font-size: 0.88rem;
    color: var(--muted);
    min-height: 40px;
    display: flex;
    align-items: center;
}

.galeri-empty {
    text-align: center;
    color: var(--muted);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 24px;
    grid-column: 1 / -1;
}

/* ===== Kategori Registration ===== */
.kategori-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 24px;
}

.kategori-card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(11, 37, 69, 0.08);
    padding: 32px;
    text-align: left;
    border-left: 5px solid var(--gold);
    border-top: 3px solid var(--navy-light);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    color: inherit;
}

.kategori-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(11, 37, 69, 0.15);
    border-top-color: var(--gold);
    text-decoration: none;
    border-left-color: var(--gold-light);
}

.kategori-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.kategori-card h3 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    color: var(--navy-dark);
    font-weight: 700;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    letter-spacing: 0.3px;
}

.kategori-card p {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.status-badge.buka {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.tutup {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
        position: fixed;
        right: 16px;
        top: 8px;
    }

    .nav-container {
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        background: var(--navy-dark);
        border-bottom: 3px solid var(--gold);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        gap: 0;
        z-index: 99;
    }

    .nav-menu.show {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu a {
        padding: 16px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-left: 4px solid transparent;
        display: block;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
        color: #d7e0eb;
        font-size: 0.95rem;
        font-weight: 600;
    }

    .nav-menu a:hover {
        background: rgba(201, 162, 39, 0.1);
        color: var(--gold-light);
    }

    .nav-menu a.active {
        border-left-color: var(--gold);
        background: rgba(201, 162, 39, 0.08);
        color: var(--gold-light);
    }

    .nav-menu a.nav-cta {
        margin: 12px 14px;
        padding: 12px 16px;
        text-align: center;
        border-left: none;
        background: linear-gradient(135deg, var(--gold-light), var(--gold)) !important;
        color: var(--navy-dark) !important;
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .card {
        padding: 22px;
        margin-bottom: 20px;
    }

    .site-header {
        padding: 40px 20px;
    }

    .site-header h1 {
        font-size: 1.5rem;
    }

    .site-logo {
        width: 64px;
        height: 64px;
    }

    .container {
        margin: -20px auto 32px;
        padding: 0 16px;
    }

    .admin-container {
        padding: 0 16px 32px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 14px;
    }

    .stat-card .num {
        font-size: 1.8rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .kategori-grid {
        grid-template-columns: 1fr;
    }

    .public-nav a {
        padding: 12px 12px;
        font-size: 0.85rem;
    }

    .public-nav a.nav-cta {
        margin: 8px 4px;
        padding: 8px 14px;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 10px 8px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .content-page {
        margin: 28px auto;
    }

    .content-page h2.page-title {
        font-size: 1.4rem;
        margin-bottom: 24px;
    }

    .galeri-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    footer.site-footer {
        padding: 20px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    /* Improve header for mobile */
    .site-header {
        padding: 24px 16px;
        background-size: cover;
        background-position: center bottom;
    }

    .site-header h1 {
        font-size: 1rem;
        letter-spacing: 0.15px;
        line-height: 1.3;
        margin: 0;
        text-shadow: 0 3px 6px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.8);
    }

    .site-header p {
        font-size: 0.8rem;
        margin: 4px 0 0;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    }

    .header-badge {
        font-size: 0.55rem;
        padding: 3px 8px;
        letter-spacing: 0.8px;
        margin-top: 4px;
    }

    .site-logo {
        width: 48px;
        height: 48px;
        margin-bottom: 4px;
    }

    .header-inner {
        gap: 8px;
    }

    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    p {
        font-size: 0.9rem;
    }

    .card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .site-header {
        padding: 32px 16px;
    }

    .site-header h1 {
        font-size: 1.3rem;
    }

    .site-logo {
        width: 56px;
        height: 56px;
    }

    .site-header .header-badge {
        font-size: 0.65rem;
        padding: 4px 12px;
    }

    .container {
        margin: -15px auto 24px;
        padding: 0 12px;
    }

    .admin-container {
        padding: 0 12px 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .num {
        font-size: 1.6rem;
    }

    .feature-grid {
        gap: 12px;
        margin-top: 24px;
    }

    .feature-card {
        padding: 16px;
    }

    .kategori-grid {
        gap: 12px;
    }

    .kategori-card {
        padding: 16px;
    }

    .public-nav a {
        padding: 10px 10px;
        font-size: 0.8rem;
    }

    .public-nav-inner {
        flex-direction: column;
    }

    table {
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 8px 6px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .btn-block {
        margin-bottom: 8px;
    }

    .section-title {
        font-size: 1rem;
        padding-left: 12px;
    }

    .hero h2 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .hero p.lead {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .hero-actions {
        gap: 8px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .galeri-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .galeri-item img {
        height: 120px;
    }

    .progress-wrap {
        height: 6px;
        margin-bottom: 20px;
    }

    input[type=text],
    input[type=number],
    input[type=date],
    input[type=email],
    input[type=tel],
    input[type=password],
    select,
    textarea {
        font-size: 16px;
        padding: 10px 12px;
    }

    footer.site-footer {
        padding: 16px 12px;
        font-size: 0.75rem;
    }
}

/* ===== MOBILE OPTIMIZATION ===== */

/* iOS safe area support */
@supports (padding: max(0px)) {
    body {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .site-header,
    .public-nav {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}

/* Touch-friendly button sizes (min 44px) */
.btn,
button,
a.btn,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    min-height: 44px;
    min-width: 44px;
    padding: max(10px, calc((44px - 1em) / 2)) 20px;
}

/* Prevent text selection on buttons */
.btn,
button,
a.btn {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Better input focus for mobile */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 8px;
}


/* Link tap feedback */
a {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* Optimize images for mobile */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Improve readability on small screens */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    /* Ensure forms are readable */
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px;
        min-height: 44px;
    }

    /* Better spacing for mobile */
    .container,
    .admin-container,
    .card {
        max-width: 100%;
    }

    /* Optimize navigation for mobile */
    .public-nav {
        flex-wrap: wrap;
        gap: 8px;
    }

    .public-nav a {
        flex: 1 1 auto;
        min-width: 80px;
    }

    /* Improve table readability */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    th,
    td {
        white-space: nowrap;
    }

    /* Full-width buttons on mobile */
    .btn-block,
    .form-group .btn {
        width: 100%;
        display: block;
    }

    /* Adjust carousel for mobile */
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    /* Responsive form layout */
    .form-group {
        margin-bottom: 16px;
    }

    label {
        display: block;
        margin-bottom: 6px;
        font-weight: 500;
    }
}

/* Tablet optimization (768px - 1024px) */
@media (min-width: 481px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }

    .kategori-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .public-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Landscape mobile orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .site-header {
        padding: 16px 20px;
    }

    .site-header h1 {
        font-size: 1.2rem;
    }

    .site-logo {
        width: 48px;
        height: 48px;
    }
}

/* Print styles */
@media print {
    .public-nav,
    .site-footer,
    .btn,
    button {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}