﻿/* ==========================================================================
   responsive-fixes.css – 2026-09 – Fix horizontal overflow & mobile UX
   Load AFTER main.css & custom.css
   ========================================================================== */

/* 1. Global box-model & overflow */
html { box-sizing: border-box; overflow-x: hidden; }
*, *::before, *::after { box-sizing: inherit; }
html, body { max-width: 100%; overflow-x: hidden; }
body { position: relative; -webkit-text-size-adjust: 100%; }
img, video, iframe { max-width: 100%; }
iframe { display: block; border: 0; }

/* Prevent wrapper from creating scrollbars */
.wrapper { overflow-x: hidden; }

/* Make container never overflow viewport */
.container { width: 100%; max-width: 1170px; }
@media (max-width: 991px) { .container { padding-left: 15px; padding-right: 15px; } }

/* 2. Coinlib widget – was fixed 62px + pointer-events:none + box-shadow overflow */
.header-main > div[style*="height:62px"] {
  height: auto !important;
  min-height: 62px;
  pointer-events: auto !important;
}
.header-main > div[style*="height:62px"] iframe {
  width: 100% !important;
  max-width: 100%;
  pointer-events: auto;
}
@media (max-width: 767px) {
  .header-main > div[style*="height:62px"] {
    border-radius: 0 !important;
    border-left: 0 !important; border-right: 0 !important;
  }
}

/* 3. Header hero – modern dark gradient + new bg_hero_new.jpg */
.header-main {
  overflow: hidden;
  position: relative;
  background-color: #070b14 !important;
  background-image: url('../img/bg/bg_hero_new.jpg') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}
.header-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 18% 8%, rgba(37,99,235,0.22), transparent 60%),
    radial-gradient(700px 400px at 88% 12%, rgba(6,182,212,0.14), transparent 60%),
    linear-gradient(180deg, rgba(7,11,20,0.52) 0%, rgba(7,11,20,0.72) 55%, rgba(7,11,20,0.92) 100%);
  z-index: 1;
  pointer-events: none;
}
.header-main > * { position: relative; z-index: 2; }
.header-main .container { position: relative; z-index: 2; }
.header-main .header-main-title { text-shadow: 0 2px 18px rgba(0,0,0,0.35); }
.header-main .header-main-text { text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
.header-bg-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.header-bg-phone {
  max-width: min(45vw, 520px);
  height: auto;
  right: -40px; top: -80px;
}
.header-bg-triangles,
.header-bg-stars {
  max-width: 100%;
  overflow: hidden;
}
@media (max-width: 1199px) {
  .header-bg-phone { max-width: 38vw; right: -20px; opacity: 0.85; }
  .header-bg-triangles { left: 120px; transform: scale(0.85); transform-origin: top left; }
  .header-bg-stars { left: 300px; transform: scale(0.85); }
}
@media (max-width: 991px) {
  .header-bg-phone { display: none !important; } /* hide huge phone on tablet */
  .header-bg-triangles, .header-bg-stars { opacity: 0.35; }
  .header-main-middle { min-height: auto !important; padding: 30px 0 20px !important; }
}
@media (max-width: 767px) {
  .header-bg-layer { display: none !important; } /* hide all decorative layers on mobile */
  .header-bg-text {
    font-size: clamp(32px, 12vw, 60px) !important;
    left: 0 !important; right: 0 !important;
    white-space: nowrap; overflow: hidden;
    opacity: 0.07;
  }
}

/* 4. Header typography – fluid */
.header-main-title {
  font-size: clamp(20px, 3.2vw, 36px) !important;
  line-height: 1.25 !important;
  word-wrap: break-word;
}
.header-main-text { font-size: clamp(14px, 1.8vw, 16px); line-height: 1.6; }
@media (max-width: 767px) {
  .header-main-content { max-width: 100% !important; padding: 20px 0 10px !important; }
  .header-main-title::before { display: none; }
}

/* 5. Screen / laptop video wrapper – aspect ratio */
.screen { max-width: 100%; margin: 0 auto; }
.screen-video {
  position: relative;
  padding-top: 0 !important;
  padding-bottom: 56.25% !important; /* 16:9 */
  height: 0 !important;
  overflow: hidden;
}
.show-video {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  padding: 6% 7% 8% !important; /* keep laptop frame padding responsive */
  background-size: contain !important;
  background-position: center !important;
}
@media (max-width: 767px) {
  .screen-video { padding-bottom: 62% !important; }
  .show-video { padding: 8% 9% 10% !important; }
}

/* 6. About images – prevent absolute overflow */
.about-img.home {
  position: absolute;
  top: 80px; left: auto; right: 0;
  max-width: 52%;
  height: auto;
}
@media (max-width: 1199px) { .about-img.home { display: none !important; } }
@media (max-width: 991px) {
  .about-img.home { position: relative !important; top: auto !important; left: auto !important; margin: 20px auto 0 !important; max-width: 85% !important; display: block !important; }
}

/* 7. iPhone plans – already hidden at 990px, ensure no leak */
.iphone { max-width: 100%; overflow: hidden; }
@media (max-width: 991px) { .iphone { display: none !important; } }

/* 8. Investment plans grid – centre & stack */
.tariff-plans {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 0 -10px;
}
.plan-box {
  flex: 0 1 282px;
  max-width: 282px;
  padding: 0 10px;
  margin: 0 0 30px;
  display: flex; /* stretch */
}
.plan-box label { width: 100% !important; max-width: 262px; margin: 0 auto; }
@media (max-width: 991px) {
  .tariff-plans { margin: 0 -8px; }
  .plan-box { flex: 0 1 50%; max-width: 50%; }
}
@media (max-width: 580px) {
  .plan-box { flex: 0 1 100%; max-width: 340px; margin-left: auto; margin-right: auto; }
  .plan-box label { width: 100% !important; }
}

/* Override custom.css fixed height that breaks mobile – make label height auto at smallest */
@media (max-width: 480px) {
  .plan-box label { height: auto !important; min-height: 340px; padding-bottom: 20px; }
}

/* 9. Support / FAQ / Partners pages – prevent overflow */
.section-page { padding: 60px 0; overflow: hidden; }
@media (max-width: 767px) { .section-page { padding: 40px 0; } }
.partners-content, .support-bottom, .faq-tabs { max-width: 100%; overflow: hidden; }

/* 10. Footer – stack & disclosure readability */
.footer-top { overflow: hidden; }
.support-block, .social-buttons-block { min-width: 0; }
.footer-regulatory { overflow-wrap: break-word; word-break: break-word; }
.footer-regulatory div { text-align: left !important; }
@media (max-width: 767px) {
  .footer-regulatory { margin-top: 20px !important; padding-top: 18px !important; }
  .footer-regulatory p { font-size: 10px !important; line-height: 1.6 !important; text-align: left !important; }
  .footer-menu { display: none !important; } /* keep existing behaviour but ensure no overflow */
}
@media (max-width: 480px) {
  .support-list { flex-direction: column; align-items: flex-start; }
  .support-item { width: 100%; margin-bottom: 16px; text-align: left; }
  .payment-list { justify-content: center; flex-wrap: wrap; gap: 8px; }
}

/* 11. Hamburger & mobile nav – ensure tappable & overlay */
.hamburger { cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (max-width: 767px) {
  .hamburger { display: inline-block !important; z-index: 200; }
  .main-menu {
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .main-menu.slide { max-height: calc(100vh - 20px); }
}
/* Prevent body scroll when menu open */
body.menu-open { overflow: hidden; height: 100vh; }

/* 12. Buttons – wrap on small */
.btn, .btn-start, .btn-transparent { white-space: normal; word-wrap: break-word; max-width: 100%; }
@media (max-width: 480px) {
  .header-text-block .btn { display: block; width: 100%; margin: 8px 0 !important; text-align: center; }
}

/* 13. Paid-out badge – avoid overlapping hamburger */
.btm.btn-paid { z-index: 55; }
@media (max-width: 767px) {
  .btm.btn-paid { top: 90px !important; font-size: 11px !important; padding: 6px 14px !important; }
}
@media (max-width: 480px) {
  .btm.btn-paid { display: none !important; } /* hide on tiny to avoid clutter – still accessible via menu */
}

/* 14. Tables & responsive helpers */
table.responsive, .table { width: 100% !important; max-width: 100%; overflow-x: auto; display: block; }
@media (max-width: 767px) {
  .table-history { font-size: 13px; }
}

/* 15. Smooth scrolling & anchor offsets */
html { scroll-behavior: smooth; }
#watchvideo { scroll-margin-top: 20px; }

/* 16. Fix coinlib pointer-events still blocked inside header */
.coinlore-priceticker-widget { max-width: 100%; overflow: hidden; }

/* 16b. Footer digitalbestoption – mobile fixes for regulations / liquidity */
.footer-digitalbestoption { overflow-x: hidden; }
.footer-digitalbestoption .container { overflow-x: hidden; }
@media (max-width: 767px) {
  .footer-digitalbestoption { padding: 24px 0 18px 0 !important; }
  /* Top: stack logo + regulations */
  .footer-digitalbestoption > .container > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 18px !important;
  }
  /* Regulations: allow wrap, smaller gaps */
  .footer-digitalbestoption [style*="REGULATIONS"] {
    font-size: 10px !important;
    gap: 8px 12px !important;
  }
  /* Liquidity, Corporate, Associations: stack vertically, center logos */
  .footer-digitalbestoption [style*="LIQUIDITY PROVIDERS"],
  .footer-digitalbestoption [style*="CORPORATE GOVERNANCE"],
  .footer-digitalbestoption [style*="ASSOCIATIONS"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .footer-digitalbestoption [style*="LIQUIDITY PROVIDERS"] > div:last-child,
  .footer-digitalbestoption [style*="CORPORATE GOVERNANCE"] > div:last-child {
    width: 100% !important;
    justify-content: center !important;
    gap: 14px 18px !important;
    text-align: center !important;
  }
  /* Make logos centered and wrap nicely */
  .footer-digitalbestoption [style*="LIQUIDITY PROVIDERS"] > div:last-child > span,
  .footer-digitalbestoption [style*="CORPORATE GOVERNANCE"] > div:last-child > span {
    flex: 0 1 auto;
  }
  /* Prevent horizontal scrollbar */
  .footer-digitalbestoption .container { padding-left: 16px !important; padding-right: 16px !important; }
}
@media (max-width: 480px) {
  .footer-digitalbestoption [style*="REGULATIONS"] { gap: 6px 10px !important; }
  .footer-digitalbestoption [style*="LIQUIDITY PROVIDERS"] > div:last-child { gap: 10px 14px !important; }
  .footer-digitalbestoption > .container > div:first-child img { height: 32px !important; }
}

/* 17. Salesmartly livechat bubble positioning */
@media (max-width: 767px) {
  iframe[src*="salesmartly"], div[id*="salesmartly"], div[class*="salesmartly"] { bottom: 20px !important; right: 15px !important; }
}
@media (min-width: 768px) {
  iframe[src*="salesmartly"], div[id*="salesmartly"], div[class*="salesmartly"] { bottom: 20px !important; right: 20px !important; }
}
#salesmartly-container, .salesmartly-widget-container { z-index: 999 !important; }

/* Liquidity grid â€“ arrange logos evenly, only for this section */
.footer-digitalbestoption [style*="LIQUIDITY PROVIDERS"] + div {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important;
  gap: 14px 20px !important;
  align-items: center !important;
}
.footer-digitalbestoption [style*="LIQUIDITY PROVIDERS"] + div span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  min-height: 32px;
}
@media (max-width: 991px) {
  .footer-digitalbestoption [style*="LIQUIDITY PROVIDERS"] + div {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 580px) {
  .footer-digitalbestoption [style*="LIQUIDITY PROVIDERS"] + div {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px 16px !important;
  }
}
/* Liquidity – desktop 7 in one row */
@media (min-width: 992px) {
  .footer-digitalbestoption [style*="LIQUIDITY PROVIDERS"] + div { grid-template-columns: repeat(7, 1fr) !important; }
}

/* Why digitalbestoption 2-col â€“ match screenshot */
.why-two-col { display:grid; grid-template-columns:1fr 1fr; gap:32px; }
@media (max-width: 767px) { .why-two-col { grid-template-columns:1fr; gap:16px; } }
/* Header logo â€“ resized for public pages */
.logo__img{height:42px !important; width:auto !important; max-width:160px !important; object-fit:contain;}
@media(max-width:767px){ .logo__img{height:34px !important; max-width:140px !important;} }
@media(max-width:480px){ .logo__img{height:30px !important;}}
.logo-wrap{width:auto !important; min-width:140px;}
.header-main-top{min-height:auto !important; padding-top:8px !important; padding-bottom:8px !important;}