/* =========================
   FOOTER CATEGORIES
========================= */

.totl-footer-course-cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.totl-footer-course-cats li {
    margin: 0;
}

.totl-footer-course-cats a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    padding: 8px 12px;
    transition: color 0.2s ease;
}

.totl-footer-course-cats a:hover {
    color: #8cc500;
}

@media (max-width: 768px) {
    .totl-footer-course-cats {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}


/* =========================
   MAIN MENU LAYOUT (DESKTOP)
========================= */

.totl-custom-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.totl-custom-menu li {
    position: relative;
}

.totl-custom-menu a {
    text-decoration: none;
    color: #333;
    padding: 10px 20px;
    display: block;
    font-weight: 500;
    transition: color 0.2s ease;
}

.totl-custom-menu a:hover {
    color: #8cc500;
}


/* =========================
   MEGA MENU (DESKTOP)
========================= */

.totl-custom-menu li:hover > .mega-menu {
    display: block;
    animation: menuFade 0.2s ease-out;
}

.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    width: 750px; /* Slightly wider to accommodate the 75/25 layout beautifully */
    max-width: 95vw;
    z-index: 1000;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    overflow: hidden;
}

.mega-menu-content {
    display: flex;
    flex-direction: column;
    background: #fff;
}


/* =========================
   ABOUT US - SPECIFIC LAYOUT
========================= */

/* Optional: Ensure the parent wrapper aligns the columns side-by-side */
.mega-menu-content {
    display: flex;
    align-items: stretch; /* Makes both left and right columns equal height */
	flex-direction: row;
}

.mega-menu-banner {
    flex: 1; /* Sets this as the smaller column */
    min-height: 140px;
    background-color: #f8fafc;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 1.5rem; /* Standardized padding */
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.mega-menu-banner p {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0.5rem 0 1.5rem 0;
    line-height: 1.5;
}

.mega-menu-banner > * {
    position: relative;
    z-index: 1;
	font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.about-grid {
    flex: 2; /* Takes up twice the space as the banner */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    padding: 1.5rem 2rem;
}

.menu-item-description {
    font-size: 0.85rem;
    color: #666666;
    margin: 0.25rem 0 0 0;
    line-height: 1.4;
}

.static-menu-item {
    min-height: 100px;
}

.static-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-weight: 600;
    color: #222;
    font-size: 14px;
    border-bottom: 1px solid transparent;
}

.totl-custom-menu .static-menu-header .parent-link {
    padding: 0; 
    color: inherit;
    flex: 1;
}

.static-menu-header:hover {
    color: #8cc500;
}

/* =========================
   OUR COURSES (75/25 LAYOUT)
========================= */

.courses-mega-wrapper {
    display: flex;
    flex-direction: row;
}

.courses-left-col {
    width: 75%;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.courses-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    flex-grow: 1;
}

/* Dynamic Right Column */
.courses-right-col {
    width: 25%;
    background-color: #f8fafc;
    border-left: 1px solid #e5e7eb;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.dynamic-info-block {
    text-align: center;
    width: 100%;
}

.dynamic-image-wrap {
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.dynamic-image-wrap img {
    max-width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.dynamic-info-block h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.dynamic-info-block p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.view-all-left {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    text-align: left;
}

.view-all-left a {
    color: #53c510;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}


/* =========================
   CSS ACCORDION
========================= */

.accordion-item {
    margin-bottom: 5px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-weight: 600;
    color: #222;
    font-size: 14px;
}

.accordion-header .parent-link {
    color: inherit;
    text-decoration: none;
    flex: 1;
    padding: 0;
}

.accordion-header:hover {
    color: #8cc500;
}

.toggle-icon {
    font-size: 1.3rem;
    font-weight: 300;
    color: #666;
    display: inline-block;
    transition: transform 0.2s ease;
}

.toggle-icon-label {
    padding-left: 10px;
}

/* CSS Checkbox Hack */
.totl-accordion-toggle:checked ~ .accordion-header .toggle-icon {
    transform: rotate(45deg); /* Turns the + into an x when open */
    color: #8cc500;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
    padding: 0 10px;
    opacity: 0;
}

.totl-accordion-toggle:checked ~ .accordion-content {
    max-height: 800px; /* arbitrary high number */
    padding: 5px 10px 15px 10px;
    opacity: 1;
}

.accordion-content a.child-link {
    display: block;
    padding: 6px 0;
    color: #555;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.accordion-content a.child-link:hover {
    color: #8cc500;
    padding-left: 6px;
}


/* =========================
   STATIC LINKS
========================= */

.mega-menu-links {
    padding: 1rem 2rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.mega-menu-links a {
    color: #53c510;
    font-weight: 500;
}


/* =========================
   MOBILE MENU & RESPONSIVE
========================= */

.totl-menu-toggle {
    display: none;
    background: #fff;
    border-radius: 25px;
    padding: 10px 14px;
    border: 1px solid #eee;
    color: #232323;
    font-size: 16px;
    margin-bottom: 10px;
}

.totl-custom-menu ul.totl-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 991px) {
    .courses-mega-wrapper {
        flex-direction: column;
    }
    
    .courses-left-col, .courses-right-col {
        width: 100%;
        border-left: none;
    }
    
    .courses-right-col {
        border-top: 1px solid #e5e7eb;
        padding: 1.5rem 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .totl-menu-toggle {
        display: block;
    }

    .totl-custom-menu ul.totl-menu {
        display: none;
        flex-direction: column;
        background: #fff;
        border-radius: 25px;
        padding: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }

    .totl-custom-menu ul.totl-menu.open {
        display: flex;
        animation: menuFade 0.2s ease-out;
    }

    .totl-custom-menu ul.totl-menu li a {
        color: #232323;
        display: flex;
        justify-content: space-between;
        padding: 12px 14px;
        text-decoration: none;
    }

    /* Hide mega menu features on mobile dropdown */
    .mega-menu {
        display: none !important;
    }

    .courses-grid-2col {
        grid-template-columns: 1fr;
    }
}


/* =========================
   ANIMATION
========================= */

@keyframes menuFade {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}