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

/* 基本設定 */
:root {
    --header-height: 60px;
    --top-news-height: 40px;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* TOP NEWS エリア */
.top-news {
    background: -webkit-linear-gradient(left, #1a237e, #0277bd);
    background: linear-gradient(to right, #1a237e, #0277bd);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: bold;
    height: var(--top-news-height);
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.top-news p {
    max-width: 1200px;
    margin: 0 auto;
}

/* ヘッダー */
header {
    background: -webkit-linear-gradient(left, #1a237e, #0277bd);
    background: linear-gradient(to right, #1a237e, #0277bd);
    padding: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white;
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
}

.logo {
    width: 200px;
    height: auto;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.logo img {
    width: 100%;
    height: auto;
}

/* メインメニュー */
.main-menu {
    position: relative;
}

.main-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-menu .menu-item {
    position: relative;
}

.main-menu a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.main-menu > ul > li > a {
    position: relative;
}

.main-menu > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.main-menu > ul > li:hover > a::after {
    transform: scaleX(1);
}

.main-menu span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* サブメニュー */
.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(248, 249, 250, 0.95);
    min-width: 200px;
    padding: 8px 0;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

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

.submenu a {
    padding: 8px 24px;
    font-size: 0.9rem;
    display: block;
    text-align: left;
    white-space: nowrap;
    transition: background-color 0.3s ease;
    color: #333;
}

.submenu a:hover {
    background-color: #f0f0f0;
    color: #1a237e;
}

/* PCのみサブメニューを表示 */
@media screen and (max-width: 1024px) {
    .main-menu {
        display: none;
    }
}

.header-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.language {
    text-decoration: none;
    color: white;
    font-weight: bold;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.search-btn:hover {
    opacity: 1;
}

.search-icon {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
}

/* 虫眼鏡アイコン */
.search-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border: 2px solid white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-icon::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 11px;
    width: 2px;
    height: 7px;
    background: white;
    transform: rotate(-45deg);
    transition: all 0.3s ease;
}

/* ×マークスタイル */
.search-btn.active .search-icon::before {
    width: 18px;
    height: 2px;
    border: none;
    background: white;
    transform: rotate(45deg);
    top: 8px;
    left: 0;
    border-radius: 0;
}

.search-btn.active .search-icon::after {
    width: 18px;
    height: 2px;
    top: 8px;
    left: 0;
    transform: rotate(-45deg);
    background: white;
}

/* 検索ボックス */
.search-box {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(248, 249, 250, 0.98);
    padding: 1rem 0;
    transform: translateY(0%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* z-index: 1000; */
}

.search-box.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

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

.search-form {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #1a237e;
}

.search-submit {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.search-submit:hover {
    opacity: 1;
}

.search-submit-icon {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
}

.search-submit-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 11px;
    height: 11px;
    border: 2px solid #333;
    border-radius: 50%;
}

.search-submit-icon::after {
    content: '';
    position: absolute;
    top: 9px;
    left: 10px;
    width: 2px;
    height: 7px;
    background: #333;
    transform: rotate(-45deg);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
}

/* メインコンテンツ */
main {
    margin: 0 auto;
    overflow-x: hidden;
}

/* Hero エリア */
.hero {
    width: 100vw;
    height: calc(100vh - (var(--header-height) + var(--top-news-height)));
    position: relative;
    overflow: hidden;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.hero-slider {
    width: 100%;
    height: 100%;
}

.hero-slide {
    width: 100%;
    height: 100%;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01); /* Safari用のちらつき防止 */
}

.hero-slide img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    -webkit-transform: scale(1.01); /* Safari用のちらつき防止 */
    transform: scale(1.01);
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    -webkit-transform: translateY(20px);
    transform: translateY(20px);
    -webkit-transition: opacity 0.6s ease-out, -webkit-transform 0.6s ease-out;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

/* セクション共通 */
.pickup,
.about-event,
.news,
.blog-list,
.sponsor,
.sns {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 8rem 0; /* デスクトップサイズのパディング */
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem; /* 左右の余白を増やす */
}

section h2 {
    text-align: center;
    margin-bottom: 3rem; /* 見出し下の余白を増やす */
    font-size: 2rem;
}

/* 各セクションの背景色 */
.pickup {
    background-color: #f8f9fa;
}

.about-event {
    background-color: #ffffff;
}

.news {
    background-color: #f1f5f9;
}

.blog-list {
    background-color: #ffffff;
}

/* ブロググリッド */
.blog-grid {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-item {
    aspect-ratio: 16/9;
    background-color: #f0f0f0;
    border-radius: 8px;
    opacity: 0;
    -webkit-transform: translateY(20px);
    transform: translateY(20px);
    -webkit-transition: opacity 0.6s ease-out, -webkit-transform 0.6s ease-out;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.blog-item.visible {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

/* スポンサー */
.sponsor {
    background-color: #f8f9fa;
}

.sns {
    background-color: #ffffff;
}

/* フッター */
footer {
    background-color: #333;
    color: white;
    padding: 4rem 0;
    text-align: center;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* レスポンシブ対応 */
@media screen and (max-width: 1024px) {
    .pickup,
    .about-event,
    .news,
    .blog-list,
    .sponsor,
    .sns {
        padding: 6rem 0; /* タブレットサイズのパディング */
    }

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

    section h2 {
        margin-bottom: 2.5rem;
        font-size: 1.8rem;
    }

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

    .main-menu {
        display: none;
    }

    .menu-toggle {
        display: -webkit-flex;
        display: flex;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --header-height: 50px;
        --top-news-height: 50px;
    }

    .pickup,
    .about-event,
    .news,
    .blog-list,
    .sponsor,
    .sns {
        padding: 4rem 0; /* 小型タブレットサイズのパディング */
    }

    .section-content {
        padding: 0 1.25rem;
    }

    section h2 {
        margin-bottom: 2rem;
        font-size: 1.6rem;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .hero {
        height: 60vh;
    }

    .header-container {
        padding: 0 1.25rem;
    }
}

@media screen and (max-width: 480px) {
    .pickup,
    .about-event,
    .news,
    .blog-list,
    .sponsor,
    .sns {
        padding: 2.5rem 0; /* 40px - コンテンツ間の余白を少し縮小 */
    }

    .section-content {
        padding: 0 1rem; /* 16px - 左右の余白はそのまま */
    }

    section h2 {
        margin-bottom: 1.25rem; /* 20px - 見出し下の余白を調整 */
        font-size: 1.4rem;
        letter-spacing: -0.02em; /* 文字詰めを少し調整 */
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem; /* 16px - グリッドアイテム間の余白 */
    }

    .blog-item {
        aspect-ratio: 16/9;
        margin-bottom: 0.5rem; /* 8px - アイテム下の余白を追加 */
    }

    .top-news {
        font-size: 0.875rem;
        padding: 0.5rem;
        height: 40px; /* 固定高さを設定 */
    }

    header {
        height: 50px;
    }

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

    .logo {
        width: 140px;
    }
}

/* 小さいスマートフォン向けの追加調整 */
@media screen and (max-width: 360px) {
    .pickup,
    .about-event,
    .news,
    .blog-list,
    .sponsor,
    .sns {
        padding: 2rem 0; /* 32px - さらにコンパクトに */
    }

    .section-content {
        padding: 0 0.875rem; /* 14px - 左右の余白をさらに調整 */
    }

    section h2 {
        margin-bottom: 1rem; /* 16px */
        font-size: 1.25rem;
    }
}

/* タッチデバイス対応 */
@media (hover: none) {
    .blog-item {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Safariのバグ対応 */
@supports (-webkit-touch-callout: none) {
    .hero {
        height: -webkit-fill-available;
    }
}

@media screen and (max-width: 480px) {
    footer {
        padding: 3rem 0;
    }
} 