@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');
@import url('sidebarkiri.css');
@import url('sidebarkanan.css');
@import url('main-content-responsive.css');

:root {
    /* Palet Granodiorit Lebak (dari batuan & geosite) */
    --header-dark: #1F2937;                 /* Biotite Black - teks utama & outline */
    --header-primary: #6B7280;              /* Granodiorit Grey - warna utama header */
    --header-secondary: #3B5E4A;            /* Moss Green Geosite - aksen alam/ekowisata */
    --header-accent: #D97706;               /* Andesine Bronze - highlight & CTA */
    --header-bg: #F2F4F5;                   /* Quartz White - latar bersih */
    --muted: #6b7280;
    /* Lebar area konten utama: pas dengan sisa layar setelah dikurangi sidebar kanan */
    --saphira-content-width: calc(100vw - var(--sidebar-right-width));
    --saphira-gutter: 48px;
    --saphira-header-offset: 148px;
    --saphira-bg-muted: #fdf6fb;
    /* Sidebar kanan 400px */
    --sidebar-left-width: 0px;
    --sidebar-right-width: 400px;
}

.site-header {
    font-family: 'Poppins', sans-serif;
}

.site-header * {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-top: var(--saphira-header-offset);
}

body.has-global-sidebars {
    /* Hanya sidebar kanan yang aktif */
    padding-right: var(--sidebar-right-width);
    padding-top: var(--saphira-header-offset);
    transition: padding 0.3s ease;
}

/* Mobile: 320px - 768px - Sembunyikan sidebar */
@media (max-width: 768px) {
    body.has-global-sidebars {
        padding-right: 0 !important;
    }
    
    .nav-bar .container-max {
        padding-right: 24px !important;
    }
}

/* Tablet: 769px - 1200px - Sembunyikan sidebar dan gunakan header kompak */
@media (min-width: 769px) and (max-width: 1200px) {
    body.has-global-sidebars {
        padding-right: 0 !important;
    }
    
    .nav-bar .container-max {
        padding-right: 24px !important;
    }
}

/* Tablet/Desktop: 1024px - 1200px - Responsive sama dengan 769px */
@media (min-width: 1024px) and (max-width: 1200px) {
    body.has-global-sidebars {
        padding-right: 0 !important;
    }
    
    .nav-bar .container-max {
        padding-right: 24px !important;
        max-width: 100%;
        margin: 0;
    }
    
    body.has-global-sidebars .site-header {
        width: 100%;
        right: 0;
    }
    
    /* Styling header sama dengan 769px */
    body .site-header .top-bar .container-max,
    body .site-header .nav-bar .container-max {
        gap: 12px !important;
        flex-wrap: wrap !important;
    }

    body .site-header .brand-inline {
        flex: 1 1 260px !important;
    }

    /* Sembunyikan main-nav dan tampilkan nav-toggle (sama dengan 769px) */
    body .site-header .main-nav {
        display: none !important;
    }
    
    body .site-header .nav-toggle {
        display: inline-flex !important;
    }
}

/* Desktop: 1201px+ - Header full width, konten beri ruang untuk sidebar kanan 400px */
@media (min-width: 1201px) {
    body.has-global-sidebars {
        padding-right: var(--sidebar-right-width) !important;
    }
    
    .nav-bar .container-max {
        padding-right: 24px !important;
        max-width: 100%;
        margin: 0;
    }
}

/* Desktop: 1201px - 1850px
   - Menu utama ditampilkan (bukan nav-toggle)
   - Sidebar kanan tetap tampil di kanan
   - Menu tidak boleh menimpa sidebar
   - Hanya tampilkan menu sampai "Produk Hukum", menu lainnya disembunyikan
*/
@media (min-width: 1201px) and (max-width: 1850px) {
    /* Pastikan header tidak melebar ke area sidebar */
    body.has-global-sidebars .site-header {
        width: var(--saphira-content-width) !important;
        right: var(--sidebar-right-width) !important;
        left: 0 !important;
    }
    
    body .site-header .main-nav {
        display: flex !important;
    }
    
    body .site-header .nav-toggle {
        display: none !important;
    }
    
    /* Batasi container nav-bar agar menu tidak melebar ke area sidebar */
    .nav-bar .container-max {
        max-width: 100% !important;
        width: 100% !important;
        padding-right: 24px !important;
        padding-left: 24px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow: visible;
        position: relative;
        box-sizing: border-box;
    }
    
    /* Pastikan main-nav tidak overflow ke area sidebar */
    .main-nav {
        max-width: 100%;
        flex-wrap: nowrap;
        overflow: visible;
    }
    
    /* Sembunyikan menu setelah "Produk Hukum" (menu ke-5 dan seterusnya) pada lebar 1201-1400px */
    .main-nav > ul > li:nth-child(n+5) {
        display: none !important;
    }
    
    /* Pastikan dropdown menu tidak melebar ke area sidebar */
    .main-nav .dropdown {
        max-width: 300px;
    }
    
    /* Untuk menu item terakhir yang tampil, geser dropdown ke kiri agar tidak menimpa sidebar */
    .main-nav > ul > li:nth-child(4) .dropdown {
        right: 0;
        left: auto;
    }
    
    /* Pastikan dropdown tidak melewati batas kanan konten utama */
    .main-nav > ul > li {
        position: relative;
    }
    
    .main-nav > ul > li .dropdown {
        max-width: min(300px, calc(var(--saphira-content-width) - 200px));
    }
}

/* Desktop: 1401px - 1600px - Tampilkan sampai "Layanan Desa" */
@media (min-width: 1401px) and (max-width: 1600px) {
    .main-nav > ul > li:nth-child(5) {
        display: list-item !important;
    }
    .main-nav > ul > li:nth-child(n+6) {
        display: none !important;
    }
}

/* Desktop: 1601px - 1850px - Tampilkan sampai "Layanan Mandiri" */
@media (min-width: 1601px) and (max-width: 1850px) {
    .main-nav > ul > li:nth-child(-n+6) {
        display: list-item !important;
    }
    .main-nav > ul > li:nth-child(n+7) {
        display: none !important;
    }
}

/* Desktop: 1851px+ - Tampilkan semua menu */
@media (min-width: 1851px) {
    .main-nav > ul > li {
        display: list-item !important;
    }
}

/* Tablet bridge:
   769px - 1024px  : layout lebih padat, nav mendekati mobile
   1024px - 1200px : layout desktop penuh */
@media screen and (min-width: 769px) and (max-width: 1023.98px) {
    body .site-header .top-bar .container-max,
    body .site-header .nav-bar .container-max {
        gap: 12px !important;
        flex-wrap: wrap !important;
    }

    body .site-header .brand-inline {
        flex: 1 1 260px !important;
    }

    body .site-header .main-nav {
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    body .site-header .main-nav ul {
        flex: 1 1 100% !important;
        flex-wrap: wrap !important;
        column-gap: 12px !important;
        row-gap: 6px !important;
    }

    body .site-header .main-nav > ul > li {
        flex: 1 1 calc(50% - 12px) !important;
    }

    body .site-header .main-nav .has-dropdown > button {
        width: 100% !important;
        justify-content: space-between !important;
    }

    body .site-header .main-nav .dropdown {
        position: relative !important;
        inset: auto !important;
        margin-top: 8px !important;
        width: 100% !important;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
    }

    body .site-header .nav-cta {
        margin-left: auto !important;
    }

    body .section-wrapper,
    body .category-container,
    body .profil-content,
    body .layanan-content,
    body .ppid-content,
    body .public-main .section,
    body .public-page .section,
    body main .container,
    body main .container-max {
        width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    body .statistics-grid,
    body .content-grid,
    body .cards-grid,
    body .news-grid,
    body .video-grid,
    body .gallery-grid,
    body .program-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
        gap: 20px !important;
    }

    body .flex-row,
    body .section-row,
    body .info-row,
    body .stat-row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
    }

    body .flex-row > *,
    body .section-row > *,
    body .info-row > *,
    body .stat-row > * {
        flex: 1 1 calc(50% - 20px) !important;
    }

    body .table-responsive,
    body .table-wrapper,
    body .data-table {
        overflow-x: auto !important;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1200px) {
    body .site-header .top-bar .container-max,
    body .site-header .nav-bar .container-max {
        gap: 16px !important;
    }

    body .section-wrapper,
    body .category-container,
    body .profil-content,
    body .layanan-content,
    body .ppid-content,
    body .public-main .section,
    body .public-page .section,
    body main .container,
    body main .container-max {
        width: 100% !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

/* Mobile specific (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --saphira-header-offset: 100px;
    }
    body {
        padding-top: var(--saphira-header-offset);
    }
    
    body.has-global-sidebars {
        padding-left: 0;
        padding-right: 0;
        padding-top: var(--saphira-header-offset);
    }
    
    /* Pastikan konten utama tidak terpotong */
    .container-max,
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Top bar mobile */
    .top-bar {
        font-size: 0.75rem;
    }
    
    .top-bar .container-max {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 16px;
    }
    
    .top-bar .contact-info {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    
    .top-bar .quick-links {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    
    .top-bar .quick-links a {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    /* Nav bar mobile */
    .nav-bar {
        padding: 12px 0;
    }
    
    /* Sembunyikan logo pada mobile */
    .brand-inline {
        display: none !important;
    }
    
    .brand-text strong {
        font-size: 0.95rem;
    }
    
    .brand-text small {
        font-size: 0.75rem;
    }
    
    /* Nav CTA mobile */
    .nav-cta {
        padding: 4px;
    }
    
    .nav-cta-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    /* Running Text Mobile - Di tengah header */
    .header-running-text {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 120px);
        max-width: 400px;
        height: 100%;
        overflow: visible;
        z-index: 1;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: none;
        gap: 12px;
    }
    
    .running-text-wrapper {
        flex: 1;
        overflow: hidden;
        position: relative;
        height: 100%;
        display: flex;
        align-items: center;
    }
    
    .running-text-content {
        display: flex;
        white-space: nowrap;
        animation: runningText 30s linear infinite;
        color: #fff;
        font-size: 0.7rem;
        font-weight: 500;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        line-height: 1.2;
    }
    
    .running-text-content span {
        padding-right: 50px;
        display: inline-block;
    }
    
    @keyframes runningText {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
    
    /* Icon di kiri dan kanan running text - Tema Pemerintah */
    .running-text-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        z-index: 2;
    }
    
    .running-text-icon i {
        font-size: 1.8rem;
        color: #ffd700;
        text-shadow: 0 0 12px rgba(255, 215, 0, 0.9), 0 0 24px rgba(255, 215, 0, 0.6), 0 0 36px rgba(255, 215, 0, 0.3);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
    
    /* Icon kiri - Selamat Datang dengan animasi goyang */
    .running-text-icon-left i {
        animation: iconPulse 2s ease-in-out infinite, iconShakeLeft 2.5s ease-in-out infinite, iconColorShift 4s ease-in-out infinite;
        animation-delay: 0s, 0s, 0s;
    }
    
    /* Icon kanan - Pelayanan Publik dengan animasi goyang */
    .running-text-icon-right i {
        animation: iconPulse 2s ease-in-out infinite, iconShakeRight 2.5s ease-in-out infinite, iconColorShift 4s ease-in-out infinite;
        animation-delay: 0.5s, 0.5s, 2s;
    }
    
    /* Animasi pulse untuk icon - Lebih halus untuk ukuran besar */
    @keyframes iconPulse {
        0%, 100% {
            opacity: 1;
        }
        50% {
            opacity: 0.9;
        }
    }
    
    /* Animasi goyang untuk icon kiri - Selamat Datang */
    @keyframes iconShakeLeft {
        0%, 100% {
            transform: translateX(0) rotate(0deg) scale(1);
        }
        25% {
            transform: translateX(-6px) rotate(-12deg) scale(1.1);
        }
        50% {
            transform: translateX(0) rotate(0deg) scale(1.2);
        }
        75% {
            transform: translateX(6px) rotate(12deg) scale(1.1);
        }
    }
    
    /* Animasi goyang untuk icon kanan - Pelayanan Publik */
    @keyframes iconShakeRight {
        0%, 100% {
            transform: translateX(0) rotate(0deg) scale(1);
        }
        25% {
            transform: translateX(6px) rotate(12deg) scale(1.1);
        }
        50% {
            transform: translateX(0) rotate(0deg) scale(1.2);
        }
        75% {
            transform: translateX(-6px) rotate(-12deg) scale(1.1);
        }
    }
    
    /* Animasi perubahan warna - Tema Pemerintah (Merah Putih Emas) */
    @keyframes iconColorShift {
        0%, 100% {
            color: #ffd700;
            text-shadow: 0 0 12px rgba(255, 215, 0, 0.9), 0 0 24px rgba(255, 215, 0, 0.6), 0 0 36px rgba(255, 215, 0, 0.3);
        }
        25% {
            color: #dc2626;
            text-shadow: 0 0 12px rgba(220, 38, 38, 0.9), 0 0 24px rgba(220, 38, 38, 0.6), 0 0 36px rgba(220, 38, 38, 0.3);
        }
        50% {
            color: #ffffff;
            text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 24px rgba(255, 255, 255, 0.6), 0 0 36px rgba(255, 255, 255, 0.3);
        }
        75% {
            color: #ffd700;
            text-shadow: 0 0 12px rgba(255, 215, 0, 0.9), 0 0 24px rgba(255, 215, 0, 0.6), 0 0 36px rgba(255, 215, 0, 0.3);
        }
    }
}

/* Mobile kecil (max-width: 576px) - Header lebih kompak */
@media (max-width: 576px) {
    :root {
        --saphira-header-offset: 70px;
    }
    body {
        padding-top: var(--saphira-header-offset) !important;
    }
    body.has-global-sidebars {
        padding-top: var(--saphira-header-offset) !important;
    }
}

/* Mobile 320x894 sampai 769x894 - Header sangat kompak dengan animasi warna */
@media (max-width: 769px) and (max-height: 894px) {
    :root {
        --saphira-header-offset: 75px; /* Ditingkatkan karena ada running text */
    }
    body {
        padding-top: var(--saphira-header-offset) !important;
    }
    body.has-global-sidebars {
        padding-top: var(--saphira-header-offset) !important;
    }
    
    /* Animasi perubahan warna header */
    .site-header {
        animation: headerColorShift 8s ease-in-out infinite;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    }
    
    @keyframes headerColorShift {
        0%, 100% {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
        }
        25% {
            background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
        }
        50% {
            background: linear-gradient(135deg, #065f46 0%, #047857 50%, #059669 100%);
        }
        75% {
            background: linear-gradient(135deg, #7c2d12 0%, #9a3412 50%, #c2410c 100%);
        }
    }
    
    /* Nav bar ikut animasi warna */
    .nav-bar {
        animation: navBarColorShift 8s ease-in-out infinite;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    }
    
    @keyframes navBarColorShift {
        0%, 100% {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
        }
        25% {
            background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
        }
        50% {
            background: linear-gradient(135deg, #065f46 0%, #047857 50%, #059669 100%);
        }
        75% {
            background: linear-gradient(135deg, #7c2d12 0%, #9a3412 50%, #c2410c 100%);
        }
    }
    
    /* Warna teks putih untuk kontras */
    .nav-bar .brand-inline,
    .nav-bar .brand-text strong,
    .nav-bar .nav-toggle {
        color: #fff;
    }
    
    .nav-toggle {
        border-color: rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.1);
    }
    
    .nav-toggle span {
        background: #fff;
    }
    
    /* Top bar sangat kompak */
    .top-bar {
        display: none; /* Sembunyikan top bar di mobile kecil */
    }
    
    /* Nav bar sangat kompak */
    .nav-bar {
        padding: 0;
        min-height: 55px;
        max-height: 55px;
        border-top: none;
        position: relative;
    }
    
    .nav-bar .container-max {
        padding: 8px 16px;
        min-height: 55px;
        gap: 12px;
        position: relative;
    }
    
    /* Brand icon lebih kecil dengan efek glow */
    .brand-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        padding: 0;
        margin: 0;
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(5px);
    }
    
    .brand-icon-img {
        border-radius: 6px;
    }
    
    /* Sembunyikan logo pada mobile 320-769 */
    .brand-inline {
        display: none !important;
    }
    
    .brand-text strong {
        font-size: 0.9rem;
        line-height: 1.2;
    }
    
    .brand-text small {
        display: none; /* Sembunyikan subtitle di mobile */
    }
    
    /* Nav toggle lebih kecil */
    .nav-toggle {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        position: relative;
        z-index: 2;
    }
    
    .nav-toggle span {
        width: 18px;
        height: 2px;
        margin: 3px 0;
    }
    
    /* Pastikan bottom nav tetap muncul */
    .mobile-bottom-nav {
        display: flex !important;
        z-index: 1000;
    }
    
    body {
        padding-bottom: 70px !important;
    }
    
    /* Running Text Mobile - Di tengah header */
    .header-running-text {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 120px);
        max-width: 400px;
        height: 100%;
        overflow: visible;
        z-index: 1;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: none;
        gap: 12px;
    }
    
    .running-text-wrapper {
        flex: 1;
        overflow: hidden;
        position: relative;
        height: 100%;
        display: flex;
        align-items: center;
    }
    
    .running-text-content {
        display: flex;
        white-space: nowrap;
        animation: runningText 30s linear infinite;
        color: #fff;
        font-size: 0.7rem;
        font-weight: 500;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        line-height: 1.2;
    }
    
    .running-text-content span {
        padding-right: 50px;
        display: inline-block;
    }
    
    /* Icon di kiri dan kanan running text - Tema Pemerintah */
    .running-text-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        z-index: 2;
    }
    
    .running-text-icon i {
        font-size: 1.8rem;
        color: #ffd700;
        text-shadow: 0 0 12px rgba(255, 215, 0, 0.9), 0 0 24px rgba(255, 215, 0, 0.6), 0 0 36px rgba(255, 215, 0, 0.3);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
    
    /* Icon kiri - Selamat Datang dengan animasi goyang */
    .running-text-icon-left i {
        animation: iconPulse 2s ease-in-out infinite, iconShakeLeft 2.5s ease-in-out infinite, iconColorShift 4s ease-in-out infinite;
        animation-delay: 0s, 0s, 0s;
    }
    
    /* Icon kanan - Pelayanan Publik dengan animasi goyang */
    .running-text-icon-right i {
        animation: iconPulse 2s ease-in-out infinite, iconShakeRight 2.5s ease-in-out infinite, iconColorShift 4s ease-in-out infinite;
        animation-delay: 0.5s, 0.5s, 2s;
    }
    
    /* Animasi pulse untuk icon - Lebih halus untuk ukuran besar */
    @keyframes iconPulse {
        0%, 100% {
            opacity: 1;
        }
        50% {
            opacity: 0.9;
        }
    }
    
    /* Animasi goyang untuk icon kiri - Selamat Datang */
    @keyframes iconShakeLeft {
        0%, 100% {
            transform: translateX(0) rotate(0deg) scale(1);
        }
        25% {
            transform: translateX(-6px) rotate(-12deg) scale(1.1);
        }
        50% {
            transform: translateX(0) rotate(0deg) scale(1.2);
        }
        75% {
            transform: translateX(6px) rotate(12deg) scale(1.1);
        }
    }
    
    /* Animasi goyang untuk icon kanan - Pelayanan Publik */
    @keyframes iconShakeRight {
        0%, 100% {
            transform: translateX(0) rotate(0deg) scale(1);
        }
        25% {
            transform: translateX(6px) rotate(12deg) scale(1.1);
        }
        50% {
            transform: translateX(0) rotate(0deg) scale(1.2);
        }
        75% {
            transform: translateX(-6px) rotate(-12deg) scale(1.1);
        }
    }
    
    /* Animasi perubahan warna - Tema Pemerintah (Merah Putih Emas) */
    @keyframes iconColorShift {
        0%, 100% {
            color: #ffd700;
            text-shadow: 0 0 12px rgba(255, 215, 0, 0.9), 0 0 24px rgba(255, 215, 0, 0.6), 0 0 36px rgba(255, 215, 0, 0.3);
        }
        25% {
            color: #dc2626;
            text-shadow: 0 0 12px rgba(220, 38, 38, 0.9), 0 0 24px rgba(220, 38, 38, 0.6), 0 0 36px rgba(220, 38, 38, 0.3);
        }
        50% {
            color: #ffffff;
            text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 24px rgba(255, 255, 255, 0.6), 0 0 36px rgba(255, 255, 255, 0.3);
        }
        75% {
            color: #ffd700;
            text-shadow: 0 0 12px rgba(255, 215, 0, 0.9), 0 0 24px rgba(255, 215, 0, 0.6), 0 0 36px rgba(255, 215, 0, 0.3);
        }
    }
    
    @keyframes runningText {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}

/* Mobile sangat kecil 320x894 */
@media (max-width: 480px) and (max-height: 894px) {
    :root {
        --saphira-header-offset: 70px; /* Ditingkatkan karena ada running text */
    }
    body {
        padding-top: var(--saphira-header-offset) !important;
    }
    body.has-global-sidebars {
        padding-top: var(--saphira-header-offset) !important;
    }
    
    .nav-bar {
        min-height: 50px;
        max-height: 50px;
    }
    
    .nav-bar .container-max {
        padding: 6px 12px;
        min-height: 50px;
        gap: 10px;
    }
    
    /* Sembunyikan logo pada mobile sangat kecil */
    .brand-inline {
        display: none !important;
    }
    
    .nav-toggle {
        width: 36px;
        height: 36px;
    }
    
    .nav-toggle span {
        width: 16px;
    }
    
    /* Pastikan bottom nav tetap muncul */
    .mobile-bottom-nav {
        display: flex !important;
        z-index: 1000;
    }
    
    body {
        padding-bottom: 70px !important;
    }
    
    /* Running Text - Font lebih kecil di mobile sangat kecil */
    .header-running-text {
        width: calc(100% - 100px);
        max-width: 350px;
        gap: 10px;
    }
    
    .running-text-content {
        font-size: 0.65rem;
    }
    
    /* Icon sedikit lebih kecil di mobile sangat kecil */
    .running-text-icon {
        width: 32px;
        height: 32px;
    }
    
    .running-text-icon i {
        font-size: 1.5rem;
    }
}

.site-header {
    margin-bottom: 0;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* Header seperti plat batu halus dengan bayangan lembut */
    background:
        radial-gradient(circle at 0 0, rgba(255,255,255,0.65), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(0,0,0,0.08), transparent 55%),
        var(--header-bg);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
}

/* Desktop: Header mengisi sisa lebar setelah sidebar (1201px+) */
@media (min-width: 1201px) {
    body.has-global-sidebars .site-header {
        width: var(--saphira-content-width);
        right: var(--sidebar-right-width);
    }
}

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

.top-bar {
    /* Sabuk gelap menyerupai retakan batuan */
    background: linear-gradient(135deg, #15181b 0%, #2b3137 45%, #3f464d 100%);
    color: #fff;
    font-size: 0.8rem;
    padding: 8px 0;
}

.top-bar .container-max {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 24px;
}

.top-bar .contact-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.top-bar .contact-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.85;
    font-size: 0.8rem;
    white-space: nowrap;
}

.top-bar .quick-links {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.top-bar .quick-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    opacity: 0.9;
    padding: 4px 10px;
    border-radius: 6px;
    transition: opacity 0.2s ease, background 0.2s ease;
    font-size: 0.8rem;
    white-space: nowrap;
}

.top-bar .quick-links a:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

.nav-bar {
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

/* Running Text - Default: Sembunyikan di desktop */
.header-running-text {
    display: none;
}

.nav-bar .container-max {
    display: flex;
    align-items: center;
    /* Logo + nama desa nempel kiri, menu mengikuti dengan jarak yang lebih jauh */
    justify-content: flex-start;
    gap: 40px;
    /* Header konten menempel ke kiri layar */
    max-width: 100%;
    margin: 0;
    padding-left: 24px;
    padding-right: 24px;
}

/* Desktop: Header mengisi sisa lebar setelah sidebar (1201px+) */
@media (min-width: 1201px) {
    .nav-bar .container-max {
        max-width: var(--saphira-content-width);
        margin-left: 0;
        margin-right: auto;
    }
}

.brand-inline {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    text-decoration: none;
    color: var(--header-dark);
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
}

.brand-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-text strong {
    font-size: 1.05rem;
    display: block;
    line-height: 1.3;
    font-weight: 700;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.2;
}

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    align-items: center;
    justify-content: center;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--header-dark);
    display: block;
    margin: 4px 0;
}

.main-nav {
    display: flex;
    gap: 22px;
    align-items: center;
    flex: 1;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 18px;
    flex: 1;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav a,
.main-nav button {
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--header-dark);
    text-decoration: none;
    padding: 14px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap; /* cegah teks menu seperti "Profil Desa" terbelah dua baris */
}

.main-nav a:hover,
.main-nav button:hover {
    color: var(--header-primary);
}

.main-nav .dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    padding: 14px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.main-nav li:hover > .dropdown,
.main-nav li:focus-within > .dropdown,
.main-nav li.open > .dropdown {
    display: flex;
}

.dropdown a {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--header-dark);
    font-weight: 500;
}

.dropdown a i {
    width: 20px;
}

.dropdown a:hover {
    background: rgba(23, 128, 109, 0.08);
    color: var(--header-primary);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border-radius: 0;
    background: var(--header-primary);
    box-shadow: 0 18px 40px rgba(23, 128, 109, 0.25);
    text-decoration: none;
    margin-left: auto;
}

.nav-cta-icon {
    width: 42px;
    height: 42px;
    border-radius: 0;
    background: #fff;
    color: var(--header-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.nav-cta-icon i {
    color: inherit;
}

.nav-cta-text {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    padding-right: 4px;
}

/* Shared hero/content alignment */
[class^="hero-"] > .container,
[class^="hero-"] > .container-max,
[class*=" hero-"] > .container,
[class*=" hero-"] > .container-max,
[class^="hero_"] > .container,
[class*=" hero_"] > .container,
.category-container,
.profil-content,
.layanan-content,
.ppid-content,
.pengaduan-content,
.umkm-content,
.potensi-content,
.lembaga-content,
.dokumen-content,
.produk-content,
.agenda-content,
.berita-content,
.galeri-content,
.kontak-content,
.pbb-content,
.bansos-content,
.apbdes-content,
.laporan-content,
.sdgs-content,
.idm-content,
.rkpdes-content,
.rpjmdes-content,
.video-content,
.penduduk-content,
.kategori-container,
.section-wrapper {
    width: min(var(--saphira-content-width), calc(100% - var(--saphira-gutter)));
    margin-left: auto;
    margin-right: auto;
}

[class^="hero-"],
[class*=" hero-"],
[class^="hero_"],
[class*=" hero_"] {
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 768px) {
    [class^="hero-"] > .container,
    [class^="hero-"] > .container-max,
    [class*=" hero-"] > .container,
    [class*=" hero-"] > .container-max,
    [class^="hero_"] > .container,
    [class*=" hero_"] > .container,
    .category-container,
    .profil-content,
    .layanan-content,
    .ppid-content,
    .pengaduan-content,
    .umkm-content,
    .potensi-content,
    .lembaga-content,
    .dokumen-content,
    .produk-content,
    .agenda-content,
    .berita-content,
    .galeri-content,
    .kontak-content,
    .pbb-content,
    .bansos-content,
    .apbdes-content,
    .laporan-content,
    .sdgs-content,
    .idm-content,
    .rkpdes-content,
    .rpjmdes-content,
    .video-content,
    .penduduk-content,
    .kategori-container,
    .section-wrapper {
        width: calc(100% - 32px);
    }
}

.section-card h1,
.section-card h2 {
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
}

.section-card h3 {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 85vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 40px rgba(15,23,42,0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.mobile-panel.active {
    bottom: 0;
}

.mobile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(15,23,42,0.08);
    background: white;
    position: relative;
}

.mobile-panel-header::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(15,23,42,0.2);
    border-radius: 2px;
}

.mobile-panel-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--header-dark);
    background: var(--header-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-panel-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(15,23,42,0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--header-dark);
    font-size: 1.2rem;
}

.mobile-panel-close:hover {
    background: rgba(15,23,42,0.1);
    transform: rotate(90deg);
}

.mobile-panel-close:active {
    transform: rotate(90deg) scale(0.95);
}

.mobile-panel-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 16px 24px;
}

.mobile-panel .mobile-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 8px 0;
}

.mobile-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 12px;
    background: white;
    border-radius: 16px;
    text-decoration: none;
    color: var(--header-dark);
    box-shadow: 0 2px 8px rgba(15,23,42,0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.4s ease forwards;
    min-height: 110px;
}

/* Animation delays will be set dynamically via JavaScript */

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(20, 92, 74, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.mobile-link-item:hover::before {
    opacity: 1;
}

.mobile-link-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(20, 92, 74, 0.2);
    background: linear-gradient(135deg, rgba(20, 92, 74, 0.05), rgba(26, 163, 118, 0.05));
}

.mobile-link-item:active {
    transform: translateY(-2px) scale(0.96);
}

.mobile-link-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--header-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(20, 92, 74, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mobile-link-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-link-item:hover .mobile-link-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 24px rgba(20, 92, 74, 0.35);
}

.mobile-link-item:hover .mobile-link-icon::after {
    opacity: 1;
}

.mobile-link-item:hover .mobile-link-icon i {
    transform: scale(1.1);
}

.mobile-link-text {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--header-dark);
    transition: color 0.3s ease;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}

.mobile-link-item:hover .mobile-link-text {
    color: var(--header-primary);
}

.mobile-link-admin {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02)) !important;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.mobile-link-admin .mobile-link-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.mobile-link-admin:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05)) !important;
    border-color: rgba(239, 68, 68, 0.2);
}

.mobile-panel .mobile-links .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 12px;
    padding: 12px 16px;
    color: var(--header-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #f8fafc 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(8px);
    z-index: 10;
    border-radius: 12px;
    grid-column: 1 / -1;
}

.mobile-panel .mobile-links .section-title i {
    font-size: 1rem;
    opacity: 0.8;
}

/* Tablet dan di bawah - sembunyikan main nav, tampilkan toggle */
@media (max-width: 1024px) {
    .main-nav {
        display: none !important;
    }

    .nav-toggle {
        display: inline-flex;
    }
}

/* Desktop - pastikan main nav muncul (hanya di 1757px+) */
@media (min-width: 1757px) {
    .main-nav {
        display: flex !important;
    }
    
    .nav-toggle {
        display: none !important;
    }
}

/* Sembunyikan nav-toggle di mobile karena sudah ada bottom nav */
@media (max-width: 768px) {
    .main-nav {
        display: none !important;
    }
    
    .nav-toggle {
        display: none !important;
    }
}

/* Extra small mobile (max-width: 640px) */
@media (max-width: 640px) {
    .top-bar .container-max {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-bar .quick-links {
        flex-wrap: wrap;
    }
    
    /* Mobile panel adjustments */
    .mobile-panel {
        max-height: 90vh;
    }
    
    .mobile-panel-header {
        padding: 16px 20px;
    }
    
    .mobile-panel-header h3 {
        font-size: 1.1rem;
    }
    
    .mobile-panel .mobile-links {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .mobile-link-item {
        padding: 14px 8px;
        min-height: 100px;
    }
    
    .mobile-link-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .mobile-link-text {
        font-size: 0.75rem;
    }
}

/* Very small mobile (max-width: 360px) */
@media (max-width: 360px) {
    .mobile-panel .mobile-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .mobile-link-item {
        min-height: 95px;
    }
    
    .mobile-link-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .mobile-link-text {
        font-size: 0.7rem;
    }
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    z-index: 1001;
    padding: 8px 0;
    padding-bottom: max(8px, calc(8px + env(safe-area-inset-bottom)));
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 500;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    flex: 1;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
    font-size: 1.3rem;
    transition: all 0.2s ease;
    color: inherit;
}

.bottom-nav-item span {
    font-size: 0.65rem;
    line-height: 1.2;
    white-space: nowrap;
    font-weight: 500;
}

.bottom-nav-item:hover,
.bottom-nav-item:focus,
.bottom-nav-item.active {
    color: var(--header-primary);
    outline: none;
}

.bottom-nav-item:hover i,
.bottom-nav-item:focus i,
.bottom-nav-item.active i {
    transform: scale(1.15);
    color: var(--header-primary);
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--header-primary);
    border-radius: 0 0 3px 3px;
}

/* Styling khusus untuk tombol logout */
.bottom-nav-logout {
    color: #dc2626 !important;
}

.bottom-nav-logout i {
    color: #dc2626 !important;
}

.bottom-nav-logout:hover,
.bottom-nav-logout:focus {
    color: #b91c1c !important;
    background-color: rgba(220, 38, 38, 0.1);
}

.bottom-nav-logout:hover i,
.bottom-nav-logout:focus i {
    color: #b91c1c !important;
    transform: scale(1.15);
}

.bottom-nav-logout:active {
    background-color: rgba(220, 38, 38, 0.2);
}

.bottom-nav-menu-toggle.active i::before {
    content: '\f00d'; /* fa-times */
}

/* Tampilkan menu bottom hanya di mobile (320px - 768px) */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px !important;
    }
    
    .mobile-bottom-nav {
        display: flex !important;
        z-index: 1001 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        border-top: 1px solid rgba(15, 23, 42, 0.1) !important;
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08) !important;
    }
    
    .bottom-nav-item {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 6px 8px !important;
        font-size: 0.65rem !important;
    }
    
    .bottom-nav-item i {
        font-size: 1.2rem !important;
    }
    
    .bottom-nav-item span {
        font-size: 0.6rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .bottom-nav-logout {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 6px 8px !important;
        font-size: 0.65rem !important;
    }
    
    .bottom-nav-logout i {
        font-size: 1.2rem !important;
    }
    
    .bottom-nav-logout span {
        font-size: 0.6rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* Sembunyikan menu bottom di tablet dan desktop (769px+) */
@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
    
    /* Sembunyikan running text di desktop */
    .header-running-text {
        display: none !important;
    }
}

/* Tablet/Desktop: 1024px - 1756px - Responsive sama dengan 769px (menu bottom tetap disembunyikan) */
@media (min-width: 1024px) and (max-width: 1756px) {
    .mobile-bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}

/* Tampilkan di mobile dan tambahkan padding bottom pada body */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px !important;
    }
    
    .mobile-bottom-nav {
        display: flex !important;
        z-index: 1001;
    }
    
    /* Highlight active menu berdasarkan current page */
    .bottom-nav-item.active {
        color: var(--header-primary);
    }
    
    .bottom-nav-item.active i {
        color: var(--header-primary);
    }
}

/* ============================================
   MAIN CONTENT RESPONSIVE LAYOUT
   ============================================ */

/* Base container styles */
.container,
.container-max {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

/* Desktop: Full width with sidebars */
@media (min-width: 1201px) {
    body.has-global-sidebars .container,
    body.has-global-sidebars .container-max {
        max-width: var(--saphira-content-width);
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Tablet: Reduced padding */
@media (max-width: 1200px) and (min-width: 769px) {
    .container,
    .container-max {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    body.has-global-sidebars .container,
    body.has-global-sidebars .container-max {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Mobile: Minimal padding */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Ensure all containers are responsive */
    .container,
    .container-max {
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    body.has-global-sidebars .container,
    body.has-global-sidebars .container-max {
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Typography adjustments */
    h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
    h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); }
    h3 { font-size: clamp(1.1rem, 3.5vw, 1.5rem); }
    h4 { font-size: clamp(1rem, 3vw, 1.25rem); }
    
    /* Better touch targets */
    button,
    .btn,
    a[role="button"],
    .nav-toggle,
    .nav-cta {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Smooth scrolling for mobile */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Image responsiveness */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Table responsiveness */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    /* Text wrapping */
    p, span, div, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .container,
    .container-max {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    body.has-global-sidebars .container,
    body.has-global-sidebars .container-max {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Footer Saphira */
.saphira-footer {
    position: relative;
    background: var(--header-primary);
    color: #fff;
    margin-top: 60px;
    padding: 40px 0 24px;
    overflow: hidden;
}

.saphira-footer .footer-blend {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1469474968028-56623f02e42e?auto=format&fit=crop&w=1200&q=60') center/cover;
    opacity: 0.08;
}

.saphira-footer .container-max {
    position: relative;
    max-width: 1100px;
    margin: auto;
    padding: 0 24px;
    z-index: 2;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 20px;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
}

.footer-brand > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-brand h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.footer-icon {
    width: 48px;
    height: 48px;
    border-radius: 0;
    background: rgba(196, 122, 59, 0.2);
    border: 2px solid rgba(196, 122, 59, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #e0b06b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    flex-shrink: 0;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
    50% { transform: scale(1.05); box-shadow: 0 6px 16px rgba(196, 122, 59, 0.3); }
}

.footer-label {
    margin: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-bottom: 2px;
}

.footer-info {
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    line-height: 1.6;
}

.footer-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-info i {
    font-size: 0.85rem;
    opacity: 0.9;
    width: 16px;
    text-align: center;
}

.footer-bottom {
    text-align: center;
    padding: 16px 0 0;
    opacity: 0.9;
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-bottom p {
    margin: 6px 0;
}

.footer-social {
    margin-top: 12px;
}

.footer-social-label {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 8px;
}

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

.social-links a {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.social-links a:hover {
    background: var(--header-accent);
    color: var(--header-secondary);
    transform: translateY(-4px) scale(1.05);
}

/* Footer Responsive */
@media (max-width: 768px) {
    .saphira-footer {
        padding: 32px 0 20px;
    }
    
    .saphira-footer .container-max {
        padding: 0 20px;
    }
    
    .footer-main {
        flex-direction: column;
        gap: 24px;
        padding-bottom: 20px;
    }
    
    .footer-brand {
        gap: 10px;
    }
    
    .footer-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .footer-brand h3 {
        font-size: 1.1rem;
    }
    
    .footer-label {
        font-size: 0.7rem;
    }
    
    .footer-info {
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .footer-social {
        margin-top: 10px;
    }
    
    .footer-social-label {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }
    
    .footer-bottom {
        padding: 14px 0 0;
        font-size: 0.8rem;
    }
    
    .footer-bottom p {
        margin: 4px 0;
    }
}

