/* ═══════════════════════════════════════════════════════════════════════════
   Typography Scale 
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --font-size-xs: 0.64rem;
  --font-size-sm: 0.8rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.563rem;
  --font-size-2xl: 1.953rem;
  --font-size-3xl: 2.441rem;
  --font-size-4xl: 3.052rem;
  --font-size-5xl: 3.815rem;

  --font-family-body: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-family-heading: 'DM Sans', system-ui, -apple-system, sans-serif;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0em;
  --letter-spacing-wide: 0.02em;

  --color-text: #1C1C1C;
  --color-background: #ffffff;
}

/* Typography Classes */
.text-xs {
  font-size: var(--font-size-xs);
}

.text-sm {
  font-size: var(--font-size-sm);
}

.text-base {
  font-size: var(--font-size-base);
}

.text-lg {
  font-size: var(--font-size-lg);
}

.text-xl {
  font-size: var(--font-size-xl);
}

.text-2xl {
  font-size: var(--font-size-2xl);
}

.text-3xl {
  font-size: var(--font-size-3xl);
}

.text-4xl {
  font-size: var(--font-size-4xl);
}

.text-5xl {
  font-size: var(--font-size-5xl);
}

/* Body Styles */
body {
  font-family: var(--font-family-body);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--color-text);
  background-color: var(--color-background);
}

/* Heading Styles */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

.heading {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

.body-text {
  font-family: var(--font-family-body);
  line-height: var(--line-height-normal);
  color: var(--color-text);
}

body {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

hr {
  border: none;
  height: 0.5px;
  background-color: #E2E8F0;
}

/* --------------------------------NAVBAR------------------------- */
.navbar {
  position: fixed;
  top: 0px;
  border-bottom: 1px solid #E2E8F0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 1000;
}

/* Container */
.nav-container {
  width: 100%;
  height: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 26px;

  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border-radius: 20px;
}

/* Left side */
.nav-left {
  display: flex;
  align-items: center;
  gap: 140px;
}

/* Logo */
.logo img {
  height: 100px;
  /* control size */
  width: auto;
  display: block;
}

/* Links */
.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}

/* ACTIVE LINK */
.nav-links a.active {
  color: #AB1017;
  font-size: 1.1rem;
  /* slightly bigger */
  font-weight: 600;
}



/* Button */


@media (max-width: 768px) {
  .nav-container {
    height: 80px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .nav-left {
    gap: 20px;
    /* reduce huge gap */
  }

  .nav-links {
    display: none;
    /* simple mobile version */
  }

  .btn-primary {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

/*------------------------------------------Container------------------------------------------------------------------------*/

.container {
  max-width: 1295px;
  margin: 0 auto;
  padding-left: 26px;
  padding-right: 26px;
}

/*------------------------------------------Hero------------------------------------------------------------------------*/
.hero {
  margin-top: 90px;
  /* space below navbar */
}

/* Layout */
.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* LEFT SIDE */
.hero-left {
  flex: 1;
}

.hero-left h1 {
  font-size: var(--font-size-4xl);
  max-width: 500px;
}

/* BUTTON GROUP */
.hero-buttons {
  margin-top: 94px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-primary {
  padding: 16px 32px;
  background: #AB1017;
  color: #fff;
  border: none;
  border-radius: 80px;
  font-size: var(--font-size-lg);
  font-weight: 500;
  height: 59px;
  cursor: pointer;

  transition: all 0.3s ease;
}

/* HOVER */
.btn-primary:hover {
  box-shadow: 0 10px 25px rgba(171, 16, 23, 0.3);
}

/* CLICK */
.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-play {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: 0.3s;
}

/* Circle animation */
.play-icon {
  width: 59px;
  height: 59px;
  background: black;
  border-radius: 50%;
  position: relative;

  transition: all 0.3s ease;
}

/* Triangle */
.play-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);

  border-left: 10px solid white;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;

  transition: 0.3s;
}

/* Text */
.btn-play span {
  font-size: var(--font-size-lg);
  font-weight: 500;
  transition: 0.3s;
}

/* HOVER EFFECT */
.btn-play:hover .play-icon {
  transform: scale(1.1);
  background: #AB1017;
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(171, 16, 23, 0.4);
}

.btn-play:hover .play-icon::before {
  transform: translate(-30%, -50%);
}

.btn-play:hover span {
  color: #AB1017;
}

button,
.btn-play {
  will-change: transform;
}

/* Circle */
.play-icon {
  width: 59px;
  height: 59px;
  background: black;
  border-radius: 50%;
  position: relative;
}

/* Triangle (play icon) */
.play-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);

  border-left: 15px solid white;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

/* Text */
.btn-play span {
  font-size: var(--font-size-base);
  font-weight: 500;
}

.hero-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.hero-right img {
  height: auto;
  width: 769px;
  max-width: 100%;
}

@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
  }

  .hero-right img {
    height: auto;
    max-height: 400px;
  }

  .hero-left h1 {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/*--------------------------Search section-------------------------------------------------------------*/
.search-section {
  margin-top: 80px;
}

.search-box {
  background: #7C111A;
  border-radius: 80px;
  height: 300px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;

  padding: 40px 20px;
  /* helps on smaller screens */
}

.search-box h2 {
  color: #ffffff;
  font-size: var(--font-size-3xl);
  /* H2 */
  text-align: center;
  max-width: 600px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-bar input {
  width: 479px;
  height: 59px;

  border: 1px solid #B07076;
  border-radius: 40px;

  padding: 0 20px;
  outline: none;

  font-size: var(--font-size-base);
  color: #ffffff;
  background: transparent;
}

/* Placeholder styling */
.search-bar input::placeholder {
  color: #B07076;
}

.btn-search {
  height: 59px;
  padding: 0 32px;

  background: #ffffff;
  color: #7C111A;

  border: none;
  border-radius: 80px;

  font-size: var(--font-size-base);
  font-weight: 500;
  cursor: pointer;

  transition: 0.3s;
}

.search-bar input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Hover */
.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.search-bar input:hover {
  border-color: #ffffff;
}

@media (max-width: 768px) {
  .search-box {
    height: auto;
    padding: 40px 20px;
    border-radius: 40px;
  }

  .search-bar {
    flex-direction: column;
    width: 100%;
  }

  .search-bar input {
    width: 100%;
  }

  .btn-search {
    width: 100%;
  }
}

/*-------------------------fields---------------------------------------------------*/
.fields {
  margin-top: 26px;

  display: flex;
  gap: 8px;

  justify-content: center;
  flex-wrap: wrap;
  /* IMPORTANT for responsiveness */
}

.field {
  height: 60px;
  padding: 0 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #7C111A;
  border-radius: 80px;

  font-size: var(--font-size-sm);
  text-align: center;

  cursor: pointer;
  transition: 0.3s;
}

.field:hover {
  background: #FFE2E4;
  color: #7C111A;
  transform: translateY(-2px);
  border-color: #FFE2E4;
}

.field.active {
  background: #FFE2E4;
  color: #ffffff;
  border-color: #7C111A;
}


@media (max-width: 768px) {
  .field {
    width: 100%;
    max-width: 300px;
  }
}

/*------------------------------------services----------------------------------------------*/

/* Services Grid Container */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* exactly 4 per row */
  gap: 8px;
  margin-top: 100px;
}


.service-card {
  border: 1px solid #E2E8F0;
  border-radius: 30px;
  /* optional rounded edges */

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 24px 12px;
  /* gives breathing space inside */
  gap: 6px;
  /* icon → text spacing */

  text-align: center;
  cursor: pointer;

  transition: 0.3s;
}

/* Icons */
.service-icon {
  height: 30px;
  width: auto;
}

/* Text */
.service-card h3 {
  font-size: var(--font-size-xl);
  /* H3 */
  color: #410702;
  margin: 0;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(65, 7, 2, 0.15);
  border-color: #AB1017;
  /* optional highlight */
}

/* Tablet: 2 per row */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 per row */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/*---------------------------------------about us ------------------------------------------*/
.about {
  margin-top: 200px;
}

.about-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.about-header h1 {
  font-size: var(--font-size-4xl);
}

.about-header p {
  margin-top: 16px;
  font-size: var(--font-size-sm);
  color: #1C1C1C;
}

.about-cards {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.about-card {
  height: 90%;
  background: #F2F3FF;
  border-radius: 35px;
  padding: 28px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.about-card img {
  /* same as image height */
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  width: 100%;
  object-fit: contain;

  display: block;
}

.card-image {
  height: 220px;
  /* same as image height */
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.card-content {
  margin-top: auto;
  /*pushes content to bottom */
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 130px;
}

.about-card h4 {
  font-size: var(--font-size-2xl);
  /* H4 */
  color: #000;
}

.about-card p {
  font-size: var(--font-size-sm);
  color: #1f2937;

}

.about-card {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.about-card.show {
  opacity: 1;
  transform: translateY(0);
}

.about-card:nth-child(1) {
  transition-delay: 0.1s;
}

.about-card:nth-child(2) {
  transition-delay: 0.2s;
}

.about-card:nth-child(3) {
  transition-delay: 0.3s;
}

.about-card:nth-child(4) {
  transition-delay: 0.4s;
}

/*------------------------------------teachers section--------------------------------------------------------*/
.teachers {
  margin-top: 100px;
}

.teachers .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  /* space between left and right */
}

/* Left text */
.teachers-left h2 {
  font-size: var(--font-size-4xl);
  line-height: 1.3;
  text-align: left;
}

.teachers-left p {
  margin-top: 24px;
  font-size: var(--font-size-sm);
  color: #1C1C1C;
  text-align: left;
  line-height: 1.6;
  margin-bottom: 80px;
}

/* Background texture */
.teacher-card .texture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.teacher-card {
  width: 506.26px;
  height: 492px;
  border-radius: 35px;
  position: relative;
  /* important for layering */
  overflow: hidden;
  /* clips corners */
  background-color: #b12732;
}



/* Teacher image */
.teacher-card .teacher-pic {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* preserves teacher pic aspect ratio */
  position: absolute;
  top: 0;
  left: 0;
}



/* SVG square icon on bottom-right */
.teacher-card .icon-square {
  position: absolute;
  bottom: 10px;
  /* adjust spacing from bottom */
  right: 20px;
  /* adjust spacing from right */
  width: 300px;
  /* adjust to your design */
  height: 120px;
  /* adjust to your design */
}

/* Tablet */
@media (max-width: 1024px) {
  .teachers .container {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .teachers-left,
  .teachers-right {
    text-align: center;
  }

  .teacher-card {
    width: 80%;
    height: auto;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .teachers-left p {
    font-size: var(--font-size-sm);
  }
}

/*-----------------------------------------------FAQ section -------------------------------------------*/
/* Container & layout */
.faq {
  display: flex;
  gap: 50px;
  margin-top: 120px;
  align-items: flex-start;
}

@media (min-width: 1024px) {
  .faq {
    align-items: flex-end;
  }
}

.faq-left h2 {
  font-size: var(--font-size-4xl);
}

.faq-left h2 span {
  color: #AB1017;
}

.faq-left img {
  margin-top: 20px;
  max-width: 100%;
  height: auto;
}

.faq-left p {
  margin-top: 20px;
  font-size: var(--font-size-sm);
}

/* Right FAQ items */
.faq-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border-radius: 16px;
  overflow: hidden;

}

.faq-question {
  width: 100%;
  padding: 20px 32px;
  background: #F4F5FF;
  border: none;

  display: flex;
  justify-content: space-between;
  align-items: center;

  text-align: left;
  font-size: var(--font-size-lg);
  font-weight: 500;
  cursor: pointer;
  line-height: 1.4;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 32px;
  background: #fff;

}

.faq-answer p {
  margin: 16px 0;
  font-size: var(--font-size-sm);
}

.faq-icon {
  transition: transform 0.3s ease;
  font-size: 20px;
  line-height: 1;
}

/* Active state */
.faq-item.active .faq-answer {
  max-height: 500px;
  /* enough to fit content */
  padding: 16px 32px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  /* plus becomes X */
}

/*----------------------------------------------Footer---------------------------------------------------------*/
.footer {
  margin-top: 300px;
  background: #4B0B05;
  color: #B7B7B7;
  padding: 60px 80px;
}

/* MAIN LAYOUT */
.footer-container {
  display: flex;
  justify-content: space-between;
  gap: 60px;
}

/* LEFT SIDE */
.footer-left {
  max-width: 420px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 600;
}

.footer-text {
  margin: 24px 0;
  line-height: 1.6;
}

/* SUBSCRIBE */
.footer-subscribe {
  display: flex;
  gap: 12px;
}

.footer-subscribe input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 30px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
}

.footer-subscribe input::placeholder {
  color: #ccc;
}

.footer-subscribe button {
  padding: 14px 24px;
  border-radius: 30px;
  border: none;
  background: #C21D1D;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}

.footer-subscribe button:hover {
  background: #a81818;
}

.footer-note {
  margin-top: 12px;
  font-size: 12px;
  color: #ddd;
}

/* RIGHT SIDE */
.footer-right {
  display: flex;
  gap: 60px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col h4 {
  margin-bottom: 10px;
  font-size: 16px;
}

.footer-col a {
  text-decoration: none;
  color: #ddd;
  font-size: 14px;
  transition: 0.3s;
}

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

/* TABLET */
@media (max-width: 1024px) {
  .footer-container {
    flex-direction: column;
    gap: 40px;
  }

  .footer-right {
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

/* MOBILE */
@media (max-width: 600px) {
  .footer {
    padding: 40px 20px;
  }

  .footer-subscribe {
    flex-direction: column;
  }

  .footer-subscribe button {
    width: 100%;
  }

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

.footer-subscribe input:focus {
  outline: none;
  border-color: #C21D1D;
}

.footer-col a {
  position: relative;
}

.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1px;
  background: #fff;
  transition: 0.3s;
}

.footer-col a:hover::after {
  width: 100%;
}


/*--------------------------------------------------------------------------------------------------------*/
/*-------------------------------////courses page////------------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------------------*/

/* Courses Header */
.courses-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 90px;
  /* gap from navbar */
  text-align: center;
}

.courses-header h2 {
  margin-top: 16px;
  /* gap from illustration */
  font-size: var(--font-size-3xl);
}

/* Header illustration */
.header-illustration {
  max-width: 100%;
  height: auto;
}

.course-search-bar input {
  width: 479px;
  height: 59px;
  padding: 0 16px;
  border: 1px solid #7C111A;
  border-radius: 30px;
  font-size: var(--font-size-sm);
}

.course-search-bar button {
  height: 59px;
  padding: 16px 32px;
  border-radius: 30px;
  background: #7C111A;
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: var(--font-size-base);
  transition: 0.3s;
}

.course-search-bar button:hover {
  background: #fedede;
  color: #7C111A;
}

/*---------------------------------search filters----------------------------------------------------------------*/
/* FILTER BUTTONS */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  /* space between buttons */
  justify-content: center;
  margin-top: 24px;
  /* gap from search bar */
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  /* space between icon and text */
  height: 44px;
  padding: 0 25px;
  border: 1px solid #E2E8F0;
  border-radius: 15px;
  background: #fff;
  cursor: pointer;
  font-size: var(--font-size-base);
  /* H4 */
  color: #1C1C1C;
  transition: 0.3s;
}

.filter-btn img {
  height: 20px;
}

/* ACTIVE STATE */
.filter-btn.active {
  border: none;
  background: #FAEBEB;
  color: #BB181D;
}

.filter-btn.active img {
  filter: brightness(0) saturate(100%) invert(22%) sepia(97%) saturate(6565%) hue-rotate(346deg) brightness(92%) contrast(107%);
  /* This is one way to tint your icon red #BB181D via CSS */
}

/* HOVER EFFECT (optional) */
.filter-btn:hover:not(.active) {
  background: #f9f9f9;
}

/*----------------------------------------cards UI-------------------------------------------------------*/
.courses-container {
  margin-top: 40px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.course-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 30px;
  padding: 20px;

  display: flex;
  flex-direction: column;

  min-height: 220px;
  position: relative;

  transition: 0.3s;
}

/* Hover (premium feel) */
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.06);
}

.card-top-icon {
  display: flex;
  justify-content: center;
}

.card-top-icon img {
  height: 40px;
}

.card-tags {
  display: flex;
  gap: 8px;
  margin-top: 30px;
}

.tag {
  font-size: var(--font-size-base);
  color: #BB181D;

  background: #FFE2E4;
  padding: 4px 10px;
  border-radius: 20px;
}

.card-title {
  margin-top: 20px;
  font-size: var(--font-size-xl);
}

.card-save {
  margin-top: auto;
  /* pushes it to bottom */
  display: flex;
  justify-content: flex-end;
}

.card-save img {
  width: 15px;
  cursor: pointer;
  transition: 0.2s;
}

.card-save img:hover {
  transform: scale(1.2);
}

.card-save img.active {
  filter: brightness(0) saturate(100%) invert(22%) sepia(97%) saturate(6565%) hue-rotate(346deg);
}

@media (max-width: 1024px) {
  .courses-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .courses-container {
    grid-template-columns: 1fr;
  }
}

/*--------------------------------------------------------------------------------------------------------*/
/*-------------------------------////User dashboard////------------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------------------*/

.dashboard-navbar {
  position: fixed;
  top: 0px;
  border-bottom: 1px solid #E2E8F0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 1000;
}

.dashboard-container {
  width: 100%;
  height: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 26px;

  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border-radius: 20px;
}

/* NAV LINKS */
.dashboard-links {
  display: flex;
  gap: 50px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;

  text-decoration: none;
  color: #1C1C1C;
  font-size: var(--font-size-base);

  transition: 0.3s;
}

/* ICON */
.nav-item img {
  color: #1C1C1C;
  width: 21px;
}

/* ACTIVE STATE */
.nav-item.active {
  color: #BB181D;
  font-weight: 600;
  font-size: 1.1rem;
  /* slightly bigger */
}



/* HOVER */
.nav-item:hover {
  color: #BB181D;
}

/* RIGHT SIDE */
.nav-right {
  display: flex;
  align-items: center;
}

.support-icon {
  width: 22px;
  cursor: pointer;
  transition: 0.3s;
}

.support-icon:hover {
  transform: scale(1.1);
}

.nav-item {
  position: relative;
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #BB181D;
  transition: 0.3s;
}

.nav-item:hover::after,
.nav-item.active::after {
  width: 100%;
}

@media (max-width: 768px) {
  .dashboard-links {
    gap: 20px;
  }

  .nav-item span {
    display: none;
    /* icons only on small screens */
  }
}

/*---------------------container proprities----------------------------------------------------------------------------*/
.dashboard-content {
  margin-top: 100px;
  display: flex;
  gap: 20px;
  padding: 30px 26px;
}

/* LEFT */
.dashboard-left {
  width: 80%;
}

/* RIGHT */
.dashboard-right {
  width: 20%;
  position: sticky;
  top: 100px;
  /* stays fixed while scrolling */
}

/*-----------------------welcome section------------------------------------------------------------*/
.welcome-section {
  gap: 8px;

}

.welcome-section h1 {
  font-size: var(--font-size-4xl);
}

.welcome-section p {
  font-size: var(--font-size-base);
  color: #676767;
}

/*-----------------------fields buttons for dashboard------------------------------------------------------------*/

.feilds-buttons {

  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  /* space between buttons */
  justify-content: left;
  margin-top: 32px;
}

.feilds-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  /* space between icon and text */
  height: 44px;
  padding: 0 25px;
  border: 1px solid #E2E8F0;
  border-radius: 15px;
  background: #fff;
  cursor: pointer;
  font-size: var(--font-size-base);
  /* H4 */
  color: #1C1C1C;
  transition: 0.3s;
}

.feilds-btn img {
  height: 20px;
}

/* ACTIVE STATE */
.feilds-btn.active {
  border: none;
  background: #FAEBEB;
  color: #BB181D;
}

.feilds-btn.active img {
  filter: brightness(0) saturate(100%) invert(22%) sepia(97%) saturate(6565%) hue-rotate(346deg) brightness(92%) contrast(107%);
  /* This is one way to tint your icon red #BB181D via CSS */
}


.feilds-btn:hover:not(.active) {
  background: #f9f9f9;
}

/*------------------------------section header----------------------------------------*/
.section-header {
  margin-top: 32px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h3 {
  font-size: var(--font-size-2xl);
}

.scroll-buttons {
  display: flex;
  gap: 10px;
}

.scroll-btn {
  width: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.scroll-btn:hover {
  transform: scale(1.1);
}

/*-----------------------------------------------cards row--------------------------------------*/
.horizontal-courses {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
  /* space for scroll */
}

.course-card {
  min-width: 250px;
  /* 🔥 IMPORTANT */
  flex-shrink: 0;
  /* prevents shrinking */
}

.horizontal-courses {
  scroll-behavior: smooth;
}

/* optional: hide scrollbar */
.horizontal-courses::-webkit-scrollbar {
  height: 6px;
}

.horizontal-courses::-webkit-scrollbar-thumb {
  background: #f0ecec;
  border-radius: 10px;
}

.horizontal-courses {
  scroll-behavior: smooth;
}


/*----------------------------------------------------------------pomodoro--------------------------------------------------*/
/* CARD BASE */
.right-card {
  margin-bottom: 24px;
  border: 1px solid #ECEDF8;
  border-radius: 24px;
  padding: 23px;
  background: #fff;
}

/* TITLE */
.pomodoro-card h4 {
  font-size: var(--font-size-lg);
}

/* TIMER */
.pomodoro-timer {
  margin-top: 110px;
  text-align: center;
}

.pomodoro-timer h1 {
  font-size: var(--font-size-4xl);
}

/* ACTIONS */
.pomodoro-actions {
  margin-top: 74px;

  display: flex;
  justify-content: center;
  gap: 14px;
}

/* PLAY BUTTON */
.play-btn {
  background: #CE2026;
  border: none;
  border-radius: 38px;

  padding: 12px 25px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: 0.3s;
}

.play-btn img {
  width: 18px;
}

/* MORE BUTTON */
.more-btn {
  background: #FFBCBC;
  border: none;
  border-radius: 38px;

  padding: 12px 25px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: 0.3s;
}

.more-btn img {
  width: 18px;
}

/*--------------------------------------------------To-Do List_--------------------------------------------------------*/
/* HEADER */
.todo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ADD BUTTON */
.add-btn {
  padding: 11px;
  border-radius: 11px;
  background: #ECEDF8;
  border: none;
  cursor: pointer;

  font-size: var(--font-size-2xl);
  color: #7C111A;

  transition: 0.3s;
}

.add-btn:hover {
  transform: scale(1.05);
}

/* INPUT */
.todo-input-box {
  margin-top: 20px;
  display: none;
}

.todo-input-box input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ECEDF8;
}

/* LIST */
.todo-list {
  margin-top: 42px;

  display: flex;
  flex-direction: column;
  gap: 42px;
}

/* TASK */
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  transition: 0.3s;
}

/* CHECKBOX */
.checkbox {
  width: 30px;
  height: 30px;
  border: 1px solid #ECEDF8;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

/* TEXT AREA */
.todo-content {
  flex: 1;
}

/* TITLE */
.todo-content h3 {
  font-size: var(--font-size-lg);
}

/* DATE */
.todo-content p {
  font-size: var(--font-size-sm);
  color: #CE2026;

}

/* DELETE */
.delete-btn {
  cursor: pointer;
  font-size: 18px;
}

/* COMPLETED STATE */
.todo-item.completed {
  opacity: 0.6;
  transform: translateY(10px);
}

.todo-item.completed h3 {
  text-decoration: line-through;
}

.todo-item {
  transition: all 0.3s ease;
}

/*-------------------------------------Pomodoro-------------------------------------------------------*/
* {
  box-sizing: border-box;
}

/* CONTAINER */
.pomodoro-container {
  margin-top: 100px;
  display: flex;
  padding: 24px;
  gap: 24px;
}

.pomodoro-left {
  flex: 0 0 30%;
}

.pomodoro-right {
  flex: 1;
}

/* TIMER BOX */
.timer-box {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 51px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}


/* BACKGROUND SVG */
.timer-bg {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);


  opacity: 0.5;
  /* subtle premium look */

  pointer-events: none;
  /* prevent blocking clicks */
  z-index: 0;

}


/* CONTENT ABOVE */
.timer-box>*:not(.timer-bg) {
  position: relative;
  z-index: 1;
}

/* HEADER */
.timer-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timer-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* AUDIO BUTTON */
.audio-btn {
  width: 43px;
  height: 43px;
  background: #FFE2E4;
  border: none;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
}

/* EDIT ICON */
.edit-icon {
  width: 30px;
  height: 30px;
  cursor: pointer;
}

/* MODES */
.timer-modes {
  display: flex;
  gap: 16px;
  margin-top: 156px;
}

.mode-btn {
  height: 36px;
  padding: 0 56px;
  border-radius: 13px;
  border: 1px solid #410702;
  background: transparent;
  color: #410702;
  cursor: pointer;
}

/* ACTIVE MODE */
.mode-btn.active {
  background: #BB181D;
  color: white;
  border: none;
}

/* TIMER TEXT */
.timer-display {
  margin-top: 24px;
  font-size: 120px;
  font-family: "Poppins", sans-serif;
  color: #410702;
  text-align: center;
}

/* CONTROLS */
.timer-controls {
  margin-top: 24px;
  display: flex;
  gap: 16px;
}

/* PLAY BUTTON */
.play-btn {
  height: 38px;
  padding: 0 25px;
  background: #CE2026;
  border: none;
  border-radius: 20px;
  cursor: pointer;
}

.play-btn.active {
  background: #ffc1c5;
}

/* RESET BUTTON */
.reset-btn {
  height: 38px;
  padding: 0 25px;
  border: 1px solid #410702;
  background: transparent;
  border-radius: 20px;
  cursor: pointer;
}

/*---------------------------pomodoro right section ---------------------------------------------------*/

/* CONTAINER */
.custom-timers {
  width: 100%;
  background: #ffffff;
  border: 1px solid #DCDDE6;
  padding: 16px;
}

/* HEADER */
.timer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timer-card-header h4 {
  color: #410702;
}

/* INPUT GROUP */
.todo-input-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.todo-input-group input {
  flex: 1;
  height: 47px;
  border-radius: 12px;
  border: 1px solid #DCDDE6;
  padding: 0 16px;
  outline: none;
  font-family: var(--font-family-body);
}

.todo-input-group input:focus {
  border-color: #AB1017;
}

.add-todo-btn {
  width: 47px;
  height: 47px;
  border-radius: 12px;
  background: #FFE2E4;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.add-todo-btn:hover {
  background: #AB1017;
}

.add-todo-btn:hover img {
  filter: brightness(0) invert(1);
}

/* HR */
.custom-timers hr {
  margin: 17px 0;
  border: none;
  height: 1px;
  background: #DCDDE6;
}

/* LIST */
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

/* CUSTOM SCROLLBAR FOR TODO LIST */
.todo-list::-webkit-scrollbar {
  width: 4px;
}
.todo-list::-webkit-scrollbar-thumb {
  background: #DCDDE6;
  border-radius: 10px;
}

/* ITEM */
.todo-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  background: #fff;
  border: 1px solid #DCDDE6;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.todo-item:hover {
  border-color: #AB1017;
  transform: translateX(5px);
}

.todo-item.completed {
  background: #F8F9FA;
  opacity: 0.7;
}

/* CHECKBOX */
.todo-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #DCDDE6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-weight: bold;
  transition: all 0.2s ease;
}

.todo-item.completed .todo-checkbox {
  background: #AB1017;
  border-color: #AB1017;
}

/* TEXT */
.todo-text {
  flex: 1;
  font-size: 15px;
  color: #1C1C1C;
  transition: all 0.2s ease;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: #94A3B8;
}

/* DELETE */
.todo-delete {
  background: none;
  border: none;
  color: #DCDDE6;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.todo-delete:hover {
  color: #AB1017;
}

@media (max-width: 992px) {
  .custom-timers {
    margin-top: 24px;
  }

  .pomodoro-container {
    flex-direction: column;
  }

  /* TIMER GOES FIRST */
  .pomodoro-right {
    order: -1;
    width: 100%;
  }

  /* LEFT SECTION BELOW */
  .pomodoro-left {
    width: 100%;
  }

}

@media (max-width: 768px) {
  .pomodoro-container {
    transition: all 0.3s ease;
  }

  .timer-box {
    padding: 24px;
    border-radius: 30px;
  }

  .timer-display {
    font-size: 64px;
  }

  .timer-modes {
    margin-top: 60px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .mode-btn {
    padding: 0 14px;
    font-size: 12px;
  }
}

/*------------------------------------timer save pop ups----------------------------------------------------*/
/* overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);

  display: none;
  justify-content: center;
  align-items: center;

  z-index: 999;
}

/* modal box */
.modal {
  width: 400px;
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  border: 1px solid #E2E8F0;
}

/* header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-modal {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* body */
.modal-body {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  padding: 0 12px;
}

/* button */
.save-timer-btn {
  height: 44px;
  border-radius: 12px;
  background: #CE2026;
  color: white;
  border: none;
  cursor: pointer;
}

.timer-card {
  position: relative;
}


/*--------------------------------------------------Quiz UI---------------------------------------------------*/
.quiz-page {
  width: 100%;
  padding-top: 100px;
}

/* HEADER */
.quiz-header {
  display: flex;
  justify-content: flex-start;
  padding: 0 40px;
}

.return-btn {
  background: none;
  border: none;

  font-size: 16px;
  font-weight: 600;
  /* 🔥 more bold */
  color: #1C1C1C;

  cursor: pointer;

  display: flex;
  align-items: center;
  gap: 8px;

  transition: all 0.2s ease;
}

.return-btn:hover {
  color: #23415E;
  /* nice modern purple/blue */
  transform: translateX(-3px);
  /* slight move left */
}

.btn-primary.review-btn {
  background-color: #FFE2E4;
  color: #BB181D;
}

/* MAIN CONTAINER */
.quiz-container {
  display: flex;
  gap: 16px;
  padding: 0 40px;
}

/* LEFT SIDE */
.quiz-info {
  width: 20%;
  color: #1C1C1C;
}

.quiz-title {
  margin-bottom: 24px;
}

/* RIGHT SIDE */
.quiz-content-box {
  flex: 1;
  background: #FFFFFF;
  height: 516px;
  border-radius: 56px;
  border: 1px solid #E2E8F0;

  padding: 100px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* TITLE INSIDE BOX */
.quiz-content-title {
  text-align: left;
}

/* BUTTON AREA */
.quiz-action {
  display: flex;
  justify-content: flex-end;
}

.quiz-container,
.quiz-active,
.result-screen {
  transition: opacity 0.3s ease;
}

/*----------------------------------------active quiz---------------------------------------------------------------*/

/* FULL SCREEN STATE */
.quiz-active {
  width: 100%;
  min-height: 100vh;
  padding: 100px 40px;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.quiz-active-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

}

.quiz-progress {
  font-size: var(--font-size-base);
}

/* REPORT BUTTON */
.report-btn {
  background: none;
  border: none;
  font-size: var(--font-size-base);
  cursor: pointer;
  font-weight: 500;
}

/* QUESTION */
.quiz-question h4 {
  margin-bottom: 32px;
}

.quiz-sub {
  font-size: var(--font-size-base);
  margin-bottom: 32px;
}

/* ANSWERS */
.answers-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* SINGLE ANSWER */
.answer {
  width: 100%;
  height: 80px;
  background: #edf2f7;
  border-radius: 34px;

  display: flex;
  align-items: center;

  padding-left: 45px;
  cursor: pointer;

  transition: all 0.2s ease;
}

/* TEXT */
.answer h5 {
  margin: 0;
}

/* HOVER EFFECT */
.answer:hover {
  background: #d8dee7;
  transform: scale(1.01);
}

.answer.correct {
  background: #d1fae5 !important;
  transform: scale(1.03);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.answer.wrong {
  background: #fee2e2 !important;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}


.hidden {
  display: none !important;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #E2E8F0;
  border-radius: 20px;
  margin-top: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #6366F1;
  /* your primary color */
  border-radius: 20px;
  transition: width 0.4s ease;
}

.quiz-question,
.answers-container {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/*--------------------------review UI--------------------------------------------*/
.review-container {
  max-width: 800px;
  margin: auto;
  padding: 40px;
}

.review-item {
  margin-bottom: 32px;
}

.review-answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.review-answer {
  padding: 16px;
  border-radius: 16px;
  background: #edf2f7;
}

.review-answer.correct {
  background: #D4E5F5;
}

.review-answer.wrong {
  background: #FFE2E4;
  /* red */
}

/*---------------------------------------------------Flashcards-------------------------------------------------*/
.flash-page {
  width: 100%;
  padding-top: 100px;
}

/* HEADER */
.flash-header {
  display: flex;
  justify-content: flex-start;
  padding: 0 40px;
}

.flash-container {
  display: flex;
  gap: 16px;
  padding: 0 40px;
}

.flash-info {
  width: 20%;
  color: #1C1C1C;
}

.flash-title {
  margin-bottom: 24px;
}

/* RIGHT SIDE */
.flash-content-box {
  flex: 1;
  background: #FFFFFF;

  border-radius: 56px;
  border: 1px solid #E2E8F0;

  padding: 100px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.flash-content-title {
  text-align: left;
}

/* Container spacing (100px gap from question) */
.flash-answer {
  margin-top: 100px;
  display: flex;
  justify-content: flex-start;
}

/* Button styling */
.show-answer-btn {
  background-color: #FFE2E4;
  padding: 0 13px;
  height: 40px;
  border-radius: 20px;
  border: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Text inside button */
.show-answer-btn h6 {
  color: #BB181D;
}

/* BUTTON AREA */
.flash-actions {
  margin-top: 50px;

  display: flex;
  justify-content: flex-end;
  gap: 15px;
}


.rate {
  background-color: #E2E8F0;
  padding: 10px;
  border-radius: 15px;
  border: none;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

/* "Again / Hard / Good / Easy" */
.rate h6 {
  color: #BB181D;
}

/* "<1m / <6m ..." */
.rate p {
  color: rgba(187, 24, 29, 0.5);
  font-size: 12px;
  margin: 0;
}

.end-screen {
  padding: 40px;
}

.end-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
}

.end-subtitle {
  font-size: 18px;
  margin-bottom: 30px;
}

/* Progress container */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Base item */
.progress-item {
  display: flex;
  justify-content: space-between;
  padding: 15px 20px;
  border-radius: 20px;
  background: #f5f5f5;
}

/* Colors */
.progress-item.completed {
  background: #E5E7EB;
}

.progress-item.good {
  background: #ffffff;
  border: 1px solid #dbeafe;
}

.progress-item.hard {
  background: #f9f9f9;
}

.progress-item.again {
  background: #ffe4e6;
}

/* Text */
.progress-item span {
  font-weight: 500;
}

.progress-item strong {
  color: #1f4e79;
}

/* Restart button */
.restart-btn {
  margin-top: 40px;
  padding: 12px 24px;
  background: #c81e1e;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
}

/*--------------------------------------------Log in---------------------------------------------------*/




/* MAIN CONTAINER */
.auth-container {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* LEFT SIDE */
.auth-left {
  flex: 1;
  background: url("assets/images/authBg.png") center/cover no-repeat;
  position: relative;
  color: white;
  display: flex;
  align-items: flex-end;
  padding: 40px;
}

.auth-left .overlay {
  position: absolute;
  inset: 0;
}

.left-content {
  position: relative;
  max-width: 400px;
}

.left-content h1 {
  font-size: 28px;
  margin-bottom: 15px;
}

/* RIGHT SIDE */
.auth-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background: #fff;
}

.form-wrapper {
  width: 100%;
  max-width: 500px;
}


.subtitle {
  font-size: 12px;
  color: gray;
  margin-bottom: 25px;
}

/* FORM GRID */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group.full {
  grid-column: span 2;
}

label {
  font-size: 14px;
  margin-bottom: 5px;
}

input,
select {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  outline: none;
  background: #f5f6ff;
}

/* BUTTONS */
.buttons {
  grid-column: span 2;
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

button {
  flex: 1;
  padding: 12px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
}

.primary {
  background: red;
  color: white;
}

.secondary {
  background: white;
  border: 1px solid #ccc;
}

/* 📱 RESPONSIVE */
@media (max-width: 900px) {
  .auth-container {
    flex-direction: column;
  }

  .auth-left {
    height: 200px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .input-group.full {
    grid-column: span 1;
  }

  .buttons {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE OVERRIDES (MOBILE & TABLET)
   ═══════════════════════════════════════════════════════════════════════════ */

body {
    overflow-x: hidden; /* Prevent horizontal scroll */
}

@media (max-width: 1024px) {
    /* FOOTER */
    .footer-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-right {
        justify-content: flex-start;
        gap: 40px;
    }

    /* ABOUT SECTION */
    .about-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    /* USER DASHBOARD */
    .dashboard-content {
        flex-direction: column;
        margin-top: 80px;
    }

    .dashboard-left, .dashboard-right {
        width: 100%;
    }

    .dashboard-right {
        position: static;
        order: -1;
        margin-bottom: 20px;
    }

    /* NAV LINKS */
    .dashboard-links {
        gap: 20px;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .dashboard-links::-webkit-scrollbar {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE BOTTOM TAB BAR — Phone-first navigation
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ——— DASHBOARD NAVBAR → BOTTOM TAB BAR ——— */
    .dashboard-navbar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-bottom: none;
        border-top: 1px solid #E2E8F0;
        z-index: 1100;
    }

    .dashboard-navbar .dashboard-container {
        padding: 6px 4px;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    /* Hide the logo and support icon in bottom bar */
    .dashboard-navbar .logo,
    .dashboard-navbar .nav-right {
        display: none;
    }

    /* Tab bar layout */
    .dashboard-links {
        width: 100%;
        display: flex;
        justify-content: space-around;
        gap: 0;
        overflow-x: visible;
        padding-bottom: 0;
    }

    /* Individual tab items */
    .nav-item {
        flex-direction: column;
        align-items: center;
        gap: 2px;
        font-size: 10px;
        padding: 4px 0;
        min-width: 0;
        flex: 1;
    }

    .nav-item span {
        display: block !important;
        font-size: 10px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .nav-item img {
        width: 20px;
        height: 20px;
    }

    /* Remove underline effect in bottom bar */
    .nav-item::after {
        display: none;
    }

    .nav-item.active {
        font-size: 10px;
        color: #BB181D;
    }

    /* ——— GLOBAL SPACING FIXES ——— */
    /* Push content above the bottom tab bar */
    body {
        padding-bottom: 70px;
    }

    /* Reduce top margins since navbar is at bottom */
    .dashboard-content {
        margin-top: 20px;
        padding: 16px 14px;
    }

    .courses-header {
        margin-top: 20px;
    }

    .quiz-page {
        padding-top: 20px;
    }

    .flash-page {
        padding-top: 20px;
    }

    .pomodoro-container {
        margin-top: 20px;
        padding: 14px;
    }

    /* ——— LANDING PAGE NAVBAR (index.html) ——— */
    .nav-container {
        padding: 10px 16px;
        height: auto;
    }

    .nav-left {
        gap: 10px;
    }

    .logo img {
        height: 55px;
    }

    /* ——— HERO SECTION ——— */
    .hero-container {
        flex-direction: column;
        text-align: center;
        margin-top: 30px;
    }

    .hero-left h1 {
        font-size: 2rem;
        line-height: 1.2;
        max-width: 100%;
    }

    .hero-buttons {
        margin-top: 30px;
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .btn-play {
        justify-content: center;
    }

    /* ——— GENERAL SECTIONS ——— */
    .about, .teachers, .faq, .footer {
        margin-top: 60px;
    }

    .about-header h1, .teachers-left h2, .faq-left h2 {
        font-size: 1.8rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 30px;
    }

    /* ——— HOME DASHBOARD ——— */
    .welcome-section h1 {
        font-size: 1.8rem;
    }

    .welcome-section p {
        font-size: 0.9rem;
    }

    .section-header h3 {
        font-size: 1.3rem;
    }

    .feilds-buttons {
        gap: 6px;
        margin-top: 20px;
    }

    .filter-btn {
        padding: 0 14px;
        height: 38px;
        font-size: 0.85rem;
    }

    /* Pomodoro widget on home right sidebar */
    .pomodoro-timer {
        margin-top: 40px;
    }

    .pomodoro-actions {
        margin-top: 30px;
    }

    /* ——— COURSES / LIBRARY / GAMES ——— */
    .courses-container {
        grid-template-columns: 1fr;
        padding: 0 14px;
    }
    
    .course-card {
        min-width: 100%;
    }

    .course-search-bar input {
        width: 100%;
        max-width: 100%;
        height: 48px;
        font-size: 0.9rem;
    }

    .header-illustration {
        max-width: 80%;
        height: auto;
    }

    .filter-buttons {
        padding: 0 14px;
    }

    /* ——— QUIZ PAGE ——— */
    .quiz-header, .flash-header {
        padding: 0 16px;
    }

    .quiz-container {
        flex-direction: column;
        padding: 0 16px;
    }

    .quiz-info, .flash-info {
        width: 100%;
        display: flex;
        gap: 12px;
        align-items: baseline;
        margin-bottom: 12px;
    }

    .quiz-title, .flash-title {
        margin-bottom: 8px;
    }

    .quiz-content-box {
        height: auto;
        min-height: 300px;
        padding: 40px 24px;
        border-radius: 30px;
    }

    .quiz-active {
        padding: 20px 16px;
        min-height: auto;
    }

    .quiz-question h4 {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }

    .quiz-sub {
        margin-bottom: 16px;
        font-size: 0.9rem;
    }

    .answer {
        height: auto;
        min-height: 56px;
        padding: 14px 20px;
        border-radius: 20px;
    }

    .answer h5 {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .quiz-nav {
        flex-direction: row !important;
        gap: 10px !important;
        margin-top: 24px !important;
    }

    .quiz-nav .btn-primary {
        padding: 12px 16px !important;
        font-size: 0.9rem;
        border-radius: 16px;
    }

    /* Quiz result screen */
    .test-result h1 {
        font-size: 3rem !important;
    }

    .test-result h2 {
        font-size: 1.3rem;
    }

    /* ——— FLASHCARD PAGE ——— */
    .flash-container {
        flex-direction: column;
        padding: 0 16px;
    }

    .flash-content-box {
        padding: 24px 16px;
        border-radius: 30px;
    }

    .flash-card-outer {
        height: 220px;
        margin-top: 20px;
    }

    .flash-front, .flash-back {
        padding: 24px;
        border-radius: 20px;
    }

    .flash-front h2 {
        font-size: 1.2rem;
    }

    .flash-back h3 {
        font-size: 1.1rem;
    }

    .nav-controls {
        margin-top: 24px;
    }

    .nav-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* ——— POMODORO PAGE ——— */
    .timer-box {
        padding: 20px;
        border-radius: 24px;
    }

    .timer-display {
        font-size: 56px;
    }

    .timer-modes {
        margin-top: 40px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .mode-btn {
        padding: 0 20px;
        font-size: 0.8rem;
        height: 34px;
    }

    .timer-controls {
        margin-top: 20px;
    }

    /* Pomodoro todo sidebar */
    .custom-timers {
        border-radius: 16px;
        padding: 14px;
    }

    /* ——— CALCULATOR PAGE ——— */
    .calc-main-container {
        flex-direction: column;
        padding: 0;
    }

    .card, .side {
        border-radius: 20px;
        padding: 20px;
    }

    .card h1 {
        font-size: 1.5rem;
    }

    .result {
        font-size: 40px !important;
    }

    .subject {
        padding: 10px 14px;
        border-radius: 10px;
    }

    .subject input {
        width: 65px;
        padding: 6px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EXTRA SMALL PHONES (≤ 480px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .about-cards {
        grid-template-columns: 1fr;
    }

    .search-box h2 {
        font-size: 1.4rem;
    }

    .field {
        max-width: 100%;
        width: 100%;
    }

    .tag {
        font-size: 0.75rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    /* Bottom tab text even smaller */
    .nav-item span {
        font-size: 9px !important;
    }

    .nav-item img {
        width: 18px;
        height: 18px;
    }

    /* Dashboard spacing */
    .dashboard-content {
        padding: 12px 10px;
    }

    .welcome-section h1 {
        font-size: 1.5rem;
    }

    /* Quiz */
    .quiz-active {
        padding: 16px 12px;
    }

    .answer {
        padding: 12px 16px;
        min-height: 48px;
        border-radius: 16px;
    }

    /* Pomodoro */
    .timer-display {
        font-size: 44px;
    }

    .timer-modes {
        margin-top: 30px;
    }

    .mode-btn {
        padding: 0 14px;
        font-size: 0.75rem;
    }

    /* Flashcard */
    .flash-card-outer {
        height: 180px;
    }

    .flash-front h2 {
        font-size: 1rem;
    }

    .flash-back h3 {
        font-size: 0.95rem;
    }

    /* Calculator */
    .result {
        font-size: 32px !important;
    }

    .calc-btn {
        font-size: 0.95rem;
        padding: 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   iOS SAFE AREA — Bottom tab bar respects notch/home indicator
   ═══════════════════════════════════════════════════════════════════════════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .dashboard-navbar .dashboard-container {
            padding-bottom: calc(6px + env(safe-area-inset-bottom));
        }

        body {
            padding-bottom: calc(70px + env(safe-area-inset-bottom));
        }
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN RESPONSIVE FIXES
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 850px) {
    .admin-layout {
        display: block !important;
    }

    .admin-sidebar {
        padding: 15px;
        flex-direction: row !important;
        overflow-x: auto;
        white-space: nowrap;
        gap: 10px !important;
        border-right: none;
        border-bottom: 1px solid #eee;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .admin-sidebar > div {
        display: none;
    }

    .nav-btn, .nav-btn-exit {
        padding: 10px 15px;
        width: auto !important;
        white-space: nowrap;
    }

    .admin-main {
        padding: 15px;
    }
    
    .section-card {
        padding: 20px;
        border-radius: 12px;
    }

    .data-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}