/* タブレット対応 */
@media (max-width: 768px) {
    /* ヘッダー調整 */
    body {
        padding-top: 70px;
    }
    
    /* ナビゲーション */
    .main-navigation .menu-container {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #f8f9fa;
        box-shadow: 0 2px 10px rgba(0,0,0,0.15);
        display: none;
    }
    
    .main-navigation.toggled .menu-container {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid #e0e0e0;
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation a {
        display: block;
        padding: 15px 20px;
        background-color: #002040;
        color: white;
        transition: all 0.3s;
    }
    
    .main-navigation a:hover {
        background-color: #f8f9fa;
        color: #333;
    }
    
    .menu-toggle {
        display: block !important;
    }
    
    /* グリッドレイアウト */
    .info-grid,
    .executives-grid,
    .events-grid,
    .news-events-grid {
        grid-template-columns: 1fr;
    }
    
    .news-events-grid {
        gap: 30px;
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* ページタイトル */
    .page-title {
        font-size: 2em;
    }
    
    /* ページヘッダー */
    .page-header {
        padding: 60px 0;
    }
    
    .breadcrumb-wrapper {
        padding: 8px 0;
    }
    
    .breadcrumb {
        font-size: 0.85em;
    }
    
    .hero-title {
        font-size: 2.5em;
    }
    
    .section-title {
        font-size: 2em;
    }
    
    /* サイドバーレイアウト */
    .news-layout,
    .award-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }
    
    .news-sidebar,
    .award-sidebar,
    .contact-sidebar {
        order: 2;
    }
    
    /* 会長挨拶 */
    .chairman-photo {
        float: none;
        width: 100%;
        max-width: 350px;
        margin: 0 auto 30px;
    }
    
    /* テーブル */
    .presidents-table {
        display: none;
    }
    
    .presidents-cards {
        display: block;
    }
    
    .president-card {
        background: white;
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    /* タイムライン - モバイル調整 */
    .timeline-year {
        font-size: 0.85em;
        padding: 4px 12px;
        margin-bottom: 10px;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .timeline-content h4 {
        font-size: 1.1em;
    }
    
    /* 学校歴史セクション */
    .schools-parallel-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .merger-visual {
        display: none;
    }
    
    .merged-school-container {
        margin-top: 0;
    }
    
    /* モバイル用タブ表示 */
    .history-tabs-mobile {
        display: flex;
    }
    
    /* 最初は北高校のみ表示 */
    .school-column {
        display: none;
    }
    
    .school-column[data-school="north"] {
        display: block;
    }
}

/* スマートフォン対応 */
@media (max-width: 480px) {
    /* 基本レイアウト */
    body {
        padding-top: 60px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .site-header .container {
        padding: 15px;
    }
    
    /* サイトブランディング */
    .site-branding {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .site-title {
        font-size: 20px;
    }
    
    .site-description {
        font-size: 12px;
    }
    
    /* ページヘッダー */
    .page-header {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 1.8em;
    }
    
    /* ページヘッダー */
    .page-header {
        padding: 50px 0;
    }
    
    .page-header .page-title {
        font-size: 1.8em;
    }
    
    .breadcrumb {
        font-size: 0.8em;
    }
    
    .breadcrumb-item:not(:last-child)::after {
        margin: 0 6px;
    }
    
    /* ヒーローセクション */
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2em;
    }
    
    .hero-subtitle {
        font-size: 1.2em;
    }
    
    /* セクション */
    section {
        margin: 40px 0;
    }
    
    section h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 1.5em;
        margin-bottom: 30px;
    }
    
    /* お知らせ・イベントセクション */
    .news-column,
    .event-column {
        padding: 25px;
    }
    
    .news-column .section-title,
    .event-column .section-title {
        font-size: 1.4em;
    }
    
    /* 会の紹介グリッド - 一つずつ表示 */
    .about-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    /* カード・ボックス */
    .info-box,
    .executive-card,
    .event-card {
        padding: 20px;
    }
    
    .page-content {
        padding: 20px;
    }
    
    /* ボタン */
    .button {
        display: block;
        text-align: center;
        margin: 10px 0;
    }
    
    .event-actions {
        display: flex;
        flex-direction: column;
    }
    
    /* フッター */
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .social-links {
        display: flex;
        justify-content: center;
        gap: 20px;
    }
    
    /* フォーム */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px; /* iOSズーム防止 */
    }
    
    /* FAQ */
    .faq-question h3 {
        font-size: 1em;
    }
    
    /* 検索フォーム */
    .search-form {
        flex-direction: column;
    }
    
    .search-form button {
        width: 100%;
    }
    
    /* ページネーション */
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        margin: 0 2px;
        font-size: 14px;
    }
    
    /* ニュースアイテム */
    .news-title {
        font-size: 1.1em;
    }
    
    /* イベント詳細 */
    .event-details {
        font-size: 14px;
    }
    
    /* ウィジェット */
    .widget {
        padding: 15px;
    }
    
    /* テーブル（横スクロール対応） */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 500px;
    }
    
    /* タイムライン（モバイル調整） */
    .timeline {
        padding-left: 0;
    }
    
    .timeline::before,
    .north-timeline::before,
    .south-timeline::before,
    .shimoda-timeline::before {
        display: none;
    }
    
    .timeline-item {
        flex-direction: column;
        margin-bottom: 30px;
        padding: 20px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .timeline-item::before {
        display: none;
    }
    
    .timeline-year {
        width: auto;
        margin-bottom: 10px;
    }
    
    .timeline-content {
        padding-left: 0;
    }
    
    .timeline-content h4 {
        font-size: 1.1em;
    }
    
    /* 学校カラム調整 */
    .school-column {
        padding: 20px;
    }
    
    .school-header {
        margin-bottom: 30px;
        padding-bottom: 15px;
    }
    
    .school-header h3 {
        font-size: 1.5em;
    }
    
    .school-years {
        font-size: 1em;
    }
    
    /* アクセスマップ */
    .access-content {
        flex-direction: column;
    }
    
    .map-container iframe {
        height: 250px;
    }
}

/* レスポンシブテーブル（カード表示は常に非表示） */
.presidents-cards {
    display: none;
}

@media (max-width: 768px) {
    .presidents-table {
        display: none;
    }
    
    .presidents-cards {
        display: block;
    }
}

/* アクセシビリティ対応 */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

/* プリント対応 */
@media print {
    .site-header,
    .site-footer,
    .menu-toggle,
    .pagination,
    .search-form,
    .button {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .page-content {
        box-shadow: none;
        padding: 0;
    }
    
    a {
        text-decoration: none;
        color: black;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

