/* General Body and Resets */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: #0056b3;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px; /* Added padding for mobile */
}

/* Header Section */
.top-bar {
    background-color: #0d47a1;
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

/* Enhanced responsive top-bar */
@media (max-width: 768px) {
    .top-bar {
        font-size: 11px;
        text-align: center;
        padding: 6px 0;
    }
    .top-bar span {
        padding: 0 10px;
        line-height: 1.3;
    }
}

.main-header {
    background-color: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container img {
    height: 60px;
    margin-right: 15px;
}

.logo-text h1 {
    margin: 0;
    font-size: 18px;
    color: #1c3e66;
    font-weight: 600;
}

.logo-text p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

/* Enhanced responsive header */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 0;
    }
    .logo-container {
        flex-direction: column;
        text-align: center;
    }
    .logo-container img {
        height: 50px;
        margin-right: 0;
        margin-bottom: 8px;
    }
    .logo-text h1 {
        font-size: 14px;
        line-height: 1.2;
    }
    .logo-text p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .logo-container img {
        height: 40px;
    }
    .logo-text h1 {
        font-size: 12px;
    }
    .logo-text p {
        font-size: 10px;
    }
}

/* Navigation Bar */
.navbar {
    background-color: #1c3e66;
    padding: 0;
    position: relative;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li a {
    display: block;
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.nav-links li a:hover, .nav-links li a.active {
    background-color: #0d47a1;
}

.auth-links .login-btn {
    background-color: #28a745;
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.auth-links .login-btn:hover {
    background-color: #218838;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 30px 0;
}

/* Enhanced responsive main content */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 0;
    }
}

/* Hero Section for Homepage */
.hero-section {
    background-image: url('bgi.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 51, 102, 0.6);
    border-radius: 8px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h2 {
    font-size: 42px;
    margin: 0 0 20px 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section .hero-btn {
    background-color: #28a745;
    color: white;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.hero-section .hero-btn:hover {
    background-color: #218838;
}

/* Enhanced responsive hero section */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 15px;
        margin-bottom: 20px;
    }
    .hero-section h2 {
        font-size: 28px;
        line-height: 1.3;
    }
    .hero-section p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    .hero-section .hero-btn {
        font-size: 16px;
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 10px;
    }
    .hero-section h2 {
        font-size: 22px;
    }
    .hero-section p {
        font-size: 13px;
    }
    .hero-section .hero-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
}

/* Action Links Bar */
.action-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.action-link {
    background-color: #ffffff;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-size: 18px;
    font-weight: 600;
    color: #1c3e66;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Enhanced responsive action bar */
@media (max-width: 768px) {
    .action-bar {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }
    .action-link {
        padding: 15px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .action-link {
        padding: 12px;
        font-size: 14px;
    }
}

/* Info Cards Section */
.info-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.info-card h3 {
    margin-top: 0;
    color: #1c3e66;
}

.info-card p {
    font-size: 14px;
    color: #555;
}

.info-card .btn {
    background-color: #0d47a1;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
}

/* Enhanced responsive info cards */
@media (max-width: 768px) {
    .info-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    .info-card {
        padding: 20px;
    }
    .info-card h3 {
        font-size: 18px;
    }
    .info-card p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .info-cards-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .info-card {
        padding: 15px;
    }
    .info-card h3 {
        font-size: 16px;
    }
    .info-card .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Content Page Styling */
.content-page {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.content-page h2 {
    color: #1c3e66;
    border-bottom: 2px solid #0d47a1;
    padding-bottom: 10px;
    margin-top: 0;
}

/* Enhanced responsive content page */
@media (max-width: 768px) {
    .content-page {
        padding: 20px 15px;
    }
    .content-page h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .content-page {
        padding: 15px 10px;
    }
    .content-page h2 {
        font-size: 18px;
    }
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #1c3e66;
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e9ecef;
}

.unduh {
    background-color: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.unduh:hover {
    background-color: #218838;
}

/* Enhanced responsive table */
@media (max-width: 768px) {
    table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    th, td {
        padding: 8px 6px;
        min-width: 100px;
    }
    .unduh {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Table wrapper for horizontal scroll */
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.table-wrapper table {
    margin: 0;
    display: table;
    white-space: nowrap;
}

/* Footer Section */
.footer {
    background-color: #1c3e66;
    color: white;
    padding: 40px 0;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.footer-section h4 {
    border-bottom: 2px solid #0d47a1;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.footer-section p, .footer-section ul, .footer-section li {
    font-size: 14px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #a9c7ff;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #3e5f8f;
    font-size: 13px;
}

/* Enhanced responsive footer */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0;
    }
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    .footer-section h4 {
        font-size: 16px;
    }
    .footer-section p, .footer-section ul, .footer-section li {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .footer-section h4 {
        font-size: 15px;
    }
    .footer-section p, .footer-section ul, .footer-section li {
        font-size: 12px;
        line-height: 1.6;
    }
}

/* Form Styling */
.form-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-container .form-group {
    margin-bottom: 20px;
}

.form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-container input[type="text"],
.form-container input[type="date"],
.form-container input[type="email"],
.form-container textarea,
.form-container select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-container input[type="text"]:focus,
.form-container input[type="date"]:focus,
.form-container input[type="email"]:focus,
.form-container textarea:focus,
.form-container select:focus {
    border-color: #0d47a1;
    outline: none;
    box-shadow: 0 0 5px rgba(13, 71, 161, 0.2);
}

.form-container input[type="submit"] {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s;
}

.form-container input[type="submit"]:hover {
    background-color: #218838;
}

/* Enhanced responsive form */
@media (max-width: 768px) {
    .form-container {
        padding: 20px 15px;
    }
    .form-container input[type="text"],
    .form-container input[type="date"],
    .form-container input[type="email"],
    .form-container textarea,
    .form-container select {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    .form-container input[type="submit"] {
        padding: 12px 20px;
        font-size: 1em;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 15px 10px;
    }
    .form-container label {
        font-size: 14px;
    }
}

/* =================================================================== */
/* === CSS TAMBAHAN UNTUK DROPDOWN & MENU RESPONSIVE === */
/* =================================================================== */

.navbar .nav-links li {
    position: relative;
}

.navbar .nav-links .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1c3e66;
    list-style: none;
    padding: 10px 0;
    margin-top: 5px;
    min-width: 240px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 0 0 5px 5px;
    z-index: 100;
}

.navbar .nav-links li:hover > .dropdown {
    display: block;
}

.navbar .nav-links .dropdown li a {
    padding: 10px 20px;
    white-space: nowrap;
    font-size: 14px;
}

.navbar .nav-links .dropdown li a:hover {
    background-color: #0d47a1;
}

.menu-toggle {
    display: none;
    color: white;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

/* Enhanced responsive navigation */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .navbar .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #1c3e66;
        z-index: 200;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    
    .navbar .nav-links.active {
        display: flex;
    }

    .navbar .nav-links li {
        width: 100%;
    }
    
    .navbar .nav-links li a {
        border-bottom: 1px solid #3e5f8f;
        padding: 12px 20px;
        font-size: 16px;
    }

    .navbar .nav-links .dropdown {
        position: static;
        box-shadow: none;
        border-radius: 0;
        min-width: 100%;
        margin-top: 0;
        padding-left: 20px;
        background-color: #153252;
        display: none;
    }
    
    .navbar .nav-links li.has-dropdown > a {
         display: flex;
         justify-content: space-between;
         align-items: center;
    }
    
    .navbar .nav-links li.has-dropdown > a::after {
        content: '▼';
        font-size: 10px;
        margin-left: 10px;
        transition: transform 0.3s;
    }

    .navbar .nav-links li.has-dropdown.open > a::after {
        transform: rotate(180deg);
    }

    .navbar .nav-links li:hover > .dropdown {
         display: none;
    }
    
    .navbar .nav-links .dropdown.show {
        display: block;
    }

    .navbar .nav-links .dropdown li a {
        padding: 10px 40px;
        font-size: 14px;
        border-bottom: 1px solid #2a4766;
    }

    /* Hide auth links on mobile or make them stack */
    .auth-links {
        margin-top: 10px;
    }
    
    .auth-links .login-btn {
        display: block;
        text-align: center;
        margin: 10px 20px;
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .navbar .nav-links li a {
        padding: 10px 15px;
        font-size: 15px;
    }
    
    .navbar .nav-links .dropdown li a {
        padding: 8px 30px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .menu-toggle {
        font-size: 20px;
        padding: 8px;
    }
    
    .navbar .nav-links li a {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .navbar .nav-links .dropdown li a {
        padding: 8px 25px;
        font-size: 12px;
    }
}

/* =================================================================== */
/* === CSS TAMBAHAN UNTUK POP-UP MAKLUMAT === */
/* =================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-content img {
    width: 100%;
    display: block;
    height: auto;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    font-weight: bold;
    color: #fff;
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.modal-close:hover {
    background-color: rgba(0,0,0,0.6);
}

/* Enhanced responsive modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-close {
        top: 5px;
        right: 10px;
        font-size: 24px;
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 5px;
    }
    
    .modal-content {
        width: 98%;
        border-radius: 4px;
    }
    
    .modal-close {
        font-size: 20px;
        width: 25px;
        height: 25px;
    }
}

/* =================================================================== */
/* === CSS TAMBAHAN UNTUK WIDGET KOMISI INFORMASI === */
/* =================================================================== */
.info-publik-widget {
    position: fixed;
    bottom: 10px;
    right: 1px;
    width: 50%;
    max-width: 300px;
    z-index: 999;
    transition: transform 0.2s ease-in-out;
}

.info-publik-widget:hover {
    transform: scale(1.05);
}

.info-publik-widget img {
    width: 80%;
    height: auto;
}

/* Enhanced responsive widget */
@media (max-width: 1024px) {
    .info-publik-widget {
        max-width: 250px;
        bottom: 15px;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .info-publik-widget {
        max-width: 200px;
        bottom: 15px;
        right: 15px;
        width: 40%;
    }
    
    .info-publik-widget img {
        width: 85%;
    }
}

@media (max-width: 480px) {
    .info-publik-widget {
        max-width: 150px;
        bottom: 10px;
        right: 10px;
        width: 35%;
    }
    
    .info-publik-widget img {
        width: 90%;
    }
}

/* =================================================================== */
/* === CSS TAMBAHAN UNTUK STATISTIK PENGUNJUNG === */
/* =================================================================== */
.footer-section .visitor-stats {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section .visitor-stats li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #3e5f8f;
    font-size: 14px;
}

.footer-section .visitor-stats li:last-child {
    border-bottom: none;
}

.footer-section .visitor-stats span {
    font-weight: bold;
    color: #a9c7ff;
}

/* Enhanced responsive visitor stats */
@media (max-width: 768px) {
    .footer-section .visitor-stats li {
        font-size: 12px;
        padding: 3px 0;
    }
}

@media (max-width: 480px) {
    .footer-section .visitor-stats li {
        font-size: 11px;
        flex-direction: column;
        align-items: flex-start;
        padding: 5px 0;
    }
    
    .footer-section .visitor-stats span {
        margin-top: 2px;
    }
}

/* =================================================================== */
/* === ADDITIONAL RESPONSIVE UTILITIES === */
/* =================================================================== */

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive text utilities */
@media (max-width: 768px) {
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    
    p, li, td, th {
        font-size: 14px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    h4 { font-size: 14px; }
    
    p, li, td, th {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* Responsive spacing utilities */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}

/* Touch-friendly button sizes for mobile */
@media (max-width: 768px) {
    .btn, .action-link, .hero-btn, .login-btn, .unduh {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 16px;
    }
}

/* Prevent horizontal scroll */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

/* Improve readability on small screens */
@media (max-width: 480px) {
    body {
        font-size: 14px;
        line-height: 1.4;
    }
    
    /* Better spacing for small screens */
    .main-content {
        padding: 15px 0;
    }
    
    .hero-section {
        margin-bottom: 15px;
    }
    
    .action-bar {
        margin-bottom: 15px;
    }
}

/* =================================================================== */
/* === LANDSCAPE ORIENTATION ADJUSTMENTS === */
/* =================================================================== */

/* Adjustments for landscape mobile devices */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 30px 15px;
    }
    
    .hero-section h2 {
        font-size: 24px;
    }
    
    .modal-content {
        max-height: 80vh;
    }
}

/* =================================================================== */
/* === ACCESSIBILITY IMPROVEMENTS === */
/* =================================================================== */

/* Focus styles for better accessibility */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #0d47a1;
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #0d47a1;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1001;
}

.skip-link:focus {
    top: 6px;
}

/* =================================================================== */
/* === PRINT STYLES === */
/* =================================================================== */

@media print {
    .navbar, .footer, .hero-section, .action-bar, 
    .info-publik-widget, .modal-overlay, .menu-toggle {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .content-page {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    .info-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 15px;
    }
}

/* =================================================================== */
/* === HIGH CONTRAST MODE SUPPORT === */
/* =================================================================== */

@media (prefers-contrast: high) {
    .hero-section::before {
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .navbar, .footer {
        background-color: #000;
    }
    
    .info-card, .content-page, .form-container {
        border: 2px solid #000;
    }
}

/* =================================================================== */
/* === REDUCED MOTION SUPPORT === */
/* =================================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .info-card:hover, .action-link:hover {
        transform: none;
    }
    
    .info-publik-widget:hover {
        transform: none;
    }
}

/* =================================================================== */
/* === DARK MODE SUPPORT (Optional) === */
/* =================================================================== */

@media (prefers-color-scheme: dark) {
    /* Only apply if you want to support dark mode */
    /*
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .info-card, .content-page, .form-container {
        background-color: #2a2a2a;
        color: #e0e0e0;
    }
    
    .main-header {
        background-color: #2a2a2a;
        border-bottom-color: #404040;
    }
    */
}

/* =================================================================== */
/* === UTILITY CLASSES FOR RESPONSIVE DESIGN === */
/* =================================================================== */

/* Hide elements on mobile */
.hide-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Show only on mobile */
.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block !important;
    }
}

/* Responsive text alignment */
.text-center-mobile {
    text-align: left;
}

@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center;
    }
}

/* Responsive margins and paddings */
.mb-mobile {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .mb-mobile {
        margin-bottom: 20px;
    }
}

/* =================================================================== */
/* === ENHANCED TABLE RESPONSIVENESS === */
/* =================================================================== */

/* Alternative table display for very small screens */
@media (max-width: 600px) {
    .responsive-table {
        border: 0;
    }
    
    .responsive-table caption {
        font-size: 1.3em;
    }
    
    .responsive-table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    
    .responsive-table tr {
        border-bottom: 3px solid #ddd;
        display: block;
        margin-bottom: 0.625em;
    }
    
    .responsive-table td {
        border-bottom: 1px solid #ddd;
        display: block;
        font-size: 0.8em;
        text-align: right;
        padding-left: 50%;
        position: relative;
    }
    
    .responsive-table td:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        left: 6px;
        position: absolute;
        text-align: left;
        top: 50%;
        transform: translateY(-50%);
        width: 45%;
    }
}

/* =================================================================== */
/* === FINAL RESPONSIVE TWEAKS === */
/* =================================================================== */

/* Ensure content doesn't get too narrow */
@media (max-width: 320px) {
    .container {
        min-width: 280px;
        padding: 0 5px;
    }
    
    .hero-section h2 {
        font-size: 18px;
    }
    
    .info-card, .action-link {
        padding: 10px;
    }
    
    .modal-content {
        width: 100%;
        margin: 5px;
    }
}

/* Safe area for devices with notches */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }
    
    .navbar {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Ensure clickable elements are large enough on touch devices */
@media (pointer: coarse) {
    .nav-links li a,
    .dropdown li a,
    .btn,
    .action-link,
    .hero-btn,
    .login-btn,
    .unduh,
    .modal-close {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Performance optimization: will-change for animated elements */
.info-card,
.action-link,
.info-publik-widget,
.modal-content {
    will-change: transform;
}

/* Remove will-change after animation completes */
.info-card:not(:hover),
.action-link:not(:hover),
.info-publik-widget:not(:hover) {
    will-change: auto;
}