/* =========================================================
   GLOBAL
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    background: #f4f6fb;
    color: #1f2937;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    width: 100%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 60px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-container .logo {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 0;

    color: #111827;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}

.nav-container .logo span {
    min-width: 0;
}

.nav-container .portal-logo {
    display: block;
    flex-shrink: 0;

    width: 48px;
    height: 48px;

    object-fit: contain;
    transform: scale(1.2);
    transform-origin: center;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 45px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.navbar .nav-links a {
    color: #26364a;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;

    transition: color 0.2s ease;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: #247b55;
}

/* =========================================================
   PROGRAM LOGO STRIP
   Responsive grid — no horizontal scrolling
========================================================= */

.school-program-strip {
    position: relative;
    z-index: 50;

    width: 100%;
    padding: 12px 24px;

    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.school-program-list {
    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));

    align-items: center;
    justify-items: center;

    gap: 10px;

    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 0;

    box-sizing: border-box;

    /* No horizontal scrolling */
    overflow: visible;
}

/* Individual program logo item */

.school-program-item {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 115px;
    min-width: 0;
    height: 100px;
    padding: 5px;

    box-sizing: border-box;
    border-radius: 10px;

    text-decoration: none;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.school-program-item:hover {
    background: #f3f8f5;
    transform: translateY(-2px);
}

/* Program logo image */

.school-program-logo {
    display: block;

    width: 100%;
    max-width: 90px;
    height: 90px;

    object-fit: contain;
    object-position: center;
}

/* Currently selected program */

.school-program-item.current-program {
    background: #f0f8f3;
    box-shadow: inset 0 0 0 2px #25815c;
}

.school-program-item.current-program::after {
    content: "";

    position: absolute;
    bottom: 3px;
    left: 35%;

    width: 30%;
    height: 3px;

    border-radius: 3px;
    background: #25815c;
}

/* Placeholder when a program has no logo */

.school-program-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 75px;
    height: 75px;
    padding: 6px;

    box-sizing: border-box;
    border-radius: 50%;

    background: #edf7f1;
    color: #176b4b;

    font-size: 12px;
    font-weight: 700;
    text-align: center;

    overflow-wrap: anywhere;
}

/* Program name tooltip */

.school-program-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% - 2px);
    z-index: 100;

    width: max-content;
    max-width: 220px;
    padding: 9px 12px;

    transform: translate(-50%, 6px);

    background: #174c35;
    color: #ffffff;

    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    font-size: 12px;
    line-height: 1.4;
    text-align: center;

    white-space: normal;
    overflow-wrap: anywhere;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.school-program-item:hover .school-program-tooltip,
.school-program-item:focus-visible .school-program-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.school-program-item:focus-visible {
    outline: 2px solid #25815c;
    outline-offset: 2px;
}

/* =========================================================
   MAIN PROGRAM CONTAINER
========================================================= */

.program-container {
    width: 100%;
    max-width: 1310px;

    margin: 0 auto;
    padding: 35px 30px 60px;
}

/* =========================================================
   BACK BUTTON
========================================================= */

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-bottom: 22px;
    padding: 12px 20px;

    background: transparent;
    color: #0f0000;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    transition: all 0.25s ease;
}

/* =========================================================
   PROGRAM HEADER
========================================================= */

.program-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 24px;

    width: 100%;
    padding: 25px 30px;

    background: #ffffff;
    border-radius: 12px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* Program logo and information */

.program-info {
    display: flex;
    align-items: center;
    gap: 24px;

    flex: 1 1 400px;
    min-width: 0;
}

.program-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    padding: 8px;

    overflow: hidden;

    background: #f4f6fb;
    border-radius: 50%;
}

.program-logo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;
}

.program-info>div:last-child {
    min-width: 0;
}

.program-info h1 {
    margin-bottom: 12px;

    color: #174c35;
    font-size: 28px;
    line-height: 1.35;

    overflow-wrap: anywhere;
}

/* Program details */

.program-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.program-details span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 13px;

    background: #edf7f1;
    color: #28734b;

    border-radius: 20px;

    font-size: 14px;
    font-weight: 600;
}

/* =========================================================
   PROGRAM ACTION BUTTONS
========================================================= */

.compare-btn,
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 18px;

    border: 1px solid #287d55;
    border-radius: 7px;

    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.compare-btn {
    background: #287d55;
    color: #ffffff;
}

.compare-btn:hover {
    background: #216746;
    border-color: #216746;
}

.download-btn {
    background: #ffffff;
    color: #287d55;
}

.download-btn:hover {
    background: #287d55;
    color: #ffffff;
}

/* =========================================================
   CURRICULUM SECTION
========================================================= */

.curriculum-section {
    width: 100%;
    margin-top: 35px;
}

.curriculum-section h2 {
    margin-bottom: 20px;

    color: #174c35;
    font-size: 23px;
    line-height: 1.4;
}

/* =========================================================
   MAJOR SELECTOR
========================================================= */

.major-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;

    width: 100%;
    max-width: 410px;

    margin: 20px 0;
}

.major-selector label {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.major-selector select {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;

    font-family: inherit;
    font-size: 14px;
    color: #1f2937;

    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;

    cursor: pointer;
    outline: none;
}

.major-selector select:focus {
    border-color: #28734b;
    box-shadow: 0 0 0 3px rgba(40, 115, 75, 0.12);
}

/* =========================================================
   YEAR BUTTONS
========================================================= */

.year-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 15px;
}

.year-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 22px;

    background: #ffffff;
    color: #4b5563;

    border: 1px solid #dfe5e2;
    border-radius: 7px;

    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;

    transition: all 0.2s ease;
}

.year-button:hover,
.year-button.active {
    background: #28734b;
    color: #ffffff;
    border-color: #28734b;
}

/* =========================================================
   SEMESTER BUTTONS
========================================================= */

.semester-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 20px;
}

.semester-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 18px;

    background: #ffffff;
    color: #28734b;

    border: 1px solid #28734b;
    border-radius: 7px;

    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;

    transition: all 0.2s ease;
}

.semester-button:hover,
.semester-button.active {
    background: #28734b;
    color: #ffffff;
}

/* =========================================================
   SUBJECT CARD
========================================================= */

.subjects-card {
    width: 100%;

    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.subjects-title {
    padding: 18px 25px;
    background: #edf7f1;
}

.subjects-title h3 {
    color: #28734b;
    font-size: 18px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* =========================================================
   SUBJECT TABLE
========================================================= */

.subject-table {
    width: 100%;
    padding: 10px 25px 20px;
}

.subject-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px;
    align-items: center;

    gap: 20px;
    padding: 13px 5px;

    border-bottom: 1px solid #eeeeee;
}

.subject-header {
    color: #6b7280;

    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.subject-name {
    min-width: 0;

    color: #1f2937;
    font-size: 15px;
    line-height: 1.6;

    overflow-wrap: anywhere;
}

.subject-name strong {
    color: #174c35;
}

.subject-units {
    text-align: center;
    font-weight: 600;
}

.total-row {
    margin-top: 10px;
    padding: 14px 10px;

    background: #edf7f1;
    color: #28734b;

    border-bottom: none;
    border-radius: 6px;

    font-weight: 700;
}

/* =========================================================
   NO SUBJECTS
========================================================= */

.no-subjects {
    padding: 50px 20px;
    text-align: center;
}

.no-subjects h3 {
    margin-bottom: 8px;
    color: #374151;
}

.no-subjects p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* =========================================================
   TABLET RESPONSIVE
========================================================= */

@media (max-width: 1000px) {
    .nav-container {
        padding: 18px 25px;
    }

    .navbar .nav-links {
        gap: 22px;
    }

    .nav-container .logo {
        font-size: 21px;
    }

    .school-program-strip {
        padding: 10px 16px;
    }

    .school-program-list {
        grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
        gap: 8px;
    }

    .school-program-item {
        max-width: 95px;
        height: 82px;
    }

    .school-program-logo {
        max-width: 75px;
        height: 75px;
    }

    .school-program-placeholder {
        width: 62px;
        height: 62px;
        font-size: 11px;
    }

    .program-container {
        padding: 30px 24px 50px;
    }

    .program-header {
        gap: 20px;
    }

    .program-info {
        gap: 18px;
    }

    .program-logo {
        flex-basis: 84px;
        width: 84px;
        height: 84px;
    }

    .program-info h1 {
        font-size: 25px;
    }
}

/* =========================================================
   MOBILE RESPONSIVE
========================================================= */

@media (max-width: 700px) {
    .nav-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;

        padding: 16px 18px;
    }

    .nav-container .logo {
        justify-content: center;
        width: 100%;
        font-size: 20px;
        text-align: center;
    }

    .nav-container .portal-logo {
        width: 42px;
        height: 42px;
    }

    .navbar .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;

        width: 100%;
        gap: 10px 22px;
    }

    .navbar .nav-links a {
        font-size: 14px;
    }

    .school-program-strip {
        padding: 8px 10px;
    }

    .school-program-list {
        grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
        gap: 5px;
        padding: 4px 0;
    }

    .school-program-item {
        max-width: 70px;
        height: 58px;
        padding: 2px;
        border-radius: 7px;
    }

    .school-program-logo {
        max-width: 54px;
        height: 54px;
    }

    .school-program-placeholder {
        width: 44px;
        height: 44px;
        padding: 3px;
        font-size: 9px;
    }

    .school-program-tooltip {
        display: none;
    }

    .school-program-item:hover {
        transform: none;
    }

    .program-container {
        padding: 25px 16px 40px;
    }

    .program-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;

        padding: 22px 20px;
    }

    .program-info {
        align-items: center;
        gap: 14px;

        width: 100%;
        flex: 1 1 auto;
    }

    .program-logo {
        flex: 0 0 68px;
        width: 68px;
        height: 68px;
        padding: 5px;
    }

    .program-info h1 {
        margin-bottom: 10px;
        font-size: 22px;
        line-height: 1.35;
    }

    .program-details {
        gap: 7px;
    }

    .program-details span {
        padding: 6px 10px;
        font-size: 12px;
    }

    .compare-btn,
    .download-btn {
        width: 100%;
        min-height: 44px;
    }

    .curriculum-section {
        margin-top: 28px;
    }

    .curriculum-section h2 {
        font-size: 21px;
    }

    .major-selector {
        max-width: 100%;
    }

    .year-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .year-button {
        padding: 10px 12px;
    }

    .semester-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .semester-button {
        padding: 10px 8px;
    }

    .subjects-title {
        padding: 15px 16px;
    }

    .subjects-title h3 {
        font-size: 16px;
    }

    .subject-table {
        padding: 8px 14px 16px;
    }

    .subject-row {
        grid-template-columns: minmax(0, 1fr) 55px;
        gap: 10px;
        padding: 12px 3px;
    }

    .subject-name {
        font-size: 14px;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {
    .nav-container {
        padding: 14px 12px;
    }

    .nav-container .logo {
        gap: 8px;
        font-size: 17px;
    }

    .nav-container .portal-logo {
        width: 36px;
        height: 36px;
    }

    .navbar .nav-links {
        justify-content: space-between;
        gap: 8px;
    }

    .navbar .nav-links a {
        font-size: 13px;
    }

    .school-program-strip {
        padding: 6px;
    }

    .school-program-list {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
        gap: 3px;
    }

    .school-program-item {
        height: 46px;
    }

    .school-program-logo {
        max-width: 42px;
        height: 42px;
    }

    .school-program-placeholder {
        width: 36px;
        height: 36px;
        font-size: 8px;
    }

    .program-container {
        padding: 22px 12px 35px;
    }

    .back-button {
        padding: 10px 14px;
        font-size: 13px;
    }

    .program-header {
        padding: 18px 14px;
        gap: 16px;
    }

    .program-info {
        align-items: flex-start;
        gap: 10px;
    }

    .program-logo {
        flex: 0 0 56px;
        width: 56px;
        height: 56px;
        padding: 4px;
    }

    .program-info h1 {
        font-size: 18px;
    }

    .program-details {
        gap: 5px;
    }

    .program-details span {
        padding: 5px 8px;
        font-size: 11px;
    }

    .compare-btn,
    .download-btn {
        padding: 11px 10px;
        font-size: 13px;
    }

    .semester-buttons {
        grid-template-columns: minmax(0, 1fr);
    }

    .subject-table {
        padding: 8px 10px 14px;
    }

    .subject-row {
        grid-template-columns: minmax(0, 1fr) 45px;
        gap: 7px;
    }

    .subject-name {
        font-size: 13px;
    }

    .subject-units {
        font-size: 13px;
    }

    .no-subjects {
        padding: 35px 15px;
    }
}


.footer-copyright {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 18px clamp(20px, 5vw, 96px);
    color: #d0d0d0;
    background: #202020;
    font-size: 14px;
    line-height: 1.5;
}

.footer-copyright p {
    margin: 0;
}

.footer-copyright .developer-credit {
    margin: 0;
    text-align: right;
}