/* カスタムCSS */
body {
    color: #1f2937; /* 基本テキストカラー */
}

/* セクションタイトルスタイル */
.section-title {
    font-size: 3.5rem; /* Large font size for major titles */
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.section-title-sub {
    color: #00A1CC; /* Main color */
    font-size: 1.25rem;
    font-weight: 600;
    border-left: 4px solid #00A1CC;
    padding-left: 10px;
}

/* カルーセル用のCSS */
#hero-section {
    height: 70vh; /* ヒーローセクションの高さ */
    min-height: 450px;
}

.carousel-item {
    display: none;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-item.active {
    display: flex;
    opacity: 1;
    position: relative;
}

/* ページの切り替えトランジション */
.page-content {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    min-height: calc(100vh - 200px); /* フッターを考慮した最小の高さ */
}

.page-content.active {
    display: block;
    opacity: 1;
}

/* ドロップダウンメニューのスタイル */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 16px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-title {
    padding: 0 20px 12px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 8px;
}

.dropdown-title-ja {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 2px;
}

.dropdown-title-en {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-items {
    display: flex;
    flex-direction: column;
}

.dropdown-items a {
    padding: 10px 20px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-items a:hover {
    background: #f8fafc;
    color: #00A1CC;
    padding-left: 24px;
}

.dropdown-items a:hover::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #00A1CC;
    border-radius: 50%;
}

/* モバイルメニューのスタイル */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8fafc;
    border-radius: 6px;
    margin: 4px 0;
}

.mobile-submenu.active {
    max-height: 300px;
}

.mobile-dropdown-toggle {
    background: none;
    border: none;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-dropdown-toggle:hover {
    color: #00A1CC;
}

.mobile-dropdown-toggle.active {
    color: #00A1CC;
    font-weight: 600;
}

/* スクロール時のヘッダー効果 */
header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* ワークセクションのスクロールコンテナ */
.work-scroll-container {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #00A1CC #f1f5f9;
    padding: 0 0 20px 0;
}

.work-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.work-scroll-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.work-scroll-container::-webkit-scrollbar-thumb {
    background: #00A1CC;
    border-radius: 4px;
}

.work-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #006B8A;
}

.work-card {
    min-width: 320px;
    flex: 0 0 auto;
}

/* アローリンクのスタイル */
.arrow-link {
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.arrow-link:hover .arrow-icon {
    background: #00A1CC;
    color: white;
    transform: translateX(4px);
}

.arrow-icon {
    transition: all 0.3s ease;
}

/* ニュースリストのホバー効果 */
.flex.items-center.py-4.border-b.border-gray-200 {
    transition: all 0.2s ease;
}

.flex.items-center.py-4.border-b.border-gray-200:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

/* ニュースリストのテーブルスタイル */
.news-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* iOS用スムーズスクロール */
}

.news-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 500px; /* モバイルでも崩れない最小幅 */
}

.news-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

/* リンクがある行だけにホバー効果を適用（背景色の変化はなし） */
.news-table tbody tr.has-link:hover {
    /* 背景色とtransform効果を削除 - テキストカラーのみ変化 */
}

.news-table tbody tr:last-child {
    border-bottom: none;
}

.news-table tbody tr td {
    padding: 16px 0;
    vertical-align: top;
}

.news-table tbody tr td:first-child {
    padding-left: 0;
}

.news-table tbody tr td:last-child {
    padding-right: 0;
}

/* 固定幅列 */
.news-table .date-col {
    width: 100px;
    white-space: nowrap;
    padding-right: 8px; /* ラベルとの間隔を調整 */
}

.news-table .label-col {
    width: 110px; /* ラベル列の固定幅 */
    text-align: left;
    padding-right: 12px; /* コンテンツとの間隔を調整 */
}

.news-table .content-col {
    padding-left: 0; /* 左パディングをリセット */
}

/* ニュースリンクスタイル */
.news-row {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: table-row;
}

/* ニュースコンテンツスタイル */
.news-content {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.5; /* 行間を少し詰めてコンパクトに */
    margin: 0;
    transition: color 0.2s ease;
    word-break: break-word; /* 長い単語を適切に改行 */
}

/* リンクがある行だけホバー時に青色に変化 */
.news-table tbody tr.has-link:hover .news-content {
    color: #00A1CC;
}

/* 日付スタイル */
.news-date {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

/* ニュースコンテンツスタイル */
.news-content {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.5; /* 行間を少し詰めてコンパクトに */
    margin: 0;
    transition: color 0.2s ease;
    word-break: break-word; /* 長い単語を適切に改行 */
}

/* ニュースラベル等幅スタイル */
.news-label {
    display: inline-block;
    min-width: 65px; /* 最小幅を設定 - モバイル対応 */
    max-width: 110px; /* 最大幅を設定 */
    width: auto; /* コンテンツに応じて可変 */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.75rem; /* text-xs相当 */
    font-weight: 600; /* font-semibold相当 */
    padding: 0.25rem 0.5rem; /* px-2 py-1相当 */
    border-radius: 9999px; /* rounded-full相当 */
    flex-shrink: 0;
    line-height: 1.2; /* 行間を詰めてコンパクトに */
}

.news-label.bg-kmax-light {
    background-color: #33C4F0;
    color: white;
}

.news-label.bg-yellow-100 {
    background-color: #FEF3C7;
    color: #92400E;
}

/* アバウトイメージコンテナ */
.about-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 161, 204, 0.1), rgba(0, 107, 138, 0.1));
    z-index: 1;
}

.about-image-container img {
    position: relative;
    z-index: 2;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
    
    .section-title-sub {
        font-size: 1.1rem;
    }
    
    #hero-section {
        height: 50vh;
        min-height: 300px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        margin-top: 8px;
        background: #f8fafc;
    }
    
    .work-card {
        min-width: 280px;
    }
    
    /* モバイル用テーブルスタイル */
    .news-table .date-col {
        width: 70px;
        padding: 12px 8px 12px 0;
    }
    
    .news-table .label-col {
        width: 65px; /* モバイル用に狭く */
        padding: 12px 8px 12px 0;
    }
    
    .news-table .content-col {
        padding: 12px 0 12px 8px;
    }
    
    .news-content {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    .news-label {
        min-width: 45px; /* モバイル用に最小幅を狭く */
        max-width: 65px; /* モバイル用に最大幅を狭く */
        width: auto; /* コンテンツに応じて可変 */
        font-size: 0.625rem;
        padding: 0.125rem 0.25rem;
        line-height: 1.1; /* モバイルではさらに詰めて */
    }
    
    .news-date {
        font-size: 0.75rem;
    }
    
    /* モバイルでもリンクがある行だけにホバー効果を適用（背景色の変化はなし） */
    .news-table tbody tr.has-link:active {
        /* 背景色とtransform効果を削除 - テキストカラーのみ変化 */
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section-title-sub {
        font-size: 1rem;
    }
}