/* ============================================================
   ESENSI - Modern Mobile HTML Theme
   Premium Mobile-First Design with Glassmorphism & Animations
   ============================================================ */

/* ── Google Font Import ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ══════════════════════════════════════════════════════════════
   1. ROOT VARIABLES & DESIGN TOKENS
   ══════════════════════════════════════════════════════════════ */
:root {
  /* Primary Color Palette - Modern Teal/Emerald */
  --primary-base-color: #0d9488;
  --primary-darken-color: #0f766e;
  --primary-light-color: #5eead4;
  --primary-gradient: linear-gradient(135deg, #0d9488 0%, #2dd4bf 50%, #14b8a6 100%);

  /* Secondary Color Palette - Rich Slate */
  --secondary-base-color: #334155;
  --secondary-darken-color: #1e293b;
  --secondary-light-color: #64748b;

  /* Accent Color Palette - Vibrant Amber */
  --accent-base-color: #f59e0b;
  --accent-darken-color: #d97706;
  --accent-light-color: #fbbf24;

  /* Neutral Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: rgba(148, 163, 184, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ══════════════════════════════════════════════════════════════
   2. BASE / RESET / TYPOGRAPHY
   ══════════════════════════════════════════════════════════════ */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary) !important;
  background: var(--bg-primary) !important;
  background-image: none !important;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6 !important;
}

/* Remove default background image */
body.font-primary {
  background-image: none !important;
  background-color: var(--bg-primary) !important;
}

/* Modern Selection */
::selection {
  background: var(--primary-base-color);
  color: #fff;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-base-color);
  border-radius: var(--radius-full);
}

/* ══════════════════════════════════════════════════════════════
   3. LOADING SCREEN - Custom Circle Spinner & Rotating Text
   ══════════════════════════════════════════════════════════════ */
.fixed.inset-0.bg-white.z-\[9999\],
#preloader {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
}

/* Circular Text 'Desa Tangkil Kulon' using SVG */
.fixed.inset-0.bg-white.z-\[9999\]::before,
#preloader::before {
  content: "";
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 140px !important;
  height: 140px !important;
  margin-top: -70px !important;
  margin-left: -70px !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cdefs%3E%3Cpath id='c' d='M 70, 70 m -55, 0 a 55,55 0 1,1 110,0 a 55,55 0 1,1 -110,0' fill='none' /%3E%3C/defs%3E%3Ctext fill='%230d9488' font-family='sans-serif' font-weight='bold' font-size='10.5' letter-spacing='2.5'%3E%3CtextPath href='%23c' startOffset='0%25'%3EDESA TANGKIL KULON %E2%80%A2 DESA TANGKIL KULON %E2%80%A2 %3C/textPath%3E%3C/text%3E%3C/svg%3E");
  background-size: cover;
  background-color: transparent !important;
  animation: textSpin 8s infinite linear;
  pointer-events: none;
}

/* User's Exact Custom Spinner (mapped to .spinner-grow) */
.spinner-grow {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  
  /* HIDE THE BASE ELEMENT TO DESTROY FRAMEWORK'S TEAL BOX */
  visibility: hidden !important;
  animation: none !important;
  opacity: 1 !important; /* Paksa muncul karena ada class opacity-0 dari Tailwind */
  background: transparent !important; 
  
  width: 50px !important;
  height: 50px !important;
  aspect-ratio: 1 !important;
  display: grid !important;
}

.spinner-grow::before,
.spinner-grow::after {    
  visibility: visible !important; /* SHOW ONLY THE DOTS */
  content: "";
  grid-area: 1/1;
  --c: no-repeat radial-gradient(farthest-side, #25b09b 92%, #0000);
  background: 
    var(--c) 50% 0, 
    var(--c) 50% 100%, 
    var(--c) 100% 50%, 
    var(--c) 0 50%;
  background-size: 12px 12px;
  animation: l12 1s infinite;
}

.spinner-grow::before {
  margin: 4px;
  filter: hue-rotate(45deg);
  background-size: 8px 8px;
  animation-timing-function: linear;
}

@keyframes l12 { 
  100% { transform: rotate(.5turn); }
}

@keyframes textSpin {
  100% { transform: rotate(1turn); }
}

/* ══════════════════════════════════════════════════════════════
   4. HEADER AREA - Glassmorphism + Sticky
   ══════════════════════════════════════════════════════════════ */
.container.md\:px-4.lg\:px-5 {
  padding: 0 !important;
  max-width: 100% !important;
}

header {
  position: relative;
  min-height: 180px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl) !important;
  overflow: hidden;
  background-size: cover !important;
  background-position: center !important;
}

@media (min-width: 1024px) {
  header {
    min-height: 220px;
    border-radius: 0 0 32px 32px !important;
  }
}

/* Header Overlay - Light transparent gradient */
header .absolute.bg-gray-800 {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.35) 100%) !important;
}

header .bg-opacity-60 {
  --tw-bg-opacity: 0.3 !important;
}

/* Header Text Styling */
header .text-h2 {
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

@media (min-width: 1024px) {
  header .text-h2 {
    font-size: 2rem !important;
  }
}

header section p {
  font-size: 0.8rem;
  color: #f8fafc !important;
  opacity: 0.9;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* Header Logo */
header figure img {
  height: 60px !important;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform var(--transition-normal);
}

header figure img:hover {
  transform: scale(1.05);
}

/* Running text / marquee strip */
header .bg-white.bg-opacity-20 {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
}

/* Gallery strip in header */
header marquee .grid img {
  border-radius: var(--radius-sm);
  transition: transform var(--transition-fast);
}

header marquee .grid img:hover {
  transform: scale(1.08);
}

/* ══════════════════════════════════════════════════════════════
   5. CATEGORY MENU (Sidebar Drawer) - Glass Effect
   ══════════════════════════════════════════════════════════════ */
/* Category menu overlay */
.fixed.inset-0.bg-black.bg-opacity-50 {
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Category menu trigger button */
header button[type="button"] {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  margin: 8px;
}

header button[type="button"]:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Category menu panel */
.bg-white.text-gray-700.w-3\/4.shadow {
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0 !important;
  box-shadow: var(--shadow-xl) !important;
}

/* ══════════════════════════════════════════════════════════════
   6. NAVIGATION MENUS - Modern Mobile + Desktop
   ══════════════════════════════════════════════════════════════ */

/* Desktop Navigation */
nav.bg-primary-100.text-white.hidden.lg\:block {
  background: var(--primary-gradient) !important;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav.bg-primary-100 a {
  transition: all var(--transition-fast) !important;
  border-radius: var(--radius-sm);
  font-weight: 500 !important;
  font-size: 0.875rem;
}

nav.bg-primary-100 a:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px);
}

/* Desktop dropdown */
nav .absolute.top-full {
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg) !important;
  margin-top: 4px;
}

nav .absolute.top-full a {
  border-radius: 0 !important;
  font-size: 0.85rem;
  color: #334155 !important;
}

nav .absolute.top-full a:hover,
nav .absolute.top-full a:focus {
  background-color: #f1f5f9 !important;
  color: var(--primary-base-color) !important;
  transform: none !important;
}

/* Mobile Navigation */
nav.bg-primary-100.text-white.lg\:hidden {
  background: var(--primary-gradient) !important;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.3);
}

/* Mobile Menu Button */
nav.bg-primary-100.lg\:hidden button {
  font-weight: 700 !important;
  letter-spacing: 1px;
  font-size: 0.9rem;
  padding: 14px !important;
}

/* Menu gradient text override */
.menu-gradient {
  background: linear-gradient(90deg, #ffffff, #a7f3d0, #5eead4, #ffffff) !important;
  background-size: 300% 100%;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent;
  animation: menuGradientFlow 3s ease-in-out infinite;
  font-size: 1rem !important;
  font-weight: 700 !important;
}

@keyframes menuGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Mobile submenu items */
nav.lg\:hidden ul a {
  padding: 12px 16px !important;
  font-size: 0.875rem;
  border-radius: 0 !important;
  transition: all var(--transition-fast);
}

nav.lg\:hidden ul a:hover {
  padding-left: 24px !important;
}

/* Mobile submenu dropdown - white background */
nav.lg\:hidden ul ul {
  background-color: #ffffff !important;
  border-radius: 0 !important;
}

nav.lg\:hidden ul ul li {
  border-color: #e5e7eb !important;
}

/* Mobile submenu links - dark text, no white on hover */
nav.lg\:hidden ul ul a,
nav.lg\:hidden ul ul a:link,
nav.lg\:hidden ul ul a:visited {
  color: #334155 !important;
  background-color: transparent !important;
}

nav.lg\:hidden ul ul a:hover,
nav.lg\:hidden ul ul a:focus,
nav.lg\:hidden ul ul a:active {
  color: var(--primary-base-color) !important;
  background-color: #f1f5f9 !important;
}

/* Third-level submenu */
nav.lg\:hidden ul ul ul {
  background-color: #f8fafc !important;
}

nav.lg\:hidden ul ul ul a:hover {
  color: var(--primary-base-color) !important;
  background-color: #e2e8f0 !important;
}

/* ══════════════════════════════════════════════════════════════
   7. PAGE CONTENT AREA - Mobile Optimized Cards
   ══════════════════════════════════════════════════════════════ */

/* Remove space below slider */
.sliderx + *,
.owl-carousel + *,
section.sliderx {
  margin-top: 0 !important;
}

.sliderx {
  margin-bottom: 0 !important;
  border-radius: 12px !important;
  overflow: hidden;
}

/* Reduce slider height on desktop */
@media (min-width: 1024px) {
  .owl-carousel.lg\:h-\[400px\],
  .owl-carousel figure.lg\:h-\[400px\],
  .owl-carousel figure img.lg\:h-\[400px\] {
    height: 250px !important;
  }
}

/* Remove owl-carousel dots spacing */
.owl-dots {
  margin-top: 0 !important;
  padding: 0 !important;
}

/* Main content wrapper */
.container.mx-auto.lg\:px-5.px-3 {
  padding: 0 12px !important;
  margin-top: 20px !important;
}

@media (min-width: 1024px) {
  .container.mx-auto.lg\:px-5.px-3 {
    padding: 0 24px !important;
    margin-top: 28px !important;
  }
}

/* Main Content Card */
main.bg-white.rounded-lg {
  background: var(--bg-card) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md) !important;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

main.bg-white.rounded-lg:hover {
  box-shadow: var(--shadow-lg) !important;
}

/* Sidebar area */
aside.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

aside.sidebar .shadow {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md) !important;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all var(--transition-normal);
}

aside.sidebar .shadow:hover {
  box-shadow: var(--shadow-lg) !important;
  transform: translateY(-2px);
}

/* Search input in sidebar */
aside.sidebar .form-input,
aside.sidebar input[type="text"] {
  border-radius: var(--radius-full) !important;
  border: 2px solid var(--border-color) !important;
  padding: 12px 44px !important;
  font-size: 0.875rem;
  background: var(--bg-secondary) !important;
  transition: all var(--transition-fast);
  height: auto !important;
}

aside.sidebar .form-input:focus,
aside.sidebar input[type="text"]:focus {
  border-color: var(--primary-base-color) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15) !important;
  background: var(--bg-card) !important;
}

/* ══════════════════════════════════════════════════════════════
   8. SLIDER / CAROUSEL - Modern Rounded
   ══════════════════════════════════════════════════════════════ */
.sliderx {
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.owl-carousel figure img {
  border-radius: 0 !important;
}

/* Slider overlay caption */
.sliderx .absolute.bg-black.bg-opacity-60 {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)) !important;
  padding: 20px !important;
}

.sliderx .absolute a {
  font-weight: 700 !important;
  font-size: 1rem !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Slider Navigation */
.slider-nav span {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm) !important;
  transition: all var(--transition-fast) !important;
}

.slider-nav span:hover {
  background: var(--primary-base-color) !important;
}

/* ══════════════════════════════════════════════════════════════
   9. HEADLINE SECTION
   ══════════════════════════════════════════════════════════════ */
.lg\:h-\[350px\].overflow-hidden.rounded-lg {
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
}

.lg\:h-\[350px\].overflow-hidden.rounded-lg:hover {
  transform: scale(1.01);
}

.lg\:h-\[350px\] .absolute.bg-black.bg-opacity-60 {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)) !important;
}

/* ══════════════════════════════════════════════════════════════
   10. ARTICLES & CONTENT CARDS
   ══════════════════════════════════════════════════════════════ */

/* Article heading */
article h1.text-h2 {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
  article h1.text-h2 {
    font-size: 1.75rem !important;
  }
}

/* Article meta */
article span.inline-flex {
  color: var(--text-secondary) !important;
  font-size: 0.75rem !important;
}

/* Article content styling */
.content.space-y-2 {
  line-height: 1.8 !important;
  color: var(--text-primary);
}

.content.space-y-2 img {
  border-radius: var(--radius-md) !important;
  margin: 16px 0;
}

.content.space-y-2 p {
  margin-bottom: 12px;
}

/* Breadcrumb */
nav.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

nav.breadcrumb ol li:not(:last-child)::after {
  content: '/';
  margin-left: 8px;
  color: var(--text-muted);
}

nav.breadcrumb a {
  color: var(--primary-base-color) !important;
  transition: color var(--transition-fast);
}

nav.breadcrumb a:hover {
  color: var(--primary-darken-color) !important;
}

/* ══════════════════════════════════════════════════════════════
   11. BUTTONS - Modern Pill Style
   ══════════════════════════════════════════════════════════════ */
.btn {
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  padding: 10px 24px !important;
  transition: all var(--transition-normal) !important;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn-primary,
.btn.btn-primary {
  background: var(--primary-gradient) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3) !important;
}

.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 24px rgba(13, 148, 136, 0.4) !important;
}

.btn-accent,
.btn.btn-accent {
  background: linear-gradient(135deg, var(--accent-base-color), var(--accent-light-color)) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3) !important;
}

.btn-accent:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4) !important;
}

/* ══════════════════════════════════════════════════════════════
   12. WIDGETS AREA - Card Redesign
   ══════════════════════════════════════════════════════════════ */

/* Widget titles */
.shadow.rounded-lg.bg-white .text-h5,
.shadow.rounded-lg.bg-white h5 {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--text-primary);
  padding: 14px 16px !important;
  border-bottom: 2px solid var(--bg-secondary);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, transparent 100%);
  margin: 0 !important;
}

/* Widget cards */
.shadow.rounded-lg.bg-white {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all var(--transition-normal);
}

/* Aparatur desa / info widgets */
.shadow.rounded-lg.bg-white img {
  border-radius: var(--radius-md);
  transition: transform var(--transition-normal);
}

.shadow.rounded-lg.bg-white img:hover {
  transform: scale(1.03);
}

/* ══════════════════════════════════════════════════════════════
   13. FOOTER - Modern Dark Glass
   ══════════════════════════════════════════════════════════════ */
footer.footer {
  padding: 0 12px !important;
  margin-bottom: 0;
}

footer .bg-zinc-700 {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
  padding: 24px 20px !important;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
}

footer .bg-zinc-700 p {
  font-size: 0.75rem;
  opacity: 0.8;
}

footer .bg-zinc-700 a {
  transition: opacity var(--transition-fast);
}

footer .bg-zinc-700 a:hover {
  opacity: 0.7;
}

/* Social media icons in footer */
footer .space-x-1 li a {
  width: 36px !important;
  height: 36px !important;
  border-radius: var(--radius-md) !important;
  transition: all var(--transition-fast) !important;
  font-size: 0.9rem;
}

footer .space-x-1 li a:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ══════════════════════════════════════════════════════════════
   14. BACK TO TOP BUTTON
   ══════════════════════════════════════════════════════════════ */
.fixed.bottom-0.mb-5.right-0.mr-5 a {
  background: var(--primary-gradient) !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35) !important;
  border-radius: var(--radius-md) !important;
  width: 44px !important;
  height: 44px !important;
  transition: all var(--transition-normal) !important;
}

.fixed.bottom-0.mb-5.right-0.mr-5 a:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 24px rgba(13, 148, 136, 0.45) !important;
}

/* Move back-to-top above mobile bottom nav */
@media (max-width: 1023px) {
  .fixed.bottom-0.mb-5.right-0.mr-5 {
    bottom: 60px !important;
    margin-bottom: 12px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   15. APBDesa / KEUANGAN SECTION
   ══════════════════════════════════════════════════════════════ */
.container > div[class*="bg-"] table,
table {
  border-radius: var(--radius-md);
  overflow: hidden;
}

table th {
  background: var(--primary-base-color) !important;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px !important;
}

table td {
  padding: 10px 16px !important;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color) !important;
}

table tr:hover td {
  background: var(--bg-secondary);
}

/* ══════════════════════════════════════════════════════════════
   16. ALERTS & NOTIFICATIONS
   ══════════════════════════════════════════════════════════════ */
.alert {
  border-radius: var(--radius-md) !important;
  border: none !important;
  padding: 16px !important;
  margin: 12px 0;
}

.alert-info {
  background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
  color: #1e40af !important;
  border-left: 4px solid #3b82f6 !important;
}

/* ══════════════════════════════════════════════════════════════
   17. PAGINATION - Modern Pill Style
   ══════════════════════════════════════════════════════════════ */
.pagination,
nav[aria-label*="aginat"] {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 16px 0;
}

.pagination a,
.pagination span,
nav[aria-label*="aginat"] a,
nav[aria-label*="aginat"] span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: var(--radius-sm) !important;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.pagination .active span,
.pagination a:hover {
  background: var(--primary-base-color) !important;
  color: #fff !important;
  border-color: var(--primary-base-color) !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

/* ══════════════════════════════════════════════════════════════
   18. FORM ELEMENTS - Modern Rounded
   ══════════════════════════════════════════════════════════════ */
.form-input,
.form-select,
.form-control,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"] {
  border-radius: var(--radius-md) !important;
  border: 2px solid var(--border-color) !important;
  padding: 10px 16px !important;
  font-size: 0.85rem !important;
  transition: all var(--transition-fast) !important;
  background: var(--bg-card) !important;
}

.form-input:focus,
.form-select:focus,
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-base-color) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12) !important;
  outline: none !important;
}

/* ══════════════════════════════════════════════════════════════
   19. CARD COMPONENTS - Glassmorphism
   ══════════════════════════════════════════════════════════════ */

/* Generic card styles */
.bg-white.rounded-lg.shadow,
.card {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all var(--transition-normal) !important;
  overflow: hidden;
}

.bg-white.rounded-lg.shadow:hover,
.card:hover {
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════════════
   20. HEADINGS - Modern Typography
   ══════════════════════════════════════════════════════════════ */
.text-h2,
h2 {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.text-h3,
h3 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: var(--text-primary);
}

.text-h4,
h4 {
  font-size: 1rem !important;
  font-weight: 700 !important;
}

.text-h5,
h5 {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
}

.text-h6,
h6 {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
}

/* ══════════════════════════════════════════════════════════════
   21. IMAGE STYLES
   ══════════════════════════════════════════════════════════════ */
figure img {
  transition: transform var(--transition-normal), filter var(--transition-normal);
}

/* Article images */
.content a[data-fancybox] img {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm);
}

/* ══════════════════════════════════════════════════════════════
   22. LINKS - Accent on Hover
   ══════════════════════════════════════════════════════════════ */
a.hover\:text-link:hover,
.text-primary-200 {
  color: var(--primary-base-color) !important;
}

a:not([class]) {
  transition: color var(--transition-fast);
}

/* ══════════════════════════════════════════════════════════════
   23. MOBILE-SPECIFIC OPTIMIZATIONS
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  /* Tighter spacing on mobile */
  .container.mx-auto {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* Smaller heading sizes on mobile */
  .text-h2,
  h2 {
    font-size: 1.1rem !important;
  }

  .text-h3,
  h3 {
    font-size: 1rem !important;
  }

  /* Reduce card padding */
  main.bg-white.rounded-lg {
    padding: 12px !important;
  }

  /* Footer */
  footer .bg-zinc-700 {
    padding: 20px 16px !important;
    text-align: center;
  }

  /* Gallery in header */
  header figure img {
    height: 50px !important;
  }

  /* Header height */
  header {
    min-height: 180px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  header {
    min-height: 250px;
  }
}

/* ══════════════════════════════════════════════════════════════
   24. BOTTOM NAVIGATION BAR (Mobile Only)
   ══════════════════════════════════════════════════════════════ */
/* Add extra body padding on mobile for bottom nav */
@media (max-width: 1023px) {
  body {
    padding-bottom: 70px !important;
  }

  /* Make the sticky nav at top have higher z-index */
  nav.bg-primary-100.text-white.lg\:hidden {
    z-index: 200;
  }

  /* Footer needs space above bottom nav */
  footer.footer {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   25. ANIMATIONS & MICRO-INTERACTIONS
   ══════════════════════════════════════════════════════════════ */

/* Fade in on scroll (for elements with animate.css) */
.animate__animated {
  animation-duration: 0.6s !important;
}

/* Smooth hover lift for all interactive cards */
.shadow.rounded-lg,
.bg-white.rounded-lg.shadow {
  transition: all var(--transition-normal) !important;
}

.shadow.rounded-lg:hover,
.bg-white.rounded-lg.shadow:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg) !important;
}

/* Ripple effect on buttons */
.btn:active {
  transform: scale(0.97) !important;
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.5s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   26. ADDITIONAL COMPONENT STYLING
   ══════════════════════════════════════════════════════════════ */

/* Tab headers */
.tab-header,
[role="tablist"] {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Badge / tag */
.badge,
span.badge {
  border-radius: var(--radius-full) !important;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 3px 10px;
}

/* Divider */
hr {
  border-color: var(--border-color) !important;
  margin: 16px 0;
}

/* ══════════════════════════════════════════════════════════════
   27. STAT / INFO CARDS
   ══════════════════════════════════════════════════════════════ */

/* Info cards styling for statistics, keuangan, etc */
.bg-primary-100,
[class*="bg-primary"] {
  border-radius: var(--radius-md);
}

/* ══════════════════════════════════════════════════════════════
   28. POPUP / MODAL STYLING
   ══════════════════════════════════════════════════════════════ */
.fancybox-slide--html .fancybox-content {
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   29. DATATABLE STYLING
   ══════════════════════════════════════════════════════════════ */
.dataTables_wrapper {
  font-size: 0.85rem;
}

.dataTables_wrapper .dataTables_filter input {
  border-radius: var(--radius-full) !important;
  border: 2px solid var(--border-color) !important;
  padding: 6px 16px !important;
}

/* ══════════════════════════════════════════════════════════════
   30. PRINT STYLES
   ══════════════════════════════════════════════════════════════ */
@media print {
  body {
    background: #fff !important;
    padding: 0 !important;
  }

  header,
  nav,
  footer,
  .fixed,
  aside {
    display: none !important;
  }

  main {
    box-shadow: none !important;
    border: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   31. UTILITY CLASSES
   ══════════════════════════════════════════════════════════════ */
.glass {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════════════════════
   32. DARK MODE SUPPORT (via dark class or prefers-color-scheme)
   ══════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(148, 163, 184, 0.15);
    --glass-bg: rgba(30, 41, 59, 0.72);
    --glass-border: rgba(148, 163, 184, 0.1);
  }

  body {
    color: var(--text-primary) !important;
  }

  main.bg-white.rounded-lg {
    background: var(--bg-card) !important;
  }

  .shadow.rounded-lg.bg-white,
  .bg-white.rounded-lg {
    background: var(--bg-card) !important;
  }

  .bg-white.text-gray-700.w-3\/4.shadow {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
  }

  aside.sidebar .form-input,
  aside.sidebar input[type="text"] {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
  }

  .fixed.inset-0.bg-white.z-\[9999\] {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  }

  table td {
    border-bottom-color: var(--border-color) !important;
  }

  table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* ══════════════════════════════════════════════════════════════
   33. SMOOTH ENTRANCE ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply fade-in animation to main sections */
main.bg-white.rounded-lg {
  animation: fadeInUp 0.5s ease-out;
}

aside.sidebar > * {
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

aside.sidebar > *:nth-child(1) { animation-delay: 0.05s; }
aside.sidebar > *:nth-child(2) { animation-delay: 0.1s; }
aside.sidebar > *:nth-child(3) { animation-delay: 0.15s; }
aside.sidebar > *:nth-child(4) { animation-delay: 0.2s; }
aside.sidebar > *:nth-child(5) { animation-delay: 0.25s; }
aside.sidebar > *:nth-child(6) { animation-delay: 0.3s; }

footer {
  animation: fadeInUp 0.5s ease-out 0.3s both;
}

/* ══════════════════════════════════════════════════════════════
   34. SPECIAL SECTION STYLING
   ══════════════════════════════════════════════════════════════ */

/* Sticky share buttons */
.sticky-share {
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Comment section */
.comment-area,
.komentar {
  border-radius: var(--radius-md);
}

/* Peta / Map section */
.leaflet-container {
  border-radius: var(--radius-md) !important;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   35. COMPAT - Override Tailwind Clashes
   ══════════════════════════════════════════════════════════════ */

/* Ensure primary-100 backgrounds use new color */
.bg-primary-100 {
  background-color: var(--primary-base-color) !important;
}

.bg-primary-200 {
  background-color: var(--primary-darken-color) !important;
}

.text-accent-200 {
  color: var(--accent-base-color) !important;
}

/* Override text-link hover color */
.hover\:text-link:hover {
  color: var(--primary-base-color) !important;
}

/* Fix bg-gray-100 body */
.bg-gray-100 {
  background-color: var(--bg-primary) !important;
}
