﻿/* =============================
   GLOBAL SITE STYLES
   ============================= */

body {
    background-color: #000000;
    margin: 0;
    padding: 0;
    color: #FFFFFF;
    font-family: "Noto Sans JP", Arial, sans-serif;
}

/* Global links (light blue, red on hover) */
a {
    color: #66CCFF;
    text-decoration: none;
}

a:hover {
    color: #FF0000;
}

/* =============================
   LAYOUT
   ============================= */

.container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "header"
        "contents"
        "footer";
    max-width: 1024px;
    margin: 0 auto;
}

.header {
    grid-area: header;
    color: #FFFFFF;
}

.contents {
    grid-area: contents;
    margin: 20px auto;
}

.footer {
    grid-area: footer;
}

/* Utility */
.left  { text-align: left; }
.right { text-align: right; }
.center { text-align: center; }
li { list-style: none; }

/* =============================
   NEWS / BUTTON / FOOTER
   ============================= */

.newsTitle {
    font-size: 1.3em;
    border-bottom: 1px solid #fff;
    background-color: #666666;
    padding: 5px 0;
    margin-top: 15px;
    width: 45vw;
}

.news p {
    padding-bottom: 1px;
    border-bottom: 1px solid #eeeeee;
}

.news p a {
    display: block;
    padding: 6px 0 5px;
}

.news p a:hover {
    color: #999999;
}

.btn {
    display: block;
    border: 1px solid #eeeeee;
    width: 100%;
    background-color: #666666;
}

.btn a { display: block; }

#copyright {
    margin-top: 50px;
    padding: 0 50px;
    text-align: center;
    font-size: 90%;
    border-top: 1px solid #FFFFFF;
}

/* =============================
   CARDS (TOP PAGE, etc.)
   ============================= */

.card-container {
    display: grid;
    gap: 20px;
    text-align: center;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    padding: 10px 20px;
    margin-bottom: 80px;
}

.card {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    justify-items: center;
    align-items: center;
    margin-top: 50px;
}

.card img {
    max-width: 350px;
}

.card p {
    text-align: left;
}

/* =============================
   TITLES (共通)
   ============================= */

.title.first {
    text-align: center;
}

.title.first span {
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
}

.title.first span::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;       /* underline from start of text */
    width: 100%;   /* same width as text */
    height: 3px;
    background: #ffffff;
}

/* =============================
   KYOTO PAGE SPECIAL STYLES
   ============================= */

/* Section title with white vertical line */
.section-title {
    border-left: 4px solid #ffffff;
    padding-left: 10px;
    font-size: 22px;
    display: inline-block;
}

/* Thin divider line */
.hr-thin {
    border: none;
    border-top: 1px solid #ffffff;
    margin: 12px 0;
}

/* Responsive top image */
.main-image {
    width: 100%;
    height: auto;
    max-width: 1024px;
}

/* Facility images grid */
.facility-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 30px;
}

.facility-img {
    width: 32%;
    max-width: 320px;
    height: auto;
    border-radius: 4px;
}

@media (max-width: 800px) {
    .facility-img {
        width: 48%;
    }
}

@media (max-width: 500px) {
    .facility-img {
        width: 100%;
    }
}

/* ACCESS section */
.access-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.access-text {
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.access-text p {
    margin: 2px 0;
}

.access-map {
    width: 623px;
    height: 300px;
    border: 0;
}

@media (max-width: 800px) {
    .access-wrapper {
        flex-direction: column;
    }
    .access-map {
        width: 100%;
        height: 260px;
    }
    .access-text {
        width: 100%;
    }
}

/* Feature subtitles */
.feature-title {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 5px;
}

/* =============================
   DORMITORY PAGE
   ============================= */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin: 30px 0;
}

.photo-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border: 1px solid #444;
    border-radius: 4px;
}

.dorm-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    color: #fff;
}

.dorm-table th,
.dorm-table td {
    border: 1px solid #666;
    padding: 15px;
    background: #222;
}

.dorm-table th:first-child,
.dorm-table td:first-child {
    border-left: 6px solid #fff; /* thick white left border */
}

.dorm-table th {
    background: #333;
}

/* =============================
   GAKUHI / COURSE (LONG COURSE)
   ============================= */

/* Flex wrapper for fee page */
.course-flex {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}

.fee-table {
    width: 60%;
    border-collapse: collapse;
    color: #fff;
    background: #111;
}

.fee-table th {
    background: #444; /* gray header */
    padding: 12px;
    border: 1px solid #666;
}

.fee-table td {
    padding: 10px 12px;
    border: 1px solid #666;
    text-align: center;
}

.fee-notes {
    width: 40%;
    font-size: 14px;
    line-height: 1.8;
}

.fee-notes p {
    margin-bottom: 12px;
}

@media (max-width: 800px) {
    .course-flex {
        flex-direction: column;
    }
    .fee-table,
    .fee-notes {
        width: 100%;
    }
}

/* Dark gray box title (2年コース, 1.5年コース, etc.) */
.course-title-box,
.gakuhi-title-box {
    width: 100%;
    background: #222222;
    color: #ffffff;
    padding: 12px 18px;
    font-size: 22px;
    font-weight: bold;
    border: 1px solid #555;
    margin: 25px 0 10px 0;
    text-align: left;
}

/* If you want gakuhi title slightly bigger: override here if needed */
/*
.gakuhi-title-box {
    font-size: 24px;
    margin-top: 40px;
}
*/

/* =============================
   LESSON PAGE
   ============================= */

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin: 30px 0;
    justify-items: center;
}

.lesson-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 1px solid #444;
    border-radius: 4px;
}

/* =============================
   NENKAN (Annual Events)
   ============================= */

.year-flex {
    display: flex;
    gap: 30px;
    margin: 30px 0;
}

.year-box {
    width: 50%;
}

.year-title {
    font-size: 18px;
    margin-bottom: 10px;
    border-left: 4px solid #fff;
    padding-left: 8px;
}

.year-table {
    width: 100%;
    border-collapse: collapse;
}

.year-table th,
.year-table td {
    border: 1px solid #666;
    padding: 10px;
}

.year-table th {
    width: 60px;
    background: #444;
    text-align: center;
}

@media (max-width: 800px) {
    .year-flex {
        flex-direction: column;
    }
    .year-box {
        width: 100%;
    }
}

/* =============================
   SCHOOL LIFE BOXES
   ============================= */

.life-box-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.life-box {
    background: #222222;
    border: 1px solid #444;
    color: #ffffff;
    padding: 20px;
    font-size: 20px;
    text-align: center;
    border-radius: 0;
    flex: 1;
    min-width: 220px;
    font-weight: bold;
}

.life-main-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-top: 40px;
    margin-bottom: 20px;
}

/* =============================
   FLOW PAGE
   ============================= */

.flow-intro {
    text-align: center;
    margin: 20px auto;
    line-height: 1.8;
    color: #ffffff;
    max-width: 800px;
}

/* =============================
   VOICE PAGE (学生の声)
   ============================= */

/* Main page title */
.voice-main-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-top: 40px;
    margin-bottom: 10px;
}

/* Thick underline under "VOICE OF STUDENTS" */
.hr-thick {
    width: 180px;          /* similar style as Kyoto */
    height: 4px;
    background: #666;
    margin: 0 auto 30px auto;
    border: none;
}

/* Country title boxes (ベトナム / VIETNAM, etc.)
   Same dark-gray feeling as course.html */
.voice-title-box,
.voice-country-title {
    width: 100%;
    background: #222222;  /* dark gray like course titles */
    color: #ffffff;
    padding: 12px 18px;
    font-size: 20px;
    font-weight: bold;
    border: 1px solid #555;
    margin: 25px 0 15px 0;
    box-sizing: border-box;
}

/* Layout: Image + Text (left/right alternation controlled in HTML) */
.voice-block {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.voice-block img {
    width: 320px;      /* fixed width, same height ratio */
    height: auto;
    border: 1px solid #333;
}

.voice-text {
    flex: 1;
    font-size: 17px;
    line-height: 1.8;
}

/* Reverse layout when using .reverse class */
.voice-block.reverse {
    flex-direction: row-reverse;
}

@media screen and (max-width: 768px) {
    .voice-block,
    .voice-block.reverse {
        flex-direction: column;
    }

    .voice-block img {
        width: 100%;
        margin-bottom: 15px;
    }
}

/* =============================
   RESPONSIVE (GLOBAL)
   ============================= */

@media screen and (max-width: 1024px) {
    .card img {
        max-width: 250px;
    }
}

@media screen and (max-width: 980px) {
    .card img {
        max-width: 200px;
    }
}

@media screen and (max-width: 600px) {
    .card-container {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .card img {
        width: 100%;
    }

    .newsTitle {
        width: 90vw;
    }
}
/* ================================
   FIXED INDEX PAGE LAYOUT (NEW)
================================ */

/* Wrapper for Banners + News */
/* COMPLETELY REMOVE ALL SPACE BETWEEN BANNERS & NEWS */
/* News Title Box */
/* Remove extra space ABOVE and BELOW banners */
/* FIX: Keep banners + news on same row */
.flex-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;           /* small gap only */
    margin-top: 0;
    padding-top: 0;
}

/* LEFT COLUMN — BANNERS */
.flex-container .banner-column {
    width: 300px;        /* same size as before */
    flex-shrink: 0;      /* prevent shrinking */
}

/* RIGHT COLUMN — NEWS */
.flex-container .news-column {
    flex: 1;             /* take remaining space */
    min-width: 250px;    /* prevent wrapping */
}

/* Reduce gap between banner images */
.banner {
    margin-bottom: 8px !important;
}

/* Reduce spacing in news block */
.newsTitle {
    margin-top: 0 !important;
}

.news {
    margin-top: 8px !important;
}

.newsTitle {
    background: #666;
    color: #fff;
    font-size: 1.3em;
    padding: 6px 10px;
    border-bottom: 1px solid #fff;
    width: 100%;
    margin-bottom: 8px;
}

/* News List */
.news p {
    border-bottom: 1px solid #bbb;
    margin: 6px 0;
    padding-bottom: 4px;
}

.news p a {
    color: #fff;
    display: block;
    padding: 4px 0;
}

.news p a:hover {
    color: #999999;!important;
}

/* MOBILE FIX */
@media (max-width: 800px) {
    .flex-container {
        flex-direction: column;
        gap: 25px;
    }

    .left-box,
    .right-box {
        width: 100%;
    }

    .banner img {
        width: 80%;
        margin: 0 auto 15px auto;
    }
}
/* FIX: Banner + News Layout Without Footer Shift */
.flex-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;     /* top-align both columns */
    gap: 15px;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* LEFT — Banner Column */
.banner-column {
    width: 300px;                /* fixed width keeps size same */
    flex-shrink: 0;
}

/* RIGHT — News Column */
.news-column {
    flex: 1;
    min-width: 260px;
}

/* Keep banners small / same size */
.banner {
    margin-bottom: 8px !important;
}

/* Prevent footer from entering flex row */
.footer {
    clear: both;
    width: 100%;
}

/* Also force flex container to NOT wrap */
.flex-container {
    flex-wrap: nowrap !important;
}
/* Prevent horizontal scroll / wide layout */
body, html {
    max-width: 100%;
    overflow-x: hidden;
}
/* Fix large images overflowing on mobile */
img {
    max-width: 100%;
    height: auto;
    display: block;
}
/* MENU PANEL FIX (needed for all pages) */
.panel {
    display: none;
}
.panel.active {
    display: block;
}
.pamphlet-row {
    display: flex;
    justify-content: center;  /* center horizontally */
    align-items: center;
    gap: 30px;                /* spacing between icons */
    flex-wrap: wrap;          /* wrap on small screens */
    margin: 20px 0;
}

.pamphlet-row img {
    width: 160px;
    height: auto;
}
