/* ===== Media Pages Design (News, Albums, Calendar, Detail) ===== */
:root {
    --mp-navy: #1a2b49;
    --mp-gold: #cda863;
    --mp-text: #333;
    --mp-muted: #888;
    --mp-border: #e8e8e8;
}

/* Hero */
.mp-hero {
    position: relative;
    min-height: 320px;
    padding: 5rem 0 4rem;
    background-color: #1a2b49;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}
.mp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.45) 100%);
}
.mp-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}
.mp-hero-title {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}
.mp-hero-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    max-width: 520px;
    margin: 0;
    line-height: 1.6;
}

/* Section title (School Calendar) */
.mp-section-title {
    text-align: start;
    font-size: 2rem;
    font-weight: 700;
    margin: 2.5rem 0 1.5rem;
    color: var(--mp-navy);
}
.mp-section-title .gold { color: var(--mp-gold); }

/* Filter pills */
.mp-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
.mp-filter-pill {
    border: 1px solid var(--mp-navy);
    background: #fff;
    color: var(--mp-navy);
    padding: 0.45rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mp-filter-pill:hover,
.mp-filter-pill.active {
    background: var(--mp-navy);
    color: #fff;
    border-color: var(--mp-navy);
}

/* News grid */
.mp-news-section,
.mp-albums-section,
.mp-calendar-section,
.mp-detail-section {
    padding: 2.5rem 0 4rem;
    background: #fff;
}
.mp-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}
.mp-news-card {
    border: 1px solid var(--mp-border);
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
    height: 100%;
}
.mp-news-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.mp-news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.mp-news-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.mp-news-body { padding: 1.25rem 1.35rem 1.5rem; }
.mp-news-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--mp-gold);
    margin-bottom: 0.65rem;
    line-height: 1.35;
}
.mp-news-excerpt {
    font-size: 0.88rem;
    color: var(--mp-text);
    line-height: 1.65;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mp-news-date {
    font-size: 0.82rem;
    color: var(--mp-muted);
    margin: 0;
}

/* Albums grid (4 columns) */
.mp-albums-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.mp-album-card {
    background: #fff;
    overflow: hidden;
    border: 1px solid var(--mp-border, #eaeaea);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mp-album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.mp-album-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.mp-album-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.mp-album-body { padding: 1.25rem 1rem; }
.mp-album-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mp-navy);
    margin-bottom: 0.35rem;
    line-height: 1.35;
}
.mp-album-date {
    font-size: 0.82rem;
    color: var(--mp-muted);
    margin: 0;
}

/* Calendar */
.mp-calendar-wrap {
    border: 1px solid var(--mp-border);
    background: #fff;
    overflow: hidden;
}
.mp-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mp-border);
    flex-wrap: wrap;
    gap: 0.75rem;
}
.mp-month-select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    color: var(--mp-navy);
    min-width: 120px;
}
.mp-cal-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.mp-cal-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--mp-navy);
}
.mp-cal-nav-btn:hover { background: #f5f5f5; }
.mp-cal-range {
    font-weight: 600;
    color: var(--mp-navy);
    font-size: 0.95rem;
    min-width: 140px;
    text-align: center;
}

.mp-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fafafa;
    border-bottom: 1px solid var(--mp-border);
}
.mp-cal-weekdays span {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--mp-muted);
    text-transform: uppercase;
}
.mp-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}
.mp-cal-day {
    min-height: 110px;
    padding: 0.5rem;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.mp-cal-day:nth-child(7n) { border-right: none; }
.mp-cal-day.other-month .mp-cal-day-num { color: #ccc; }
.mp-cal-day-num {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mp-navy);
    margin-bottom: 0.35rem;
    display: block;
}
.mp-cal-event {
    font-size: 0.68rem;
    line-height: 1.3;
    padding: 0.35rem 0.4rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    cursor: pointer;
    overflow: hidden;
}
.mp-cal-event-title {
    font-weight: 700;
    display: block;
    margin-bottom: 0.15rem;
}
.mp-cal-event-author {
    font-size: 0.62rem;
    opacity: 0.85;
}
.mp-cal-event.ev-green { background: #d4edda; color: #155724; }
.mp-cal-event.ev-pink { background: #f8d7da; color: #721c24; }
.mp-cal-event.ev-tan { background: #fff3cd; color: #856404; }
.mp-cal-event.ev-blue { background: #d1ecf1; color: #0c5460; }

/* Detail page (Image / Video sections) */
.mp-detail-block { margin-bottom: 2.5rem; }
.mp-detail-block h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--mp-navy);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--mp-border);
}
.mp-image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.mp-image-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 4px;
}
.mp-video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
.mp-video-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #000;
}
.mp-video-card img,
.mp-video-card iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}
.mp-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mp-navy);
    font-size: 1.25rem;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.mp-loading {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mp-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--mp-muted);
}

@media (max-width: 991px) {
    .mp-news-grid { grid-template-columns: repeat(2, 1fr); }
    .mp-albums-grid { grid-template-columns: repeat(2, 1fr); }
    .mp-image-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .mp-news-grid,
    .mp-albums-grid,
    .mp-video-grid,
    .mp-image-grid { grid-template-columns: 1fr; }
    .mp-cal-day { min-height: 70px; }
    .mp-cal-event { font-size: 0.6rem; padding: 0.2rem; }
}
