:root {
    --hofstra-blue: #003594;
    --hofstra-mid-blue: #2E96FF;
    --hofstra-dark: #001254;
    --hofstra-gold: #FFC72C;

    --bg-page: #f8f9fa;
    --bg-card: #ffffff;

    --text-main: #212529;
    --text-muted: #6c757d;

    --radius: 4px;
    --font-main: 'Nunito Sans', sans-serif;
}

/* Body styles scoped to app wrapper or specific reset */
.course-finder-app * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Body styles scoped to app wrapper */
.course-finder-app {
    font-family: var(--font-main);
    /* background-color: var(--bg-page); -- remove to inherit template bg */
    color: var(--text-main);
    /* min-height: 100vh; -- remove to fit in content area */
    display: flex;
    flex-direction: column;
}

/* Header - Scoped to app */
.cf-header {
    background-color: var(--hofstra-blue);
    color: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cf-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cf-header .subtitle {
    color: var(--hofstra-gold);
    font-weight: 400;
    margin-left: 0.5rem;
    text-transform: none;
}

/* Container & Layout */
.cf-container {
    width: 100%;
    /* max-width: 1200px; - Let template handle max-width */
    margin: 0 auto;
    padding: 0 1.5rem;
}

.cf-layout-grid {
    display: grid;
    grid-template-columns: 480px 1fr;
    /* Adjusted width to prevent overflow */
    gap: 2rem;
    align-items: start;
    text-align: left;
    /* Reset text align from template */
}

/* Sidebar */
.cf-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 2rem;
    color: var(--text-main);
    /* Ensure text color */
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.cf-filter-columns {
    display: flex;
    gap: 1.5rem;
}

.cf-filter-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cf-sidebar-header h2 {
    color: var(--hofstra-blue);
    font-size: 1.1rem;
    /* Slightly smaller for 2-col */
    margin-bottom: 0.5rem;
}

.cf-sidebar-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.cf-grade-selector-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cf-grade-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    background: white;
    /* Explicit background */
    border: 2px solid #e9ecef;
    border-radius: var(--radius);
    text-align: left;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    color: var(--hofstra-blue);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cf-grade-btn .icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
}

.cf-grade-btn:hover {
    border-color: var(--hofstra-mid-blue);
    background-color: #f8f9fa;
    transform: translateX(4px);
}

.cf-grade-btn.selected {
    background-color: var(--hofstra-blue);
    color: white;
    border-color: var(--hofstra-blue);
    box-shadow: 0 4px 6px rgba(0, 53, 148, 0.2);
}

/* Results Area */
.cf-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    color: var(--text-main);
}

.cf-results-header h2 {
    color: white;
    /* Changed to white for better visibility on blue, OR generic dark if we fix bg */
    color: var(--hofstra-dark);
    /* Revert to dark if we force white bg on app */
    font-size: 1.75rem;
    margin: 0;
}

.cf-count-badge {
    background-color: var(--hofstra-gold);
    color: var(--hofstra-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Course Grid */
.cf-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cf-course-card {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    /* Slightly more rounded */
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--text-main);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Softer initial shadow */
    height: 100%;
    /* Uniform height */
}

.cf-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 53, 148, 0.15);
    /* Blue-tinted shadow on hover */
    border-color: var(--hofstra-mid-blue);
    background: white;
}

.cf-card-top {
    padding: 1.25rem 1.25rem 0.5rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cf-course-tag {
    background: var(--hofstra-gold);
    color: var(--hofstra-dark);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.cf-course-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    text-align: right;
}

.cf-course-title {
    padding: 0 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hofstra-blue);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.cf-course-date {
    margin-top: auto;
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Empty State / No Results */
.cf-empty-state {
    grid-column: 1 / -1;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    background: white;
    border-radius: var(--radius);
    border: 2px dashed #e9ecef;
}

.cf-no-results-msg {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid #dee2e6;
    color: var(--text-main);
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer - Scoped */
.cf-footer {
    margin-top: auto;
    padding: 2rem 0;
    background-color: #fff;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cf-layout-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cf-sidebar {
        position: static;
        margin-bottom: 1rem;
    }

    .cf-grade-selector-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .cf-grade-btn {
        width: auto;
        white-space: nowrap;
    }
}


/* --- Navigation Dropdown Fixes --- */

/* Ensure parent li is positioned for absolute child */
.nav-anchor-desktop .list-inline-item {
    position: relative !important;
}

/* Submenu Styling - Hidden by default */
.nav-anchor-desktop .submenu {
    display: none !important;
    /* Force hidden initially */
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-top: 3px solid #003594;
    /* Hofstra Blue */
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 260px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    text-align: left;
}

/* Show Submenu on Hover */
.nav-anchor-desktop .list-inline-item:hover .submenu {
    display: block !important;
}

/* Vertical Stacking for Submenu Items */
.nav-anchor-desktop .submenu li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    border-bottom: 1px solid #f0f0f0;
}

.nav-anchor-desktop .submenu li:last-child {
    border-bottom: none;
}

/* Submenu Link Styling */
.nav-anchor-desktop .submenu li a {
    display: block !important;
    padding: 12px 20px;
    color: #222 !important;
    /* Force dark text for visibility on white bg */
    text-decoration: none !important;
    font-size: 15px;
    line-height: 1.4;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-anchor-desktop .submenu li a:hover {
    background-color: #f8f9fa !important;
    color: #003594 !important;
}

/* --- Top Level Link Hover Effect --- */

.nav-anchor-desktop .nav-link {
    position: relative;
    padding-bottom: 4px;
    text-decoration: none !important;
    color: #fff !important;
    /* Ensure top-level links are white on the blue bar */
    font-weight: 500;
    transition: color 0.15s ease-in-out;
    z-index: 5 !important;
}

/* Underline Animation */
.nav-anchor-desktop .nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #fff !important;
    transition: all 0.3s ease-out;
    transform: translateX(-50%);
    pointer-events: none !important;
}

.nav-anchor-desktop .nav-link:hover,
.nav-anchor-desktop .list-inline-item:hover>.nav-link {
    color: #FDC82F !important;
    /* Gold color from Hofstra site */
}

.nav-anchor-desktop .nav-link:hover::before,
.nav-anchor-desktop .list-inline-item:hover>.nav-link::before {
    width: 100% !important;
    background-color: #FDC82F !important;
    /* Underline turns gold on hover */
}

/* Down Arrow for Dropdowns */
.has-submenu::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #fff !important;
    /* Force white arrow */
    opacity: 0.8;
    transition: border-top-color 0.15s ease-in-out;
}

.nav-anchor-desktop .list-inline-item:hover .has-submenu::after {
    border-top-color: #FDC82F !important;
}

/* --- Mobile Styles: Fix Truncation and Visibility --- */
.nav-anchor-mobile .nav-anchor-toggle {
    color: #FDC82F !important;
    /* Gold text */
    font-weight: 700;
}

.nav-anchor-mobile-menu {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.nav-anchor-mobile-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    /* Allows menu to grow as long as needed */
    overflow: visible !important;
    z-index: 10001 !important;
    /* Ensure it floats above everything */
    position: relative;
    /* Establish stacking context */
}

.nav-link-mobile {
    color: #ffffff !important;
    /* White text for main links */
    font-weight: 600;
    padding: 12px 15px;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto !important;
    /* Ensure clicks are received */
    cursor: pointer !important;
    position: relative;
    z-index: 10002;
    /* Ensure it floats above container */
}

.mobile-submenu {
    display: none;
    padding-left: 20px;
    background: #ffffff;
    /* White background for submenus */
    list-style: none;
    margin: 0;
}

.mobile-submenu.show {
    display: block !important;
}

.mobile-submenu li a {
    padding: 12px 15px;
    display: block;
    border-bottom: 1px solid #eee;
    color: #003594 !important;
    /* Blue text for sub-items */
    pointer-events: auto !important;
    /* Ensure submenu links are also clickable */
    position: relative;
    z-index: 10003;
}




/* Modern Pill Tabs Styling - Replicating index.html */
:root {
    --hof-navy: #003594;
    --hof-gold: #FFC72C;
    --hof-gray: #e9ecef;
}

.sticky-tabs-wrapper {
    position: sticky !important;
    top: 0 !important;
    z-index: 1005 !important;
    background: white;
    padding: 24px 0 15px 0;
    margin-bottom: 40px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    width: 100% !important;
}

#sticky-pills-tab {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
}

#sticky-pills-tab .nav-item {
    flex: 0 0 calc(25% - 10px) !important;
    min-width: 250px !important;
    box-sizing: border-box !important;
    display: block !important;
}

#sticky-pills-tab .nav-link {
    width: 100% !important;
    text-align: center !important;
    background-color: var(--hof-gray) !important;
    color: var(--hof-navy) !important;
    font-family: "quiet-sans", sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    padding: 16px 20px !important;
    border-radius: 0 !important;
    border: none !important;
    text-decoration: none !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

#sticky-pills-tab .nav-link.active {
    background-color: var(--hof-navy) !important;
    color: white !important;
}

#sticky-pills-tab .nav-link:hover:not(.active) {
    background-color: #dee2e6 !important;
    color: #001254 !important;
}

@media (max-width: 768px) {
    #sticky-pills-tab .nav-item {
        flex: 0 0 calc(50% - 10px) !important;
        min-width: 150px !important;
    }
}

/* Refined Accordion Styling - Replicating ce-edge.html */
.edge-accordion {
    border-top: 1px solid #dee2e6;
}

.edge-accordion-item {
    border-bottom: 1px solid #dee2e6;
    background: #fff;
    transition: background-color 0.3s ease;
}

.edge-accordion-item:hover {
    background-color: #f8f9fa;
}

.edge-accordion-header {
    padding: 1.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.edge-accordion-title {
    color: #003594;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0;
    flex-grow: 1;
}

.edge-accordion-type {
    color: #666;
    font-size: 0.9rem;
    margin-right: 2rem;
    display: none;
    /* Hidden by default, useful for tags */
}

.edge-accordion-toggle {
    width: 32px;
    height: 32px;
    background-color: #003594;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.edge-accordion-item.active .edge-accordion-toggle {
    background-color: #003594;
    transform: rotate(180deg);
}

.edge-accordion-item.active {
    background-color: #f1f1f1;
}

.edge-accordion-body {
    display: none;
    padding: 0 1rem 2rem 1rem;
}

.edge-accordion-item.active .edge-accordion-body {
    display: block;
}

.edge-accordion-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .edge-accordion-content-grid {
        grid-template-columns: 1fr;
    }
}

.edge-accordion-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.edge-program-group-title {
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #003594;
    margin-bottom: 1rem;
    border-bottom: 2px solid #003594;
    display: inline-block;
}

.edge-program-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 576px) {
    .edge-program-links {
        grid-template-columns: 1fr;
    }
}

.edge-program-link {
    display: flex;
    align-items: center;
    color: #003594;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.edge-program-link:hover {
    background-color: #003594;
    color: #fff;
    border-color: #003594;
}

.edge-program-link::before {
    /* This is the hex code for a clean 'Right Pointer' arrow */
    content: "\25B8" !important;

    /* Formatting to ensure it looks right */
    margin-right: 8px;
    color: #FDC82F;
    /* Hofstra Gold */
    font-size: 14px;
    display: inline-block;
}

/* --- Page Header Refinement (No-Hero Design) --- */
.page-header-block {
    background-color: #ffffff;
    padding: 2.5rem 0 3.5rem 0;
    margin-top: 110px;
    /* Clearance for fixed header */
}

.page-header-block h1 {
    font-family: "richmond-text", Richmond-Text, serif !important;
    font-size: 3.375rem !important;
    /* 54px */
    color: #003594 !important;
    font-weight: 400 !important;
    line-height: 1.1;
    margin-top: 0 !important;
    margin-bottom: 1.5rem;
}

.page-header-block .lead {
    font-family: "quiet-sans", sans-serif;
    font-size: 1.375rem;
    /* 22px */
    color: #333333 !important;
    line-height: 1.5;
    max-width: 900px;
}


/* --- Header Scroll Transitions --- */

/* Ensure logos stack correctly for transition */
.site-logo {
    position: relative;
    display: block;
}

/* Default State (Not Scrolled): Show Default (Blue) Logo */
.header-light .logo-default {
    opacity: 1 !important;
    visibility: visible !important;
    transition: all 0.3s ease-in-out;
    display: block !important;
}

.header-light .logo-scrolled {
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.3s ease-in-out;
}

/* Scrolled State: Show Scrolled Logo, Hide Default */
.header.scrolled .logo-default {
    opacity: 0 !important;
    visibility: hidden !important;
}

.header.scrolled .logo-scrolled {
    opacity: 1 !important;
    visibility: visible !important;
}

/* --- Scroll-to-Top Button --- */
#btnScrollTop {
    display: none !important;
    /* Hidden by default */
    opacity: 0 !important;
    visibility: hidden !important;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    /* High Z-Index */
    border: none;
    outline: none;
    background-color: #003594;
    /* Hofstra Blue */
    color: white;
    cursor: pointer;
    padding: 12px;
    border-radius: 4px;
    font-size: 18px;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#btnScrollTop:hover {
    background-color: #002a75;
    /* Darker Blue */
}

/* Show class controlled by JS */
#btnScrollTop.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}