/* Basic reset and font settings */
* {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%; 
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif; /* Changed for better English readability */
    color: #333;
    overflow-x: hidden !important;
    width: 100vw;
    position: relative; 
}

/* -------------------------------------- */
/* Header Styles */
/* -------------------------------------- */

.site-header {
    background-color: #0056b3;
    color: white;
    padding: 10px 20px; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-top: 80px;
    width: 100%; 
    overflow-x: hidden;
}

.header-container {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%; 
    overflow-x: hidden;
}

.site-logo a {
    color: white;
    text-decoration: none;
    font-size: 1.4em; /* Slightly smaller for longer titles */
    font-weight: bold;
}

.menu-toggle {
    display: none !important; 
}

.main-nav {
    margin-left: auto;
    overflow-x: hidden;
}

#menu-links {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    display: flex; 
    flex-direction: row; 
    width: auto;
    background: none;
    box-shadow: none;
}

#menu-links a {
    display: block;
    padding: 10px 12px;
    color: white;
    text-decoration: none;
    font-size: 1.0em; /* Adjusted for English words */
    transition: background-color 0.3s;
    border-radius: 5px; 
    margin: 0 5px; 
    white-space: nowrap; 
}

#menu-links a:hover {
    background-color: #003d7a;
}
/* 言語切り替えボタンのスタイル */
.lang-switch {
    display: flex;
    align-items: center;
    margin-left: 15px; /* ロゴとの間隔 */
    font-size: 0.9em;
    font-weight: bold;
}

.lang-switch a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.7; /* リンク側は少し薄くする */
    transition: opacity 0.3s;
}

.lang-switch a:hover {
    opacity: 1;
    text-decoration: underline;
}

.lang-switch .current-lang {
    color: #ffcc00; /* 現在の言語を強調（黄色など） */
}

.lang-switch .separator {
    color: white;
    margin: 0 5px;
    font-weight: normal;
}


/* -------------------------------------- */
/* Main Content Styles */
/* -------------------------------------- */

main {
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px 10px; 
    min-height: 80vh; 
    overflow-x: hidden;
    width: 100%; 
}

#runko, #saigai, #news, #help {
    margin: 20px 0; 
    padding: 15px;
    width: 100%; 
    overflow-x: hidden;
}

#runko, #news {
    background-color: #f0f0f0; 
}

#saigai, #help {
    background-color: #f9f9f9;
}

.rosenzu-img {
    max-width: 100%; 
    height: auto; 
    display: block; 
    margin: 10px auto 30px auto; 
}

/* -------------------------------------- */
/* Company Buttons Area */
/* -------------------------------------- */

.company-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    padding: 10px 0;
    overflow-x: hidden;
}

#saigai {
    display: grid; 
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.company-button {
    display: block; 
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 50%;
    background-size: cover; 
    background-position: center; 
    transition: transform 0.2s;
}

.company-button:hover {
    transform: translateY(-2px);
}

.company-button span {
    position: absolute;
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    color: white; 
    font-weight: bold;
    font-size: 1.5em; /* Adjusted for English text length */
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    text-align: center;
    width: 90%;
    line-height: 1.1;
    z-index: 10;
    overflow-wrap: break-word; 
}

/* Adjustments for specific buttons with long text */
/* Kyoto City Subway / Hazard Maps */
.company-buttons a:nth-child(8) span,
#saigai a span {
    font-size: 1.3em; 
}

/* 「サイトについて」用の特別なタグ色 */
.tag-about { background-color: #b0c4de; }

.news-content {
    flex: 1;
}

.news-details {
    margin: 10px 0 0 0;
    padding-left: 20px;
    font-size: 0.9em;
    color: #444;
}

.news-details li {
    margin-bottom: 5px;
    list-style-type: disc; /* 箇条書きの点を表示 */
}

/* ヘルプセクションの装飾 */
.help-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.help-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #0056b3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.help-item h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #0056b3;
}

.help-item p {
    margin-bottom: 0;
    font-size: 0.95em;
    line-height: 1.6;
}

/* 免責事項のスタイル */
#disclaimer {
    background-color: #eee; /* 少し暗めの背景で区別する */
    padding: 20px 10px;
    margin-top: 40px;
    border-top: 1px solid #ccc;
}

.disclaimer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.disclaimer-container h3 {
    font-size: 1.1em;
    margin-top: 0;
    color: #555;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    display: inline-block;
}

.disclaimer-container ul {
    list-style-type: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.disclaimer-container li {
    font-size: 0.85em; /* 文字を少し小さく */
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
    position: relative;
    padding-left: 1.2em;
}

/* 箇条書きの「・」を付ける */
.disclaimer-container li::before {
    content: "※";
    position: absolute;
    left: 0;
    color: #888;
}

/* -------------------------------------- */
/* Footer Styles */
/* -------------------------------------- */

.site-footer {
    background-color: #0056b3;
    color: white;
    padding: 15px 10px;
    text-align: center;
    width: 100%;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 1.0em;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

/* -------------------------------------- */
/* Responsive (Mobile/Tablet) */
/* -------------------------------------- */

@media (max-width: 767px) {
    .site-header {
        padding: 10px 0 0;
    }
    .header-container {
        display: block; 
        padding: 0 10px; 
        display: flex; /* スマホでも横並びを維持 */
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .lang-switch {
        margin-left: auto; /* ロゴとメニューボタンの間に配置 */
        margin-right: 15px;
        padding-top: 5px;
    }
    .main-nav {
        background-color: #003d7a;
        margin-top: 10px;
    }
    #menu-links {
        display: grid !important; 
        grid-template-columns: 1fr 1fr;
    }
    #menu-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2); 
    }
    .company-buttons, #saigai {
        grid-template-columns: 1fr; 
    }
    .company-button {
        padding-top: 35%; 
    }
    .company-button span {
        font-size: 1.4em;
    }
}
