/* =========================================================
   SYSZINWAI.SITE — GLOBAL DESIGN SYSTEM (Clean Optimized)
   ========================================================= */
/* === Root Variables (Refined Palette) === */
:root {
  --primary: #1e3a8a;
  /* deep academic blue */
  --primary-light: #3b82f6;
  /* hover vibrant blue */
  --accent: #60a5fa;
  /* bright accent blue */
  --bg: #0d1b2a;
  /* navy-dark background */
  --card-bg: #1b263b;
  /* slate surface */
  --border: #243b55;
  /* soft cool gray */
  --text: #f1f5f9;
  /* light readable text */
  --radius: 8px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.privacy-policy {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  line-height: 1.6;
  color: #333;
}

/* ------------------------------------------------------------------- */
/* Back-to-Top Button styles                                           */
/* This floating button appears when the user scrolls down, allowing   */
/* them to quickly return to the top of the page. It is hidden by     */
/* default and becomes visible with the `.show` class.                 */
/* ------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 30px;
  padding: 10px 16px;
  font-size: 14px;
  background-color: #1d4ed8;
  color: white;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  display: none;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.back-to-top:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
}

.back-to-top.show {
  display: block;
}

/* ------------------------------------------------------------------- */
/* Responsive Image Styling                                            */
/* To ensure images across the site scale gracefully on different       */
/* screen sizes and look more polished, define consistent styles for   */
/* topic images and intro images.                                      */
/* ------------------------------------------------------------------- */
/* Topic images and intro images within lesson content */
.topic-image,
.intro-image img {
  display: block;
  /* Center images horizontally and add vertical spacing */
  margin: 20px auto;
  max-width: 600px;
  width: 90%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.topic-image:hover,
.intro-image img:hover {
  transform: scale(1.03);
}

/* Figure captions for images */
figure {
  text-align: center;
  margin: 25px auto;
}

figure figcaption {
  font-size: 0.95rem;
  color: #374151;
  margin-top: 8px;
  font-style: italic;
}

.privacy-policy h1 {
  color: #ff6600;
  margin-bottom: 10px;
}

.privacy-policy h2 {
  color: #222;
  border-bottom: 2px solid #ff6600;
  padding-bottom: 4px;
  margin-top: 25px;
}

.privacy-policy ul {
  margin-left: 20px;
}

.privacy-policy a {
  color: #ff6600;
  text-decoration: none;
}

.privacy-policy a:hover {
  text-decoration: underline;
}

body {
  font-family: "Poppins", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  line-height: 1.6;
}

/* ----------------- Index Page ----------------- */
body.index-page main {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1rem;
  text-align: center;
}

/* ----------------- Courses Page ----------------- */
/* Find this block in your style.css */
body.courses-page .main1-content {
  flex: 1;
  width: 100%;
  padding: 20px 0;
  /* Ensure there is NO 'overflow: hidden' or 'overflow: auto' here */
}

/* ----------------- Other Pages ----------------- */
body.other-page main {
  flex: 1;
  width: 100%;
  padding: 3rem 40px;
  /* full width with padding */
  text-align: left;
  box-sizing: border-box;
}

header {
  background: linear-gradient(135deg, #1e3a8a, #1b263b);
  color: #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  padding: 1rem 0;
}


header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

header nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: white;
}

header nav a:hover {
  text-decoration: underline;
}

footer {
  background-color: #111827;
  /* Tailwind gray-900 */
  color: white;
  text-align: center;
  padding: 1.5rem 0;
}

footer a {
  margin: 0 0.5rem;
  color: white;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

img.logo {
  width: 100px;
  height: 100px;
  border-radius: 9999px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-right: 0.5rem;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  border: none;
  border-radius: 50px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}

/* ----------------- Index Page Grid ----------------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background:black;
  border-radius: 12px;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.card :hover{
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);}

.card h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.card a {
  color: #1d4ed8;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
   background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
  text-align: center;
  padding: 1.2rem 0;
}

footer a {
  color: #93c5fd;
  text-decoration: none;
  margin: 0 8px;
}

footer a:hover {
color: #ffffff;
  text-decoration: underline;
}




/* Main Content Area */
.courses-page .main1-content>.layout>div:not(.sidebar) {
  flex: 1;
  background: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* ----------------- Responsive Design ----------------- */
@media (max-width: 1024px) {
  .courses-page .layout {
    padding: 0 20px;
  }
}


/* Sidebar Styling */
.courses-page .sidebar {
  flex: 0 0 240px;
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 130px;
  /* --- Added for Scroll Bar --- */
  max-height: calc(100vh - 150px);
  /* Adjust this height as needed (e.g., 100vh - header height - top offset - bottom padding) */
  overflow-y: auto;
  /* Adds a vertical scrollbar when content overflows */
}

.courses-page .main1-content>.layout>div:not(.sidebar) {
  width: 100%;
}
}

/* Make body a full-height flex container */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* full viewport height */
  margin: 0;
}

.unit_intro {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  margin: 30px auto;
  max-width: 100%;
  /* Add padding to top, left, and right so headings don't touch the border */
  padding: 20px 25px 10px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Subtle glowing border effect */
.unit_intro::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, #2196f3, #4fc3f7, #81d4fa);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}


/* Layout: text + image */
.unit_intro .unit-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 20px 25px;
}

/* Paragraph text */
.unit_intro .unit-body p {
  flex: 1;
  font-size: 1rem;
  line-height: 1.7;
  color: #1a1a1a;
  margin: 0;
}

/* Image styling */
.unit_intro .intro-image img {
  width: 320px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(33, 150, 243, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.unit_intro .intro-image img:hover {
  transform: scale(1.04);
  box-shadow: 0 14px 35px rgba(33, 150, 243, 0.35);
}

/* Hover lift for the entire box */
.unit_intro:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* Center the main heading within the unit intro card */
.unit_intro {
  text-align: center;
}

/* Reset text alignment for the body inside unit intro */
.unit_intro .unit-body {
  text-align: left;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
  .unit_intro .unit-body {
    flex-direction: column;
    text-align: center;
  }

  .unit_intro .intro-image img {
    width: 100%;
    max-width: 350px;
  }
}

.layout {
  display: flex;
  flex-wrap: nowrap;
  min-height: 100vh;
  transition: all 0.3s ease;
}

/* Main content fills remaining space */
.main-cards {
  flex: 1;
  padding: 20px;
  transition: all 0.3s ease;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
  }

  .sidebar.hidden {
    display: none;
  }

  .main-cards {
    width: 100%;
    padding: 10px;
  }

  .sidebar-hint {
    font-size: 13px;
    color: #fff;
    background-color: #ff9800;
    /* orange for attention */
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .sidebar-hint:hover {
    background-color: #e68900;
  }
}

/* =========================================================
   SECTION HEADING — SYSZINWAI.SITE
   Modern, centered academic highlight
   ========================================================= */
.section-heading {
  text-align: center;
  margin: 2rem 0 1.5rem;
}

.section-heading h2 {
  display: inline-block;
  font-size: 2rem;
  font-weight: 700;
  color: #1e3a8a; /* deep academic blue */
  background: linear-gradient(90deg, #facc15 0%, #fde68a 100%);
  padding: 8px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
}

/* subtle hover effect for interactivity */
.section-heading h2:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.2);
  transition: all 0.3s ease;
}

/* responsive font size */
@media (max-width: 768px) {
  .section-heading h2 {
    font-size: 1.5rem;
    padding: 6px 12px;
  }
}
