/* ============================================
   Indonesia-Specific Styles & Enhancements
   ============================================ */

/* Indonesia-specific typography adjustments */
body {
  text-rendering: optimizeLegibility;
  /* Critical: prevent horizontal overflow on all devices */
  overflow-x: hidden;
  width: 100%;
  /* DO NOT add position:relative to body - it breaks sticky header! */
}

/* Enhanced sticky header for better visibility */
.header-51dd {
  will-change: transform, box-shadow;
}

/* Improve header button visibility on scroll */
.header-51dd.active_b80d .status_1896 {
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.5);
}

/* Add subtle pulse effect to download button */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
  }
  50% {
    box-shadow: 0 2px 12px rgba(25, 118, 210, 0.5);
  }
}

.status_1896 {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* Ensure no element can cause horizontal scroll */
* {
  max-width: 100%;
}

/* Allow full-width sections */
section,
.current-f015,
.primary-slow-b437,
.shade_middle_2474,
.hot-abcf,
.active-static-7f85,
.menu-e681 {
  max-width: none;
  width: 100%;
}

/* Header MUST be separate to maintain sticky */
.header-51dd {
  max-width: none !important;
  width: 100% !important;
}

/* Better readability for Indonesian text */
p, li, td {
  hyphens: auto;
  word-wrap: break-word;
}

/* Indonesia-specific color overrides for better cultural fit */
:root {
  --color-indonesian-red: #ce1126;
  --color-indonesian-white: #ffffff;
}

/* Additional animations for better UX */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fn-show-4abf {
  animation: fadeInUp 0.6s ease-out;
}

/* Mobile optimizations for Indonesia (often slower connections) */
@media (max-width: 768px) {
  /* Reduce animation complexity on mobile */
  * {
    animation-duration: 0.3s !important;
  }
  
  /* Optimize images */
  img {
    image-rendering: -webkit-optimize-contrast;
  }
  
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  /* Ensure all containers fit */
  .grid-811b,
  .background-lower-93df,
  .border-b1ca,
  .table-c4cb,
  .hidden-out-f5eb {
    width: 100%;
    max-width: 100%;
  }
  
  /* Better text wrapping */
  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* Prevent code overflow */
  pre, code {
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
  }
}

/* Extra small mobile (≤480px) */
@media (max-width: 480px) {
  /* More aggressive space reduction */
  .current-f015,
  .primary-slow-b437,
  .hot-abcf,
  .active-static-7f85 {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  /* Full-width buttons */
  .input_6752,
  .secondary-fixed-6670,
  .heading_focused_e16c {
    width: 100%;
    justify-content: center;
  }
  
  /* Stack flex items */
  .info_upper_a38a,
  .menu_wide_6afe,
  .tag_769c,
  .thick-e8cb {
    flex-direction: column;
    width: 100%;
  }
  
  /* Smaller stat cards */
  .right-2a33 {
    padding: 1rem;
  }
  
  .menu-e53f {
    font-size: 1.75rem;
  }
}

/* Improve tap targets for mobile (common in Indonesia) */
@media (hover: none) and (pointer: coarse) {
  .input_6752,
  .picture_7d10,
  .south-c932 {
    min-height: 44px;
    padding: 12px 20px;
  }
}

/* Better contrast for outdoor viewing (common in tropical climate) */
@media (prefers-contrast: high) {
  :root {
    --color-text: #000000;
    --color-border: #999999;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1a1a;
    --color-bg-alt: #2d2d2d;
    --color-bg-section: #242424;
    --color-text: #e0e0e0;
    --color-text-light: #b0b0b0;
    --color-border: #404040;
  }
  
  .header-51dd {
    background: #2d2d2d;
  }
  
  .dropdown-white-e9c9,
  .down-e0af,
  .right-2a33,
  .overlay-6978,
  .rough_8af0 {
    background: #2d2d2d;
  }
}

/* Loading states for slow connections */
.fn-loading-4abf {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.fn-loading-4abf::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Optimize for Indonesian payment methods */
.nav-silver-1f4e {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.hidden-up-221d {
  width: 60px;
  height: 40px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.hidden-up-221d:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Whatsapp link styling (popular in Indonesia) */
a[href*="whatsapp.middle_63c3"] {
  background: #25d366;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

a[href*="whatsapp.middle_63c3"]:hover {
  background: #1da851;
}

/* Indonesia-specific accessibility */
[lang="id"] {
  quotes: '"' '"' "'" "'";
}

/* Better number formatting for Indonesian locale */
.hero_dark_ee51 {
  font-variant-numeric: tabular-nums;
}

/* Rupiah currency formatting */
.tiny-ff26::before {
  content: "Rp ";
}

/* Performance optimizations */
.paper_7c6d {
  opacity: 0;
  transition: opacity 0.3s;
}

.paper_7c6d.fn-loaded-4abf {
  opacity: 1;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* css-noise: 0418 */
.widget-item-z4 {
  padding: 0.4rem;
  font-size: 14px;
  line-height: 1.3;
}
