main, header, footer{
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}


/* Reset layout width and padding */
.container,
.main-content,
#main-content {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: auto !important;
  
}

/* Main wrapper */
.learn-page {
  width: 100%;
}

/* ========== HEADER SECTION ========== */
.learn-header-row {
  display: flex;
  width: 100%;
  margin-bottom: 40px;
}

.learn-header a {
    color: #FF0000; /* bright red */
    text-decoration: underline; /* optional */
}

/* Visited link inside the learn-header */
.learn-header a:visited {
    color: #FFFF00; /* bright yellow */
}

/* Empty space for left side (20%) */
.learn-left-space {
  width: 0%;
}

.learn-header-container {
  width: 100%;
  display: flex;           /* enable flex for horizontal centering */
  justify-content: center; /* center the header block */
}

.learn-header {
  background-color: #007BFF;
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin: 12px 15px 0px 12px;
  text-align: center;      /* centers the H1 by default */
  width: 100%;
}

.learn-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}



/* ========== SHARED STYLES FOR CONTENT ROWS ========== */
.learn-content-row,
.learn-row {
  display: flex;
  width: 100%;
  margin-bottom: 15px;
  margin-top: 20px;
}

/* Image column */
.learn-image {
  width: 20%;
  min-width: 150px;
  /* display: flex;        /* keeps image aligned with text */
  /* align-items: stretch; /* image matches text height */
}

.learn-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid red;      /* Thin red border */
  object-fit: cover;        /* crop instead of squish */
  margin-left: 15px;
}

/* Text column */
.learn-text {
  width: 80%;
  margin-left: 20px;
  margin-right: 20px;
  padding: 20px;
    background-color: #3bccd4;   /* White content background for contrast */
      border: 2px solid #f52a27;  /* border around column */
  box-shadow: 0 0 10px rgba(0,0,0,0.1); /* Soft shadow for separation */
  border-radius: 8px;        /* Rounded corners */
}


.learn-text h2 {
  font-size: 1.75rem;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 10px;
}

.learn-text p {
  font-size: 1rem;
  line-height: 1.5;
}

.learn-text ul {
  padding-left: 20px;
  margin-top: 0;
}

.learn-text ul li {
  margin-bottom: 10px;
  margin-top: 10px;
}

.learn-text ul ul {
  padding-left: 20px;
}

.learn-text ul ul li {
  margin-bottom: 8px;
}

/* highlight style */
.highlight-box {
  background-color: #Eb2E09;
  color: white;
  padding: 10px 15px;
  margin-right: 40px;
  border-radius: 8px;
  margin-top: 15px;
  font-weight: bold;
  text-align: center;  /* or left if you prefer */
}

.highlight-box-green {
  /* display: inline-block; */ /* just makes the text area and not the whole row */
  background-color: green;
  color: white;
  padding: 0.2em 0.5em;
  border-radius: 4px;
}


.highlight-box a {
  color: white
}

.highlight-box a:visited {
  color: white;
}

/* ========= ADAPT FOR SMALL SCREENS ============ */

@media (max-width: 500px) {
  /* Stack image above text */
  .learn-content-row {
    flex-direction: column;
    align-items: center; /* center children horizontally */
  }

  /* Image: about 50% viewport width */
  .learn-image {
    width: 50vw;          /* 50% of viewport width */
    min-width: auto;      /* remove min-width */
    margin: 0 0 1rem 0;   /* margin bottom for spacing */
  }

  .learn-image img {
    width: 100%;          /* fill container width */
    height: auto;         /* keep aspect ratio */
    margin-left: 0;       /* remove left margin */
    border-radius: 8px;
  }

  /* Text: full width minus small margin */
  .learn-text {
    width: calc(100vw - 2rem); /* full viewport width minus 2rem margin */
    margin: 0 1rem;             /* left/right margin for breathing room */
    padding: 1rem 1rem 1.5rem 1rem; /* reduce padding a bit for mobile */
  }
}
