@charset "UTF-8";

/* Reset & Base */
:root {
    --primary-color: #2c7bb6;
    --accent-color: #d9534f;
    --text-color: #333;
    --bg-color: #f7f9fc;
    --white: #fff;
    --border-color: #ddd;
    --font-heading: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    --font-body: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    /* 高齢者向けに少し大きめ */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* 横スクロールを防止 */
    width: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    /* パディングを含めたサイズ計算にする */
}

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

a:hover {
    text-decoration: none;
}

/* Layout */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--white);
    min-height: 80vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* Header */
header {
    position: relative;
    /* 重なり順を制御するために必要 */
    z-index: 100;
    /* 画像より手前に表示 */
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Allow wrapping for very small screens if needed, or handle with media queries */
    gap: 10px;
}

header h1 {
    margin: 0;
    font-size: 24px;
    white-space: nowrap;
    /* Prevent title wrapping */
    flex-shrink: 0;
}

header h1 a {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Navigation */
nav {
    max-width: 100%;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping */
    gap: 15px;
    justify-content: flex-end;
    /* Align right on desktop */
    align-items: center;
    /* Ensure vertical alignment */
}

/* Welcome message specific style */
.nav-welcome {
    color: var(--white);
    margin-right: 15px;
    /* Keep gap if needed, or rely on flex gap */
    white-space: nowrap;
    /* Prevent wrapping */
    font-size: 16px;
}

nav ul li a {
    color: var(--white);
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    /* Keep text inside item on one line */
    display: inline-block;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #eee;
    margin-top: 30px;
    font-size: 14px;
}

/* Components */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #1a5a8e;
    text-decoration: none;
}

.btn-danger {
    background-color: var(--accent-color);
}

.btn-danger:hover {
    background-color: #c9302c;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

/* Forms */
form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    /* パディングを含める */
}

input:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Dashboard Cards */
.dashboard-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.menu-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background-color: #fff;
    transition: transform 0.2s;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.menu-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.menu-card p {
    font-size: 14px;
    color: #666;
    text-align: left;
}

.menu-card a {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 900px) {
    header {
        flex-direction: column;
        align-items: stretch;
        /* Align items to full width */
        padding: 10px;
    }

    header h1 {
        margin-bottom: 10px;
        text-align: center;
        /* Center title on mobile */
        justify-content: center;
    }

    header h1 a {
        justify-content: center;
    }

    nav {
        width: 100%;
        margin-top: 10px;
    }

    nav ul {
        justify-content: flex-start;
        /* Align left on mobile */
        gap: 10px;
        /* Slightly smaller gap */
    }

    .container {
        padding: 10px;
    }
}

/* Global Card & Table */
.card {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

table.table {
    width: 100%;
    border-collapse: collapse;
}

table.table th,
table.table td {
    border: 2px solid #ddd;
    padding: 10px;
    text-align: left;
}

table.table th {
    background-color: #f9f9f9;
    font-weight: bold;
}

/* Portal Design Enhancements */
/* Portal Design Enhancements */
/* Portal Design Enhancements */
.portal-hero {
    /* 全幅表示に戻す */
    width: 100%;
    /* max-width制限を解除 */
    min-height: 400px;
    /* 高さは最小値を設定 */
    margin: -20px -20px 40px -20px;
    /* 上の隙間を詰め、左右のコンテナパディングを打ち消す */
    width: calc(100% + 40px);
    /* 左右のネガティブマージン分幅を広げる */

    background-size: cover;
    background-position: center center;
    color: var(--white);

    /* Flexboxで内容を中央配置 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 60px 20px;
    /* 上下のパディングを少し増やす */
    text-align: center;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

@media (max-width: 900px) {
    .portal-hero {
        margin: -10px -10px 40px -10px;
        width: calc(100% + 20px);
    }
}

.portal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    z-index: 1;
}

.portal-hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* 高さを固定せず、SVGに合わせる */
    height: auto;
    z-index: 2;
    margin-bottom: -1px;
    /* 隙間防止 */
    line-height: 0;
    /* SVGの下の隙間を排除 */
}

.waves {
    width: 100%;
    height: 60px;
    min-height: 40px;
    max-height: 150px;
}

/* パララックスアニメーション (オプション) */
.parallax>use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }

    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* モバイル調整 */
@media (max-width: 768px) {
    .waves {
        height: 40px;
    }
}

.portal-hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.portal-hero h2 {
    font-size: 3.5rem;
    /* 少し大きく */
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.portal-hero p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.portal-hero .btn {
    padding: 14px 40px;
    /* ボタンサイズ調整 */
    font-size: 1.1rem;
    margin: 10px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: none;
    font-weight: bold;
}

.portal-hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.portal-hero .btn-danger {
    background: var(--primary-color);
}

.portal-hero .btn-light {
    background: #fff;
    color: var(--primary-color);
}

.portal-layout {
    display: grid;
    /* サイドバーの固定幅 + メインコンテンツ(余り全部) */
    grid-template-columns: 1fr 300px;
    gap: 40px;
    justify-content: center;
    max-width: 1200px;
    /* 一般的なコンテナ幅 */
    margin: 0 auto;
    padding: 0 20px;
    /* 左右の余白 */
}

@media (max-width: 960px) {
    .portal-layout {
        grid-template-columns: 1fr;
    }

    .portal-hero h2 {
        font-size: 2.2rem;
        white-space: normal;
        /* モバイルでは改行許可しないとはみ出る可能性があるので */
    }
}

/* スコープを限定して意図しない箇所への線が表示されるのを防ぐ */
.portal-main .section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
    position: relative;
}

.portal-main .section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    transition: background-color 0.2s;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #888;
    font-size: 0.9rem;
    min-width: 100px;
    font-weight: 500;
}

.news-title {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
    flex: 1;
}

.news-title:hover {
    color: var(--primary-color);
}

.portal-sidebar .card {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-links li {
    margin-bottom: 0;
    border-bottom: 1px solid #f0f0f0;
}

.content-links li:last-child {
    border-bottom: none;
}

.content-links a {
    display: block;
    padding: 12px 15px;
    color: #555;
    transition: all 0.2s;
    border-radius: 6px;
}

.content-links a:hover {
    background-color: #f9f9f9;
    color: var(--primary-color);
    padding-left: 20px;
}

.qr-section {
    text-align: center;
    background: #fff;
    padding: 20px;
}

.contact-info p {
    margin-bottom: 10px;
    line-height: 1.8;
}