:root {
    /* New Color Palette - Heritage Theme with WCAG Compliance */
    /* Primary - Heritage Gold */
    --color-gold: #C6A25A;
    /* Primary - Heritage Gold - CTA buttons, highlights */
    --color-gold-light: #D4B474;
    /* Lighter variant for hover states */
    --color-gold-dark: #B89148;
    /* Darker variant for depth */

    --color-golden-brown: #806639;
    --color-dim-gray: #565656;

    /* Secondary - Deep Mahogany */
    --color-mahogany: #5B2C2C;
    /* Secondary - Deep Mahogany - Navbar, Footer */
    --color-mahogany-light: #724040;
    /* Lighter mahogany for hover */
    --color-mahogany-dark: #481F1F;
    /* Darker mahogany for depth */

    /* Tertiary - Warm Beige */
    --color-beige: #F5E9D3;
    /* Tertiary - Warm Beige - Backgrounds */
    --color-beige-light: #FAF2E5;
    /* Lighter beige */
    --color-beige-medium: #EBD9BC;
    /* Medium beige for borders */

    /* Neutral Colors */
    --color-white: #FFFFFF;
    --color-black: #000000;
    /* Black for headings and strong text */
    --color-gray: #8F8F8F;
    /* Gray for secondary text */
    --color-gray-light: #C4C4C4;
    /* Light gray for borders */
    --color-gray-dark: #5A5A5A;
    /* Dark gray for body text */

    /* Legacy color mappings for backward compatibility */
    --color-primary: #C6A25A;
    /* Heritage Gold */
    --color-secondary: #5B2C2C;
    /* Deep Mahogany */
    --color-dark: #5B2C2C;
    /* Deep Mahogany */
    --color-brown: #C6A25A;
    /* Heritage Gold */
    --color-brown-darker: #481F1F;
    /* Darker mahogany */
    --color-brown-dark: #5B2C2C;
    /* Deep Mahogany */
    --color-brown-medium: #C6A25A;
    /* Heritage Gold */
    --color-brown-light: #D4B474;
    /* Light gold */
    --color-off-white: #FAF2E5;
    /* Light beige */
    --color-gray-lightest: #F5E9D3;
    /* Warm beige */
    --color-gray-light: #EBD9BC;
    /* Medium beige */
    --color-gray-medium: #8F8F8F;
    /* Gray */
    --color-text-dark: #000000;
    /* Black */
    --color-text-gray: #8F8F8F;
    /* Gray */
    --color-text-medium: #5A5A5A;
    /* Dark gray */
    --color-text-light: #8F8F8F;
    /* Gray */

    /* Semantic Colors */
    --color-navy: #5B2C2C;
    /* Using mahogany for navy replacement */
    --color-navy-dark: #481F1F;
    /* Darker mahogany */
    --color-bronze: #C6A25A;
    /* Using heritage gold for bronze */
    --color-success: #2D5F3F;
    --color-info: #5B2C2C;
    /* Using mahogany */
    --color-warning: #C6A25A;
    /* Using heritage gold */
    --color-error: #A54A3A;


    /* Background Colors */
    --color-bg-light: #FAF2E5;
    /* Light beige */
    --color-bg-cream: #F5E9D3;
    /* Warm beige */
    --color-bg-gray: #F5E9D3;
    /* Warm beige */
    --color-bg-hover: #EBD9BC;
    /* Medium beige */
    --color-border-light: #EBD9BC;
    /* Medium beige */

    /* Typography Scale - Improved for accessibility and visual hierarchy */
    --font-hero: clamp(2.75rem, 6vw + 1rem, 4rem);
    /* 44-64px - Hero H1 only */
    --font-h1: clamp(2.25rem, 5vw, 3rem);
    /* 36-48px - Page H1 */
    --font-h2: clamp(1.875rem, 4vw, 2.375rem);
    /* 30-38px - Section headings */
    --font-h3: clamp(1.5rem, 3vw, 2rem);
    /* 24-32px - Subsection headings */
    --font-h4: clamp(1.25rem, 2.5vw, 1.625rem);
    /* 20-26px - Card headings */
    --font-h5: clamp(1.125rem, 2vw, 1.375rem);
    /* 18-22px - Small headings */
    --font-h6: clamp(1rem, 1.8vw, 1.1875rem);
    /* 16-19px */
    --font-base: clamp(1rem, 1.5vw, 1.0625rem);
    /* 16-17px - Body text (WCAG min) */
    --font-sm: clamp(0.875rem, 1.3vw, 0.9375rem);
    /* 14-15px - Small text */
    --font-xs: clamp(0.8125rem, 1.2vw, 0.875rem);
    /* 13-14px - Tiny text */

    /* Legacy font size mappings */
    --font-2xl: var(--font-h1);
    --font-xl: var(--font-h2);
    --font-lg: var(--font-h3);
    --font-36: var(--font-h2);
    --font-24: var(--font-h4);
    --font-22: var(--font-h5);
    --font-18: var(--font-h5);
    --font-16: var(--font-base);
    --font-14: var(--font-sm);
    --font-12: var(--font-xs);

    /* Font Weights */
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Line Heights - Optimized for readability */
    --line-height-tight: 1.2;
    /* Headings */
    --line-height-normal: 1.5;
    /* UI elements */
    --line-height-relaxed: 1.7;
    /* Body text */
    --line-height-loose: 1.8;
    /* Long-form content */

    /* Spacing System - 8px base unit */
    --spacing-xs: 0.25rem;
    /* 4px */
    --spacing-sm: 0.5rem;
    /* 8px */
    --spacing-md: 1rem;
    /* 16px */
    --spacing-lg: 1.5rem;
    /* 24px */
    --spacing-xl: 2rem;
    /* 32px */
    --spacing-2xl: 3rem;
    /* 48px */
    --spacing-3xl: 4rem;
    /* 64px */
    --spacing-4xl: 6rem;
    /* 96px */

    /* Layout */
    --max-content-width: 1440px;
    --container-padding: clamp(1rem, 3vw, 2rem);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dynamic Scroll Button - Desktop Only */
.scroll-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-gold);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-btn:hover {
    background-color: var(--color-gold-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.scroll-btn.show {
    display: flex;
}

/* Hide on mobile and tablet - Desktop only (≥992px) */
@media (max-width: 991.98px) {
    .scroll-btn {
        display: none !important;
    }
}

.scroll-to-top {
    display: none;
}

body {
    font-family: 'Lato', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--font-base);
    font-weight: var(--font-regular);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-dark);
    /* Black for body text */
    background-color: var(--color-white);
    /* Light beige background */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography System - Consistent heading styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-black);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.01em;
}

h1 {
    font-size: var(--font-h1);
    margin-bottom: var(--spacing-lg);
}

h2 {
    font-size: var(--font-h2);
    margin-bottom: var(--spacing-lg);
}

h3 {
    font-size: var(--font-h3);
    margin-bottom: var(--spacing-md);
}

h4 {
    font-size: var(--font-h4);
}

h5 {
    font-size: var(--font-h5);
}

h6 {
    font-size: var(--font-h6);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-medium);
}

a {
    color: var(--color-primary);
    /* Heritage Gold */
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-gold-dark);
    /* Darker gold on hover */
    text-decoration: underline;
}

/* Navbar Styling - Deep Mahogany theme */
.navbar-custom {
    background-color: var(--color-golden-brown);
    /* Deep Mahogany */
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.navbar-brand {
    margin: 0 10px 0 0;
}

.navbar-brand img {
    height: 50px;
}

/* Toggler styling */
.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    padding: 0.5rem 0.75rem;
}

/* Nav Links - Better contrast and readability */
.navbar-nav .nav-link {
    color: var(--color-black) !important;
    margin: 0 var(--spacing-sm);
    font-weight: var(--font-medium);
    font-size: var(--font-base);
    line-height: var(--line-height-normal);
    transition: var(--transition-base);
    padding: var(--spacing-sm) var(--spacing-md);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--color-gold-light) !important;
    transform: translateY(-1px);
}

/* Active Link State */
.navbar-nav .nav-link.active {
    color: var(--color-black) !important;
    font-weight: var(--font-semibold);
}

/* Hide Default Dropdown Arrow */
.navbar-nav .dropdown-toggle::after {
    display: none;
}

/* Dropdown Menu Styling - Deep Mahogany theme */
.navbar-nav .dropdown-menu {
    background-color: var(--color-golden-brown);
    /* Deep Mahogany */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: var(--spacing-sm) 0;
    margin-top: 0;
    top: 100%;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);

    /* Smooth animation with GPU acceleration */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.95);
    will-change: transform, opacity;

    /* Smooth cubic-bezier for natural motion */
    transition: opacity var(--transition-base),
        transform var(--transition-base),
        visibility var(--transition-base);
}

/* Create invisible bridge between button and dropdown for easier interaction */
.navbar-nav .dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    display: none;
}

@media (min-width: 992px) {
    .navbar-nav .dropdown::before {
        display: block;
    }
}

/* Logo styling */
#logo {
    height: 55px;
    width: auto;
    margin-right: 12px;
}

.logo-name {
    display: flex;
    flex-direction: column;
    text-align: left;
    font-family: 'Inter', sans-serif;
    line-height: 1.2;
}

.logo-name span {
    color: var(--color-black);
    /* White text for navbar logo */
    letter-spacing: 0.3px;
}

.logo-name span:first-child {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
}

.logo-name span:last-child {
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    #logo {
        height: 45px;
        margin-right: 10px;
    }

    .logo-name span:first-child {
        font-size: 13px;
    }

    .logo-name span:last-child {
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    #logo {
        height: 40px;
        margin-right: 8px;
    }

    .logo-name span:first-child {
        font-size: 12px;
    }

    .logo-name span:last-child {
        font-size: 10px;
    }
}

.search-box input {
    width: 100%;
    max-width: 730px;
    padding: 12px 15px 12px 45px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 16px;
}

.search-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Search Buttons - Improved with new color palette and better UX */
.btn-search,
.btn-advanced {
    padding: var(--spacing-md) var(--spacing-2xl);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: var(--font-semibold);
    font-size: var(--font-base);
    line-height: var(--line-height-normal);
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    /* Touch-friendly size */
}

.btn-search {
    background: var(--color-golden-brown);
    color: var(--color-white);
    border: 2px solid var(--color-golden-brown);
}

.btn-search:hover {
    background: var(--color-gold-dark);
    border-color: var(--color-gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-advanced {
    background: transparent;
    color: var(--color-golden-brown);
    border: 2px solid var(--color-golden-brown);
    font-weight: var(--font-semibold);
}

.btn-advanced:hover {
    background: var(--color-golden-brown);
    border-color: var(--color-golden-brown);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Advanced Search Modal Styling */
#advancedSearchModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

#advancedSearchModal .modal-header {
    background: linear-gradient(135deg, var(--color-golden-brown) 0%, var(--color-gold) 100%);
    /* Deep Mahogany to Heritage Gold */
    color: white;
    padding: 24px 32px;
    border-bottom: none;
}

#advancedSearchModal .modal-title {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

#advancedSearchModal .modal-title i {
    color: var(--color-gold-light);
    /* Light gold */
}

#advancedSearchModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s;
}

#advancedSearchModal .btn-close:hover {
    opacity: 1;
}

#advancedSearchModal .modal-body {
    padding: 32px;
    background: #FAFAFA;
}

#advancedSearchModal .modal-footer {
    padding: 20px 32px;
    background: #fff;
    border-top: 1px solid #E5E5E5;
}

.control-label {
    font-weight: 600;
    color: var(--color-golden-brown);
    /* Deep Mahogany */
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#advancedSearchForm {
    text-align: left;
}

#advancedSearchForm .form-control,
#advancedSearchForm .form-select {
    border-radius: 10px;
    height: 48px;
    border: 2px solid #E0E0E0;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

#advancedSearchForm .form-control:focus,
#advancedSearchForm .form-select:focus {
    border-color: var(--color-gold);
    /* Heritage Gold */
    box-shadow: 0 0 0 3px rgba(198, 162, 90, 0.1);
    outline: none;
}

#advancedSearchForm .form-control::placeholder {
    color: #999;
}

#advancedSearchModal .btn-secondary {
    background: #6c757d;
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s;
}

#advancedSearchModal .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

#advancedSearchModal .btn-primary {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    /* Heritage Gold gradient */
    border: none;
    border-radius: 50px;
    padding: 10px 28px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(198, 162, 90, 0.3);
    transition: all 0.3s;
}

#advancedSearchModal .btn-primary:hover {
    background: linear-gradient(135deg, var(--color-gold-dark) 0%, var(--color-golden-brown) 100%);
    /* Darker gold to mahogany */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(198, 162, 90, 0.4);
}

/* Show dropdown on hover - Desktop only */
@media (min-width: 992px) {

    /* Add subtle delay to prevent accidental triggers */
    .navbar-nav .dropdown {
        transition: all 0.15s ease;
    }

    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
        transition-delay: 0.1s;
    }
}

/* Show dropdown when .show class is added (for mobile/tablet) */
.navbar-nav .dropdown.show .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
}

/* Dropdown Items */
.navbar-nav .dropdown-item {
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-size: 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.navbar-nav .dropdown-item:hover {
    background-color: rgba(198, 162, 90, 0.2);
    /* Heritage Gold with transparency */
    color: var(--color-gold-light);
    padding-left: 2rem;
    transform: translateX(2px);
}

.navbar-nav .dropdown-item.active {
    background-color: rgba(198, 162, 90, 0.25);
    /* Heritage Gold with transparency */
    color: var(--color-gold-light);
}

/* Language Selector */
.lang-selector {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--color-mahogany-dark);
    /* Darker mahogany */
    padding: 5px 12px;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-selector:hover {
    background-color: rgba(198, 162, 90, 0.2);
    /* Heritage Gold with transparency */
}

.lang-selector img {
    width: 25px;
    height: 25px;
    margin-right: 8px;
    border-radius: 50%;
}

/* Language Dropdown Menu */
.lang-menu {
    background-color: rgba(91, 44, 44, 0.98);
    /* Deep Mahogany with transparency */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.3rem 0;
    min-width: 150px;
    margin-top: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    /* Smooth animation with GPU acceleration */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.95);
    will-change: transform, opacity;

    /* Smooth cubic-bezier for natural motion */
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-dropdown.show .lang-menu,
.lang-dropdown .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.lang-dropdown-icon {
    width: 10px !important;
}

.lang-menu .dropdown-item {
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.lang-menu .dropdown-item:hover {
    background-color: rgba(198, 162, 90, 0.2);
    /* Heritage Gold with transparency */
    color: var(--color-gold-light);
}

.lang-menu .dropdown-item.active {
    background-color: rgba(198, 162, 90, 0.25);
    /* Heritage Gold with transparency */
    color: var(--color-gold-light);
}

/* Theme Toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--color-mahogany-dark);
    /* Darker mahogany */
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(198, 162, 90, 0.2);
    /* Heritage Gold with transparency */
    transform: scale(1.05);
}

/* Desktop ≥992px: Menu center, actions di kanan */
@media (min-width: 992px) {
    .navbar .navbar-brand {
        flex: 0 0 auto;
    }

    .navbar .navbar-collapse {
        flex: 1 1 auto;
        display: flex !important;
        align-items: center;
    }

    .navbar-nav.main-menu {
        gap: 10px;
        margin: 0 auto;
    }

    .actions-wrap {
        flex: 0 0 auto;
        margin-left: 0;
    }
}

/* Mobile <992px: Menu collapse, lang+theme masuk dropdown */
@media (max-width: 991.98px) {
    .navbar-custom {
        padding: 0.6rem 1rem;
    }

    .navbar-brand img {
        height: 42px;
    }

    .navbar-collapse {
        background-color: var(--color-gold-dark);
        /* Deep Mahogany with transparency */
        margin: 0.5rem -1rem -0.8rem;
        padding: 1rem;
        border-radius: 0 0 15px 15px;
    }

    .navbar-nav.main-menu {
        margin-bottom: 1rem;
    }

    .navbar-nav .nav-link {
        margin: 0;
        padding: 0.6rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }

    /* Mobile dropdown - click to open */
    .navbar-nav .dropdown-menu {
        background-color: var(--color-gold-light);
        /* Darker mahogany with transparency */
        border: none;
        margin: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;

        /* Faster transition for mobile for better touch response */
        transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
            transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
            visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1),
            max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 0;
        overflow: hidden;
        transform: translateY(-5px) scale(0.98);
    }

    .navbar-nav .dropdown.show .dropdown-menu {
        max-height: 500px;
        transform: translateY(0) scale(1);
    }

    .navbar-nav .dropdown-item {
        padding: 0.5rem 1.5rem;
        font-size: 13px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background-color 0.2s ease, padding-left 0.2s ease;
    }

    .navbar-nav .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        padding-left: 1.75rem;
    }

    .navbar-nav .dropdown-item:last-child {
        border-bottom: none;
    }

    /* Active link styling mobile */
    .navbar-nav .nav-link.active::after {
        display: none;
    }

    .actions-wrap {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .lang-selector {
        margin: 0;
    }

    .theme-toggle {
        margin-left: 0;
    }
}

/* Small mobile ≤576px */
@media (max-width: 576px) {
    .navbar-custom {
        padding: 0.5rem 0.75rem;
    }

    .navbar-brand img {
        height: 38px;
    }

    .navbar-collapse {
        margin: 0.5rem -0.75rem -0.5rem;
        padding: 0.75rem;
    }

    .navbar-nav .nav-link {
        font-size: 14px;
        padding: 0.5rem 0;
    }

    .lang-selector {
        padding: 5px 10px;
        font-size: 14px;
    }

    .lang-selector img {
        width: 22px;
        height: 22px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 94vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 60px;
    /* Add spacing from navbar for consistency */
}

.background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide-image.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
    z-index: 1;
}

/* No-image gradient hero */
.hero-noimage {
    background: radial-gradient(1200px 600px at 50% 0%, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, rgba(91, 44, 44, 1) 0%, rgba(72, 31, 31, 1) 60%, rgba(72, 31, 31, 0.96) 100%);
}

/* Hero Content - WCAG and Material Design compliant */
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
    padding: 0 var(--container-padding);
    max-width: 1024px;
    width: 100%;
}

.hero-content h1 {
    font-size: var(--font-hero);
    /* 44-64px - Hero specific size */
    font-weight: var(--font-bold);
    /* 700 - Bold for impact */
    line-height: 1.15;
    /* Tighter for large text */
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.025em;
    /* Slightly tighter for large text */
    white-space: nowrap;
    /* Keep title in single line */
    /* Strong text shadow for WCAG AAA contrast on images */
    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.5),
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.1);
    color: var(--color-white) !important;
    /* Force white for hero heading */
}

.hero-content p {
    font-size: var(--font-h4);
    /* 20-26px - Larger for better readability */
    font-weight: var(--font-regular);
    line-height: 1.6;
    /* Looser for comfortable reading */
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
    /* Slight transparency for visual hierarchy */
    color: rgba(255, 255, 255, 0.95) !important;
    /* Force near-white for subtitle */
    /* Enhanced text shadow for readability */
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.75),
        0 3px 12px rgba(0, 0, 0, 0.5),
        0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Decorative divider below hero */
.hero-divider {
    height: 54px;
    padding: 4px 0;
    border-top: 2px solid var(--color-gold);
    border-bottom: 2px solid var(--color-gold);
    background-color: var(--color-beige);
}

.hero-pattern {
    height: 100%;
    width: 100%;
    background-image: url('/common/dokumen/pattern.png');
    background-repeat: round;
    background-size: auto 100%;
    background-position: left;
}

/* Search Box */
.search-container {
    background-color: #fff;
    border-radius: 50px;
    padding: 6px 12px;
    /* reduce height */
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
    max-width: 800px;
    /* reduced width to match title/description */
    margin-left: auto;
    margin-right: auto;
}

.search-icon {
    color: #999;
    margin: 0 10px;
    font-size: 18px;
}

.search-container input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    /* reduce height */
    font-size: clamp(14px, 2vw, 16px);
    color: #666;
}

.search-container input::placeholder {
    color: #999;
}

/* Use global .search-buttons, .btn-search, .btn-advanced styles defined earlier */

/* Make hero search buttons slightly slimmer while keeping other sections intact */
.hero-section .btn-search,
.hero-section .btn-advanced {
    min-height: 42px;
    /* slightly slimmer */
    padding: 10px 20px;
}

/* Popular Search Section */
.popular-search {
    margin-top: 20px;
}

.popular-search p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-bottom: 15px;
}

.popular-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-btn {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: clamp(13px, 2vw, 14px);
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.tag-btn:hover {
    background-color: #fff;
    color: var(--color-gold);
    /* Deep Mahogany */
}

/* Document Collection Section */
.document-section {
    background-color: var(--color-beige);
    /* Warm Beige */
    padding: 44px 0;
    /* tightened from 60px */
    /* min-height intentionally unset for cross-browser compatibility */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    /* tightened from 40px */
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: clamp(1.25rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: var(--color-black);
    /* Black */
    margin: 0;
}

.btn-view-all {
    background-color: var(--color-primary);
    /* Heritage Gold */
    color: var(--color-white);
    border: none;
    padding: 20px 32px;
    border-radius: 32px;
    font-weight: var(--font-bold);
    cursor: pointer;
    transition: all 0.3s;
    font-size: var(--font-base);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.btn-view-all:hover {
    background-color: var(--color-gold-dark);
    /* Subtle darker gold like btn-search */
    color: var(--color-white);
    /* Keep text white on hover */
    transform: translateY(-2px);
    /* Same subtle movement as btn-search */
    box-shadow: var(--shadow-md);
    /* Consistent shadow with btn-search */
    text-decoration: underline;
    /* Underline to indicate it's a link */
}

/* Document Cards Grid */
.document-grid {
    /* Use flexbox to precisely control row counts and centering */
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /* tightened from 24px */
    justify-content: center;
    /* center second row of 3 cards */
    align-items: stretch;
}

.document-card {
    background-color: var(--color-gold);
    /* Deep Mahogany */
    color: #fff;
    text-decoration: none;
    /* anchor reset */
    border-radius: 26px;
    padding: 18px 22px;
    /* tightened from 22px 28px */
    /* Use CSS Grid inside card: icon left, title+count stacked on right */
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-auto-rows: auto;
    align-items: center;
    column-gap: 16px;
    /* slightly tighter */
    row-gap: 4px;
    /* tighter stack spacing */
    text-align: left;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    min-height: 96px;
    /* 4 columns on desktop: width = (100% - 3 gaps) / 4 */
    flex: 0 1 calc((100% - (20px * 3)) / 4);
    max-width: calc((100% - (20px * 3)) / 4);
}

.document-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    background-color: var(--color-gold-light);
}

.document-card:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 3px;
}

.document-icon {
    width: 56px;
    height: 56px;
    /* place icon in grid col 1 spanning both rows */
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 0;
    background-color: var(--color-beige);
    /* Warm beige */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--color-gold);
    /* Heritage Gold */
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.document-card:hover .document-icon {
    border-color: var(--color-gold-light);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
    transform: scale(1.02);
}

.document-icon img {
    font-size: 28px;
    color: var(--color-gold);
    /* Deep Mahogany */
    transition: all 0.3s;
    max-width: 60%;
}

.document-icon img.keputusan {
    max-width: 70%;
}

.document-card:hover .document-icon i {
    color: #fff;
}

.document-card h3 {
    font-size: clamp(1rem, 2.4vw, 1.125rem);
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0 0 2px 0 !important;
    line-height: 1.2;
    grid-column: 2;
    grid-row: 1;
}

.document-card p {
    font-size: clamp(0.8125rem, 2vw, 0.9375rem);
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    grid-column: 2;
    grid-row: 2;
}

/* Large screens ≥1400px keep 4 columns but allow comfortable spacing via container max-width */
@media (min-width: 1400px) {
    .document-card {
        flex: 0 1 calc((100% - (24px * 3)) / 4);
        max-width: calc((100% - (24px * 3)) / 4);
    }
}

/* tablet adjustments */
@media (max-width: 991.98px) {
    .document-grid {
        gap: 18px;
        justify-content: center;
    }

    .document-card {
        padding: 16px 18px;
        /* slightly tighter */
        border-radius: 22px;
        min-height: 88px;
        /* 3 columns on tablet */
        flex: 0 1 calc((100% - (18px * 2)) / 3);
        max-width: calc((100% - (18px * 2)) / 3);
        grid-template-columns: 50px 1fr;
    }

    .document-icon {
        width: 50px;
        height: 50px;
    }
}

/* small mobile */
@media (max-width: 576px) {
    .document-card {
        gap: 14px;
        /* 1 column on small mobile */
        flex: 0 1 100%;
        max-width: 100%;
    }
}



/* Focus Section (Fokus Terkini) */
.focus-section {
    background-color: var(--color-white);
    padding: 60px 0;
}

.focus-section h2 {
    font-size: var(--font-36);
    font-weight: var(--font-bold);
    color: var(--color-black);
    /* Black */
    text-align: center;
    margin-bottom: 40px;
}

/* Two Column Grid Layout */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

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

/* Column Headers */
.focus-header {
    padding: 20px 30px;
    border-radius: 20px;
    text-align: center;
}

.focus-header h3 {
    font-size: var(--font-24);
    font-weight: var(--font-bold);
    margin: 0;
}

.header-gold {
    background-color: var(--color-gold);
    /* Heritage Gold */
    color: var(--color-white) !important;
    /* Force white text */
}

.header-gold h3 {
    color: var(--color-white) !important;
    /* Ensure h3 is white */
}

.header-navy {
    background-color: var(--color-mahogany);
    /* Deep Mahogany */
    color: var(--color-white) !important;
    /* Force white text */
}

.header-navy h3 {
    color: var(--color-white) !important;
    /* Ensure h3 is white */
}

/* Regulation List */
.regulation-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
}

/* Regulation Cards */
.regulation-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 40px 45px;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 140px;
    height: 100%;
}

.gold-card .regulation-card {
    border: 1px solid var(--color-gold);
    /* Heritage Gold */
}

.navy-card .regulation-card {
    border: 1px solid var(--color-mahogany);
    /* Deep Mahogany */
    /* Remove background, keep original white background */
}

.regulation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.regulation-card-bg-animate:hover {
    background-color: var(--color-gold) !important;
}

.regulation-card-bg-animate:hover .regulation-badge {
    background-color: #352201;
}

.regulation-content {
    flex: 1;
}

.regulation-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-gold {
    background-color: var(--color-gold);
    color: var(--color-white);
    font-weight: var(--font-semibold);
    font-size: var(--font-14);
}

.badge-navy {
    background-color: var(--color-mahogany);
    /* Deep Mahogany */
    color: var(--color-white);
    font-weight: var(--font-semibold);
    font-size: var(--font-14);
}

.regulation-card h4 {
    font-size: var(--font-18);
    font-weight: var(--font-bold);
    color: var(--color-text-dark);
    margin: 0 0 10px 0;
    line-height: 1.5;
    max-width: 350px;
    /* Text truncation with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5em;
    /* 3 lines * 1.5 line-height */
}

.regulation-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--color-gray);
    /* Gray */
    flex-wrap: wrap;
    align-items: center;
}

.regulation-meta span {
    display: flex;
    align-items: center;
}

.regulation-arrow {
    width: 68px;
    height: 68px;
    min-width: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 16px;
}

.arrow-gold {
    border: 2px solid var(--color-gold);
    /* Heritage Gold */
    color: var(--color-gold);
    background-color: rgba(198, 162, 90, 0.14);
}

.arrow-navy {
    border: 2px solid var(--color-mahogany);
    /* Deep Mahogany */
    color: var(--color-gold);
    background-color: rgba(91, 44, 44, 0.14);
}

.regulation-card:hover .regulation-arrow {
    transform: rotate(45deg);
}

/* Responsive */
@media (max-width: 991px) {
    .focus-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .focus-section {
        padding: 50px 0;
    }

    .focus-header {
        padding: 14px 25px;
    }

    .regulation-card {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    .regulation-arrow {
        align-self: flex-start;
        width: 38px;
        height: 38px;
        min-width: 38px;
    }
}

@media (max-width: 576px) {
    .focus-section h2 {
        margin-bottom: 30px;
    }

    .focus-header {
        padding: 12px 20px;
    }

    .regulation-card {
        padding: 18px;
    }

    .regulation-badge {
        font-size: 10px;
        padding: 5px 14px;
    }
}

/* News Section (Berita Terbaru) */

.news-section {
    background-color: var(--color-beige);
    /* Medium beige */
    padding: 60px 0;
    /* min-height intentionally unset for cross-browser compatibility */
}

.news-section h2 {
    font-size: var(--font-36);
    font-weight: var(--font-bold);
    color: var(--color-black);
    /* Black */
    margin-bottom: 40px;
}

.news-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}



.news-carousel {
    position: relative;
    padding: 0;
}

.swiper {
    width: 100%;
    height: 100%;
}

.news-card {
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-8px);
}

.news-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 20px;
}

.news-content {
    padding: 20px 20px 20px 0;
}

.news-content h3 {
    font-size: var(--font-18);
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* WebKit compatibility */
    line-clamp: 2;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.swiper {
    padding: 10px 0;
}

.news-date {
    font-size: var(--font-16);
    color: var(--color-text-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Custom Swiper Navigation */
.swiper-button-prev,
.swiper-button-next {
    width: 45px;
    height: 45px;
    background-color: var(--color-gold);
    /* Heritage Gold */
    border-radius: 50%;
    transition: all 0.3s;
    top: 120px;
}

.swiper-button-prev {
    left: -23px;
}

.swiper-button-next {
    right: -23px;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background-color: var(--color-gold-dark);
    /* Darker gold */
}

.swiper-button-prev:after,
.swiper-button-next:after {
    content: '';
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.swiper-button-prev:after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");
}

.swiper-button-next:after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
}

/* Hide pagination dots */
.swiper-pagination {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .news-section {
        padding: 40px 0;
    }

    .news-section h2 {
        font-size: 28px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .news-carousel {
        padding: 0 30px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 38px;
        height: 38px;
    }

    .swiper-button-prev {
        left: -30px;
    }

    .swiper-button-next {
        right: -30px;
    }

    .swiper-button-prev:after,
    .swiper-button-next:after {
        width: 20px;
        height: 20px;
    }

    .news-image {
        height: 200px;
    }
}

/* Survey & Statistics Section */
.survey-stats-section {
    background-color:
        #f8f8f8;
    padding: 60px 0;
}

.survey-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

/* Survey Card */
.survey-card {
    background: radial-gradient(circle at top right, var(--color-gold-light) 0%, var(--color-golden-brown) 70%);
    /* Heritage Gold to Deep Mahogany */
    border-radius: 25px;
    padding: 35px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.survey-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.survey-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
}

.survey-icon svg {
    width: 100%;
    height: 100%;
    fill: #fff;
}

.survey-card h3 {
    font-size: var(--font-h3);
    /* Use consistent typography */
    font-weight: var(--font-bold);
    margin-bottom: 15px;
    color: var(--color-white);
}

.survey-card p {
    font-size: var(--font-base);
    /* Use consistent typography */
    line-height: var(--line-height-relaxed);
    margin-bottom: 25px;
    color: var(--color-white);
    opacity: 0.95;
}

.btn-survey {
    background-color: var(--color-white);
    color: var(--color-gold) !important;
    /* Use mahogany for better contrast */
    border: 2px solid var(--color-white);
    padding: 14px 32px;
    /* Consistent with other buttons */
    border-radius: 32px;
    /* Consistent rounded corners */
    font-weight: var(--font-bold);
    font-size: var(--font-base);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-survey:hover {
    background-color: var(--color-white);
    /* Keep white background */
    color: var(--color-gold) !important;
    /* Keep mahogany text */
    border-color: var(--color-gold);
    /* Add mahogany border on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 44, 44, 0.15);
    /* Subtle shadow */
}

/* Statistics Card */
.stats-card {
    background-color: #fff;
    border-radius: 25px;
    padding: 35px;
    border: 1px solid var(--color-golden-brown);
    position: relative;
    transition: all 0.3s;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.stats-header h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--color-black);
    /* Deep Mahogany */
    margin: 0;
}

.stats-arrow {
    width: 54px;
    height: 54px;
    background-color: var(--color-golden-brown);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.stats-arrow:hover {
    background-color: var(--color-gold-dark);
    /* Darker gold */
    transform: rotate(45deg);
}

.chart-container {
    position: relative;
    height: 280px;
    margin-top: 20px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-gray);
    /* Gray */
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Links Section (Tautan Terkait) */
.links-section {
    background-color: var(--color-beige);
    /* Medium beige */
    padding: 60px 0;
}

.links-section h2 {
    font-size: var(--font-36);
    font-weight: var(--font-bold);
    color: var(--color-black);
    /* Black */
    text-align: center;
    margin-bottom: 15px;
}

.links-subtitle {
    text-align: center;
    color: var(--color-text-gray);
    font-size: var(--font-18);
    margin-bottom: 40px;
    font-family: Inter, sans-serif;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    /* 2 columns for better centering */
    gap: 30px;
    justify-content: center;
    max-width: 800px;
    /* Limit width for centering */
    margin: 0 auto;
    /* Center the grid */
}

.link-card {
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;

    display: flex;
    flex-direction: column;
}

.link-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.link-image {
    width: 100%;
    height: 160px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    flex-shrink: 0;
}

.link-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.link-footer {
    background: #D3AE6D;
    padding: 18px;
    text-align: center;

    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 80px;
}

.link-footer h4 {
    font-size: var(--font-base);
    /* Use consistent typography */
    font-weight: var(--font-bold);
    /* Make it bolder for better contrast */
    color: #352201;
    /* Change to white text */
    margin: 0;
    line-height: 1.4;
}

/* Footer Styling - Modern Redesign */
footer {
    background-color: var(--color-white);
    /* Deep Mahogany */
    color: var(--color-black);
    padding: var(--spacing-3xl) 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-2xl);
    padding: 0 var(--spacing-lg);
    /* Add horizontal padding */
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    /* 3 equal columns */
    gap: var(--spacing-xl);
    width: 100%;
    max-width: 1200px;
    /* Wider for 3 columns */
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
    align-items: flex-start;
}

.footer-address {
    text-align: center;
}

.footer-address h4 {
    font-size: var(--font-h4);
    font-weight: var(--font-bold);
    color: var(--color-black);
    margin-bottom: var(--spacing-lg);
}

/* Ensure all paragraphs in footer-address are white */
.footer-address p {
    font-size: var(--font-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-dim-gray);
    max-width: 300px;
    margin: 0 auto var(--spacing-sm) auto;
}

.footer-contact-section {
    text-align: center;
}

.footer-contact-section h4 {
    font-size: var(--font-h4);
    font-weight: var(--font-bold);
    color: var(--color-black);
    margin-bottom: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-size: var(--font-base);
    color: rgba(255, 255, 255, 0.95);
    padding: var(--spacing-sm);
    /* Add padding for better click area */
    border-radius: 8px;
    /* Rounded corners */
    transition: all 0.3s ease;
}

.contact-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    /* Subtle hover background */
}

.contact-item i {
    color: var(--color-dim-gray);
    font-size: 20px;
    /* Reduce icon size for contact */
}

.contact-email {
    color: var(--color-dim-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-email:hover,
.contact-email:focus {
    color: var(--color-dim-gray);
    text-decoration: underline;
}

.footer-social {
    text-align: center;
}

.footer-social h4 {
    font-size: var(--font-h4);
    font-weight: var(--font-bold);
    color: var(--color-black);
    margin-bottom: var(--spacing-lg);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    /* Allow wrapping for smaller screens */
}

.social-icon {
    width: 45px;
    /* Slightly larger for better visibility */
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    /* Subtle background */
    border: 2px solid rgba(255, 255, 255, 0.2);
    /* Subtle border */
    color: var(--color-dim-gray);
    /* White icons */
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 18px;
    /* Consistent icon size */
}

.social-icon:hover {
    background-color: var(--color-gold);
    /* Heritage Gold on hover */
    border-color: var(--color-gold);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(198, 162, 90, 0.3);
    /* Gold shadow */
}

.footer-bottom {
    background-color: var(--color-gold);
    /* Darker mahogany */
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: var(--font-sm);
    color: var(--color-black);
    font-weight: var(--font-medium);
}

/* Fixed Action Buttons */
.fixed-action-buttons {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    width: 60px;
    height: 60px;
    background-color: var(--color-gold);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.action-btn img {
    width: 32px !important;
    height: 32px !important;
    filter: brightness(0) invert(1);
    /* Make icons white */
}

.action-btn:hover {
    transform: scale(1.1);
    background-color: var(--color-gold);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.action-btn:active {
    transform: scale(0.95);
}

/*halaman umum*/

.halaman-umum {
    margin-top: 120px;
}

.title-content {
    margin: 40px 0;
}

.title-content h2 {
    color: var(--color-text-dark);
    font-size: var(--font-36);
    font-weight: var(--font-bold);
    margin-bottom: 10px;
}

.title-content p {
    color: #818181;
    font-size: var(--font-18);
    line-height: 1.4;
    max-width: 850px;
}

.body-content img {
    max-width: 100%;
    height: auto;
}

.body-content {
    color: var(--color-text-dark);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--color-gold);
    margin-bottom: 50px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}


/* Breadcrumb Styling */
.hukum-breadcrumb-wrapper {
    margin-bottom: 25px;
}

.breadcrumb-item {
    list-style: none;
    font-size: var(--font-18);
    font-weight: var(--font-medium);
    font-family: Inter, Sans-Serif;
}

.breadcrumb-item a {
    text-decoration: none;
    color: black;
}

.breadcrumb-item a:hover {
    color: black;
}

.breadcrumb-item.active {
    color: var(--color-gold) !important;
}

/* News Article Detail */
.news-article {
    margin-bottom: 50px;
}

.news-article .article-header {
    margin-bottom: 30px;
}

.news-article .article-title {
    color: var(--color-text-dark);
    font-size: var(--font-36);
    font-weight: var(--font-bold);
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-article .article-meta {
    display: flex;
    gap: 20px;
    color: var(--color-gray);
    font-size: var(--font-16);
    flex-wrap: wrap;
}

.news-article .article-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-article .article-image {
    margin-bottom: 30px;
}

.news-article .article-content {
    font-size: var(--font-18);
    line-height: 1.8;
    color: var(--color-text-dark);
}

.news-article .article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

.news-article .article-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.news-article .related-news-section {
    margin-top: 50px;
}

.news-article .section-title {
    font-size: var(--font-24);
    font-weight: var(--font-bold);
    color: var(--color-text-dark);
    margin-bottom: 25px;
}

/* PAGINATION */

.regulation-grid .list-view .pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px 0;
    padding: 0;
    list-style: none;
    gap: 10px;
}

.pagination>li {
    display: inline-block;
}

.pagination>li>a,
.pagination>li>span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 14px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #8b7355;
    text-decoration: none;
    background-color: #fff;
    border: 2px solid #d4c5a9;
    border-radius: 50px;
    /* Fully rounded */
    transition: all 0.3s ease;
}

.pagination>li>a:hover,
.pagination>li>a:focus {
    color: #fff;
    background-color: #b8a57a;
    border-color: #b8a57a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 165, 122, 0.4);
    text-decoration: none;
}

.pagination>.active>a,
.pagination>.active>a:hover,
.pagination>.active>span {
    color: #fff;
    background-color: #b8a57a;
    border-color: #b8a57a;
    cursor: default;
    box-shadow: 0 4px 12px rgba(184, 165, 122, 0.4);
}

.pagination>.disabled>span,
.pagination>.disabled>a {
    color: #ccc;
    background-color: #f9f9f9;
    border-color: #e8e8e8;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination>.prev>a,
.pagination>.next>a {
    padding: 10px;
    font-weight: 700;
}

/* news page */

.news-page {
    padding: 60px 0;
    min-height: auto;
    margin-top: 50px;
}

/* Responsive Breakpoints */

@media (min-width: 1200px) {

    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        max-width: 1440px;
    }
}

/* Tablet & Medium screens */
@media (max-width: 991px) {

    .document-section,
    .focus-section,
    .news-section,
    .survey-stats-section,
    .links-section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .document-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 18px;
    }

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

    .news-carousel {
        padding: 0 50px;
    }

    .survey-stats-grid,
    .links-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

/* Tablet screens */
@media (max-width: 992px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        /* 2 columns on tablet */
        gap: var(--spacing-lg);
    }

    .footer-social {
        grid-column: 1 / -1;
        /* Span full width for social section */
        text-align: center;
        margin-top: var(--spacing-lg);
        padding-top: var(--spacing-lg);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Mobile screens */
@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
    }

    .hero-content {
        padding: 0 18px;
    }

    .hero-content h1 {
        margin-bottom: 15px;
        font-size: clamp(28px, 6vw, var(--font-hero));
        /* Responsive size for mobile */
        white-space: normal;
        /* Allow wrapping on very small screens */
    }

    .hero-content p {
        margin-bottom: 22px;
    }

    .search-container {
        border-radius: 25px;
        padding: 12px;
        flex-direction: column;
        gap: 10px;
        max-width: 95%;
    }

    .search-icon {
        display: none;
    }

    .search-container input {
        width: 100%;
        text-align: center;
        padding: 12px;
        min-width: 100%;
    }

    .search-buttons {
        width: 100%;
        flex-direction: column;
        margin-left: 0;
        gap: 8px;
    }

    .btn-search,
    .btn-advanced {
        width: 100%;
        padding: 12px 20px;
    }

    .popular-tags {
        gap: 8px;
    }

    .tag-btn {
        padding: 8px 16px;
    }

    .document-section,
    .focus-section,
    .news-section,
    .survey-stats-section,
    .links-section {
        padding: 45px 0;
    }

    /* Footer Responsive */
    .footer-main {
        grid-template-columns: 1fr;
        /* Stack to 1 column on mobile */
        gap: var(--spacing-xl);
        text-align: center;
    }

    .footer-address h4 {
        font-size: var(--font-h5);
    }

    .footer-address p {
        font-size: var(--font-sm);
    }

    .section-header h2,
    .focus-section h2,
    .news-section h2,
    .links-section h2 {
        width: 100%;
        text-align: center;
    }

    .btn-view-all {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    /* document-grid uses flex; keep gap only */
    .document-grid {
        gap: 15px;
    }

    .document-card {
        padding: 22px 15px;
    }

    .document-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 0;
    }

    .document-icon i {
        font-size: 35px;
    }

    .tab-btn {
        padding: 12px 35px;
        min-width: 100%;
    }

    .regulation-card {
        padding: 20px;
        flex-direction: row;
    }

    .news-carousel {
        padding: 0 45px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .news-image {
        height: 200px;
    }

    .news-content {
        padding: 18px;
    }

    .survey-stats-grid {
        gap: 22px;
    }

    .survey-card,
    .stats-card {
        padding: 28px;
    }

    .chart-container {
        height: 240px;
    }

    footer {
        padding: 40px 0 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .fixed-action-buttons {
        right: 15px;
    }

    .action-btn {
        width: 50px;
        height: 50px;
    }

    .action-btn img {
        width: 28px !important;
        height: 28px !important;
    }


}

/* Small Mobile */
@media (max-width: 576px) {
    .hero-section {
        min-height: 480px;
    }

    .hero-content {
        padding: 0 15px;
    }

    .search-container {
        padding: 10px;
        max-width: 96%;
    }

    .popular-search {
        margin-top: 15px;
    }

    .document-section,
    .focus-section,
    .news-section,
    .survey-stats-section,
    .links-section {
        padding: 40px 0;
    }

    .document-grid {
        gap: 12px;
    }

    .document-card {
        padding: 20px 12px;
    }

    .document-icon {
        width: 65px;
        height: 65px;
        margin-bottom: 0;
    }

    .document-icon i {
        font-size: 32px;
    }

    .tab-btn {
        padding: 10px 30px;
    }

    .regulation-card {
        padding: 18px;
    }

    .news-carousel {
        padding: 0 40px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 36px;
        height: 36px;
    }

    .news-image {
        height: 180px;
    }

    .news-content {
        padding: 16px;
    }

    .survey-card,
    .stats-card {
        padding: 25px;
    }

    .survey-icon {
        width: 60px;
        height: 60px;
    }

    .chart-container {
        height: 220px;
    }

    footer {
        padding: 35px 0 0;
    }

    .acc-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .hero-section {
        min-height: 450px;
    }

    /* document-grid uses flex; adjust gap only */
    .document-grid {
        gap: 10px;
    }

    .news-carousel {
        padding: 0 38px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 34px;
        height: 34px;
    }

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

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

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 85vh;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        margin-bottom: 10px;
        white-space: nowrap;
        /* Keep single line even in landscape */
    }

    .hero-content p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .search-container {
        margin-bottom: 15px;
    }

    .popular-search {
        margin-top: 10px;
    }
}

/* Layout Max Width Constraints */
.site-content,
main>.document-section>.container,
main>.focus-section>.container,
main>.news-section>.container,
main>.survey-stats-section>.container,
main>.links-section>.container,
.footer-content,
.hero>.container,
.navbar .container-fluid {
    max-width: var(--max-content-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

nav.navbar {
    width: 100%;
}
