:root {
    --school-red: #b91c36;
    --school-red-dark: #5f101b;
    --school-red-mid: #8f1728;
    --school-red-bright: #e94560;
    --school-red-soft: #fff1f3;
    --ink: #24161a;
    --muted: #6f5d62;
    --soft-bg: #fff8f9;
    --line: #f2d4da;
}

body {
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #fff 0, #fff 58%, var(--soft-bg) 100%);
}

a {
    color: var(--school-red);
    text-decoration: none;
}

a:hover {
    color: var(--school-red);
}

.btn {
    border-radius: 6px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(180deg, var(--school-red-bright), var(--school-red));
    border-color: var(--school-red);
    box-shadow: 0 8px 18px rgba(185, 28, 54, .18);
}

.btn-primary:hover {
    background: var(--school-red-dark);
    border-color: var(--school-red-dark);
}

.btn-danger {
    background: linear-gradient(180deg, var(--school-red-bright), var(--school-red));
    border-color: var(--school-red);
    box-shadow: 0 8px 18px rgba(185, 28, 54, .18);
}

.btn-outline-primary {
    color: var(--school-red);
    border-color: var(--school-red);
}

.btn-outline-primary:hover {
    background: var(--school-red);
    border-color: var(--school-red);
    color: #fff;
}

.text-bg-primary,
.bg-primary {
    background-color: var(--school-red) !important;
    color: #fff !important;
}

.text-primary {
    color: var(--school-red) !important;
}

.top-strip {
    background: linear-gradient(90deg, var(--school-red-dark), var(--school-red-mid));
    color: #fff;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand-mark {
    align-items: center;
    background: #fff;
    border: 3px solid var(--school-red-bright);
    border-radius: 50%;
    color: var(--school-red);
    display: inline-flex;
    font-size: .9rem;
    height: 42px;
    justify-content: center;
    letter-spacing: 0;
    width: 42px;
}

.brand-text {
    max-width: 360px;
    white-space: normal;
}

.navbar .nav-link {
    color: #263244;
    font-weight: 600;
    position: relative;
}

.navbar .nav-link:hover {
    color: var(--school-red);
}

.navbar .nav-link::after {
    background: linear-gradient(90deg, var(--school-red-bright), var(--school-red));
    bottom: 2px;
    content: "";
    height: 2px;
    left: .5rem;
    position: absolute;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s ease;
    width: calc(100% - 1rem);
}

.navbar .nav-link:hover::after {
    transform: scaleX(1);
}

.flash-wrap {
    position: relative;
    z-index: 5;
}

.hero-section {
    background-image: linear-gradient(90deg, rgba(95, 16, 27, .86), rgba(185, 28, 54, .42)), var(--home-banner-image);
    background-position: center;
    background-size: cover;
    position: relative;
}

.hero-section::after {
    background: linear-gradient(90deg, var(--school-red-dark) 0, var(--school-red-dark) 18%, #fff 18%, #fff 22%, var(--school-red-bright) 22%, var(--school-red) 100%);
    bottom: 0;
    content: "";
    height: 8px;
    left: 0;
    position: absolute;
    right: 0;
}

.min-vh-hero {
    min-height: 560px;
}

.hero-content {
    padding-bottom: 40px;
    padding-top: 40px;
}

.text-white-75 {
    color: rgba(255, 255, 255, .82);
}

.page-hero,
.article-hero {
    background-image: linear-gradient(90deg, rgba(95, 16, 27, .94), rgba(185, 28, 54, .60)), var(--page-banner-image);
    background-position: center;
    background-size: cover;
    border-bottom: 6px solid var(--school-red);
    padding: 86px 0;
}

.article-hero {
    padding: 120px 0;
}

.section-kicker {
    color: var(--school-red);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.section-band {
    background: var(--soft-bg);
}

.info-panel,
.program-card,
.program-tile,
.contact-box,
.form-panel,
.download-card,
.search-result,
.memo-item,
.subpage-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(95, 16, 27, .08);
    padding: 24px;
}

.content-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(95, 16, 27, .08);
    overflow: hidden;
}

.content-card .card-img-top {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.announcement-item {
    border-left: 4px solid var(--school-red);
    padding: 4px 0 4px 16px;
}

.announcement-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    padding: 22px;
}

.announcement-date {
    background: linear-gradient(180deg, var(--school-red-bright), var(--school-red));
    border-radius: 8px;
    color: #fff;
    flex: 0 0 120px;
    font-weight: 700;
    padding: 12px;
    text-align: center;
}

.program-tile i,
.program-icon,
.download-icon {
    align-items: center;
    background: var(--school-red-soft);
    border-radius: 8px;
    color: var(--school-red);
    display: inline-flex;
    font-size: 1.5rem;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.program-card {
    border-top: 4px solid var(--school-red);
}

.program-card:nth-child(even),
.program-tile:nth-child(even) {
    border-top-color: var(--school-red-dark);
}

.event-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    padding: 20px;
}

.event-date {
    align-items: center;
    background: linear-gradient(180deg, var(--school-red-bright), var(--school-red));
    border-radius: 8px;
    color: #fff;
    display: flex;
    flex: 0 0 62px;
    flex-direction: column;
    justify-content: center;
    min-height: 68px;
}

.event-date span {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
}

.event-detail-meta {
    background: var(--school-red-soft);
    border: 1px solid var(--line);
    border-left: 4px solid var(--school-red);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 18px;
}

.memo-list {
    display: grid;
    gap: 18px;
}

.memo-item {
    align-items: flex-start;
    display: flex;
    gap: 18px;
}

.memo-date {
    align-items: center;
    background: linear-gradient(180deg, var(--school-red-bright), var(--school-red));
    border-bottom: 4px solid var(--school-red-dark);
    border-radius: 8px;
    color: #fff;
    display: flex;
    flex: 0 0 92px;
    flex-direction: column;
    justify-content: center;
    min-height: 86px;
}

.memo-date span {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.subpage-link {
    align-items: center;
    background: var(--school-red-soft);
    border: 1px solid var(--line);
    border-left: 4px solid var(--school-red);
    border-radius: 8px;
    color: var(--ink);
    display: flex;
    font-weight: 700;
    justify-content: space-between;
    padding: 16px;
}

.subpage-link:hover {
    background: #fff;
    color: var(--school-red);
}

.gallery-tile {
    border-radius: 8px;
    margin: 0;
    overflow: hidden;
    position: relative;
}

.gallery-tile img {
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    width: 100%;
}

.gallery-tile figcaption {
    background: rgba(95, 16, 27, .88);
    bottom: 0;
    color: #fff;
    font-size: .85rem;
    left: 0;
    padding: 8px 10px;
    position: absolute;
    right: 0;
}

.map-placeholder {
    align-items: center;
    background: repeating-linear-gradient(45deg, #fff8f9, #fff8f9 12px, #f6dbe1 12px, #f6dbe1 24px);
    border: 1px dashed #d28b98;
    border-radius: 8px;
    color: var(--school-red-dark);
    display: flex;
    flex-direction: column;
    font-weight: 700;
    gap: 8px;
    min-height: 220px;
    justify-content: center;
}

.map-placeholder i {
    font-size: 2rem;
}

.article-body {
    font-size: 1.08rem;
    line-height: 1.8;
    max-width: 880px;
}

.login-section {
    background: var(--soft-bg);
    padding: 90px 0;
}

.login-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
    padding: 32px;
}

.site-footer {
    background: linear-gradient(135deg, var(--school-red-dark), #3a0710);
    color: #fff;
}

.site-footer a {
    color: #fff;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-bottom {
    background: rgba(0, 0, 0, .18);
}

@media (max-width: 991.98px) {
    .brand-text {
        max-width: 240px;
    }

    .min-vh-hero {
        min-height: 480px;
    }
}

@media (max-width: 575.98px) {
    .announcement-card {
        display: block;
    }

    .memo-item {
        display: block;
    }

    .memo-date {
        display: inline-flex;
        margin-bottom: 14px;
    }

    .announcement-date {
        display: inline-block;
        margin-bottom: 14px;
    }

    .brand-text {
        max-width: 190px;
        font-size: .92rem;
    }
}
