/* ==========================================================================
   RESPONSIVE OVERRIDES FOR BEEJACK1 (960 Grid / Drupal 6)
   Targeted approach — override only specific elements, no wildcard resets.
   ========================================================================== */

@media screen and (max-width: 768px) {

  /* --- BASE ------------------------------------------------------------ */
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  *, *::before, *::after { box-sizing: border-box; }

  /* --- CONTAINERS ------------------------------------------------------ */
  body .container-12,
  body .container-16 {
    width: 100% !important;
    padding: 0 10px;
  }

  /* --- GRID CELLS — stack single-column -------------------------------- */
  body .grid-1,  body .grid-2,  body .grid-3,  body .grid-4,
  body .grid-5,  body .grid-6,  body .grid-7,  body .grid-8,
  body .grid-9,  body .grid-10, body .grid-11, body .grid-12,
  body .container-12 .grid-6,
  body .container-12 .grid-12 {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: static !important;
  }
  body .column {
    width: 100% !important;
    float: none !important;
    position: static !important;
  }
  body .alpha, body .omega {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  body [class*="push-"],
  body [class*="pull-"] {
    left: auto !important;
    right: auto !important;
    position: static !important;
  }

  /* --- PAGE STRUCTURE -------------------------------------------------- */
  body #page-wrap,
  body #page,
  body #main,
  body #main-content {
    width: 100% !important;
    float: none !important;
    padding: 8px !important;
    margin: 0 !important;
  }
  body #sidebar-left,
  body #sidebar-right,
  body .not-front #sidebar-right {
    width: 100% !important;
    float: none !important;
    clear: both !important;
    position: static !important;
    margin: 15px 0 0 0 !important;
    padding: 8px !important;
  }

  /* --- HEADER ---------------------------------------------------------- */
  body #header-wrap {
    height: auto !important;
    background-image: none !important;
    background-color: #e8edf1;
    padding: 0;
  }
  body #site-header {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px 0;
  }

  /* Logo — centered */
  body #branding {
    float: none !important;
    margin: 0 !important;
    text-align: center;
    width: 100% !important;
  }
  body #branding a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
  body #branding img { max-width: 160px; height: auto; }
  body #site-name { display: none !important; }

  /* Hide language block + tagline on mobile */
  body #locale-block   { display: none !important; }
  body #block-block-11 { display: none !important; }

  /* --- PRIMARY NAV — equal-width button row ---------------------------- */
  body #site-menu {
    width: 100% !important;
    float: none !important;
    overflow: hidden;
    padding: 0;
    border-top: 1px solid #b6c2ca;
    border-bottom: 1px solid #b6c2ca;
    background: #d6dee4;
  }
  body ul.main-menu {
    position: static !important;
    display: flex !important;
    width: 100% !important;
    height: auto !important;
    padding: 0; margin: 0;
    list-style: none;
  }
  body ul.main-menu li {
    flex: 1 1 0%;
    float: none !important;
    display: block;
    height: auto !important;
    margin: 0 !important;
    border-right: 1px solid #b6c2ca;
  }
  body ul.main-menu li.last { border-right: none; }
  body ul.main-menu li a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 4px;
    background: none !important;
    background-image: none !important;
    width: auto !important;
    height: auto !important;
    font-size: 12px;
    font-weight: bold;
    color: #002b67;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
    border: none !important;
  }

  /* --- SECONDARY NAV — horizontal scroll ------------------------------- */
  body #site-subheader {
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
  }
  body #site-subheader .menu li {
    float: none !important;
    display: inline-block;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
  }
  body #site-subheader .menu li a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    color: #333;
    text-decoration: none;
  }
  body #site-subheader .menu {
    display: flex;
    flex-wrap: nowrap;
    padding: 0; margin: 0;
    list-style: none;
    white-space: nowrap;
  }

  /* --- CASINO REVIEW BLOCK — full-width above article text ------------- */
  body .casino-review-block4 {
    float: none !important;
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    clear: both;
  }

  /* Front page: hide duplicate casino tables (keep first node's only) */
  body.front .node ~ .node .casino-review-block4 { display: none !important; }

  /* --- TABLES — horizontal scroll wrapper instead of forcing widths ----- */
  body .casino-review-block4,
  body #block-countryorder-0 .content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* --- NODE CONTENT ---------------------------------------------------- */
  body .node .content {
    width: 100% !important;
    float: none !important;
    clear: both;
  }
  body .node .content p { word-wrap: break-word; line-height: 1.7; }
  body .node h2 a { font-size: 18px; line-height: 1.3; }

  /* --- LINKS GRID (block-block-23) — stack vertically ------------------ */
  body #block-block-23 table { border-collapse: collapse; }
  body #block-block-23 table,
  body #block-block-23 tbody,
  body #block-block-23 tr,
  body #block-block-23 td {
    display: block !important;
    width: 100% !important;
  }
  body #block-block-23 td { padding: 6px 4px; }
  body #block-block-23 td a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 0;
  }

  /* --- IMAGES — constrain to container --------------------------------- */
  body img { max-width: 100%; height: auto; }

  /* --- SIDEBAR BLOCKS -------------------------------------------------- */
  body .sidebar .block,
  body #sidebar-right .block {
    width: 100% !important;
    margin-bottom: 15px;
  }
  body .view-casinos-reviews-focused .views-row {
    width: 100% !important;
    float: none !important;
    position: static !important;
    padding-left: 0 !important;
    overflow: visible !important;
    margin-bottom: 15px;
  }
  body .view-casinos-reviews-focused .views-row .views-field-field-big-image-fid,
  body .view-casinos-reviews-focused .views-row .views-field-nothing,
  body .view-casinos-reviews-focused .views-row .views-field-field-raiting-rating {
    position: static !important;
    width: auto !important;
    left: auto !important;
  }

  /* --- QUICKTABS ------------------------------------------------------- */
  body .quicktabs_wrapper,
  body .quicktabs-wrapper { width: 100% !important; }
  body ul.quicktabs_tabs,
  body ul.quicktabs-tabs {
    display: flex; flex-wrap: wrap;
    padding: 0; margin: 0;
  }
  body ul.quicktabs_tabs li,
  body ul.quicktabs-tabs li { float: none !important; }
  body ul.quicktabs_tabs a,
  body ul.quicktabs-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 13px;
  }

  /* --- HIDE ON MOBILE -------------------------------------------------- */
  /* Multilingual content blocks (wrong language for English front page) */
  body #block-block-25 { display: none !important; }  /* French  */
  body #block-block-26 { display: none !important; }  /* Italian */
  body #block-block-24 { display: none !important; }  /* Spanish */
  body #block-block-10 { display: none !important; }  /* German  */

  /* Non-English quicktabs (IT, FR, DE) showing on English page */
  body #block-quicktabs-3 { display: none !important; }  /* German  */
  body #block-quicktabs-4 { display: none !important; }  /* Italian */
  body #block-quicktabs-5 { display: none !important; }  /* French  */

  /* Obsolete Blackjack Win95 software download */
  body #block-views-uc_products-block_1 { display: none !important; }

  /* Dead advertisement blocks (clktr4ck.com links) */
  body .block-ad { display: none !important; }

  /* Ad menu sidebar categories */
  body #ad-menu { display: none !important; }

  /* --- FOOTER ---------------------------------------------------------- */
  body #footer-wrap { clear: both; }
  body #footer {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    background-image: none !important;
    text-align: center;
    padding: 10px;
  }
  body #footer-bot {
    height: auto !important;
    background-image: none !important;
  }
  body #footer-region .block {
    width: 100% !important;
    float: none !important;
  }
  body #footer p,
  body #footer a {
    white-space: normal !important;
    word-wrap: break-word;
  }
  body #footer ul.menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0; margin: 0 0 10px;
    list-style: none;
  }
  body #footer ul.menu li {
    float: none !important;
    padding: 0;
  }
  body #footer ul.menu li a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 6px;
  }

  /* --- TOUCH TARGETS --------------------------------------------------- */
  body .casino-get-bonus-linko {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
  }
  body .node .links a,
  body .more-link a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
  }

  /* --- TITLE-WRAP + TITLE-56 headings ---------------------------------- */
  body #title-wrap,
  body .front #block-block-23 #title-wrap,
  body .front #block-block-10 #title-wrap {
    width: 100% !important;
    background-image: none !important;
    height: auto !important;
  }
  body #title-wrap h2,
  body #title-56 h2 {
    width: 100% !important;
    background-image: none !important;
    white-space: normal !important;
    height: auto !important;
    padding: 8px 10px;
  }

  /* --- "Read Review" links in casino tables ----------------------------- */
  body .casino-review-block4 a,
  body #block-countryorder-0 a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
  }

  /* --- block-block-23 paragraph inline links --------------------------- */
  body #block-block-23 p a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 0;
  }

  /* --- MISC FIXED-WIDTH OVERRIDES -------------------------------------- */
  body .view-general-articles-block_2 { width: 100% !important; }
  body .no-sidebars #main { width: 100% !important; }
  body #block-menu-secondary-links ul.menu { width: 100% !important; }
  body .webform-client-form { width: 100% !important; }
  body .webform-client-form .form-text { width: 100% !important; }
  body .resizable-textarea,
  body .resizable-textarea .form-textarea { width: 100% !important; }
}

/* --- NARROW MOBILE (≤ 480px) ----------------------------------------- */
@media screen and (max-width: 480px) {
  body #branding img { max-width: 130px; }
  body ul.main-menu li a { font-size: 11px; padding: 8px 2px; }
  body .node h2 a { font-size: 16px; }
  body .casino-get-bonus-linko { font-size: 12px; padding: 6px 8px; }
}
