.dashboard {
    display: grid;
    grid-template-columns: 320px minmax(0, 880px);
    justify-content: space-between;
    align-items: start;
    gap: 24px;

    width: 100%;
    padding: 24px 30px 30px;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    min-width: 0;
    justify-self: end;
}

/* ======================================================
   INTERIOR PAGE LAYOUT
   ====================================================== */

.page-content {
    width: 100%;
    padding: 24px 30px 32px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.page-eyebrow {
    margin-bottom: 6px;
    color: var(--color-accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-heading h2 {
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.1;
}

.page-description {
    max-width: 720px;
    margin-top: 8px;
    color: var(--color-text-light);
}

.assignment-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .assignment-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .page-content {
        padding: 18px;
    }

    .assignment-summary {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   RESOURCE PAGE LAYOUT
   ====================================================== */

.featured-resources {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.resource-section {
    margin-top: 10px;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.section-heading h3 {
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

.section-eyebrow {
    margin-bottom: 4px;
    color: var(--color-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@media (max-width: 980px) {
    .resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .featured-resources,
    .resource-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   CONTACT PAGE LAYOUT
   ====================================================== */

.contact-section {
    margin-bottom: 28px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.featured-contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .contact-grid,
    .featured-contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   UPDATES PAGE LAYOUT
   ====================================================== */

.updates-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 20px;
    align-items: start;
}

.updates-feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.updates-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 900px) {
    .updates-layout {
        grid-template-columns: 1fr;
    }

    .updates-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .updates-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   COURSE MAP PAGE LAYOUT
   ====================================================== */

.course-map-page {
    padding-top: 10px;
}

/* Compact page heading */
.course-map-heading {
    display: block;
    margin-bottom: 10px;
}

.course-map-title-group {
    width: 100%;
}

.course-map-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.course-map-title-row h2 {
    margin: 0;

    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1.05;
    font-weight: 800;
    color: var(--color-primary);
}

.course-map-subtitle {
    margin: 4px 0 0;

    color: var(--color-text-muted);
    font-size: 1rem;
    font-weight: 500;
}

.back-dashboard-link {
    flex-shrink: 0;

    color: var(--color-primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.back-dashboard-link:hover {
    text-decoration: underline;
}

/* Outer course-map workspace card */
.course-map-card {
    width: min(100%, 1320px);
    padding: 14px;

    background: #eaf2fb;
    border: 1px solid rgba(22, 84, 154, 0.14);
    border-radius: 18px;

    box-shadow: 0 10px 28px rgba(15, 49, 87, 0.08);
}

/* Two-column map and detail layout */
.course-map-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 20px;
    align-items: start;
}

/* Left white map panel */
.course-map-panel {
    position: relative;

    width: 100%;
    min-width: 0;

    background: #ffffff;
    border: 1px solid rgba(22, 84, 154, 0.12);
    border-radius: 14px;

    box-shadow: 0 4px 14px rgba(15, 49, 87, 0.06);
}

/* Controls the size of the white map area */
.course-map-stage {
    position: relative;

    width: 100%;
    height: 720px;
    min-height: 540px;
}

/* Independently positioned map and hotspots */
.course-map-image-layer {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 92%;
    height: 96%;

    transform: translate(-50%, -50%);
}

/* Main course image */
.interactive-course-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

/* Hotspots remain tied to the map image layer */
.hole-hotspot {
    position: absolute;

    left: var(--x);
    top: var(--y);

    transform: translate(-50%, -50%);
}

/* Tablet */
@media (max-width: 960px) {
    .course-map-workspace {
        grid-template-columns: 1fr;
    }

    .course-map-stage {
        height: 680px;
        min-height: 0;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .course-map-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .course-map-title-row h2 {
        font-size: 2rem;
    }

    .course-map-stage {
        height: 560px;
    }

    .course-map-image-layer {
        width: 96%;
        height: 96%;
    }
}