/* 
 * PTSP MATSANESA - Main Stylesheet
 * Fonts: Poppins
 */

:root {
    /* Primary Colors */
    --navy: #0B3C6D;
    --navy-light: #165292;
    --navy-dark: #062646;
    --gold: #D4AF37;
    --gold-light: #F3CA47;
    --gold-dark: #A88825;
    --green: #0E9F6E;

    /* Backgrounds & Text */
    --bg-main: #F4F7F6;
    --bg-alt: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #E2E8F0;

    /* Shadows & Transitions */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-gold: 0 4px 14px 0 rgba(212, 175, 55, 0.39);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Layout */
    --header-height: 80px;
    --border-radius: 12px;
    --border-radius-lg: 24px;
}

[data-theme="dark"] {
    /* Dark Mode Variables */
    --navy: #1E293B;
    /* Slate 800 */
    --navy-light: #334155;
    /* Slate 700 */
    --navy-dark: #0F172A;
    /* Slate 900 */
    --gold: #EAB308;
    /* Yellow 500 */
    --gold-light: #FDE047;
    /* Yellow 300 */
    --gold-dark: #CA8A04;
    /* Yellow 600 */
    --green: #10B981;
    /* Emerald 500 */

    /* Backgrounds & Text */
    --bg-main: #0B1120;
    --bg-alt: #0F172A;
    --bg-card: #1E293B;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border-color: #334155;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* ================= Reset & Global ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-alt);
}

/* ================= Typography & Utilities ================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--navy);
}

[data-theme="dark"] .section-title {
    color: var(--white);
}

.divider {
    height: 4px;
    width: 80px;
    background: linear-gradient(90deg, var(--gold), var(--green));
    margin: 0 auto;
    border-radius: 2px;
}

.text-gold {
    color: var(--gold) !important;
}

.text-green {
    color: var(--green) !important;
}

.text-navy {
    color: var(--navy) !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
    gap: 8px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--navy);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--navy-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

[data-theme="dark"] .btn-outline {
    color: var(--text-main);
    border-color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--navy);
    color: white;
}

[data-theme="dark"] .btn-outline:hover {
    background-color: var(--text-main);
    color: var(--navy-dark);
}

/* ================= Header & Navbar ================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    height: 70px;
    box-shadow: var(--shadow-md);
    background-color: rgba(var(--bg-card), 0.95);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.25rem;
    color: var(--navy);
    margin-bottom: 0;
}

[data-theme="dark"] .logo-text h1 {
    color: var(--text-main);
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

[data-theme="light"] .light-icon {
    display: none;
}

[data-theme="dark"] .dark-icon {
    display: none;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-main);
    cursor: pointer;
}

/* ================= Hero Section ================= */
.hero {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-ornament {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, rgba(11, 60, 109, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--navy);
    margin-bottom: 24px;
    line-height: 1.2;
}

[data-theme="dark"] .hero-title {
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.illustration-wrapper {
    position: relative;
}

.hero-img {
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card {
    position: absolute;
    bottom: -20px;
    left: -30px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-gold {
    color: var(--gold);
    font-size: 2.5rem;
}

.stat-text strong {
    display: block;
    font-size: 1.5rem;
    color: var(--navy);
}

[data-theme="dark"] .stat-text strong {
    color: var(--white);
}

.stat-text span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.float-anim {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ================= Maklumat Pelayanan ================= */
.maklumat-card {
    background-color: var(--navy);
    color: white;
    border-radius: var(--border-radius-lg);
    padding: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .maklumat-card {
    background-color: var(--bg-card);
}

.maklumat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05));
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

.quote-icon {
    font-size: 4rem;
    color: var(--gold);
    opacity: 0.5;
    position: absolute;
    top: 30px;
    left: 30px;
}

.maklumat-content {
    position: relative;
    z-index: 2;
}

.maklumat-text {
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: center;
}

.maklumat-subtext {
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: var(--gold);
}

.maklumat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.maklumat-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
}

[data-theme="dark"] .maklumat-list li {
    background: var(--bg-main);
    color: var(--text-main);
}

.check-icon {
    color: var(--green);
}

/* ================= Visi & Misi ================= */
.visi-misi-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
}

.visi-card {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    border-top: 5px solid var(--gold);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.icon-wrapper span {
    font-size: 2.5rem;
    color: var(--gold);
}

.visi-card h3 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--navy);
}

[data-theme="dark"] .visi-card h3 {
    color: var(--gold);
}

.visi-card p {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--text-muted);
}

.misi-wrapper h3 {
    font-size: 1.75rem;
    margin-bottom: 24px;
    color: var(--navy);
}

[data-theme="dark"] .misi-wrapper h3 {
    color: var(--white);
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -37px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--navy);
    border: 3px solid var(--bg-main);
    box-shadow: 0 0 0 3px rgba(11, 60, 109, 0.2);
}

[data-theme="dark"] .timeline-dot {
    background-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

.timeline-content {
    background-color: var(--bg-card);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    font-weight: 500;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--gold);
}

/* ================= Alur Layanan ================= */
.flow-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 120px;
}

.flow-icon {
    width: 70px;
    height: 70px;
    background-color: var(--navy);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

[data-theme="dark"] .flow-icon {
    background-color: var(--navy-light);
}

.flow-step:hover .flow-icon {
    background-color: var(--gold);
    transform: scale(1.1);
}

.flow-icon span {
    font-size: 2rem;
}

.flow-step p {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.flow-arrow {
    color: var(--border-color);
    font-size: 1.5rem;
}

[data-theme="dark"] .flow-arrow {
    color: var(--text-muted);
}

/* ================= Standar Pelayanan ================= */
.standar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.standar-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.standar-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header span {
    font-size: 2.5rem;
    color: var(--navy);
}

[data-theme="dark"] .card-header span {
    color: var(--gold);
}

.card-header h3 {
    font-size: 1.5rem;
}

.jam-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.jam-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--bg-main);
    border-radius: var(--border-radius);
    font-size: 1.125rem;
}

.prinsip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.prinsip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.125rem;
    font-weight: 500;
}

.prinsip-item .check {
    color: var(--green);
}

/* ================= Jenis Pelayanan ================= */
.layanan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.layanan-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.layanan-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

.layanan-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(11, 60, 109, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);
}

[data-theme="dark"] .layanan-icon {
    background-color: rgba(255, 255, 255, 0.05);
}

.layanan-icon span {
    font-size: 2rem;
    color: var(--navy);
}

[data-theme="dark"] .layanan-icon span {
    color: var(--text-main);
}

.layanan-card:hover .layanan-icon {
    background-color: var(--navy);
}

.layanan-card:hover .layanan-icon span {
    color: white;
}

[data-theme="dark"] .layanan-card:hover .layanan-icon {
    background-color: var(--gold);
}

[data-theme="dark"] .layanan-card:hover .layanan-icon span {
    color: var(--navy-dark);
}

.layanan-card h3 {
    font-size: 1.125rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* ================= Survei Kepuasan (IKM) ================= */
.ikm-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.ikm-stats {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ikm-score-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    padding: 30px;
    border-radius: var(--border-radius);
    color: white;
}

[data-theme="dark"] .ikm-score-card {
    background: linear-gradient(135deg, var(--bg-main), var(--bg-alt));
    border: 1px solid var(--border-color);
}

.score-circle {
    width: 100px;
    height: 100px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    border: 5px solid var(--gold);
}

.score-category h3 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 4px;
}

.score-category p {
    margin: 0;
    opacity: 0.8;
}

.ikm-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.detail-item span.material-symbols-rounded {
    font-size: 1.75rem;
    margin-top: 2px;
}

.detail-item h4 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.detail-item p {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
}

.ikm-charts {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.chart-wrapper {
    background-color: var(--bg-main);
    padding: 20px;
    border-radius: var(--border-radius);
    height: 250px;
    position: relative;
}

/* ================= Footer ================= */
.footer {
    background-color: var(--navy-dark);
    color: #cbd5e1;
    padding-top: 80px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 2fr;
    gap: 40px;
    margin-bottom: 60px;
}

.logo-text-footer h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0;
}

.logo-text-footer p {
    color: var(--gold);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.footer-desc {
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--gold);
    color: var(--navy-dark);
    transform: translateY(-3px);
}

.footer h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--gold);
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.contact-list span.material-symbols-rounded {
    color: var(--gold);
}

.jam-list-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jam-list-footer li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.map-placeholder {
    width: 100%;
    height: 150px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.875rem;
}

/* ================= Back to Top ================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--navy);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 99;
}

[data-theme="dark"] .back-to-top {
    background-color: var(--gold);
    color: var(--navy-dark);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--gold);
    color: var(--navy-dark);
}

/* ================= Animations (Scroll Reveal) ================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ================= Responsive Media Queries ================= */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .stat-card {
        left: 20px;
        bottom: 20px;
    }

    .visi-misi-grid {
        grid-template-columns: 1fr;
    }

    .ikm-container {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        transition: 0.3s ease-in-out;
    }

    .navbar.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
    }

    .nav-actions {
        flex-direction: column;
        margin-top: 20px;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .maklumat-card {
        padding: 40px 20px;
    }

    .flow-container {
        flex-direction: column;
        gap: 20px;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .standar-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* ================= Formulir & Tabel (Halaman Pengaduan) ================= */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-card {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-card {
        padding: 24px;
    }
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.required {
    color: var(--text-main);
}

[data-theme="light"] .required {
    color: #EF4444;
}

[data-theme="dark"] .required {
    color: #F87171;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

[data-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

.file-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.file-input {
    padding: 10px;
    background-color: var(--bg-main);
    cursor: pointer;
}

.table-container {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    padding: 1px;
    /* To maintain border radius on overflow */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--bg-main);
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}

[data-theme="dark"] .data-table th {
    color: var(--gold);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: var(--bg-main);
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-waiting {
    background-color: rgba(245, 158, 11, 0.15);
    color: #D97706;
}

.status-process {
    background-color: rgba(59, 130, 246, 0.15);
    color: #2563EB;
}

.status-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #059669;
}

[data-theme="dark"] .status-waiting {
    color: #FBBF24;
}

[data-theme="dark"] .status-process {
    color: #60A5FA;
}

[data-theme="dark"] .status-success {
    color: #34D399;
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

/* ================================================================
   DYNAMIC CONTENT LOADER — supabase-content-loader.js
   ================================================================ */

/* Deskripsi singkat pada langkah alur layanan */
.flow-desc {
    display: block;
    font-size: 0.73rem;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
    margin-top: 4px;
    max-width: 110px;
    text-align: center;
}

/* Deskripsi pada kartu jenis layanan */
.layanan-desc {
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    line-height: 1.5;
    margin: 6px 0 10px;
    flex: 1;
}

/* Skeleton override agar sesuai tema situs */
[data-theme="dark"] ._skeleton {
    background: linear-gradient(90deg,
        #1e293b 25%,
        #2d3f55 50%,
        #1e293b 75%
    ) !important;
    background-size: 800px 100% !important;
}

/* ================================================================
   RESPONSIVE — Data Pengaduan & Public Pages
   375px (small phone) | 600px (mobile) | 768px (tablet)
   ================================================================ */

/* Table: enable horizontal scroll on any small screen */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Prevent table cells from wrapping awkwardly */
@media (max-width: 768px) {
    .data-table th,
    .data-table td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
    /* Hide isi singkat column on tablet */
    .data-table th:last-child,
    .data-table td:last-child {
        display: none;
    }
}

@media (max-width: 600px) {
    /* Show only tiket + status in table; rest in card view */
    .tabel-pengaduan-wrap .data-table th:nth-child(n+3),
    .tabel-pengaduan-wrap .data-table td:nth-child(n+3) {
        display: none;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 20px 16px;
        border-radius: 16px;
    }
    .section-title {
        font-size: 1.5rem !important;
    }
    .btn-lg {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    .badge {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}

@media (max-width: 375px) {
    .section-title {
        font-size: 1.3rem !important;
    }
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 0.76rem;
    }
    .empty-state .material-symbols-rounded {
        font-size: 40px !important;
    }
}

/* ================================================================
   GLOBAL FORM FEEDBACK — inline error hints
   ================================================================ */
.form-control.is-invalid {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}
.form-control.is-valid {
    border-color: var(--green, #0E9F6E) !important;
    box-shadow: 0 0 0 3px rgba(14, 159, 110, 0.12) !important;
}
.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.form-hint.is-error {
    color: #EF4444;
    font-weight: 500;
}
[data-theme="dark"] .form-hint.is-error {
    color: #F87171;
}

/* ================================================================
   BACK TO TOP button — applies to all public pages
   ================================================================ */
.back-to-top {
    position: fixed;
    bottom: 88px;
    right: 24px;
    z-index: 9000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.back-to-top.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}
.back-to-top:hover {
    background: var(--navy-light);
    transform: translateY(-2px) scale(1.05);
}
@media (max-width: 480px) {
    .back-to-top {
        bottom: 80px;
        right: 16px;
    }
}
