/* NEP HOMEPAGE STYLES */


#it-home {
    --blue: #0879e8;
    --blue-dark: #075fc0;
    --white: #ffffff;
    --text: #252a31;
    --muted: #586470;
    --border: #d9e0e6;

    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: hidden !important;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--text);
    background: #ffffff;
}

#it-home,
#it-home * {
    box-sizing: border-box;
}

#it-home a {
    text-decoration: none;
}

#it-home .wrap,
#it-home .hero-inner {
    width: calc(100% - 40px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
}


/* HEADER */

#it-home .site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

#it-home .header-inner {
    min-height: 82px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px !important;
}

#it-home .brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 0 1 42% !important;
}

#it-home .brand img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    flex: 0 0 74px;
}

#it-home .brand-title {
    color: var(--text);
    font-size: 25px !important;
    line-height: 1.05 !important;
    font-weight: 400 !important;
    margin: 0 !important;
}

#it-home .nav {
    display: flex;
    align-items: center;
    flex: 1 1 58% !important;
    justify-content: flex-end !important;
    gap: 24px !important;
    flex-wrap: nowrap !important;
}

#it-home .nav a {
    color: var(--text) !important;
    font-size: 16px !important;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap !important;
}

#it-home .nav a:hover {
    color: var(--blue) !important;
}


/* HERO */

#it-home .hero {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border);
}

#it-home .hero-inner {
    display: grid !important;
    grid-template-columns:
        minmax(0, 0.92fr)
        minmax(0, 1.08fr) !important;
    gap: 30px !important;
    align-items: center !important;
    padding: 24px 0 20px !important;
}

#it-home .hero-copy,
#it-home .hero-image {
    min-width: 0 !important;
}

#it-home .hero-label {
    margin-bottom: 8px !important;
    color: var(--blue);
    font-size: 17px !important;
    line-height: 1.2 !important;
    font-weight: 750;
}

#it-home .hero h1 {
    max-width: 620px !important;
    margin: 0 !important;
    color: var(--text);
    font-size: 42px !important;
    line-height: 1.04 !important;
    letter-spacing: -1px;
    font-weight: 400 !important;
}

#it-home .hero p {
    max-width: 650px !important;
    margin: 18px 0 !important;
    color: var(--text);
    font-size: 17px !important;
    line-height: 1.48 !important;
}

#it-home .hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap !important;
}

#it-home .button {
    display: inline-block;
    padding: 12px 22px !important;
    border-radius: 9px;
    font-size: 16px !important;
    font-weight: 750;
}

#it-home .button-primary {
    background: var(--blue);
    border: 1px solid var(--blue);
    color: #ffffff !important;
}

#it-home .button-primary:hover {
    background: var(--blue-dark);
    color: #ffffff !important;
}

#it-home .hero-image {
    width: 100% !important;
    height: 355px !important;
    overflow: hidden !important;
}

#it-home .hero-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center bottom !important;
}


/* TABLET */

@media (max-width: 900px) {

    #it-home .wrap,
    #it-home .hero-inner {
        width: calc(100% - 32px) !important;
    }

    #it-home .header-inner {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 12px 0 16px !important;
    }

    #it-home .brand,
    #it-home .nav {
        flex: none !important;
        width: 100% !important;
    }

    #it-home .nav {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    #it-home .hero-inner {
        grid-template-columns: 1fr !important;
    }

    #it-home .hero-image {
        height: auto !important;
    }

    #it-home .hero-image img {
        height: auto !important;
    }
}


/* MOBILE */

@media (max-width: 560px) {

    #it-home .wrap,
    #it-home .hero-inner {
        width: calc(100% - 24px) !important;
    }

    #it-home .brand img {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
    }

    #it-home .brand-title {
        font-size: 21px !important;
    }

    #it-home .nav {
        gap: 12px 18px !important;
    }

    #it-home .nav a {
        font-size: 15px !important;
    }

    #it-home .hero h1 {
        font-size: 36px !important;
    }
}



#it-home .hero-copy > p {
    margin-top: 0 !important;
}




/* Remove Moodle's large front-page title/header area and its empty space. */
body#page-site-index #page-header {
    display: none !important;
}

/* Pull the actual front-page content up after removing the page header. */
body#page-site-index #page {
    padding-top: 0 !important;
}

body#page-site-index #page-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Available courses title + controls. */
body#page-site-index #frontpage-available-course-list > .it-available-heading-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
}

body#page-site-index #frontpage-available-course-list > .it-available-heading-row > h2 {
    margin: 0 !important;
}

/* Keep the existing AI button compact beside Available courses. */
body#page-site-index #frontpage-available-course-list #it-ai-heading-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-height: 40px !important;

    margin: 0 !important;
    padding: 9px 17px !important;

    border: 0 !important;
    border-radius: 10px !important;

    background: #0d6efd !important;
    color: #ffffff !important;

    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;

    text-decoration: none !important;
    box-shadow: 0 3px 9px rgba(0,0,0,.15) !important;
}

body#page-site-index #frontpage-available-course-list #it-ai-heading-button:hover {
    background: #0b5ed7 !important;
    color: #ffffff !important;
}

@media (max-width: 600px) {

    body#page-site-index #frontpage-available-course-list > .it-available-heading-row {
        align-items: flex-start !important;
    }

}





/* FRONT PAGE ONLY — remove Moove's reserved top/title spacing */
body#page-site-index #page,
body#page-site-index #page-wrapper,
body#page-site-index #page-content,
body#page-site-index #region-main-box,
body#page-site-index #region-main,
body#page-site-index div[role="main"] {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove empty/header containers immediately before the main content. */
body#page-site-index .page-header,
body#page-site-index .page-context-header,
body#page-site-index .page-header-headings,
body#page-site-index #page-header {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Our custom BOL-style section begins immediately. */
body#page-site-index #it-home {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body#page-site-index .course-content,
body#page-site-index .course-content > ul,
body#page-site-index .course-content > ul > li,
body#page-site-index .course-content .content,
body#page-site-index .course-content .summary {
    margin-top: 0 !important;
    padding-top: 0 !important;
}





body#page-site-index #frontpage-available-course-list .it-course-heading-controls {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-bottom: 14px !important;
}

body#page-site-index #frontpage-available-course-list .it-course-heading-controls h2 {
    margin: 0 !important;
}

body#page-site-index #frontpage-available-course-list #it-ai-heading-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    margin: 0 !important;
    padding: 10px 17px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: #0879e8 !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

body#page-site-index #frontpage-available-course-list #it-ai-heading-button:hover {
    background: #075fc0 !important;
    color: #ffffff !important;
}




/* SHOW COMPLETE HOMEPAGE HERO IMAGE — NO CROPPING */
#it-home .hero-image {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
}

#it-home .hero-image img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
}



/* HOMEPAGE TOP SPACING */
body#page-site-index #it-home {
    margin-top: 64px !important;
}



/* WIDER HOMEPAGE TEXT COLUMN */

/*
 * Give the paragraph and its two buttons more room.
 * Keep the image large, but slightly reduce its share.
 */
@media (min-width: 901px) {
    #it-home .hero-inner {
        grid-template-columns:
            minmax(0, 1.08fr)
            minmax(0, 0.92fr) !important;

        gap: 24px !important;
    }
}

/* FINAL NEP HOMEPAGE VERTICAL POSITION */
body#page-site-index #region-main {
    padding-top: 100px !important;
}

/* RESTORE NEP HERO BLUE BUTTONS */
#it-home #nellie-social-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
}

#it-home #nellie-linkedin-button,
#it-home #youtube-ai-agent-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 10px 17px !important;
    background: #0879e8 !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 9px !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

#it-home #nellie-linkedin-button:hover,
#it-home #youtube-ai-agent-button:hover {
    background: #075fc0 !important;
    color: #ffffff !important;
}

#it-home #youtube-ai-agent-button .youtube-ai-text {
    color: #ffffff !important;
}

/* =========================================================
   NEP FINAL VISUAL ALIGNMENT
   ========================================================= */

/* 1. Move the WHOLE white NEP box down from Moodle blue bar */
body#page-site-index .course-content {
    padding-top: 32px !important;
}

/* Do not create another gap inside the white box */
body#page-site-index .course-content > .sitetopic {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body#page-site-index #it-home {
    margin-top: 0 !important;
}

/* 2. Move hero content UP toward divider */
body#page-site-index #it-home .hero-inner {
    padding-top: 8px !important;
}

/* 3. Restore red YouTube circle around white play triangle */
#it-home #youtube-ai-agent-button svg {
    width: 24px !important;
    height: 24px !important;
    padding: 5px !important;
    border-radius: 50% !important;
    background: #ff0033 !important;
    flex: 0 0 24px !important;
    box-sizing: border-box !important;
}

#it-home #youtube-ai-agent-button svg path {
    fill: #ffffff !important;
}


/* NEP FINAL REPAIR */

/* White NEP area starts BELOW blue Moodle navigation */
body#page-site-index .course-content {
    padding-top: 30px !important;
}

body#page-site-index .course-content > .sitetopic,
body#page-site-index #it-home {
    margin-top: 0 !important;
}

/* Correct hero spacing */
body#page-site-index #it-home .hero-inner {
    padding-top: 24px !important;
}

body#page-site-index #it-home .hero h1 {
    margin: 0 0 14px 0 !important;
}

body#page-site-index #it-home .hero-copy > p {
    margin: 0 0 18px 0 !important;
}

/* Separate buttons */
body#page-site-index #nellie-social-buttons {
    display: flex !important;
    gap: 14px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

/* Red YouTube play circle */
body#page-site-index #youtube-ai-agent-button svg {
    width: 24px !important;
    height: 24px !important;
    padding: 5px !important;
    background: #ff0033 !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    flex: 0 0 24px !important;
}

body#page-site-index #youtube-ai-agent-button svg path {
    fill: #fff !important;
}


/* =========================================================
   SAME WORKING HOMEPAGE PATTERN AS INTEGRATING-TECHNOLOGY.ORG
   ========================================================= */

/* Move the COMPLETE custom homepage below Moodle navigation */
body#page-site-index:not(.notloggedin) #it-home {
    margin-top: 64px !important;
    padding-top: 0 !important;
}

/* Undo the later incorrect outer-container movement */
body#page-site-index .course-content {
    padding-top: 0 !important;
}

body#page-site-index .course-content > .sitetopic {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Restore normal hero spacing */
body#page-site-index #it-home .hero-inner {
    padding-top: 24px !important;
    padding-bottom: 20px !important;
}

/* Title separated properly from paragraph */
body#page-site-index #it-home .hero h1 {
    margin: 0 0 18px 0 !important;
}

/* Paragraph separated properly from buttons */
body#page-site-index #it-home .hero-copy > p {
    margin: 0 0 18px 0 !important;
}

/* Working social-button row */
body#page-site-index #nellie-social-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
}

/* Working button shape */
body#page-site-index #nellie-linkedin-button,
body#page-site-index #youtube-ai-agent-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    height: 40px !important;
    padding: 0 18px !important;

    background: #0878e8 !important;
    color: #ffffff !important;

    border: 0 !important;
    border-radius: 20px !important;

    text-decoration: none !important;
    line-height: 40px !important;
}

/* Red YouTube circle */
body#page-site-index #youtube-ai-agent-button svg {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    padding: 5px !important;

    background: #ff0033 !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;

    flex: 0 0 24px !important;
}

body#page-site-index #youtube-ai-agent-button svg path {
    fill: #ffffff !important;
}

