/*
Theme Name: INA Lab Theme
Description: あつめてまとめる＋つくってつたえる専用テーマ
Version: 1.0
Author: INA Lab
*/

/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

/* ヘッダー */
.ina-header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.ina-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダーレイアウト */
.ina-header .ina-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.ina-header-content {
    flex: 1;
}

/* ハンバーガーメニューボタン */
.ina-hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ハンバーガーメニューがアクティブ時のアニメーション */
.ina-hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.ina-hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

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

.ina-title {
    padding: 20px 0 10px;
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    text-align: left;
}

.ina-title a {
    text-decoration: none;
    color: inherit;
}

.ina-subtitle {
    padding: 0 0 20px;
    margin: 0;
    font-size: 1rem;
    color: #666;
    text-align: left;
}

.ina-nav,
.joomla-nav {
    background: #f8f9fa;
    border-top: 1px solid #ddd;
}

.ina-nav-menu,
.joomla-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.ina-nav-menu li,
.joomla-nav li {
    margin: 0;
}

.ina-nav-menu a,
.joomla-nav a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border-right: 1px solid #ddd;
}

.ina-nav-menu a:hover,
.joomla-nav a:hover {
    background-color: #e9ecef;
    color: #0073aa;
}

.ina-nav-menu li:last-child a,
.joomla-nav li:last-child a {
    border-right: none;
}

/* メインコンテンツ */
.ina-main {
    min-height: 70vh;
}

/* トップページヒーロー */
.hero-section {
    background: #f8f9fa;
    padding: 60px 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 60px;
}

/* ========================================
   Ina-Lab Enhanced Styles
   教材サイト全体の統一スタイル - Joomlaデザイン再現
   ======================================== */

/* 1. キャラクターボタン（フロントページ用） */
.category-section {
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 50px;
    text-align: center;
    letter-spacing: 1px;
}

.category-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 0 20px;
}

.category-item {
    text-align: center;
    text-decoration: none;
    transition: all 0.4s ease;
    margin: 10px;
}

.category-item:hover {
    text-decoration: none;
}

.category-icon {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    position: relative;
    overflow: hidden;
    background: white;
}

.character-button {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: opacity 0.3s ease;
}

.category-item:hover .character-button {
    opacity: 0.8;
}

/* ホバー時の軽い効果 */
.category-item:hover .category-icon {
    opacity: 0.8;
}

/* アクティブ状態（ボタンを押したとき） */
.category-item:active .category-icon {
    opacity: 0.6;
}

.category-item:active .character-button {
    opacity: 0.6;
}

.category-label {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

/* 2. 名人ボタン（共通） */
.meijin-button {
    background: linear-gradient(135deg, #8e44ad, #9b59b6, #bb6bd9);
    color: white;
    padding: 18px 45px;
    border-radius: 35px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
}

.meijin-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.meijin-button:hover::before {
    left: 100%;
}

.meijin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(142, 68, 173, 0.4);
    text-decoration: none;
    color: white;
}

.meijin-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(142, 68, 173, 0.3);
}

/* 3. カテゴリースイッチャー */
.category-switcher {
    margin: 40px 0;
    text-align: center;
}

.category-switcher h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

.category-switcher p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.category-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.category-group {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.category-group:hover {
    background: rgba(142, 68, 173, 0.05);
}

.category-group h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.category-group .buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    text-decoration: none;
    color: white;
}

.category-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.category-btn:hover .btn-icon {
    transform: scale(1.1);
}

/* カテゴリーボタンの色分け */
.category-btn.library { 
    background: linear-gradient(135deg, #e74c3c, #c0392b); 
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.category-btn.web { 
    background: linear-gradient(135deg, #f39c12, #e67e22); 
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
}

.category-btn.interview { 
    background: linear-gradient(135deg, #27ae60, #229954); 
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

.category-btn.survey { 
    background: linear-gradient(135deg, #9b59b6, #8e44ad); 
    box-shadow: 0 3px 10px rgba(155, 89, 182, 0.3);
}

.category-btn.presentation { 
    background: linear-gradient(135deg, #1abc9c, #16a085); 
    box-shadow: 0 3px 10px rgba(26, 188, 156, 0.3);
}

.category-btn.newspaper { 
    background: linear-gradient(135deg, #34495e, #2c3e50); 
    box-shadow: 0 3px 10px rgba(52, 73, 94, 0.3);
}

.category-btn.leaflet { 
    background: linear-gradient(135deg, #e67e22, #d35400); 
    box-shadow: 0 3px 10px rgba(230, 126, 34, 0.3);
}

.category-btn.video { 
    background: linear-gradient(135deg, #3498db, #2980b9); 
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

/* 教材一覧ページ */
.materials-header {
    background: #f8f9fa;
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.materials-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.materials-description {
    color: #666;
    font-size: 1.1rem;
}

.materials-filter {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

.filter-section {
    margin-bottom: 15px;
}

.filter-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.materials-grid {
    padding: 40px 0;
}

.material-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.material-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.material-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.material-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.material-tag {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.material-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.learning-steps {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.steps-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.step-item {
    padding: 5px 0;
    color: #666;
    border-bottom: 1px solid #dee2e6;
}

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

.material-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #0073aa;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* 実践事例一覧ページ */
.archive-case-study {
    padding: 40px 0;
}

.case-study-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.case-study-item {
    display: flex;
    margin-bottom: 40px;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.case-study-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.case-thumbnail {
    flex: 0 0 200px;
    margin-right: 30px;
}

.case-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
}

.no-image {
    width: 100%;
    height: 150px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 2rem;
}

.case-content {
    flex: 1;
}

.case-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.4;
}

.case-title a {
    color: #333;
    text-decoration: none;
}

.case-title a:hover {
    color: #0073aa;
}

.case-meta {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.case-date {
    margin-right: 15px;
}

.case-location {
    background: #0073aa;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.case-excerpt {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.read-more-link {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.read-more-link:hover {
    background: #005a87;
    color: #fff;
}

/* 教材タイプページのアイコン */
.step-icon-large {
    width: 180px !important;
    height: 180px !important;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-label {
    display: none; /* Joomla!サイトと同じようにテキストラベルを非表示 */
}

.step-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    padding: 10px;
    border-radius: 50%;
}

.learning-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin: 30px 0;
}

.step-item-icon {
    text-align: center;
    transition: transform 0.3s ease;
}

.step-item-icon:hover {
    transform: translateY(-5px);
}

.step-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.step-link:hover .step-label {
    color: #0073aa;
}

/* アイコンのレスポンシブ対応 */
@media (max-width: 768px) {
    .learning-steps-grid {
        gap: 30px;
    }
    
    .step-icon-large {
        width: 144px !important;
        height: 144px !important;
    }
}

@media (max-width: 480px) {
    .learning-steps-grid {
        gap: 30px;
    }
    
    .step-icon-large {
        width: 144px !important;
        height: 144px !important;
    }
}

/* 教材ページの表内画像最適化 */
.single-material table {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.single-material table img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 表内の文字サイズを大きくする（インラインスタイルを上書き） */
.single-teaching_material table span[style*="font-size: 14pt"],
.single-teaching_material table span[style*="font-size:14pt"] {
    font-size: 18pt !important;
    line-height: 1.6 !important;
}

.single-teaching_material table p {
    font-size: 16pt !important;
    line-height: 1.6 !important;
    margin-bottom: 15px;
}

/* ポイント見出しの調整 */
.single-teaching_material table .head_i1 {
    font-size: 18pt !important;
    font-weight: bold !important;
    line-height: 1.6 !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .single-teaching_material table span[style*="font-size: 14pt"],
    .single-teaching_material table span[style*="font-size:14pt"] {
        font-size: 16pt !important;
    }
    
    .single-teaching_material table p {
        font-size: 14pt !important;
    }
    
    .single-teaching_material table .head_i1 {
        font-size: 16pt !important;
    }
}

@media (max-width: 480px) {
    .single-teaching_material table span[style*="font-size: 14pt"],
    .single-teaching_material table span[style*="font-size:14pt"] {
        font-size: 14pt !important;
    }
    
    .single-teaching_material table p {
        font-size: 12pt !important;
    }
    
    .single-teaching_material table .head_i1 {
        font-size: 14pt !important;
    }
}

/* つくつたページの表内画像特別対応 */
.single-material .material-content table img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .single-material table img {
        max-width: 100%;
    }
    
    .single-material .material-content table img {
        max-width: 100%;
    }
    
    /* スマホ表示での表幅調整 */
    .single-material .material-content table {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* スマホ表示でのボタンサイズ調整 */
    .single-material .material-content table input[type="button"],
    .single-material .material-content table button {
        width: 100% !important;
        padding: 12px 8px !important;
        font-size: 14px !important;
        margin: 5px 0 !important;
    }
    
    /* 表のセル幅調整 */
    .single-material .material-content table td {
        padding: 2px 0px !important;
        vertical-align: middle !important;
    }

    .single-material .material-content table td img:first-child {
        padding-bottom:5px;
    }
}

@media (max-width: 480px) {
    .single-material table img {
        max-width: 100%;
    }
    
    .single-material .material-content table img {
        max-width: 100%;
    }
    
    /* さらに小さい画面でのボタン調整 */
    .single-material .material-content table input[type="button"],
    .single-material .material-content table button {
        font-size: 12px !important;
        padding: 10px 6px !important;
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    /* ハンバーガーメニュー表示 */
    .ina-hamburger-menu {
        display: flex;
    }
    
    /* ナビゲーションをサイドメニューに変更 */
    .ina-nav,
    .joomla-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        border-top: none;
    }
    
    .ina-nav.active,
    .joomla-nav.active {
        left: 0;
    }
    
    .ina-nav-menu,
    .joomla-nav ul {
        flex-direction: column;
        justify-content: flex-start;
    }
    
    .ina-nav-menu a,
    .joomla-nav a {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .ina-nav-menu li:last-child a,
    .joomla-nav li:last-child a {
        border-bottom: none;
    }
    
    /* オーバーレイ */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .ina-title {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .category-grid {
        gap: 20px;
    }
    
    .category-icon {
        width: 120px;
        height: 120px;
        font-size: 1.2rem;
    }
    
    .material-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .material-actions {
        flex-direction: column;
    }
    
    /* カテゴリースイッチャーのモバイル対応 */
    .category-grid {
        gap: 15px;
    }
    
    .category-icon {
        width: 100px;
        height: 100px;
    }
    
    .category-label {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .category-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .category-group {
        width: 100%;
        max-width: 300px;
    }
    
    .category-btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-icon {
        width: 18px;
        height: 18px;
    }
    
    .meijin-button {
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    .case-study-item {
        flex-direction: column;
        padding: 20px;
    }
    
    .case-thumbnail {
        flex: none;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .case-image,
    .no-image {
        height: 200px;
    }
    
    .case-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .category-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 300px;
        margin: 0 auto 40px;
    }
    
    .category-icon {
        width: 120px;
        height: 120px;
    }
    
    .category-label {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .category-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn-icon {
        width: 16px;
        height: 16px;
    }
    
    .meijin-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .ina-container {
        padding: 0 15px;
    }

    .case-study-list {
        padding: 0 15px;
    }
    
    .case-study-item {
        padding: 15px;
        margin-bottom: 30px;
    }
    
    .case-image,
    .no-image {
        height: 150px;
    }
    
    .case-title {
        font-size: 1.1rem;
    }
    
    .case-meta {
        font-size: 0.8rem;
    }
}

/* その他のスタイル */
.btn-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.category-btn:hover .btn-icon {
    transform: scale(1.1);
}

.category-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

/* フッター */
.ina-footer {
    background: #f8f9fa;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.footer-text {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
} 