/* Love678 - Mobile performance & SEO UX */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* Download pages: full-viewport iframe (override generic iframe rule) */
body.download-page {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body.download-page iframe {
  border: none;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  display: block;
}

/* Article & content readability on mobile */
.elementor-widget-text-editor,
.elementor-widget-container {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.elementor-widget-text-editor table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.85rem;
}

.elementor-widget-text-editor h1 {
  font-size: clamp(1.35rem, 5vw, 2rem);
  line-height: 1.3;
}

.elementor-widget-text-editor h2 {
  font-size: clamp(1.15rem, 4vw, 1.6rem);
  line-height: 1.35;
}

.elementor-widget-text-editor h3 {
  font-size: clamp(1rem, 3.5vw, 1.25rem);
}

.elementor-widget-text-editor p,
.elementor-widget-text-editor li {
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
  line-height: 1.75;
}

#muc-luc {
  background: #f8f9fb;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 1.5rem;
}

#muc-luc ol {
  padding-left: 1.25rem;
  margin: 0.5rem 0 0;
}

#muc-luc a {
  display: inline-block;
  padding: 4px 0;
  min-height: 44px;
  line-height: 1.4;
}

/* Touch-friendly buttons */
.elementor-button,
.down .elementor-button,
a.elementor-button {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Reduce motion for performance & accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 767px) {
  .elementor-section {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
  }

  .elementor-widget-text-editor {
    padding: 0 4px;
  }

  /* Carousel: fit slides to screen width, keep swiper animation */
  .elementor-image-carousel-wrapper {
    overflow: hidden;
  }

  .elementor-image-carousel .swiper-slide {
    width: 100% !important;
    max-width: 100%;
  }

  .elementor-image-carousel .swiper-slide-image {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* Download button row: stack vertically */
  .elementor-element-3f5a468 .elementor-inner-column {
    width: 100% !important;
  }

  .elementor-element-3f5a468 .elementor-button-wrapper {
    width: 100%;
  }

  .elementor-element-3f5a468 .elementor-button {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 1rem;
  }

  #site-header-inner {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  #site-logo #site-logo-inner a img {
    max-width: 56px;
    height: auto;
  }

  #footer-bottom-inner {
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    text-align: center;
  }

  #mobile-dropdown a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .oceanwp-mobile-menu-icon .mobile-menu {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #scroll-top {
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    min-width: 44px;
    min-height: 44px;
  }

  a,
  button,
  .elementor-button {
    touch-action: manipulation;
  }
}

@media (max-width: 480px) {
  .elementor-column {
    width: 100% !important;
  }

  .elementor-inner-section .elementor-column {
    margin-bottom: 12px;
  }

  .page-content article {
    padding: 0.75rem !important;
  }
}
