/* ==========================
   CSS VARIABLES (WCAG SAFE)
========================== */
:root {
  /* Brand Core */
  --blue: #1f3c88;
  --blue-dark: #142a66;
  --blue-soft: #e7ecff;

  --red: #e63946;
  --red-dark: #b72a35;
  --red-soft: #fde6e8;

  --white: #ffffff;
  --gray-light: #f4f6fb;
  --text-dark: #0f172a;
  --text-muted: #475569;

  --font-base: 1rem;
  --max-width: 75rem;
}

/* ==========================
   RESET & BASE
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, Arial, sans-serif;
  font-size: var(--font-base);
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--gray-light);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue-dark);
  font-weight: 600;
}

a:hover {
  color: var(--red);
}

a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 0.2rem solid var(--red);
  outline-offset: 0.2rem;
}

/* ==========================
   LAYOUT
========================== */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 1.5rem;
}

/* ==========================
   HEADER (BLUE + RED)
========================== */
.header {
  background: linear-gradient(
    90deg,
    var(--blue),
    var(--red-dark)
  );
  color: var(--white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-group img {
  width: 10rcap;
  height: 10rem;
  margin:3%;
}

.logo-group strong {
  font-size: 1.1rem;
}

.tagline {
  font-size: 0.85rem;
  color: var(--white);
  opacity: 0.9;
}

/* ==========================
   NAVIGATION
========================== */
.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--white);
  padding: 0.4rem 0.6rem;
  border-radius: 0.3rem;
}

.nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--white);
}

/* ==========================
   HERO (RED + BLUE)
========================== */
.hero {
  background: linear-gradient(
    135deg,
    var(--blue-soft),
    var(--red-soft)
  );
  padding: 3.5rem 0;
}

.hero h1 {
  font-size: 2.3rem;
  margin-bottom: 1rem;
  color: var(--blue-dark);
}

p{
     text-align: justify;
     line-height: 2.0;
}
.hero p {
  max-width: 100%;
  color: var(--text-muted);
  font-size: 1.05rem;
  text-align: justify;
}

/* ==========================
   SECTIONS
========================== */
.section {
  padding: 3rem 0;
}

.section h2, h2{
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--red-dark);
}

.section h2 span {
  color: var(--blue-dark);
}

/* ==========================
   CONTENT CARDS
========================== */
.card {
  background: linear-gradient(
    180deg,
    var(--white),
    var(--blue-soft)
  );
  border-radius: 0.5rem;
  border-left: 0.4rem solid var(--blue);
  border-right: 0.4rem solid var(--red);
  padding: 1.6rem;
  margin-bottom: 1.8rem;
}

.card h3 {
  color: var(--blue-dark);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
}

/* ==========================
   BUTTONS (RED PRIMARY)
========================== */
.btn-primary {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--red),
    var(--red-dark)
  );
  color: var(--white);
  padding: 0.65rem 1.4rem;
  border-radius: 0.35rem;
  text-decoration: none;
  margin:1%;
}

.btn-primary:hover {
  background: linear-gradient(
    90deg,
    var(--blue),
    var(--blue-dark)
  );
}


/* Search Button */
.page-search {
    display: flex;
    max-width: 400px;  /* adjusts based on screen */
    margin: 20px auto; /* centers on page */
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.page-search input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    outline: none;
}

.page-search input::placeholder {
    color: var(--blue-dark);
    font-style: italic;
}

.page-search button {
    background-color: var(--blue-dark); /* primary accent color */
    color: white;
    border: none;
    padding: 0 20px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.page-search button:hover {
    background-color: var(--blue);
}

.page-search button svg {
    stroke: white; /* icon color */
    width: 20px;
    height: 20px;
}

/* ==========================
   CONTACT PAGE
========================== */
.contact-form {
  max-width: 32rem;
  background: linear-gradient(
    180deg,
    var(--white),
    var(--red-soft)
  );
  padding: 2rem;
  border-radius: 0.6rem;
  border: 0.1rem solid var(--blue-soft);
  margin:auto;
}

.contact-intro {
    font-size: 1rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 2rem;
    max-width: 90%;
}

.contact-form label {
  display: block;
  margin-top: 1rem;
  color: var(--blue-dark);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border: 0.1rem solid var(--blue);
}

.contact-form button {
  margin-top: 1.3rem;
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(
    90deg,
    var(--blue),
    var(--red)
  );
  color: var(--white);
  border: none;
}

.contact-form button:hover {
  background: linear-gradient(
    90deg,
    var(--red-dark),
    var(--blue-dark)
  );
}

/* ==========================
   FOOTER
========================== */
.footer {
  background: linear-gradient(
    90deg,
    var(--blue),
    var(--red-dark)
  );
  color: var(--white);
  text-align: center;
  padding: 1.6rem;
  font-size: 0.9rem;
}

/* For List on Lessons page */
.learning-cards {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 0;
    margin-top: 2rem;
}

.learning-cards li {
    background: #ffffff;
    border: 2px solid #1f3c88;
    border-radius: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.learning-cards li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: #1f3c88;
    font-weight: 600;
}

.learning-cards .icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.icon svg {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  fill: var(--red-dark);
}

.quiz-icon svg{
width:40px;
height:40px;
fill:var(--red-dark);
}

.learning-cards .title {
    font-size: 1.1rem;
}

.learning-cards li:hover {
    background: #f0f4ff;
    border-color: #e63946;
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.learning-cards li:hover a {
    color: #e63946;
}

/* SIDE NAVIGATION Bar */

    .page-layout {
    display: flex;
    min-height: calc(100vh - 120px); /* header + footer height approx */
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #f8f9fb;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    padding: 1rem;
}

/* Navigation list */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section {
    margin-bottom: 1.2rem;
}

.section-title {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #444;
    display: block;
    margin-bottom: 0.5rem;
}

.nav-section ul {
    list-style: none;
    padding-left: 0;
}

.nav-section a {
    display: block;
    padding: 0.45rem 0.6rem;
    color: #222;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
}

.nav-section a:hover,
.nav-section a:focus {
    background-color: #e8ecf5;
    outline: none;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 1.5rem;
}

/* Screen reader only */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


/* Page Title */
.page-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text-main);
}

.page-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Quiz Cards Grid */
.quiz-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Individual Card */
.quiz-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: var(--text-main);
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.quiz-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Card Titles */
.quiz-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* Card Description */
.quiz-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}



/* ==========================
   LANGUAGE CONTENT BLOCKS
========================== */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  /* grid-template-columns: repeat(3, 1fr);  */
  gap: 1.5rem;
}

.lang-item {
  background-color: var(--white);
  border-left: 0.3rem solid var(--blue);
  border-right: 0.3rem solid var(--red);
  padding: 1rem;
  border-radius: 0.4rem;
}

.lang-item strong {
  font-size: 1.1rem;
  color: var(--blue-dark);
}

.phonetic {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.3rem 0;
}

.audio-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}


.quiz-options {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.option-btn {
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
}

.option-btn.correct {
    background: #4caf50;
    color: white;
}

.option-btn.wrong {
    background: #f44336;
    color: white;
}

#nextBtn {
    margin-top: 20px;
}

/* =========================
   CATEGORY TITLE
========================= */
.category-title {
    margin: 3rem 0 1.25rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    border-left: 5px solid #2563eb;
    padding-left: 1rem;
}

/* =========================
   LEARNING CARDS (DESKTOP DEFAULT)
========================= */
.learning-cards {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* desktop first */
    gap: 1rem;
}

.learning-cards li {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.learning-cards li a {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    text-decoration: none;
    color: #111827;
}

.learning-cards .icon {
    font-size: 1.6rem;
}

.learning-cards .title {
    font-size: 1rem;
    font-weight: 500;
}

/* Hover only really matters on desktop */
.learning-cards li:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
}

.icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: #2563eb;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.learning-cards li:hover .icon svg {
    stroke: #1d4ed8;
}

/* =========================
   TABLET
========================= */
@media (max-width: 1024px) {
    .learning-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =========================
   MOBILE
========================= */
@media (max-width: 48rem) {
  .nav {
    display: none;
    flex-direction: column;
    background: linear-gradient(
      180deg,
      var(--blue-dark),
      var(--red-dark)
    );
    padding: 1rem;
  }

  .nav.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  /* For Search Option */
  .page-search {
        max-width: 90%;
    }
    .page-search input {
        font-size: 14px;
        padding: 10px 15px;
    }
    .page-search button {
        font-size: 16px;
        padding: 0 15px;
    }

  /* For list on lessons page */
  .learning-cards {
        grid-template-columns: 1fr;
    }

    /* For SIDE Navigation  */
     .sidebar {
        display: none;
    }

    .page-layout {
        flex-direction: column;
    }

   .category-title {
        font-size: 1.15rem;
        margin: 2rem 0 1rem;
    }

    .learning-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .learning-cards li a {
        padding: 0.85rem;
    }

    .learning-cards .icon {
        font-size: 1.4rem;
    }

    .learning-cards .title {
        font-size: 0.95rem;
    }
}

