/* 和風サブページ共通スタイル */

:root {
    /* 日本の伝統色 */
    --sumi: #1c1c1c;           /* 墨色 */
    --hai: #7d7d7d;            /* 灰色 */
    --shiro: #fffffb;          /* 白色 */
    --kinari: #f8f4e6;         /* 生成り色 */
    --mizuiro: #b4d4da;        /* 水色 */
    --asagi: #72b4c4;          /* 浅葱色 */
    --ai: #4a7c85;             /* 藍色 */
    --kon: #223a70;            /* 紺色 */
    --sango: #f0a68c;          /* 珊瑚色 */
    --usu-mizuiro: #e6f2f5;    /* 薄水色 */
    --matcha: #88b378;         /* 抹茶色 */
    --sakura: #fef4f4;         /* 桜色 */

    /* フォント */
    --font-serif: 'Zen Old Mincho', 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
    --font-elegant: 'Klee One', cursive;
}

/* ヘッダー和風スタイル */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 251, 0);
}

.header.scrolled {
    background: rgba(255, 255, 251, 0.95);
    box-shadow: 0 1px 0 rgba(28, 28, 28, 0.1);
}

.navbar {
    padding: 1.5rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--sumi);
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.05em;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--asagi);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--asagi);
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--sumi);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ページヒーロー和風 */
.page-hero {
    min-height: 60vh;
    background: url('japanese-hero-bg.svg') center/cover,
                linear-gradient(135deg, var(--kinari) 0%, var(--usu-mizuiro) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bamboo-pattern.svg');
    background-size: 200px 400px;
    opacity: 0.1;
    animation: drift 30s linear infinite;
}

@keyframes drift {
    from { transform: translateX(0); }
    to { transform: translateX(200px); }
}

.page-hero-content {
    text-align: center;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.page-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--sumi);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    animation: fadeInUp 0.8s ease forwards;
}

.page-hero-subtitle {
    font-family: var(--font-elegant);
    font-size: 1.2rem;
    color: var(--ai);
    letter-spacing: 0.3em;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

/* 装飾線 */
.page-hero-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--asagi);
    margin: 1.5rem auto;
}

/* セクションスタイル */
.section {
    padding: 6rem 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--kinari);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sumi);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--asagi);
}

/* カード和風スタイル */
.info-card {
    background: var(--shiro);
    border-radius: 2px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--asagi), var(--ai));
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

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

.info-card:hover::before {
    transform: scaleY(1);
}

/* テーブル和風スタイル */
.info-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--shiro);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-table th {
    font-family: var(--font-serif);
    background: var(--asagi);
    color: var(--shiro);
    padding: 1.2rem 1.5rem;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--ai);
}

.info-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--usu-mizuiro);
    color: var(--sumi);
    line-height: 1.8;
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table tr:hover {
    background: var(--sakura);
}

/* タイムライン和風 */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--asagi), var(--ai));
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInLeft 0.8s ease forwards;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 8px;
    width: 14px;
    height: 14px;
    background: var(--shiro);
    border: 3px solid var(--asagi);
    border-radius: 50%;
    z-index: 2;
}

.timeline-date {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--ai);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.timeline-content {
    background: var(--shiro);
    padding: 1.5rem;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 12px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--shiro);
}

/* フォーム和風スタイル */
.form-group {
    margin-bottom: 2rem;
}

.form-label {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--sumi);
    margin-bottom: 0.8rem;
    display: block;
    font-weight: 600;
}

.form-label span {
    color: var(--asagi);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--usu-mizuiro);
    border-radius: 2px;
    background: var(--shiro);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--sumi);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--asagi);
    background: var(--sakura);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
    line-height: 1.8;
}

/* ボタン和風スタイル */
.btn-japanese {
    display: inline-block;
    padding: 1rem 3rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-japanese-primary {
    background: var(--asagi);
    color: var(--shiro);
    border: 2px solid var(--asagi);
}

.btn-japanese-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--ai);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-japanese-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-japanese-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.btn-japanese-primary span {
    position: relative;
    z-index: 1;
}

/* フッター和風 */
.footer {
    background: var(--sumi);
    color: var(--shiro);
    padding: 4rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--asagi), transparent);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-section h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 1px;
    background: var(--asagi);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: var(--shiro);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.6;
    font-size: 0.9rem;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 和風装飾要素 */
.japanese-decoration {
    position: absolute;
    width: 100%;
    height: 200px;
    bottom: 0;
    left: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cpath d='M0,100 Q300,50 600,100 T1200,100 L1200,200 L0,200 Z' fill='%23f8f4e6' opacity='0.5'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* レスポンシブ */
@media (max-width: 1024px) {
    /* ハンバーガーメニュー表示 */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        cursor: pointer;
        padding: 5px;
        z-index: 1002;
    }

    .hamburger span {
        width: 25px;
        height: 2px;
        background: var(--sumi);
        margin: 5px auto;
        transition: all 0.3s ease;
        border-radius: 2px;
        display: block !important;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -7px);
    }

    .nav-link {
        padding: 1rem 2rem;
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--shiro);
        width: 100%;
        padding: 2rem 0;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        gap: 0;
        z-index: 1001;
    }

    .nav-menu.active {
        left: 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-item::before {
        left: 14px;
    }
}

@media (max-width: 768px) {
    /* スマホ表示では改行タグを無効化 */
    br {
        display: none;
    }

    /* ハンバーガーメニュー強制表示 */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        cursor: pointer;
        padding: 5px;
        z-index: 1002;
    }

    .hamburger span {
        width: 25px;
        height: 2px;
        background: var(--sumi);
        margin: 5px auto;
        transition: all 0.3s ease;
        border-radius: 2px;
        display: block !important;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -7px);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--shiro);
        width: 100%;
        padding: 2rem 0;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        gap: 0;
        z-index: 1001;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 1rem 2rem;
        display: block;
    }

    /* レイアウト調整 */
    .section {
        padding: 4rem 0;
    }

    .section-container {
        padding: 0 1.5rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .page-hero {
        min-height: 50vh;
        padding-top: 100px;
    }

    .page-hero-content {
        padding: 0 1.5rem;
    }

    /* フォントサイズ調整 */
    .page-hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .page-hero-subtitle {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 0.85rem;
    }

    /* カード調整 */
    .info-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .info-card h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .info-card h4 {
        font-size: 1.2rem;
    }

    .info-card p,
    .info-card li {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* ボタン調整 */
    .btn-japanese {
        padding: 0.9rem 2rem;
        font-size: 0.9rem;
    }

    /* フォーム調整 */
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .form-control {
        font-size: 0.95rem;
        padding: 0.9rem 1.2rem;
    }

    textarea.form-control {
        min-height: 120px;
    }

    /* テーブル調整 */
    .info-table {
        font-size: 0.9rem;
    }

    .info-table th,
    .info-table td {
        padding: 0.9rem 1rem;
    }

    /* タイムライン調整 */
    .timeline {
        padding: 1.5rem 0;
    }

    .timeline-date {
        font-size: 0.85rem;
    }

    .timeline-content {
        padding: 1.2rem;
    }

    .timeline-content h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .timeline-content p {
        font-size: 0.9rem;
    }

    /* フッター調整 */
    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-section {
        margin-bottom: 2rem;
    }

    .footer-section h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .footer-section li,
    .footer-section p {
        font-size: 0.9rem;
    }

    .footer-bottom {
        font-size: 0.85rem;
        padding-top: 2rem;
        margin-top: 2rem;
    }
}

/* 480px以下の極小スマホ用 */
@media (max-width: 480px) {
    /* さらなるレイアウト調整 */
    .section {
        padding: 3rem 0;
    }

    .section-container {
        padding: 0 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .page-hero {
        min-height: 45vh;
        padding-top: 90px;
    }

    .page-hero-content {
        padding: 0 1rem;
    }

    /* フォントサイズをさらに小さく */
    .page-hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .page-hero-subtitle {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 0.8rem;
    }

    /* カードをさらにコンパクトに */
    .info-card {
        padding: 1.2rem;
        margin-bottom: 1.2rem;
    }

    .info-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .info-card h4 {
        font-size: 1rem;
    }

    .info-card p,
    .info-card li {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* ボタンをコンパクトに */
    .btn-japanese {
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
    }

    /* フォームをコンパクトに */
    .form-group {
        margin-bottom: 1.2rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-control {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    textarea.form-control {
        min-height: 100px;
    }

    /* テーブルをさらに小さく */
    .info-table {
        font-size: 0.85rem;
    }

    .info-table th,
    .info-table td {
        padding: 0.7rem 0.8rem;
    }

    /* タイムラインをコンパクトに */
    .timeline {
        padding: 1rem 0;
    }

    .timeline-content {
        padding: 1rem;
    }

    .timeline-content h4 {
        font-size: 1rem;
    }

    .timeline-content p {
        font-size: 0.85rem;
    }

    /* フッターをコンパクトに */
    .footer {
        padding: 2.5rem 0 1.2rem;
    }

    .footer-section {
        margin-bottom: 1.5rem;
    }

    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .footer-section li,
    .footer-section p {
        font-size: 0.85rem;
    }

    .footer-bottom {
        font-size: 0.8rem;
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }
}