/* ===== Hello Elementor Override & Layout Fixes for 1MWIN ===== */

/* ===== PREVENT HORIZONTAL OVERFLOW ===== */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* ===== FULL WIDTH LAYOUT OVERRIDES ===== */
/* Force full-width on all Hello Elementor containers */
body .site-main,
body .site-main > *,
body .site-main article,
body .site-main .entry-content,
body .site-main .page-content,
.site-main,
.site-main > *,
.entry-content,
.page-content {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Remove any Hello Elementor page wrappers */
.elementor-page .site-main,
body:not(.elementor-page) .site-main {
  max-width: 100% !important;
  padding: 0 !important;
}

/* ===== PAGE TITLE HIDING ===== */
.page .entry-header,
.page .page-header,
.page h1.entry-title,
.page-header,
body .page-header,
body .entry-header {
  display: none !important;
}

/* ===== HEADER FIXES ===== */
/* Force sticky header with maximum specificity */
html body .site-header,
html body.admin-bar .site-header,
body .site-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background: rgba(10, 0, 21, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
}

/* Admin bar offset */
html body.admin-bar .site-header {
  top: 32px !important;
}

@media (max-width: 782px) {
  html body.admin-bar .site-header {
    top: 46px !important;
  }
}

/* Header inner - fix flex layout to prevent wrapping */
.header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  max-width: none !important;
  padding: 12px 24px !important;
}

/* Logo should always be visible */
html body .site-logo {
  flex-shrink: 0 !important;
}

html body .site-logo img {
  max-height: 45px !important;
  width: auto !important;
}

/* Nav fills remaining space and centers */
html body .main-navigation {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: visible !important;
  display: flex !important;
  justify-content: center !important;
}

html body .main-navigation ul {
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 0 !important;
  overflow: visible !important;
}

.main-navigation li a {
  padding: 8px 8px !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

@media (min-width: 1500px) {
  .main-navigation li a {
    padding: 8px 10px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 1400px) and (min-width: 1281px) {
  html body .main-navigation ul {
    gap: 0 2px !important;
  }
  .main-navigation li a {
    padding: 6px 6px !important;
    font-size: 12px !important;
  }
  .header-cta .btn-responsible-gaming {
    padding: 6px 10px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 1280px) and (min-width: 1101px) {
  .header-inner {
    padding: 10px 16px !important;
    gap: 4px !important;
  }
  html body .main-navigation ul {
    gap: 0 2px !important;
  }
  .main-navigation li a {
    padding: 5px 5px !important;
    font-size: 11px !important;
  }
  .header-cta .btn-play-now {
    padding: 8px 16px !important;
    font-size: 12px !important;
  }
  .header-cta .btn-responsible-gaming {
    display: none !important;
  }
}

@media (max-width: 1100px) and (min-width: 769px) {
  .header-inner {
    padding: 10px 12px !important;
    gap: 4px !important;
  }
  html body .main-navigation ul {
    gap: 0 !important;
  }
  .main-navigation li a {
    padding: 5px 4px !important;
    font-size: 11px !important;
  }
  .header-cta .btn-play-now {
    padding: 8px 14px !important;
    font-size: 12px !important;
  }
  .header-cta .btn-responsible-gaming {
    display: none !important;
  }
  .site-logo img {
    max-height: 35px !important;
  }
}

/* Header CTA should not shrink or wrap */
.header-cta {
  flex-shrink: 0 !important;
  margin-left: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* ===== CONTENT SECTION FIXES ===== */
/* Sections should be full-width with inner content constrained */
.hero-section,
.content-section,
.subpage-hero {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Section inner constrains content */
.section-inner {
  max-width: var(--max-width) !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ===== CARD BACKGROUND FIXES ===== */
/* Force card backgrounds with high specificity to override Hello Elementor */
html body .testimonial-card,
html body .feature-card,
html body .game-card,
html body .promo-card,
html body .faq-item,
html body .stat-item,
html body .login-step {
  background: linear-gradient(145deg, #1a0033 0%, #0f001f 100%) !important;
  border: 1px solid rgba(124, 58, 237, 0.2) !important;
  border-radius: 12px !important;
  color: #fff !important;
}

/* Ensure text colors inside cards */
html body .testimonial-card *,
html body .feature-card *,
html body .game-card *,
html body .promo-card *,
html body .faq-item *,
html body .stat-item * {
  color: inherit;
}

html body .testimonial-text,
html body .feature-card p,
html body .promo-card-content p,
html body .faq-answer p,
html body .stat-label {
  color: #c4b5d4 !important;
}

html body .game-card-info .game-rtp {
  color: #22c55e !important;
}

html body .testimonial-stars {
  color: #facc15 !important;
}

html body .stat-number {
  color: #facc15 !important;
}

/* ===== GRID LAYOUT FIXES ===== */
/* Ensure grids work properly */
html body .games-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 16px !important;
}

/* Smaller game cards */
html body .game-card-image {
  aspect-ratio: 1/1 !important;
}

html body .game-card-info {
  padding: 10px 12px !important;
}

html body .game-card-info h3 {
  font-size: 13px !important;
}

html body .game-card-info .game-rtp {
  font-size: 11px !important;
}

html body .promo-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

/* Horizontal promo card layout - image left, text right */
html body .promo-card {
  display: flex !important;
  flex-direction: row !important;
  overflow: hidden !important;
}

html body .promo-card .promo-card-image {
  flex: 0 0 40% !important;
  max-width: 40% !important;
  aspect-ratio: auto !important;
}

html body .promo-card .promo-card-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

html body .promo-card .promo-card-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 20px 24px !important;
}

html body .features-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important;
}

html body .testimonials-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)) !important;
  gap: 24px !important;
}

html body .category-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
}

/* Active users pill override */
html body .active-users-pill {
  background: linear-gradient(135deg, #e040a0 0%, #d946ef 30%, #f472b6 50%, #fb923c 80%, #f59e0b 100%) !important;
  border: none !important;
  border-radius: 60px !important;
}

html body .footer-columns {
  display: grid !important;
  grid-template-columns: 1.5fr 1fr 1fr 1fr !important;
  gap: 40px !important;
}

/* ===== WHY CHOOSE SECTION ===== */
html body .why-choose-section {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 60px !important;
  align-items: center !important;
}

/* ===== WPAUTOP CLEANUP ===== */
/* Hide any stray empty paragraphs from wpautop remnants */
.entry-content > p:empty,
.page-content > p:empty,
.entry-content > br,
.page-content > br {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  height: 0 !important;
}

/* ===== BUTTON FIXES ===== */
/* Ensure CTA buttons are styled correctly */
html body .btn-cta,
html body a.btn-cta {
  display: inline-block !important;
  background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%) !important;
  color: #000 !important;
  padding: 14px 40px !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  border: none !important;
  cursor: pointer !important;
  position: relative;
  overflow: hidden;
}

html body .btn-cta:hover,
html body a.btn-cta:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 25px rgba(250, 204, 21, 0.4) !important;
  color: #000 !important;
}

html body .btn-cta-purple,
html body a.btn-cta-purple {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  color: #fff !important;
}

html body .btn-cta-purple:hover,
html body a.btn-cta-purple:hover {
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4) !important;
  color: #fff !important;
}

html body .btn-play-now,
html body a.btn-play-now {
  background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%) !important;
  color: #000 !important;
  padding: 8px 20px !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  display: inline-block !important;
  white-space: nowrap !important;
}

html body .btn-play-now:hover,
html body a.btn-play-now:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 20px rgba(250, 204, 21, 0.4) !important;
  color: #000 !important;
}

html body .btn-responsible-gaming,
html body a.btn-responsible-gaming {
  background: transparent !important;
  color: #facc15 !important;
  padding: 8px 14px !important;
  border-radius: 50px !important;
  border: 2px solid #facc15 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  display: inline-block !important;
  white-space: nowrap !important;
  letter-spacing: 0.5px !important;
}

html body .btn-responsible-gaming:hover,
html body a.btn-responsible-gaming:hover {
  background: rgba(250, 204, 21, 0.1) !important;
  color: #facc15 !important;
}

html body .btn-play-small,
html body a.btn-play-small {
  background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%) !important;
  color: #000 !important;
  padding: 6px 16px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  display: inline-block !important;
}

/* ===== LINK STYLES ===== */
.seo-content a {
  color: #a855f7 !important;
  text-decoration: underline !important;
}

.seo-content a:hover {
  color: #facc15 !important;
}

/* ===== HERO SECTION FIX ===== */
html body .hero-section {
  position: relative !important;
  min-height: 70vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  overflow: hidden !important;
  padding: 100px 20px !important;
}

html body .hero-content h1 {
  background: linear-gradient(135deg, #fff 0%, #a855f7 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-size: 48px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

/* ===== TABLE FIXES ===== */
html body .info-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  word-wrap: break-word !important;
}

html body .info-table th {
  background: rgba(124, 58, 237, 0.15) !important;
  color: #a855f7 !important;
}

html body .info-table td {
  color: #c4b5d4 !important;
}

/* Responsive table wrapper for overflow */
html body .seo-content .info-table,
html body .entry-content .info-table {
  display: table !important;
  max-width: 100% !important;
  overflow-wrap: break-word !important;
}

/* ===== FOOTER FIXES ===== */
html body .site-footer {
  background: #060010 !important;
  border-top: 1px solid rgba(124, 58, 237, 0.2) !important;
  padding: 60px 20px 24px !important;
  color: #fff !important;
}

html body .footer-col h4 {
  color: #fff !important;
}

html body .footer-col ul li a {
  color: #8b7aa0 !important;
}

html body .footer-col ul li a:hover {
  color: #a855f7 !important;
}

html body .footer-bottom .copyright {
  color: #8b7aa0 !important;
}

/* ===== FOOTER LICENCE SECTIONS ===== */
html body .footer-licence-icons {
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 8px 0 !important;
}

html body .footer-licence-icons img {
  height: 35px !important;
}

/* ===== RESPONSIVE OVERRIDES ===== */
@media (max-width: 1024px) {
  html body .footer-columns {
    grid-template-columns: 1fr 1fr !important;
  }
  html body .why-choose-section {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  /* Mobile navigation */
  html body .mobile-menu-toggle {
    display: flex !important;
  }
  html body .header-cta {
    display: none !important;
  }
  html body .main-navigation {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(10, 0, 21, 0.99) !important;
    padding: 20px !important;
    border-bottom: 1px solid rgba(124, 58, 237, 0.3) !important;
    overflow: visible !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    max-height: calc(100vh - 70px) !important;
    overflow-y: auto !important;
  }
  html body .main-navigation.active {
    display: block !important;
  }
  html body .main-navigation ul {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
  html body .main-navigation li a {
    display: block !important;
    padding: 12px 16px !important;
  }

  /* Responsive grids - tablet */
  html body .games-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  html body .promo-grid {
    grid-template-columns: 1fr !important;
  }
  html body .promo-card {
    flex-direction: row !important;
  }
  html body .features-grid,
  html body .category-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Testimonials single column on tablet */
  html body .testimonials-grid {
    grid-template-columns: 1fr !important;
  }

  html body .footer-columns {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  html body .hero-content h1 {
    font-size: 32px !important;
  }

  .section-title {
    font-size: 28px !important;
  }

  html body .subpage-hero h1 {
    font-size: 32px !important;
  }

  /* Tables responsive on tablet */
  html body .info-table th,
  html body .info-table td {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }
  html body .info-table th {
    width: 40% !important;
  }

  /* Sections reduce padding */
  html body .content-section {
    padding: 40px 16px !important;
  }
  html body .section-inner {
    padding: 0 16px !important;
  }

  /* Licence icons smaller */
  html body .licence-icons {
    gap: 12px !important;
  }
  html body .licence-icons img {
    height: 35px !important;
  }
}

@media (max-width: 480px) {
  /* Single column grids on mobile */
  html body .games-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }
  html body .promo-grid {
    grid-template-columns: 1fr !important;
  }
  html body .promo-card {
    flex-direction: column !important;
  }
  html body .promo-card .promo-card-image {
    flex: none !important;
    max-width: 100% !important;
    aspect-ratio: 16/9 !important;
  }
  html body .features-grid,
  html body .category-grid {
    grid-template-columns: 1fr !important;
  }

  html body .hero-content h1 {
    font-size: 26px !important;
  }

  html body .hero-section {
    padding: 50px 16px !important;
    min-height: 400px !important;
  }

  html body .header-cta {
    display: none !important;
  }

  /* Tables stack on mobile */
  html body .info-table,
  html body .info-table thead,
  html body .info-table tbody,
  html body .info-table tr,
  html body .info-table th,
  html body .info-table td {
    display: block !important;
    width: 100% !important;
  }
  html body .info-table tr {
    margin-bottom: 12px !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }
  html body .info-table th {
    text-align: left !important;
    border-bottom: none !important;
    padding: 10px 16px 4px !important;
    font-size: 12px !important;
  }
  html body .info-table td {
    text-align: left !important;
    padding: 4px 16px 12px !important;
    font-size: 14px !important;
    border-bottom: none !important;
  }

  /* Section titles */
  .section-title {
    font-size: 24px !important;
  }

  /* Buttons smaller on mobile */
  html body .btn-cta,
  html body a.btn-cta {
    padding: 12px 28px !important;
    font-size: 14px !important;
  }

  /* Content section reduced padding */
  html body .content-section {
    padding: 32px 16px !important;
  }
  html body .section-inner {
    padding: 0 12px !important;
  }

  /* SEO content headings smaller */
  html body .seo-content h2 {
    font-size: 22px !important;
  }
  html body .seo-content h3 {
    font-size: 18px !important;
  }
  html body .seo-content {
    font-size: 14px !important;
  }

  /* Phone frame smaller */
  html body .phone-frame {
    max-width: 220px !important;
  }

  /* Footer reduce padding */
  html body .site-footer {
    padding: 40px 16px 20px !important;
  }

  /* Login steps */
  html body .login-step {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 16px !important;
  }

  /* FAQ on mobile */
  html body .faq-question {
    padding: 16px !important;
    font-size: 14px !important;
  }
  html body .faq-item.active .faq-answer {
    padding: 0 16px 16px !important;
  }

  /* Views counter wrap */
  html body .views-counter {
    flex-direction: column !important;
    gap: 8px !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .site-header,
  .site-footer,
  .btn-cta,
  .header-cta {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
}
