/* CuanMujur Dark Theme v2.0 — Full Coverage */
/* === DESIGN TOKENS === */
:root {
  --cm-bg: #150E27;
  --cm-surface: #1F1638;
  --cm-surface2: #281C4A;
  --cm-border: #382A5E;
  --cm-text: #F5F1FF;
  --cm-muted: #B0A4CC;
  --cm-lime: #C4FF61;
  --cm-coral: #FF6B81;
  --cm-gold: #FFC857;
  --cm-radius: 20px;
}

/* === GLOBAL OVERRIDE — kill all white === */
body, .ast-separate-container, .ast-plain-container,
.site, .site-content, .content-area, .ast-container,
.entry-content, .ast-article-post, .ast-article-single,
.page, .page-content, .post, .hentry,
.widget-area, .ast-primary-sidebar, .ast-secondary-sidebar,
.comments-area, .ast-comment-list, 
.ast-header-html, .ast-footer-overlay,
.ast-builder-grid-row, .ast-builder-menu,
.ast-main-header-wrap, .ast-below-header-wrap,
.ast-above-header-wrap, .site-header,
.ast-mobile-header-wrap, .ast-desktop-header,
.ast-archive-description, .ast-author-bio,
.ast-search-box, .ast-header-search,
.ast-header-widget-area, .ast-custom-html,
section, article, aside, main, nav, 
.ast-pagination, .post-navigation {
  background: var(--cm-bg) !important;
  color: var(--cm-text) !important;
}

/* === CARDS & SURFACES === */
.ast-article-post, .ast-article-single,
.widget, .ast-widget-area .widget,
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single,
.ast-separate-container .comments-area,
.ast-separate-container .ast-archive-description {
  background: var(--cm-surface) !important;
  border: 1px solid var(--cm-border) !important;
  border-radius: var(--cm-radius) !important;
  padding: 28px !important;
}

/* === TYPOGRAPHY === */
body { font-family: "Plus Jakarta Sans", sans-serif !important; }
h1, h2, h3, h4, h5, h6, .entry-title, .entry-title a,
.site-title, .site-title a, .page-title {
  font-family: "Fraunces", serif !important;
  color: var(--cm-text) !important;
  font-weight: 600 !important;
}
p, .entry-content p, li, .entry-content li,
.ast-article-single .entry-content { 
  color: var(--cm-muted) !important; 
}
a { color: var(--cm-lime) !important; }
a:hover { color: var(--cm-gold) !important; }

/* === HEADER (desktop + mobile) === */
.ast-primary-header-bar, .site-header,
.ast-main-header-wrap, .ast-desktop-header,
.ast-mobile-header-wrap, .ast-header-break-point .site-header {
  background: rgba(21, 14, 39, 0.85) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid var(--cm-border) !important;
}


/* === LOGO — percayacuan.art style (bigger, prominent) === */
.custom-logo, .custom-logo-link img,
.site-logo-img img, .ast-logo-title-inline .site-logo-img img {
  max-height: 52px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
.site-logo-img { 
  display: flex !important; 
  align-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
}
.custom-logo-link {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 0 !important;
}



/* === HEADER BUTTONS === */
.cm-header-btns {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  margin-left: auto !important;
}
.cm-btn {
  padding: 7px 16px !important;
  border-radius: 100px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-decoration: none !important;
  font-family: "Plus Jakarta Sans", sans-serif !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
  line-height: 1.4 !important;
}
.cm-btn-daftar {
  background: var(--cm-lime) !important;
  color: var(--cm-bg) !important;
}
.cm-btn-daftar:hover { 
  background: #d8ff8f !important; 
  transform: translateY(-1px) !important; 
}
.cm-btn-login {
  border: 1.5px solid var(--cm-border) !important;
  color: var(--cm-text) !important;
  background: transparent !important;
}
.cm-btn-login:hover { 
  border-color: var(--cm-lime) !important; 
  color: var(--cm-lime) !important; 
}

/* === FOOTER === */
.ast-footer-overlay, .ast-footer, .site-footer,
footer, .ast-small-footer, .ast-small-footer-section,
.ast-footer-widget-area {
  background: var(--cm-surface) !important;
  border-top: 1px solid var(--cm-border) !important;
  color: var(--cm-muted) !important;
}
.ast-footer-overlay a, footer a { color: var(--cm-muted) !important; }
.ast-footer-overlay a:hover, footer a:hover { color: var(--cm-lime) !important; }

/* === NAV MENU === */
.main-header-menu a, .ast-main-header-bar-alignment .main-header-menu a,
.main-navigation a, .menu-link {
  color: var(--cm-muted) !important;
  font-weight: 500 !important;
}
.main-header-menu a:hover, .menu-link:hover,
.main-header-menu .current-menu-item > a {
  color: var(--cm-text) !important;
}

/* === MOBILE MENU TOGGLE === */
.ast-mobile-menu-buttons .ast-button-wrap .menu-toggle,
.ast-header-break-point .menu-toggle {
  background: transparent !important;
  color: var(--cm-text) !important;
  border: 1px solid var(--cm-border) !important;
  border-radius: 10px !important;
}

/* === BUTTONS === */
.ast-button, .ast-custom-button, button, .button,
input[type="submit"], .menu-toggle {
  background: var(--cm-lime) !important;
  color: var(--cm-bg) !important;
  border-radius: 100px !important;
  font-weight: 700 !important;
  border: none !important;
}

/* === INPUTS === */
input, textarea, select {
  background: var(--cm-bg) !important;
  border: 1px solid var(--cm-border) !important;
  color: var(--cm-text) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--cm-lime) !important;
  outline-offset: 2px !important;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cm-bg); }
::-webkit-scrollbar-thumb { background: var(--cm-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--cm-muted); }

/* === KILL ALL RESIDUAL WHITE === */
[style*="background"], [style*="background-color"] {
  /* Only override if it's white/light */
}
div[style*="background-color:#fff"],
div[style*="background-color:rgb(255,255,255)"],
div[style*="background-color:#ffffff"],
div[style*="background:white"],
div[style*="background: rgb(255, 255, 255)"],
div[style*="background:#fff"],
div[style*="background:#ffffff"],
div[style*="background: white"] {
  background: var(--cm-bg) !important;
  background-color: var(--cm-bg) !important;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 921px) {
  .ast-primary-header-bar,
  .ast-mobile-header-wrap,
  .site-header {
    padding: 10px 20px !important;
  }
  
  .custom-logo, .custom-logo-link img,
  .site-logo-img img {
    max-height: 38px !important;
  }
  
  .cm-header-btns {
    gap: 6px !important;
  }
  
  .cm-btn {
    padding: 5px 12px !important;
    font-size: 11.5px !important;
  }
  
  .ast-container {
    padding: 0 16px !important;
  }
  
  .ast-article-post, .ast-article-single, .widget {
    padding: 20px !important;
    border-radius: 16px !important;
  }
  
  /* Mobile header — inline layout */
  .ast-mobile-header-wrap .ast-flex {
    flex-wrap: nowrap !important;
  }
  
  /* Single page — hide sidebar, full width */
  .ast-separate-container,
  .ast-plain-container {
    padding: 0 !important;
  }
  
  .content-area { padding-top: 20px !important; }
  
  /* Hide extra elements on mobile */
  .ast-header-break-point .ast-mobile-menu-buttons {
    order: 3 !important;
  }
}

@media (max-width: 544px) {
  .cm-btn {
    padding: 4px 10px !important;
    font-size: 11px !important;
  }
  
  .custom-logo, .custom-logo-link img,
  .site-logo-img img {
    max-height: 32px !important;
  }
  
  .cm-header-btns { gap: 4px !important; }
}

/* === v2.2 FINAL FIXES: logo size + button align + mobile single-page === */


/* === LOGO — percayacuan.art style (bigger, prominent) === */
.custom-logo, .custom-logo-link img,
.site-logo-img img, .ast-logo-title-inline .site-logo-img img {
  max-height: 52px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
.site-logo-img { 
  display: flex !important; 
  align-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
}
.custom-logo-link {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 0 !important;
}



/* === HEADER BUTTONS — perfectly aligned with navbar === */
.ast-primary-header-bar {
  display: flex !important;
  align-items: center !important;
}
.ast-builder-grid-row {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}
.cm-header-btns {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}
.cm-btn {
  padding: 8px 18px !important;
  border-radius: 100px !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  text-decoration: none !important;
  font-family: "Plus Jakarta Sans",sans-serif !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
  line-height: 1.3 !important;
}
.cm-btn-daftar {
  background: #C4FF61 !important;
  color: #150E27 !important;
}
.cm-btn-daftar:hover { background: #d8ff8f !important; }
.cm-btn-login {
  border: 1.5px solid #382A5E !important;
  color: #F5F1FF !important;
  background: transparent !important;
}
.cm-btn-login:hover { border-color: #C4FF61 !important; color: #C4FF61 !important; }

/* === MOBILE FIXES — no horizontal scroll, single page === */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}
.site, .ast-container, .content-area, .site-content,
.ast-separate-container, .ast-plain-container,
.entry-content, .ast-article-post, .ast-article-single,
.page, .hentry, section, article, div {
  max-width: 100vw !important;
}
img, svg, video, iframe, table, pre, code, .wp-block-table {
  max-width: 100% !important;
  height: auto !important;
}
/* Kill any element causing overflow */
* {
  -webkit-overflow-scrolling: touch;
}

/* === MOBILE LAYOUT (921px breakpoint) === */
@media (max-width: 921px) {
  .ast-primary-header-bar,
  .ast-mobile-header-wrap,
  .site-header {
    padding: 8px 16px !important;
  }
  
  .custom-logo,
  .custom-logo-link img,
  .site-logo-img img {
    max-height: 40px !important;
  }
  
  .cm-btn {
    padding: 5px 12px !important;
    font-size: 12px !important;
  }
  
  .cm-header-btns { gap: 6px !important; }
  
  .ast-container {
    padding: 0 12px !important;
    max-width: 100% !important;
  }
  
  /* Single page — no sidebar, full width */
  .ast-separate-container,
  .ast-plain-container { padding: 0 !important; }
  
  .content-area { padding-top: 16px !important; }
  
  .ast-article-post, .ast-article-single {
    padding: 16px !important;
    margin: 0 0 8px 0 !important;
    border-radius: 12px !important;
  }
  
  h1 { font-size: 24px !important; }
  h2 { font-size: 20px !important; }
  h3 { font-size: 17px !important; }
  
  /* Hamburger menu alignment */
  .ast-mobile-menu-buttons {
    order: 2 !important;
  }
  .ast-mobile-header-wrap .site-logo-img {
    order: 1 !important;
    flex: 0 0 auto !important;
  }
  .cm-header-btns {
    order: 3 !important;
  }
}

@media (max-width: 544px) {
  .custom-logo,
  .custom-logo-link img,
  .site-logo-img img {
    max-height: 34px !important;
  }
  
  .cm-btn {
    padding: 4px 10px !important;
    font-size: 11px !important;
  }
  
  .cm-header-btns { gap: 4px !important; }
  
  h1 { font-size: 21px !important; }
  h2 { font-size: 18px !important; }
}


/* === MOBILE FIXES V2 === */
 FIXES — no scroll, clean layout === */
@media (max-width: 921px) {
  /* Kill horizontal scroll */
  html, body, .site, .ast-separate-container, 
  .ast-plain-container, .ast-container, 
  .entry-content, .page-content,
  .ast-row, .ast-flex {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Container padding */
  .ast-container {
    padding: 0 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Mobile header */
  .ast-primary-header-bar,
  .ast-mobile-header-wrap .ast-primary-header-bar,
  .site-header {
    padding: 8px 0 !important;
  }
  .ast-mobile-header-wrap .ast-flex {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  
  /* Logo smaller on mobile */
  .custom-logo, .custom-logo-link img,
  .site-logo-img img {
    max-height: 38px !important;
  }
  
  /* Header buttons on mobile */
  .cm-header-btns {
    flex-shrink: 0 !important;
    gap: 6px !important;
    margin-left: 0 !important;
  }
  .cm-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
  
  /* Mobile menu toggle — clean look */
  .ast-mobile-menu-buttons {
    order: 0 !important;
    flex-shrink: 0 !important;
  }
  .ast-mobile-menu-buttons .ast-button-wrap .menu-toggle {
    padding: 8px 10px !important;
    border-radius: 10px !important;
    min-width: auto !important;
    background: transparent !important;
    border: 1px solid #382A5E !important;
    color: #F5F1FF !important;
  }
  
  /* Single column — full width cards */
  .ast-article-post, .ast-article-single,
  .widget, .ast-separate-container .ast-article-post {
    margin: 0 0 20px !important;
    padding: 20px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Hide messy side margins */
  .ast-separate-container,
  .ast-plain-container {
    padding: 0 !important;
  }
  .content-area {
    padding: 20px 0 0 !important;
  }
  .site-content .ast-container {
    padding: 0 16px !important;
  }
  
  /* Kill any overflow from images */
  img, svg, video, iframe {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Small phones */
@media (max-width: 544px) {
  .custom-logo, .custom-logo-link img,
  .site-logo-img img {
    max-height: 32px !important;
  }
  .cm-btn {
    padding: 5px 10px !important;
    font-size: 11px !important;
  }
  .cm-header-btns { gap: 4px !important; }
}


/* === HOMEPAGE BLOCK MOBILE FIXES === */
@media (max-width: 860px) {
  /* Fix grid overflows from homepage HTML blocks */
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  /* Hero section */
  .hero-grid, div[style*="display:grid"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }
  
  /* Fix any hardcoded widths */
  div[style*="max-width:1180px"],
  div[style*="max-width: 1180px"] {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  /* Fix section padding */
  section[style*="padding:96px"],
  div[style*="padding:96px"] {
    padding: 48px 0 !important;
  }
  section[style*="padding:88px"],
  div[style*="padding:88px"] {
    padding: 40px 0 !important;
  }
  
  /* Hide hero art on mobile */
  .hero-art, div[style*="aspect-ratio:1/1"] {
    display: none !important;
  }
  
  /* Trust bar */
  .trustbar, div[style*="display:flex;justify-content:space-between;flex-wrap:wrap"] {
    flex-direction: column !important;
    gap: 16px !important;
    text-align: center !important;
  }
  
  /* CTA band */
  .cta-band, div[style*="linear-gradient"] {
    flex-direction: column !important;
    padding: 28px !important;
    text-align: center !important;
  }
  .cta-band form, .form-row {
    flex-direction: column !important;
    width: 100% !important;
  }
  .cta-band input {
    min-width: 0 !important;
    width: 100% !important;
  }
  .cta-band button {
    width: 100% !important;
  }
  
  /* Footer */
  .foot-grid, div[style*="grid-template-columns:2fr repeat(3,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
}
