/* ==========================================================
   GLOBAL SETTINGS
   Simplified shared styling for Ludo pages.
   Header, hero and footer styles are retained from the original.
========================================================== */
:root {
  --white-color: #ffffff;
  --primary-color: #467214;
  --secondary-color: #f1ade8;
  --dark-color: #3c3c3b;
  --p-color: #525151;
  --border-color: #b8babb;
  --page-background-color: #f7f7f7;
  --copyright-font-size: 10px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --box-radius: 8px;
  --soft-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --accent: linear-gradient(135deg, #ff9a9e, #fad0c4);
}

body {
  margin: 0;
  font-family: "Noto Sans Bengali", "Hind Siliguri", "SolaimanLipi",
    "Solaiman Lipi", "Kalpurush", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #f9f9f9;
  color: #333333;
}

/* Consistent heading hierarchy across content pages */
h1, h2 {
  color: #818181;
  margin-bottom: 10px;
}

h3, h4, h5, h6 {
  color: #424242;
  margin-bottom: 10px;
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.55rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 1rem; }

p, ul, ol {
  color: var(--p-color);
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 15px;
}

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 6px; }
li:last-child { margin-bottom: 0; }

a, button {
  touch-action: manipulation;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.45rem; }
  h3 { font-size: 1.2rem; }
  h4 { font-size: 1.05rem; }
  h5 { font-size: 1rem; }
  h6 { font-size: 0.95rem; }
  p, ul, ol { font-size: 15px; }
}

/* =====================
   HEADER
===================== */

.site-header {
  background: var(--primary-color);
  color: #fff;
  padding: 5px 10px;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.img-header {
  height: 110px;
  width: auto;
  margin: 0 1em;
}


.header-center {
  text-align: center;
}

.site-title {
  margin-left: 0.5em;
  font-size: 2.5rem;
  font-weight: 600;
  color:#f7f5f3;
}


.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative; /* 🔑 VERY IMPORTANT */
}

/* Base menu state (closed by default) */
.menu-wrapper {
  display: none;
}


.menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Navigation */
.top-nav a {
  color: #ccc;
  text-decoration: none;
  margin-right: 12px;
  font-size: 1.0em;
}

.top-nav a:last-child {
  margin-right: 1em;
}

.top-nav a.active,
.top-nav a:hover {
  color: #fff;
  font-weight: bold
}

/* =====================
   LANGUAGE TOGGLE
===================== */

.lang-switch {
  margin: .5em 1em;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #ccc;
}

.switch {
  position: relative;
  width: 36px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: #777;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background: #4caf50;
}

input:checked + .slider:before {
  transform: translateX(18px);
}



/* ================================
   HERO SECTION
================================ */

.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background-image: url("../images/others/family_ludo.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
 
}

/* Dark/soft overlay for better text visibility */
.hero-overlay {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.20),
      rgba(0, 0, 0, 0.38)
    );

  z-index: 1;
}

/* Content over the image */
.hero-content {
  position: relative;
  z-index: 2;

  width: 90%;
  max-width: 1000px;

  text-align: center;

  margin-top: -30px;
}

/* Main game title */
.hero-content h1 {
  margin: 0;

  font-family: "Trebuchet MS", "Arial Rounded MT Bold", sans-serif;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 2px;

  color: #f50404;

  /* Ludo-style glowing text */
  text-shadow:
    0 0 5px rgba(255, 255, 255, 0.9),
    0 0 12px rgba(255, 215, 70, 0.9),
    0 0 25px rgba(255, 150, 30, 0.85),
    0 0 45px rgba(255, 80, 20, 0.65);

  animation: titleGlow 2.5s ease-in-out infinite alternate;
}

/* Tagline */
.hero-content p {
  max-width: 760px;

  margin: 30px auto 0;

  font-family: Arial, sans-serif;
  font-size: clamp(2rem, 3vw, 2.4rem);
  line-height: 1.4;
  font-weight: 500;

  color: #ffffff;

  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(0, 0, 0, 0.6);
}

/*-----TITLE GLOW ANIMATION----*/

@keyframes titleGlow {
  from {
    text-shadow:
      0 0 5px rgba(255, 255, 255, 0.9),
      0 0 12px rgba(255, 215, 70, 0.8),
      0 0 25px rgba(255, 150, 30, 0.7),
      0 0 40px rgba(255, 80, 20, 0.5);
  }

  to {
    text-shadow:
      0 0 8px rgba(255, 255, 255, 1),
      0 0 18px rgba(255, 235, 100, 1),
      0 0 35px rgba(255, 170, 40, 0.95),
      0 0 60px rgba(255, 70, 20, 0.8);
  }
}

.box { background: #deeaf7; border-left: 4px solid #1a73e8; padding: 10px; margin: 20px 0; }
     

/* ==========================================================
   MAIN CONTENT / SHARED PAGE LAYOUT
========================================================== */
main {
  max-width: 100%;
  margin: 30px;
  padding: 20px;

}

[data-lang="bn"] {
  font-size: 1.05em;
  line-height: 1.75;
}

[data-lang="bn"] p,
[data-lang="bn"] li {
  line-height: 1.85;
}

.terms_lst li { margin-left: 20px; }

/* Shared width and spacing for homepage content sections */
.ludo-intro,
.game-rules,
.winning-section,
.quick-rules,
.strategy-section,
.responsible-section,
.ready-section {
  width: 95%;
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
}

.ludo-intro,
.game-rules,
.winning-section,
.quick-rules,
.strategy-section,
.responsible-section,
.ready-section {
  padding-top: 45px;
  padding-bottom: 45px;
}

.ludo-intro,
.winning-section,
.strategy-section,
.responsible-section,
.ready-section {
  text-align: center;
}

/* Give all major homepage sections the same heading treatment */
.ludo-intro h2,
.game-rules h2,
.winning-section h2,
.quick-rules h2,
.strategy-section h2,
.responsible-section h2,
.ready-section h2 {
  margin: 0 0 24px;
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.ludo-intro { padding-top: 65px; }

.ludo-intro h4 {
  max-width: 1000px;
  margin: 0 auto 20px;
  font-size: 1.25rem;
  line-height: 1.8;
}

.ludo-intro p,
.winning-section p,
.strategy-section p,
.responsible-section p {
  max-width: 900px;
  margin: 0 auto 18px;
}

.highlight-text {
  margin-top: 28px !important;
  font-size: 1.25rem !important;
  font-weight: 700;
}

/* Common card design for game rules and legal pages */

.rules-section {
  margin: 0 0 24px;
  padding: 24px 26px;
  border: 1px solid rgba(127, 127, 127, 0.28);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.055);
}

.rule-card,
.legal-section, .rule-item {
  margin: 0 0 24px;
  padding: 24px 26px;
 
}

.rule-item h3,
.rule-card h2,
.rule-card h3,
.legal-section h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.rule-item p,
.rule-card p,
.legal-section p {
  margin: 9px 0 14px;
}

.rule-item ul,
.rule-item ol,
.rule-card ul,
.rule-card ol,
.legal-section ul,
.legal-section ol {
  margin: 8px 0 14px;
  padding-left: 1.5rem;
}

.rule-item li,
.rule-card li,
.legal-section li { margin-bottom: 6px; }


/* Legal pages */

.legal-header,
.rules-header {
  margin: 14px auto 32px;
  text-align: center;
}

.legal-header h1,
.rules-header h1 { margin-bottom: 10px; }

.legal-updated,
.rules-subtitle {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.85;
}

.rules-subtitle {
  max-width: 750px;
  margin: 0 auto;
}

.legal-content { line-height: 1.8; overflow-wrap: anywhere; }
.legal-intro { margin-bottom: 26px; }
.legal-footer-note { margin-top: 30px; font-weight: 700; text-align: center; }
[data-lang="bn"] .legal-content { font-family: "Noto Sans Bengali", sans-serif; }
[data-lang="bn"] .legal-section ul,
[data-lang="bn"] .legal-section ol,
[data-lang="bn"] .rule-card ul,
[data-lang="bn"] .rule-card ol {
  padding-left: 1.7rem;
  padding-right: 0.2rem;
}

.rules-section { 
  margin-bottom: 25px;
  border: 1px solid rgba(127, 127, 127, 0.28);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.045); 
}
.special-rule { 
  border-width: 2px; 
}
.rule-note { 
  margin-top: 14px; 
  padding: 12px 15px; 
  border-radius: 8px; 
  background: #f5f5f5; 
}

.winner-section .rule-card { 
  text-align: center; 
}

.quick-summary { 
  margin-top: 40px; 
}

/* Shared scrollable table style */
.rules-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 12px;
}

.rules-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.rules-table th,
.rules-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e2e2e2;
}

.rules-table th { background: #f2f2f2; font-weight: 700; }
.rules-table td { line-height: 1.6; }
.rules-table tr:last-child td { border-bottom: 0; }
.rules-footer { margin-top: 35px; text-align: center; }

/* Buttons */
.home-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.game-button {
  display: inline-block;
  padding: 12px 24px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.game-button:hover { transform: translateY(-3px); }
.primary-button { padding-right: 30px; padding-left: 30px; }

/* Board and game images */
.media-images {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 25px;
  width: 100%;
  margin: 35px 0;
}

.media-images img {
  display: block;
  width: calc(25% - 19px);
  min-width: 250px;
  height: auto;
  border-radius: 10px;
}

.inline-image {
  width: 50px;
  height: 50px;
  margin: 0 10px;
  vertical-align: middle;
}

.back-image {
  position:fixed;
  top: 15vh;
  right: -250px; /* Hide half of the 50px-wide image */
  width: 70vw;
  height: auto;
  object-fit: cover;
  transform: rotate(25deg);
  transform-origin: center;
  opacity: 0.3;
  z-index: 1000;
}


.media-text {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0;
}

.media-content { flex: 1; }

@media (max-width: 768px) {
  main { margin: 20px 10px; padding: 10px 15px; }

  .ludo-intro,
  .game-rules,
  .winning-section,
  .quick-rules,
  .strategy-section,
  .responsible-section,
  .ready-section { width: 92%; }

  .ludo-intro { padding-top: 42px; }

  .rule-item,
  .rule-card,
  .legal-section { padding: 20px; }

    /* Give all major homepage sections the same heading treatment */
  .ludo-intro h2,
  .game-rules h2,
  .winning-section h2,
  .quick-rules h2,
  .strategy-section h2,
  .responsible-section h2,
  .ready-section h2 {
    margin: 0 0 16px;
    font-size: clamp(1.25rem, 2.4vw, 1.45rem);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
  }
  .rule-item h3 { font-size: 1.15rem; }

  .ludo-intro { padding-top: 65px; }

  .ludo-intro h4 {
    max-width: 1000px;
    margin: 0 auto 20px;
    font-size: 0.85rem;
    line-height: 1.0;
  }

  .ludo-intro p,
  .winning-section p,
  .strategy-section p,
  .responsible-section p {
    max-width: 700px;
    margin: 0 auto 12px;
  }

  .highlight-text {
    margin-top: 10px !important;
    font-size: 0.8rem !important;
    font-weight: 500;
  }

 .media-images {
    flex-direction: row;       /* keep row layout */
    gap: 8px;                  /* tighter than the 15px tablet gap */
  }
  .media-images img {
    width: calc(45% - 4px);    /* 2 per row: 2×(50%-4) + 8 gap = 100% */
    min-width: 0;              /* override the 250px desktop floor */
    border-radius: 8px;
  }

  .game-button { text-align: center; }
  .media-text { flex-direction: column; text-align: center; }
  .media-content { text-align: left; }
  .legal-page, .rules-page { width: 94%; padding-top: 18px; }

  .back-image {
    position: fixed;
    top: 10vh;
    right: -80px; /* Hide half of the 50px-wide image */
    width: 80vw;
    height: auto;
    object-fit: cover;
    transform: rotate(20deg);
    transform-origin: center;
    opacity: 0.3;
    z-index: 1000;
  }


}

@media (max-width: 480px) {
  .media-images {
    flex-direction: row;       /* keep row layout */
    gap: 6px;                  /* tighter than the 15px tablet gap */
  }
  .media-images img {
    width: calc(40% - 4px);    /* 2 per row: 2×(50%-4) + 8 gap = 100% */
    min-width: 0;              /* override the 250px desktop floor */
    border-radius: 6px;
  }
  .rule-item,
  .rule-card,
  .legal-section { padding: 18px; }
  .rules-table { min-width: 540px; }
}

/* =========================================
   FOOTER
========================================= */

.site-footer {
  background:var(--secondary-color);
  color: #503504;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.img-footer {
  height: 80px;
  width: auto;
}

/* Right container */
.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Footer navigation */
.footer-nav a {
  color: #503504;
  text-decoration: none;
  margin-right: 12px;
  font-size: 14px;

  
}

.footer-nav a:last-child {
  margin-right: 0;
}

.footer-nav a:hover {
  color: #fff;
}

/* Social icons */
.footer-social {
  display: flex;
  gap: 10px;
}
.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* IMPORTANT */
  transition: background 0.3s, transform 0.2s;
}

.social-icon:hover {
  background: #4caf50;
  transform: translateY(-2px);
}

.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fills circle properly */
}

/* Bottom line */
.footer-bottom {
  text-align: center;
  font-size: 13px;
  padding: 10px;
  border-top: 1px solid #333;
}
.footer-bottom a {
  color: #503504;
  text-decoration: none;
}
.copyright_fnt{
  font-size: 10px;
  color:var(--white-color)
}

/* ==========================================================
   SHARED IMAGE / CONTENT HELPERS
========================================================== */
.content-image { margin: 18px auto; }

/* =====================
   MEDIA QUERIES
===================== */

@media (min-width: 769px) {
  .menu-wrapper {
    display: flex;
    align-items: center;
    position: static;
    background: none;
    padding: 0;
    gap: 12px;
  }

  .menu-toggle {
    display: none;
  }
}


/*---------- End of simplified CSS ----------*/

/* Ludo board print request popup */
#ludoPrintModal, #ludoPrintBoard {
  font-family: Arial, Helvetica, sans-serif;
}
#ludoPrintModal[hidden], #ludoPrintBoard[hidden],
#ludoPrintForm[hidden] { display: none !important; }

#ludoPrintModal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.68);
}
#ludoPrintModal .lpm-card {
  width: min(100%, 440px);
  padding: 28px 24px;
  border-radius: 14px;
  background: #fff;
  color: #222;
  box-shadow: 0 16px 55px rgba(0,0,0,.3);
  text-align: center;
}
#ludoPrintModal h2 {
  margin: 0 0 10px;
  color: #222;
  font-size: 23px;
  line-height: 1.35;
}
#ludoPrintModal .lpm-description {
  margin: 0 0 22px;
  color: #666;
  font-size: 14px;
}
#ludoPrintModal .lpm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}
#ludoPrintModal button {
  min-width: 112px;
  padding: 11px 20px;
  border: 0;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
#lpmYes { background: #238447; color: #fff; }
#lpmNo { background: #e8e8e8; color: #333; }
#ludoPrintForm {
  margin-top: 20px;
  text-align: left;
}
#ludoPrintForm label {
  display: block;
  margin: 0 0 5px;
  color: #333;
  font-size: 13px;
  font-weight: 600;
}
#ludoPrintForm input {
  display: block;
  width: 100%;
  min-height: 42px;
  margin: 0 0 14px;
  padding: 9px 11px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 14px;
}
#lpmSubmit {
  width: 100%;
  margin-top: 4px;
  background: #238447;
  color: #fff;
}
#ludoPrintBoard {
  width: min(100%, 760px);
  margin: 30px auto;
  padding: 22px;
  background: #fff;
  color: #222;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 10px;
}
#ludoPrintBoard h2 { margin: 0 0 5px; font-size: 22px; }
#ludoPrintBoard .lpb-subtitle { margin: 0 0 16px; color: #666; font-size: 13px; }
#ludoPrintSvg { display: block; width: 100%; max-width: 620px; height: auto; margin: auto; }
#ludoPrintBoard .lpb-legend {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 22px;
  margin: 14px 0 0; font-size: 13px;
}
#ludoPrintBoard .lpb-legend span { display: inline-flex; align-items: center; gap: 6px; }
#ludoPrintBoard .lpb-swatch { width: 15px; height: 15px; border: 1px solid #555; display: inline-block; }
#ludoPrintBoard .lpb-print-again {
  margin-top: 18px; padding: 10px 22px; border: 0; border-radius: 6px;
  background: #222; color: #fff; cursor: pointer; font-size: 14px;
}

@media print {
  @page { size: A4 portrait; margin: 10mm; }
  body.ludo-print-mode > *:not(#ludoPrintBoard) { display: none !important; }
  body.ludo-print-mode #ludoPrintBoard {
    display: block !important;
    width: 100%; max-width: none; margin: 0; padding: 0;
    border: 0; border-radius: 0; box-shadow: none;
    break-inside: avoid;
  }
  body.ludo-print-mode #ludoPrintSvg { width: 180mm; max-width: 180mm; height: 180mm; }
  body.ludo-print-mode #ludoPrintBoard .lpb-print-again { display: none !important; }
  body.ludo-print-mode #ludoPrintBoard h2 { font-size: 17pt; }
  body.ludo-print-mode #ludoPrintBoard .lpb-subtitle,
  body.ludo-print-mode #ludoPrintBoard .lpb-legend { font-size: 9pt; }
}


/* ======================================================
   ----------RESPONSIVE MENU-------------
========================================================= */

/* Mobile styles */
@media (max-width: 768px) {
 
/* ----MOBILE----- */

  .hero-section {
    /* let the aspect ratio drive the height so the whole photo fits */
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;          /* match your family_ludo.png ratio if different */
    background-size: contain;      /* <-- show the whole photo, no cropping */
    background-position: center center;
    background-color: #1a3306;     /* dark green so any letterbox blends in */
    background-repeat: no-repeat;
  }

  .hero-overlay {
    /* keep the overlay dark so white text stays readable over the contained image */
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.35),
      rgba(0, 0, 0, 0.55)
    );
  }

   .hero-content {
    width: 92%;
    margin-top: -20px;
  }

  .hero-content h1 {
    font-size: 1.9rem;
    letter-spacing: 1px;
    letter-spacing: 1px;
  }

  .hero-content p {
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
 }
  
  
  .header-right {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }

  main {
  margin: 20px 10px;
  padding: 10px 15px;
  
  }

  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .img-header {
    height: 60px;
    margin: 0;
  }

  .site-title {
    font-size: 1.2rem;
  }

  .menu-toggle {
    display: block;
  }

  .menu-wrapper {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1f1f1f;
    border-radius: 6px;
    padding: 12px;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
    z-index: 1000;
    display: none !important; /* Add this line */
  }

  .menu-wrapper.active {
    display: flex !important; /* This shows when active */
  }

  .top-nav {
    display: flex;
    flex-direction: column;
  }

  .footer-nav a {
    margin: 3px;
    padding: 6px;
    font-size: 12px;
  }

  .lang-switch {
    margin: 0;
    justify-content: space-between;
  }

  /* Footer stacking */
  .footer-inner {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .footer-right {
    flex-direction: column;
    gap: 10px;
  }

   .content-image {
    margin: 18px auto;
  }
}
