/* ========================================================================
   Mobile Offcanvas Menu - Hide Submenus by Default
 ========================================================================== */

/* Mobile navbar styling */
@media (max-width: 767px) {
  .tm-navbar:not(.uk-navbar-attached) {
      border-radius: 0;
      background-color: #45626b;
      padding: 8px 0px 8px 0px;
  }


/* Navbar toggle button color */
.uk-navbar-toggle {
  color: #ffffff;
}

/* Offcanvas bar background */
.uk-offcanvas-bar {
  background: #64a45b;
}

/* Offcanvas navigation link colors */
.uk-nav-offcanvas > li > a {
  color: #ffffff;
}

/* Active menu item styling */
html .uk-nav.uk-nav-offcanvas > li.uk-active > a {
  background: #ffffff;
  color: #444444;
}

/* Hide child menu items (uk-nav-sub) by default in offcanvas */
.uk-offcanvas .uk-nav-sub {
display: none !important;
padding-left: 15px;
}

/* Show child menu items when parent has uk-open class */
.uk-offcanvas li.uk-open > .uk-nav-sub {
display: block !important;
background-color: #f5f5f5;
}

/* Submenu link colors */
.uk-nav-offcanvas ul a {
  color: #444444;
}

/* Make parent menu items look clickable */
.uk-offcanvas li.uk-parent > a {
  cursor: pointer;
  position: relative;
  padding-right: 40px; /* Make room for the toggle icon */
}

/* Add dropdown arrow icon as a separate clickable element */
.uk-offcanvas li.uk-parent > a::after {
  content: "\f105";
  font-family: FontAwesome;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-30%);
  transition: transform 0.2s ease;
  cursor: pointer;
  padding: 10px;
  margin: -10px; /* Expand clickable area */
}

/* Rotate arrow when menu is expanded */
.uk-offcanvas li.uk-open > a::after {
  transform: translateY(-50%) rotate(90deg);
}

/* Style child menu items with indent */
.uk-offcanvas .uk-nav-sub li > a {
padding-left: 30px;
font-size: 13px;
}

/*.uk-offcanvas .uk-nav-sub li > a:hover {*/
/*  background-color: #1fa2d6;*/
/*  color: #ffffff;*/
/*}*/

/* Custom offcanvas styling */
.custom_offcanvas {
  background: #64a45b !important;
}

.custom_offcanvas .uk-button.uk-button-primary {
  background-color: #ffffff !important;
  color: #444444 !important;
}


.uk-nav-offcanvas > .uk-open > a, html:not(.uk-touch) .uk-nav-offcanvas > li > a:hover, html:not(.uk-touch) .uk-nav-offcanvas > li > a:focus {
    background: #64a45b !important;
    color: #ffffff !important;
    outline: none;
}

.uk-responsive-height {
    width: 110px !important;
  }

}



/* ========================================================================
   CSS for making pages responsive
   ========================================================================== */
@media (max-width: 768px) {

  /* Home page module */
  .card-container > p:first-child span { font-size: 28px !important; }
  .card-container img { width: 100% !important; height: auto; }
  .card-container p[style*="margin-left: 30px"] { margin: 0 15px !important; }

  table.jlmslist { font-size: 14px; }
  table.jlmslist tr { display: block; margin-bottom: 15px; }
  table.jlmslist td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }
  table.jlmslist td:first-child { background: #b3d3ae !important; font-weight: bold; }

  .custombuttonslink p {
    float: none !important;
    width: 90% !important;
    margin: 10px auto !important;
    display: block;
    font-size: 20px !important;
    padding: 18px 0 !important;
  }
  
  a.mod-slideshow--btn.btn{
      height:auto;
  }

  /* Schools-Intro page */
  p > a > img[src*="home23.png"] { width: 100% !important; height: auto; }
  h3 { font-size: 20px !important; line-height: 1.4 !important; }

  /* Pricing table scroll – only on schools page */
  table.assignments.table-bordered:last-of-type,
  table.assignments[style*="18px"]:last-of-type {
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    font-size: 14px !important;
  }
  table.assignments.table-bordered:last-of-type td,
  table.assignments[style*="18px"]:last-of-type td {
    min-width: 120px;
    padding: 8px 6px !important;
  }

  /* Course Guides – Economics & Science buttons (merged) */
  .uk-grid > div[class*="uk-width-medium-1-2"] {
    width: 100% !important;
    margin-bottom: 20px;
  }
  .button.btn-green,
  .button.btn-green.button-nonsolid {
    display: block !important;
    width: 90% !important;
    max-width: 360px;
    margin: 0 auto !important;
    padding: 16px 20px !important;
    font-size: 18px !important;
  }
  
  p[style*="font-size: 34.5pt"] span,
  p span[style*="34.5pt"],
  span[style*="font-size: 34.5pt"] {
    font-size: 26px !important;   
    line-height: 1.2 !important;
  }

  /* Optional slideshow */
  .mod-slideshow { min-height: 400px; }
}



/* ========================================================================
    Homepage full mobile fixes
   ========================================================================== */


@media (max-width: 768px) {
  /* Hero image full width */
  .hero img, .main-banner img { width: 100% !important; height: auto; }

  /* Navigation - offcanvas*/
  .uk-navbar-nav > li { float: none; display: block; }

  /* Content grids stack */
  .uk-grid > div[class*="uk-width-"] { width: 100% !important; margin-bottom: 20px; }

  /* Images everywhere */
  img { max-width: 100% !important; height: auto !important; }

  /* Tables scrollable */
  /*table { display: block; overflow-x: auto; white-space: nowrap; }*/

  /* Buttons larger */
  .btn, a.button { padding: 12px 20px !important; font-size: 16px !important; min-height: 44px; }

  /* Text adjustments */
  h1 { font-size: 24px !important; }
  h2 { font-size: 20px !important; }
  h3 { font-size: 18px !important; }
  p { font-size: 16px !important; line-height: 1.5; }

  /* Footer columns stack */
  .uk-container .uk-grid > div { width: 100% !important; text-align: center; }

  /* Fix any fixed widths */
  .fixed-width { width: 100% !important; }
}
