/* --- 基本スタイルと共通パーツ --- */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 1000px;
    margin: 20px auto;
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    max-height: 95vh;
    overflow-y: auto;
}

h1 {
    text-align: center;
    color: #4a4a4a;
    margin-top: 0;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s;
}
.btn:hover {
    background-color: #0056b3;
}

/* --- トップページ (`index.php`) 専用スタイル --- */
.main-title {
    font-family: 'Train One', cursive;
    font-size: clamp(3rem, 10vw, 5.5rem);
    line-height: 1.2;
    font-weight: 400;
    background: linear-gradient(45deg, #36d1dc, #fde74c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.15);
}

.selection-form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}
.form-group {
    margin-bottom: 25px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 1.1rem;
}
.form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 16px;
    box-sizing: border-box;
}
.selection-form .btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

/* --- 高校一覧ページ (`list/index.php`) 専用スタイル --- */
.list-title-ja {
    font-family: 'Train One', cursive;
    font-weight: bold;
    color: #5B7DB1;
    font-size: 2.8rem;
}
.list-title-other {
    font-family: 'Aoboshi One', serif;
    font-weight: bold;
    color: #5B7DB1;
    font-size: 2.8rem;
}

.school-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

/* PC用のカードスタイル */
.school-item-card {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    width: 90%;
    max-width: 750px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 25px; /* PCでは隙間あり */
}
.school-name-pc {
    display: block;
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    font-weight: bold;
    color: black;
    font-size: 1.5rem;
    margin: 0 0 15px 0;
}
.school-name-mobile {
    display: none;
}
.school-item-image-wrapper {
    flex-shrink: 0;
    width: 220px;
    height: 180px;
}
.school-item-image-wrapper img, .no-image-list {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}
.no-image-list {
    background-color: #e9e9e9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
}
.school-item-details-wrapper {
    flex-grow: 1;
}
.school-info {
    font-size: 16px;
    margin-bottom: 20px;
}
.school-item-details-wrapper .btn {
    width: 100%;
    max-width: 200px;
}

/* --- 高校詳細ページ (`report/index.php`) 専用スタイル --- */
.school-title {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    font-weight: bold;
    color: black;
    font-size: 2rem;
    text-align: center;
}
.school-image-container {
    width: 100%;
    margin: 20px 0 30px 0;
    text-align: center;
}
.school-image-container img {
    max-width: 100%;
    width: 600px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.no-image {
    width: 100%;
    max-width: 600px;
    height: 337.5px;
    margin: 0 auto;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.no-image p {
    color: #888;
}
.detail-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.detail-section:last-child {
    border-bottom: none;
}
.detail-section h3 {
    margin: 0 0 10px 0;
}
.detail-section a {
    word-wrap: break-word;
}

/* --- ナビゲーションボタン --- */
.navigation-buttons {
    margin-top: 40px;
    display: flex;
}
.report-page-nav {
    justify-content: center;
}
.list-page-nav {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}
.back-btn {
    background-color: #6c757d;
}
.back-btn:hover {
    background-color: #5a6268;
}

/* --- スマートフォン用のレスポンシブスタイル --- */
@media (max-width: 768px) {
    body { padding: 10px; }
    .container { padding: 20px; width: 100%; max-height: none; }
    .main-title { font-size: clamp(2.5rem, 12vw, 3.5rem); }
    .list-title-ja, .list-title-other { font-size: 2.2rem; }
    
    .school-item-card {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }
    .school-name-pc {
        display: none;
    }
    .school-name-mobile {
        display: block;
        font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
        font-weight: bold;
        color: black;
        font-size: 1.3rem;
        text-align: center;
        padding: 20px 15px 15px 15px;
        margin-bottom: 0 !important;
    }
    .school-item-image-wrapper {
        width: 100%;
        height: auto;
        margin: 0;
        line-height: 0;
    }
    .school-item-image-wrapper img, .no-image-list {
        aspect-ratio: 16 / 10;
        border-radius: 0;
    }
    .school-item-details-wrapper {
        width: 100%;
        text-align: center;
        padding: 20px;
        background-color: #fff;
        border: 1px solid #eee;
        border-top: none;
        border-radius: 0 0 5px 5px;
        margin-top: -1mm !important; /* ★ 隙間をなくすための最終手段 */
    }
    .school-item-details-wrapper .btn {
        margin: 0 auto;
    }

    .school-title {
        font-size: 1.6rem;
    }
    .school-image-container { margin: 15px 0 25px 0; }
    .school-image-container img { width: 100%; }
    .no-image { width: 100%; height: 200px; }
}