/* ==========================================================================
   Bailey Gallery - Ultra-Optimized Mobile First CSS (Lighthouse 90+)
   ========================================================================== */

:root {
  --bg-dark: #000000;
  --bg-main: rgba(0, 0, 0, 0.65);
  --bg-card: #ffffff;
  --bg-card-hover: #f4f4f4;
  --accent-gold: #f3cb2a;
  --accent-gold-light: #fff0a3;
  --accent-gold-dark: #a48713;
  --accent-red: #e31224;
  --accent-red-hover: #ff1e27;
  --accent-green: #00bd1e;
  --accent-blue: #1e90ff;
  --text-main: #ffffff;
  --text-dark: #222222;
  --text-muted: #a0a0a0;
  --border-light: #e6e6e6;
  --border-dark: #222222;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #0c0d0f;
  background-image: linear-gradient(rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.78)), url('/images/background.webp');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  content-visibility: auto;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 1. ANJ Responsible Gaming Top Bar */
.anj-top-bar {
  background: #040906;
  border-bottom: 1px solid #14281b;
  color: #9eb5a7;
  font-size: 0.75rem;
  padding: 6px 0;
  text-align: center;
}

.anj-top-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.anj-top-bar .badge-18 {
  background: var(--accent-red);
  color: #fff;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 3px;
}

.anj-top-bar a {
  color: var(--accent-gold);
  text-decoration: underline;
}

/* 2. Main Header (Logo Left, Home Link Right) */
.main-header {
  background: #000000;
  border-bottom: 1px solid #1c1c1c;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 70px;
  display: flex;
  align-items: center;
}

.main-header .header-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-header .brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.main-header .brand-logo:hover {
  transform: scale(1.02);
}

.main-header .brand-logo img {
  height: 44px;
  width: auto;
  display: block;
}

/* Header Home Link Right */
.header-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--accent-gold);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 44px; /* Ensure 44px minimum tap target for Lighthouse A11y */
}

.header-home-link:hover {
  background: var(--accent-gold);
  color: #000000;
  box-shadow: 0 0 12px rgba(243, 198, 42, 0.4);
}

.header-home-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* 3. Hero Showcase Section */
.showcase {
  padding: 24px 0 16px;
  text-align: center;
}

.showcase h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9);
  margin-bottom: 10px;
  line-height: 1.25;
}

.showcase h1 span {
  color: var(--accent-gold);
}

.showcase-sub {
  font-size: 0.95rem;
  color: #d8d8d8;
  max-width: 760px;
  margin: 0 auto 16px;
  line-height: 1.5;
}

.showcase-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.badge-pill {
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
}

/* 4. Table / Cards List of 5 Items */
.main-table-container {
  margin-bottom: 24px;
}

.table-thead-desktop {
  display: grid;
  grid-template-columns: 50px 180px 1fr 140px 180px;
  background: #2b2d31;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 12px 16px;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  align-items: center;
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

@media (max-width: 991px) {
  .table-thead-desktop {
    display: none;
  }
}

.cards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.table-card {
  background: #ffffff;
  color: #222222;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  contain: content; /* Contain layout/paint rendering for performance boost */
}

.table-card:hover {
  background: #f4f4f4;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.table-card-inner {
  display: grid;
  grid-template-columns: 50px 180px 1fr 140px 180px;
  align-items: center;
  padding: 16px;
  min-height: 105px;
}

.card-rank {
  font-size: 1.5rem;
  font-weight: 900;
  color: #888888;
  text-align: center;
  position: relative;
}

.card-rank .top-ribbon {
  position: absolute;
  top: -16px;
  left: -16px;
  background: var(--accent-green);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 8px;
  border-bottom-right-radius: 6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.card-rank .blue-ribbon {
  background: #0066cc;
}

.card-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-logo img {
  max-width: 145px;
  max-height: 54px;
  object-fit: contain;
}

.card-bonus {
  text-align: center;
  padding: 0 16px;
}

.card-bonus .bonus-main {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111111;
  margin-bottom: 4px;
}

.card-bonus .bonus-extra {
  font-size: 0.85rem;
  color: #007a27;
  font-weight: 600;
}

.card-score {
  text-align: center;
}

.card-score .num {
  font-size: 1.85rem;
  font-weight: 800;
  color: #062a61;
  line-height: 1;
}

.card-score .stars {
  color: #ff9d00;
  font-size: 0.85rem;
  margin-top: 3px;
}

.card-cta {
  text-align: center;
}

.btn-visit-red {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(180deg, #f60707 0%, #972c4c 100%);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 11px 0;
  border-radius: 6px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  transition: all 0.2s ease;
  min-height: 44px; /* Ensure 44px minimum tap target for Lighthouse A11y */
}

.btn-visit-red:hover {
  background: linear-gradient(180deg, #ff1e27 0%, #b80024 100%);
  box-shadow: 0 5px 12px rgba(229, 9, 20, 0.4);
  transform: translateY(-1px);
}

.card-cta .btn-sub-link {
  display: block;
  font-size: 0.78rem;
  color: #2b549b;
  margin-top: 5px;
  text-decoration: none;
  font-weight: 700;
}

.card-cta .btn-sub-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Mobile Optimization: High Performance & 3 Cards Visible
   ========================================================================== */
@media (max-width: 768px) {
  body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.82)), url('/images/background-mobile.webp');
    background-attachment: scroll; /* Crucial for Mobile FPS & Lighthouse score */
  }

  .anj-top-bar {
    padding: 3px 0;
    font-size: 0.65rem;
  }

  .anj-top-bar .badge-18 {
    font-size: 0.6rem;
    padding: 0 4px;
  }

  .main-header {
    height: 52px;
  }

  .main-header .brand-logo img {
    height: 32px;
  }

  .header-home-link {
    padding: 5px 12px;
    font-size: 0.78rem;
    min-height: 36px;
  }

  .showcase {
    padding: 12px 0 10px;
  }

  .showcase h1 {
    font-size: 1.2rem;
    margin-bottom: 4px;
  }

  .showcase-sub {
    display: none;
  }

  .showcase-badges {
    margin-bottom: 10px;
    gap: 6px;
  }

  .badge-pill {
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  .cards-wrapper {
    gap: 8px;
  }

  .table-card {
    border-radius: 8px;
  }

  .table-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    min-height: 68px;
    gap: 8px;
  }

  .card-rank {
    display: none;
  }

  .card-logo {
    flex: 0 0 85px;
    justify-content: flex-start;
  }

  .card-logo img {
    max-width: 85px;
    max-height: 38px;
  }

  .card-bonus {
    flex: 1 1 auto;
    text-align: left;
    padding: 0 4px;
  }

  .card-bonus .bonus-main {
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2px;
  }

  .card-bonus .bonus-extra {
    font-size: 0.68rem;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-score {
    flex: 0 0 42px;
    text-align: center;
  }

  .card-score .num {
    font-size: 1.15rem;
    font-weight: 800;
  }

  .card-score .stars {
    display: none;
  }

  .card-cta {
    flex: 0 0 85px;
    text-align: center;
  }

  .btn-visit-red {
    font-size: 0.78rem;
    padding: 7px 0;
    border-radius: 5px;
    font-weight: 800;
    min-height: 36px;
  }

  .card-cta .btn-sub-link {
    font-size: 0.65rem;
    margin-top: 2px;
  }
}

/* 5. Special Ticket Row (Right After 5 Cards) */
.ticket-special-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  margin: 24px 0 40px;
  border-radius: var(--radius-md);
  background: radial-gradient(ellipse at 50% 35%, #107c41 0%, #005c2d 55%, #012b1a 100%);
  box-shadow: 0 0 20px rgba(16,124,65,0.6), 0 8px 25px rgba(0,0,0,0.4);
  border: 1px solid rgba(46, 204, 113, 0.4);
  overflow: hidden;
  contain: content;
}

.ticket-special-row .ticket-side {
  background-color: #0e3a25;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-special-row .ticket-side span {
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 2px;
}

.ticket-special-row .ticket-body {
  border: 2px dashed rgba(255,255,255,0.6);
  border-radius: 8px;
  margin: 10px;
  padding: 22px 18px;
  display: grid;
  grid-template-columns: 1fr 200px;
  align-items: center;
  gap: 16px;
}

.ticket-info-bonus {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ticket-info-bonus img {
  max-width: 140px;
  height: auto;
}

.ticket-info-text {
  color: #ffffff;
}

.ticket-info-text .t-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 3px;
  background: linear-gradient(180deg, #ffffff, #ffea8c 50%, #f0b400);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ticket-info-text .t-sub {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffe81a;
}

.btn-ticket-gold {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, #ffee71 0%, #ffea8c 30%, #f0b400 75%, #aa7f10 100%);
  color: #012b1a;
  font-size: 1.15rem;
  font-weight: 900;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-ticket-gold:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #ffffff 0%, #ffee71 100%);
}

@media (max-width: 768px) {
  .ticket-special-row {
    grid-template-columns: 36px 1fr;
    margin: 16px 0 30px;
  }
  .ticket-special-row .ticket-side span {
    font-size: 0.95rem;
  }
  .ticket-special-row .ticket-body {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 14px 10px;
    margin: 6px;
    gap: 10px;
  }
  .ticket-info-bonus {
    flex-direction: column;
    gap: 6px;
  }
  .ticket-info-bonus img {
    max-width: 100px;
  }
  .ticket-info-text .t-title {
    font-size: 1.05rem;
  }
  .ticket-info-text .t-sub {
    font-size: 0.9rem;
  }
  .btn-ticket-gold {
    max-width: 180px;
    font-size: 0.88rem;
    padding: 8px 12px;
    margin: 0 auto;
    min-height: 38px;
  }
}

/* 6. Text Section */
.info-text-section {
  background: rgba(0, 0, 0, 0.65);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  margin-bottom: 40px;
  border: 1px solid rgba(255,255,255,0.08);
  contain: content;
}

.info-text-section h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent-gold-light);
  margin-top: 28px;
  margin-bottom: 14px;
  line-height: 1.3;
}

.info-text-section h2:first-child {
  margin-top: 0;
}

.info-text-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 20px;
  margin-bottom: 10px;
}

.info-text-section p {
  color: #d5d5d5;
  font-size: 0.96rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.info-text-section ul {
  list-style: none;
  margin-bottom: 18px;
  padding-left: 5px;
}

.info-text-section ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: #d5d5d5;
  font-size: 0.95rem;
  line-height: 1.6;
}

.info-text-section ul li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-size: 0.9rem;
}

/* 7. Contact Page Styling Enhancements */
.contact-hero-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 20px;
}

@media (max-width: 991px) {
  .contact-hero-wrapper {
    grid-template-columns: 1fr;
  }
}

.contact-card-box {
  background: rgba(18, 30, 22, 0.85);
  border: 1px solid rgba(243, 198, 42, 0.3);
  border-radius: 16px;
  padding: 30px 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.contact-card-box h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-gold-light);
  margin-bottom: 8px;
}

.contact-card-box p {
  color: #c8d6cd;
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.contact-form-modern {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-field-group input,
.form-field-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.form-field-group input:focus,
.form-field-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 10px rgba(243, 198, 42, 0.3);
}

.btn-contact-submit {
  background: linear-gradient(180deg, #ffe57f 0%, #f3c623 70%, #d49a00 100%);
  color: #012b1a;
  font-weight: 900;
  font-size: 1rem;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(243, 198, 35, 0.35);
  transition: all 0.2s ease;
  width: 100%;
  margin-top: 8px;
  min-height: 48px;
}

.btn-contact-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 198, 35, 0.5);
  background: linear-gradient(180deg, #ffffff 0%, #ffee71 100%);
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-item-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.info-icon-box {
  background: rgba(243, 198, 42, 0.15);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon-box svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.info-item-content h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-gold-light);
  margin-bottom: 4px;
}

.info-item-content p {
  font-size: 0.88rem;
  color: #c0c0c0;
  margin: 0;
  line-height: 1.5;
}

/* 8. Footer (Contains ALL Page Links) */
.main-footer {
  background: #000000;
  border-top: 1px solid #1a1a1a;
  padding: 44px 0 30px;
  margin-top: auto;
}

.footer-nav-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  list-style: none;
  margin-bottom: 28px;
  padding: 0 10px;
}

.footer-nav-menu a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px;
  display: inline-block;
  min-height: 44px; /* Ensure 44px tap target for Lighthouse A11y */
  transition: color 0.2s ease;
}

.footer-nav-menu a:hover,
.footer-nav-menu a.active {
  color: var(--accent-gold);
  text-decoration: underline;
}

.footer-disclaimer-text {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 24px;
  font-size: 0.83rem;
  color: #888888;
  line-height: 1.65;
}

.footer-icons-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.footer-icons-row img {
  height: 38px;
  width: auto;
}

.footer-copyright {
  text-align: center;
  font-size: 0.8rem;
  color: #666666;
  border-top: 1px solid #141414;
  padding-top: 20px;
}

/* Back To Top Floating Button */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--accent-gold);
  color: #000000;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 900;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
}
