main, header, footer{
  max-width: 1440px;
  margin: 0 auto;
  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;
}



/* Page-specific styles */



/* Outer wrapper still light gray */
.page-flight-instruction .columns-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;               /* space between columns */
  padding: 1.5rem;         
  border-radius: 12px;
}

/* Individual columns with white background and padding */
.page-flight-instruction .column {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #3bccd4; /* white background for each column */
  padding: 1rem 1.5rem 1.5rem 1.5rem;  
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* subtle shadow to lift columns */ 
  border: 2px solid #f52a27;  /* border around column */
}

/* Grid items (image + label) clickable area */
.page-flight-instruction .grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #f52a27;
  border: 2px solid #f52a27;  /* border around image + label */
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;            /* indicate clickable */
  transition: transform 0.2s, box-shadow 0.2s;
}

.page-flight-instruction .grid-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.page-flight-instruction h2 {
  text-align: center;
  margin-bottom: 1rem;
}

/* Links inside .grid-item-link should have blue color and underline */
.page-flight-instruction .grid-item-link h3 {
    color: blue; /* Blue text */
    text-decoration: underline; /* Underlined */
}

/* Optional: Change the color on hover for a subtle effect */
.page-flight-instruction .grid-item-link:hover h3 {
    color: darkblue; /* Darker blue on hover */
}

/* Ensure that the link itself (not just h3) does not mess with the styles */
.page-flight-instruction .grid-item-link {
    text-decoration: none;  /* Avoid underline being removed on hover */
    color: inherit; /* Inherit color from h3 */
}

.page-flight-instruction .grid-2x2,
.page-flight-instruction .grid-1x2 {
  display: grid;
  gap: 1rem;
  width: 100%;
}

.page-flight-instruction .grid-2x2 {
  grid-template-columns: repeat(2, 1fr);
}

.page-flight-instruction .grid-1x2 {
  grid-template-columns: repeat(2, 1fr);
}

.page-flight-instruction .grid-item img {
  width: 100%;
  height: 200px; /* same height for all images */
  object-fit: cover;
  border-radius: 12px;
}

/* Shift just the Flight Review image up so bottom is more visible */
.page-flight-instruction .grid-item img.flt-rvw {
  object-position: center bottom; /* aligns bottom part of image */
}
.page-flight-instruction .grid-item h3 {
  text-align: center;
  margin-top: 0.5rem;
}

.page-flight-instruction .grid-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: 12px;
  overflow: hidden;
}

.ifr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.ifr-grid table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  /* background-color: #f9f9f9; */
  border: 1px solid #ddd;
}

.ifr-grid th {
  font-weight: bold;
  background-color: #e0e0e0;
  padding: 1px;
}

.ifr-grid td {
  padding: 1px;
  border-top: 1px solid #ccc;
}

/*   --------------
   Mobile Devices
   ----------------- */

   @media (max-width: 700px) {
  /* Stack main columns vertically */
  .page-flight-instruction .columns-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem;
  }

  /* Stack grid items into a single column */
  .page-flight-instruction .grid-2x2,
  .page-flight-instruction .grid-1x2 {
    grid-template-columns: 1fr;
  }

  /* Reduce image height for better fit on small screens */
  .page-flight-instruction .grid-item img {
    height: 180px;
  }

  /* Slightly smaller text for mobile */
  .page-flight-instruction h2 {
    font-size: 1.5rem;
  }

  .page-flight-instruction .grid-item h3 {
    font-size: 1rem;
  }

  /* Optional: tighten vertical padding */
  .page-flight-instruction .column {
    padding: 1rem;
  }

    .page-flight-instruction table td {
    line-height: 1.75;
  }
}

/* -------------------
      TABLET DEVICES
      -------------------- */

/* Tablet view: Keep single column layout, but 2x2 grids inside */
@media (min-width: 744px) and (max-width: 1024px) {
  .page-flight-instruction .columns-wrapper {
    grid-template-columns: 1fr;
  }

  .page-flight-instruction .grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-flight-instruction .column {
    max-width: 700px;
    margin: 0 auto;
  }
}
