* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
    background: #f4f8ff;
    color: #102033;
}

header {
    background: linear-gradient(135deg, #0d3b78, #2f80ed);
    color: white;
    padding: 50px 20px;
    text-align: center;
}

header h1 {
    font-size: 38px;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
}

.container {
    width: min(1100px, 92%);
    margin: 40px auto;
}

.school-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    transition: 0.25s;
}

.card:hover {
    transform: translateY(-5px);
}

.photo {
    height: 190px;
    background-image: url("../school-buildings.png");
    background-repeat: no-repeat;
}

/* 上2段：2列 */
.kindergarten {
    background-size: 200% 300%;
    background-position: 0% 0%;
}

.elementary {
    background-size: 200% 300%;
    background-position: 100% 0%;
}

.junior {
    background-size: 200% 300%;
    background-position: 0% 50%;
}

.high {
    background-size: 200% 300%;
    background-position: 100% 50%;
}

/* 下段：大学3列 */
.university1,
.university2,
.university3 {
    height: 210px;
    background-size: 300% 300%;
}

.university1 {
    background-position: 0% 100%;
}

.university2 {
    background-position: 50% 100%;
}

.university3 {
    background-position: 100% 100%;
}

.content {
    padding: 22px;
}

.tag {
    display: inline-block;
    color: white;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
}

.pink { background: #ff6fae; }
.green { background: #42b883; }
.orange { background: #ff9800; }
.purple { background: #6c5ce7; }
.blue { background: #2f80ed; }

.card h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.card p {
    font-size: 15px;
    line-height: 1.8;
    color: #405066;
}

.campus-title {
    margin: 50px 0 20px;
    font-size: 28px;
    color: #0d3b78;
}

footer {
    text-align: center;
    padding: 30px;
    color: #667;
}

.back-home-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 22px;
    background: white;
    color: #0d3b78;
    text-decoration: none;
    border-radius: 999px;
    font-weight: bold;
    transition: 0.2s;
}

.back-home-btn:hover {
    transform: translateY(-2px);
    background: #eef4ff;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 30px;
    }

    .photo {
        height: 170px;
    }

    .university1,
    .university2,
    .university3 {
        height: 185px;
    }
}

/* page top fixed button */
.page-top-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
    width: 120px;
    display: block;
    transition: transform .2s ease, opacity .2s ease;
}

.page-top-btn:hover {
    transform: translateY(-5px) scale(1.03);
}

.page-top-btn img {
    width: 100%;
    display: block;
}

@media (max-width: 600px) {
    .page-top-btn {
        width: 86px;
        right: 12px;
        bottom: 12px;
    }
}
