/* lolo mobile CWV — Responsive / LCP / INP / CLS / Blog reading — v20260908mob3 */

:root {
  --lolo-header-h: 60px;
  --lolo-touch: 48px;
  --lolo-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lolo-sticky-h: 56px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--lolo-header-h) + env(safe-area-inset-top, 0px) + 8px);
}

body {
  font-family: var(--lolo-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* CLS: reserve header height */
#site-header.fixed-scroll,
#site-header.has-sticky-mobile {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: env(safe-area-inset-top, 0);
}

#site-header-inner.container {
  min-height: var(--lolo-header-h);
  padding-left: max(15px, env(safe-area-inset-left, 0px));
  padding-right: max(15px, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
}

#site-logo,
#site-logo-inner,
#site-header .custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
}

#site-logo img,
#site-header .custom-logo {
  width: var(--lolo-logo-w, 126px);
  max-width: var(--lolo-logo-w, 126px);
  height: auto;
  max-height: var(--lolo-logo-h, 54px);
  aspect-ratio: 126 / 54;
  object-fit: contain;
}

/* LCP: hero carousel stable box */
.elementor-image-carousel-wrapper,
.elementor-image-carousel-wrapper.swiper {
  min-height: min(56.25vw, 506px);
  background: #1C3649;
  contain: layout paint;
}

.elementor-image-carousel img,
.swiper-slide-image {
  background: #e5e7eb;
}

/* CLS: below-fold sections */
#lolo-soft-article,
#lolo-faq,
#lolo-inline-links {
  contain-intrinsic-size: auto 600px;
}

/* INP: instant tap feedback, no layout shift */
a,
button,
.mobile-menu,
.cms-download-btn,
.elementor-button,
.lolo-sticky-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.elementor-button:active,
.cms-download-btn:active,
.lolo-sticky-btn:active,
#mobile-dropdown .menu a:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.oceanwp-mobile-menu-icon .mobile-menu {
  min-width: var(--lolo-touch);
  min-height: var(--lolo-touch);
}

#mobile-dropdown {
  top: calc(var(--lolo-header-h) + env(safe-area-inset-top, 0px));
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  background-color: #1C3649 !important;
  color: #fff !important;
}

#mobile-dropdown .menu a,
#mobile-dropdown ul li a {
  min-height: var(--lolo-touch);
  font-size: 16px;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#footer-bottom {
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  padding-left: max(15px, env(safe-area-inset-left, 0px));
  padding-right: max(15px, env(safe-area-inset-right, 0px));
}

/* Blog list CLS */
body.blog .blog-entry.col.span_1_of_3 {
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

body.blog #blog-entries .blog-entry:nth-child(-n + 2) {
  content-visibility: visible;
}

/* Blog sticky download bar (mobile) */
.lolo-mobile-sticky-cta {
  display: none;
}

@media (max-width: 767px) {
  body.blog.single-post {
    padding-bottom: calc(var(--lolo-sticky-h) + env(safe-area-inset-bottom, 0px) + 12px);
  }

  body.blog.single-post .lolo-mobile-sticky-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    gap: 8px;
    padding: 8px max(12px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-right, 0px));
    background: rgba(28, 54, 73, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
  }

  .lolo-sticky-btn {
    flex: 1 1 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--lolo-touch);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.12s ease, opacity 0.12s ease;
  }

  .lolo-sticky-android {
    background: #d32f2f;
    color: #fff !important;
  }

  .lolo-sticky-ios {
    background: #F7F21F;
    color: #1C3649 !important;
  }

  body.blog #primary.content-area {
    padding-right: 0;
  }

  body.blog .cms-post-content {
    font-size: 17px;
    line-height: 1.78;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
  }

  body.blog .cms-post-content h2,
  body.blog .cms-post-content h3 {
    scroll-margin-top: calc(var(--lolo-header-h) + 12px);
  }

  .elementor-button,
  .cms-download-btn,
  .down .elementor-button-wrapper a {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    min-height: var(--lolo-touch);
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  body.blog .blog-entry.col.span_1_of_3 {
    width: 100%;
  }

  .seo-table-wrap {
    margin-left: -4px;
    margin-right: -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .elementor-button:active,
  .cms-download-btn:active,
  .lolo-sticky-btn:active {
    transform: none;
  }
}

@media (hover: none) {
  .cms-download-btn:hover,
  .elementor-button:hover,
  .lolo-sticky-btn:hover {
    transform: none;
  }
}

/* === v20260908mob3 — CWV / INP / Blog reading === */

#mobile-dropdown.is-open {
  display: block !important;
  visibility: visible !important;
}

body.mobile-menu-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.mobile-menu-open #main,
body.mobile-menu-open #footer {
  touch-action: none;
}

#mobile-dropdown,
#mobile-dropdown a {
  touch-action: manipulation;
  pointer-events: auto;
}

input,
select,
textarea,
.mobile-searchform input,
#ocean-mobile-search-1 {
  font-size: 16px;
}

/* Blog reading progress */
.lolo-read-progress {
  position: fixed;
  top: calc(var(--lolo-header-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10001;
  pointer-events: none;
  background: rgba(28, 54, 73, 0.12);
}

.lolo-read-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #77F4B8, #F7F21F);
  transition: width 0.08s linear;
  will-change: width;
}

/* Scroll-to-top — safe area + sticky CTA offset on blog */
#scroll-top {
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 767px) {
  body.blog.single-post #scroll-top {
    bottom: calc(var(--lolo-sticky-h) + env(safe-area-inset-bottom, 0px) + 12px);
  }
}

/* Typography — fluid headings on mobile */
@media (max-width: 767px) {
  .elementor-heading-title,
  h1.elementor-heading-title {
    font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    line-height: 1.28;
  }

  body.blog .blog-entry-title a {
    font-size: clamp(1rem, 3.8vw, 1.15rem);
    line-height: 1.35;
    display: block;
    padding: 4px 0;
  }

  body.blog .blog-entry-header,
  body.blog .thumbnail-link {
    min-height: var(--lolo-touch);
  }

  body.blog .cms-post-content {
    text-wrap: pretty;
  }

  .elementor-image-carousel .swiper-slide:not(:first-child) img {
    content-visibility: auto;
  }

  .e-con-inner > .elementor-widget-button {
    width: 100%;
  }

  .e-con-inner > .elementor-widget-button .elementor-button-wrapper {
    width: 100%;
  }
}
