﻿/* ============================================================
   GLOBAL TYPOGRAPHY — MATCH UP WEBSITE
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+Pro:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --green: #0a3a22;
    --gold: #ffcc33;
    --light: #f4f7f5;
    --radius: 18px;
    --max-width: 1300px;
    --up-serif: 'Source Serif Pro', Georgia, serif;
    --up-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--up-sans);
    line-height: 1.68;
    margin: 0;
    color: #222;
}

h1, h2, h3, h4 {
    font-family: var(--up-serif);
    font-weight: 700;
    color: var(--green);
    margin-top: 0;
}

/* ============================================================
   UNIVERSAL PAGE SECTION SPACING
============================================================ */
.msi-section {
    padding: 60px 40px;
    width: 100%;
    box-sizing: border-box;
}

.msi-section-title.center {
    text-align: center;
    margin-bottom: 30px;
}

.msi-section.light {
    background: #f4f4f4;
}

/* ============================================================
   SPLIT SECTIONS (Overview, JHS, Tech-Voc)
============================================================ */
.split {
    display: flex;
    gap: 40px;
    max-width: var(--max-width);
    margin: auto;
    align-items: center;
}

    .split.reverse {
        flex-direction: row-reverse;
    }

.split-text {
    flex: 1;
    font-size: 1.12rem;
    line-height: 1.68;
}

.split-image {
    flex: 1;
    height: 360px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    box-shadow: 0 6px 22px rgba(0,0,0,0.12);
}

/* ============================================================
   DEFAULT GRID SECTIONS (Programs)
============================================================ */
.msi-grid {
    max-width: var(--max-width);
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.msi-card {
    background: white;
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    transition: .25s ease;
}

    .msi-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 28px rgba(0,0,0,0.15);
    }

/* ============================================================
   SHS GRID — FORCE 5 COLUMNS DESKTOP
============================================================ */
.shs-grid {
    max-width: var(--max-width);
    margin: auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* ← FIXED 5 columns */
    gap: 25px;
}

/* ============================================================
   CAMPUS LIFE GALLERY
============================================================ */
.msi-gallery {
    max-width: var(--max-width);
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.gallery-item {
    height: 220px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    transition: .25s ease;
}

    .gallery-item:hover {
        transform: scale(1.03);
    }

.gallery-label {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px;
    background: rgba(0,0,0,0.55);
    color: white;
    text-align: center;
}

/* ============================================================
   QUICKLINKS
============================================================ */
.msi-quicklinks {
    max-width: 900px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.msi-ql {
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    color: var(--green);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    transition: .25s ease;
}

    .msi-ql:hover {
        transform: translateY(-4px);
    }

/* ============================================================
   RESPONSIVE BREAKPOINTS
============================================================ */

/* ===== Large Tablets (≤ 1200px) ===== */
@media (max-width: 1200px) {
    .shs-grid {
        grid-template-columns: repeat(3, 1fr); /* 5 → 3 */
    }
}

/* ===== Tablets (≤ 900px) ===== */
@media (max-width: 900px) {
    .msi-section {
        padding: 50px 30px;
    }

    .split {
        flex-direction: column;
        text-align: center;
    }

        .split.reverse {
            flex-direction: column;
        }

    .split-image {
        width: 100%;
        height: 260px;
    }

    .msi-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .msi-quicklinks {
        grid-template-columns: repeat(2, 1fr);
    }

    .shs-grid {
        grid-template-columns: repeat(2, 1fr); /* 3 → 2 */
    }
}

/* ===== Mobile Landscape (≤ 700px) ===== */
@media (max-width: 700px) {

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .msi-gallery {
        grid-template-columns: 1fr;
    }

    .msi-quicklinks {
        grid-template-columns: 1fr;
        max-width: 380px;
    }

    .shs-grid {
        grid-template-columns: 1fr; /* 2 → 1 */
    }
}

/* ===== Mobile Portrait (≤ 480px) ===== */
@media (max-width: 480px) {

    .msi-section {
        padding: 35px 20px;
    }

    .msi-card {
        padding: 20px;
    }

    .split-text {
        font-size: 1rem;
    }

    .gallery-item {
        height: 180px;
    }
}
