/* =========================================
   1. GLOBAL RESET & VARIABLES
   ========================================= */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Khula:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600&display=swap');

:root {
    --primary-color: #1a237e; /* Deep Blue */
    --primary-dark: #000051;
    --accent-color: #d81b60; /* Pink/Red accent */
    --action-color: #ff9800; /* Orange/Yellow */
    --action-hover: #f57c00;
    --secondary-color: #ffffff;
    --text-color: #333333;
    --light-bg: #f9f9f9;
    --border-color: #e0e0e0;
    --footer-bg: #e6e6e6;
    --footer-text: #283593;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { overflow-x: hidden; width: 100%; }

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. HEADER & NAVIGATION (Desktop Default)
   ========================================= */
header {
    background-color: var(--secondary-color);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo img { height: 60px; width: auto; }

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-item {
    position: relative;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.nav-link {
    color: #333;
    padding: 30px 5px;
    display: block;
    cursor: pointer;
}

.nav-link:hover, .nav-item.active .nav-link {
    color: var(--accent-color);
}

/* --- DROPDOWN MENUS (Desktop) --- */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 280px;
    border-top: 3px solid #ff2d55;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    padding: 0;
    z-index: 1001;
}

.submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 280px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-top: 3px solid #ff2d55;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    text-transform: none;
}

.dropdown-item:hover {
    background-color: #f9f9f9;
    color: #ff2d55;
    border-left: 3px solid #ff2d55;
    padding-left: 17px;
}

.has-submenu { position: relative; }
.d-flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Show dropdown on hover ONLY for Desktop */
@media (min-width: 993px) {
    .nav-item:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
    .has-submenu:hover > .submenu { display: block; }
}

/* Mobile Toggle */
.menu-toggle { display: none; font-size: 24px; cursor: pointer; color: var(--primary-color); }

/* =========================================
   3. GENERAL PAGE ELEMENTS
   ========================================= */
.page-title-bar {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 40px 0;
}
.page-title-bar h1 { margin: 0; font-size: 2.2rem; font-weight: 700; }

section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2rem; color: var(--primary-color); margin-bottom: 20px; font-weight: 700; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(to right, #ffb74d, #ff9800);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.btn:hover { background: linear-gradient(to right, #ff9800, #f57c00); transform: translateY(-2px); }
.btn-small { padding: 8px 20px; font-size: 0.8rem; }

/* =========================================
   4. HOME PAGE & GRIDS
   ========================================= */
.hero-container {
    position: relative; width: 100%; height: 600px;
    background: url('../images/hero-chefs.png') no-repeat center center/cover;
    display: flex; align-items: center; justify-content: center;
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.1); }
.hero-banner { 
    position: relative; background-color: rgba(26, 35, 126, 0.95); 
    color: white; width: 100%; text-align: center; padding: 40px 20px; margin-top: 100px; 
}
.hero-banner h1 { font-size: 2.5rem; font-weight: 700; max-width: 800px; margin: 0 auto; line-height: 1.2; }
.hero-subtext { text-align: center; padding: 60px 20px; max-width: 900px; margin: 0 auto; font-size: 1rem; color: #666; line-height: 1.8; }

/* Icon Grid (Desktop) */
.icon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.icon-item { display: flex; flex-direction: column; align-items: center; }
.icon-item img { max-width: 120px; margin-bottom: 15px; }
.icon-item h3 { font-size: 1rem; color: #222; font-weight: 600; }

/* Why Us */
.bg-blue { background-color: #64b5f6; padding: 100px 0; }
.white-card { background: #fff; border-radius: 12px; padding: 50px 60px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); max-width: 1100px; margin: 0 auto; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 35px 60px; }
.why-item { display: flex; align-items: flex-start; gap: 15px; }
.why-icon { font-size: 28px; color: #1a237e; min-width: 32px; }
.why-content h3 { font-size: 1rem; margin-bottom: 6px; font-weight: 700; }
.why-content p { font-size: 0.9rem; color: #555; }

/* Programs */
.program-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 100px; text-align: center; margin-bottom: 70px; }
.program-col h3 { color: #ffa726; font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; }
.program-col h4 { color: #ffa726; font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.cta-section { text-align: center; margin-top: 60px; }

/* =========================================
   5. ABOUT PAGE STYLES
   ========================================= */
.about-intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-image { width: 100%; margin: 40px 0; border-radius: 4px; }
.asqa-highlight { background-color: #f0f4f8; color: #273386; padding: 25px; border-radius: 8px; max-width: 900px; margin: 50px auto; text-align: center; font-weight: 600; }

.mission-wrapper { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; border-top: 3px solid #e4d3a6; border-bottom: 3px solid #e4d3a6; box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); padding: 50px 0; margin: 60px 0; background: #fff; }
.mission-content { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }

.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; margin-top: 40px; }
.value-item img { height: 80px; width: auto; margin: 0 auto 15px; }
.value-item h3 { color: var(--primary-color); margin-bottom: 10px; }

.funded-programs { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-top: 40px; text-align: center; }
.funded-program h3 { font-size: 1.8rem; font-weight: 800; color: #1f2a7c; margin-bottom: 10px; }
.funded-program h4 { font-size: 1.2rem; font-weight: 700; color: #1f2a7c; margin-bottom: 10px; }

/* =========================================
   6. CONTACT & OTHER PAGES
   ========================================= */
.contact-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.contact-form label { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; color: #333; margin-bottom: 8px; display: block; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; background-color: #fff; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Learners */
.learners-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; }
.learner-sidebar { background-color: #f5f5f5; }
.learner-tab { display: block; padding: 15px 20px; color: #555; border-bottom: 1px solid #e0e0e0; font-weight: 600; cursor: pointer; }
.learner-tab.active { background-color: var(--primary-color); color: white; }
.content-section { display: none; }
.content-section.active { display: block; }

/* Employers */
.employer-hero { background-color: #8c9eff; color: white; padding: 60px 0; }
.employer-hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

/* Support */
.support-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; margin: 50px 0; }
.support-item { display: flex; gap: 20px; }
.support-icon { font-size: 2rem; color: #ffb74d; min-width: 40px; }

/* Course List */
.course-list-item { display: flex; align-items: center; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.08); margin-bottom: 30px; border-radius: 4px; overflow: hidden; }
.course-list-img { width: 200px; height: 150px; object-fit: cover; flex-shrink: 0; }
.course-list-content { padding: 20px 30px; flex-grow: 1; }
.course-action { padding: 0 30px; flex-shrink: 0; }

/* =========================================
   7. FOOTER
   ========================================= */
.site-footer { background-color: var(--footer-bg); color: var(--footer-text); padding: 50px 5% 20px 5%; font-size: 15px; position: relative; }
.footer-content { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; max-width: 1400px; margin: 0 auto; gap: 40px; }
.footer-col-logo, .footer-col-contact, .footer-col-address { flex: 1; min-width: 250px; }
.footer-logo-img { max-width: 280px; }
.footer-col-contact, .footer-col-address { display: flex; flex-direction: column; gap: 15px; }
.contact-label { font-weight: 700; color: #283593; margin-right: 5px; }
.contact-link { color: #283593; text-decoration: underline; font-style: italic; }
.footer-socials { margin-top: 15px; display: flex; gap: 15px; }
.footer-socials a { color: #283593; font-size: 18px; }
.campus-block h3 { font-size: 16px; font-weight: 700; margin-bottom: 5px; color: #283593; }
.footer-bottom { margin-top: 50px; text-align: center; font-weight: 600; color: #4a5a8a; }
.scroll-top-btn { position: fixed; bottom: 30px; right: 30px; background-color: #fdb94e; color: #283593; width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 99; transition: background 0.3s; }

/* =========================================
   8. RESPONSIVE MEDIA QUERIES (Unified)
   ========================================= */

/* Tablet & Mobile (Max Width 992px) */
@media (max-width: 992px) {
    .navbar { padding: 10px 0; height: auto; }
    
    /* ADDED MARGIN TO MOVE HAMBURGER LEFT */
    .menu-toggle { 
        display: block; 
        margin-right: 15px; /* Moves icon away from right edge */
    }

    /* Mobile Navigation */
    .nav-links {
        display: none; /* Hidden by default */
        flex-direction: column;
        width: 100%;
        background: white;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 999;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    .nav-links.active { display: flex !important; }
    .nav-link { padding: 15px 20px; border-bottom: 1px solid #eee; width: 100%; }

    /* Mobile Dropdowns */
    .dropdown-menu, .submenu {
        position: static !important;
        box-shadow: none !important;
        border-top: none !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none; /* Hidden by default, JS toggles 'active' */
        width: 100% !important;
        padding-left: 20px;
        background-color: #f9f9f9;
    }
    .dropdown-menu.active, .submenu.active { display: block !important; }
    
    /* Grids to 2 Columns */
    .icon-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: 1fr; gap: 30px; }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .program-cols { grid-template-columns: 1fr; gap: 50px; }
    
    /* Layouts */
    .contact-page-grid, .employer-hero-content, .learners-layout { grid-template-columns: 1fr; }
    .hero-container { height: auto; padding: 100px 0 50px; }
    .about-intro-grid { grid-template-columns: 1fr; }
    .mission-content { grid-template-columns: 1fr; gap: 30px; }
    .funded-programs { grid-template-columns: 1fr; gap: 40px; }
    
    /* Course List */
    .course-list-item { flex-direction: column; text-align: center; }
    .course-list-img { width: 100%; height: 220px; }
    .course-action { padding: 20px 0; }
    
    /* Footer */
    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer-col-logo, .footer-col-contact, .footer-col-address { width: 100%; align-items: center; }
    .footer-socials { justify-content: center; }
}

/* Mobile Phones (Max Width 768px) */
@media (max-width: 768px) {
    /* --- STRICT CENTERING FOR ICONS --- */
    .icon-grid { 
        grid-template-columns: 1fr !important; /* Force Single Column */
        justify-items: center !important;     /* Center items horizontally in grid */
        gap: 40px;
    }
    
    .icon-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center !important;  /* Center content inside the flex box */
        text-align: center !important;   /* Center the text */
    }

    /* Force the image to center even if it behaves like a block */
    .icon-item img {
        margin: 0 auto 15px auto !important;
        max-width: 120px; 
    }

    /* Other Mobile Styles */
    .hero-banner h1 { font-size: 1.6rem; }
    .form-row { grid-template-columns: 1fr; }
    .support-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: 1fr; }
}