/* ==========================================================================
   トップページ - モダンデザインシステム
   ========================================================================== */

:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-main: #0f172a;
    --text-sub: #64748b;
}

.shingaku-home,
.hero-section,
.hero-section *,
.hero-section *::before,
.hero-section *::after,
.featured-section,
.featured-section *,
.featured-section *::before,
.featured-section *::after,
.schools-section,
.schools-section *,
.schools-section *::before,
.schools-section *::after,
.custom-content-section,
.custom-content-section *,
.custom-content-section *::before,
.custom-content-section *::after {
    box-sizing: border-box;
}

.shingaku-home {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #ffffff;
    color: var(--text-main);
}

html:has(.shingaku-home) {
    overflow-x: hidden;
}

/* ==========================================================================
   Split Entry UI - フルスクリーンヒーロー
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    z-index: 0;
}

.hero-background--image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2364748b' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 2;
}

/* フローティングヘッダー */
.site-header-floating {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0.375rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.site-header-floating.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.site-header-floating__logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.site-header-floating__logo-img {
    max-height: 2.5rem;
    max-width: 8rem;
    width: auto;
    object-fit: contain;
}

.site-header-floating__logo-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--shingaku-title-color, #4f46e5);
}

.site-header-floating__nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-header-floating__nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-sub);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.site-header-floating__nav a:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.05);
}

/* ヒーローコンテンツ */
.hero-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 9999px;
    color: #6366f1;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title span {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-sub);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease 0.2s both;
}

/* 背景画像時のテキスト色 */
.hero-section--has-image .hero-badge {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-section--has-image .hero-title {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-section--has-image .hero-title span {
    background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #f9a8d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section--has-image .hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.hero-section--has-image .scroll-indicator {
    color: rgba(255, 255, 255, 0.7);
}

.hero-section--has-image .scroll-indicator__line {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), transparent);
}

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

/* カテゴリーカード */
.category-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    animation: fadeInUp 0.6s ease 0.3s both;
}

@media (max-width: 1023px) {
    .category-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--card-color) 0%,
        transparent 60%
    );
    opacity: 0.05;
    transition: opacity 0.4s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--card-color);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.category-card:hover::before {
    opacity: 0.1;
}

.category-card__icon-wrapper {
    position: relative;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--card-color), color-mix(in srgb, var(--card-color) 70%, white));
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 15px -3px color-mix(in srgb, var(--card-color) 30%, transparent);
}

.category-card__icon {
    width: 2rem;
    height: 2rem;
    color: white;
}

.category-card__content {
    position: relative;
    z-index: 1;
}

.category-card__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--card-color);
    margin-bottom: 0.5rem;
}

.category-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.category-card__description {
    font-size: 0.875rem;
    color: var(--text-sub);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.category-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--card-color);
    transition: gap 0.2s ease;
}

.category-card:hover .category-card__cta {
    gap: 0.75rem;
}

.category-card__stats {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    text-align: right;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.category-card:hover .category-card__stats {
    opacity: 1;
    transform: translateY(0);
}

.category-card__stats-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--card-color);
}

.category-card__stats-label {
    font-size: 0.75rem;
    color: var(--text-sub);
}

/* スクロールヒント */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-sub);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: bounce 2s infinite;
}

.scroll-indicator__line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-sub), transparent);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ==========================================================================
   注目のイベントセクション
   ========================================================================== */

.featured-section {
    position: relative;
    padding: 6rem 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #fefce8 40%, #fef9c3 100%);
}

.featured-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(234, 179, 8, 0.3), transparent);
}

.section-header__badge--featured {
    background: #fefce8;
    border-color: #fde047;
    color: #a16207;
}

/* 注目イベントカルーセル */
.featured-carousel {
    position: relative;
}

.featured-carousel__track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0 1rem;
}

.featured-carousel__track::-webkit-scrollbar {
    display: none;
}

.featured-carousel__slide {
    flex: 0 0 calc((100% - 3rem) / 3);
    scroll-snap-align: start;
    min-width: 0;
}

@media (max-width: 1023px) {
    .featured-carousel__slide {
        flex: 0 0 calc((100% - 1.5rem) / 2);
    }
}

@media (max-width: 640px) {
    .featured-carousel__slide {
        flex: 0 0 85%;
    }
}

/* カルーセルナビゲーション */
.featured-carousel__nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.featured-carousel__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 2px solid #fde047;
    background: #ffffff;
    color: #a16207;
    cursor: pointer;
    transition: all 0.2s ease;
}

.featured-carousel__btn:hover {
    background: #fefce8;
    border-color: #eab308;
    transform: scale(1.1);
}

.featured-carousel__btn:disabled {
    opacity: 0.3;
    cursor: default;
    transform: none;
}

.featured-carousel__btn i {
    width: 1.25rem;
    height: 1.25rem;
}

.featured-carousel__dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.featured-carousel__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #fde68a;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.featured-carousel__dot--active {
    width: 1.5rem;
    background: #eab308;
}

/* ==========================================================================
   イベントセクション
   ========================================================================== */

.events-section {
    position: relative;
    padding: 6rem 2rem;
    background: #f8fafc;
}

.events-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-sub);
    font-size: 1rem;
}

/* ==========================================================================
   学校セクション
   ========================================================================== */

.schools-section {
    position: relative;
    padding: 6rem 2rem;
    background: #ffffff;
}

.school-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--card-color) 5%, white),
        #ffffff
    );
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.school-category-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.school-category-card__icon {
    width: 3.5rem;
    height: 3.5rem;
    color: var(--card-color);
    margin-bottom: 1rem;
}

.school-category-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.school-category-card__subtitle {
    font-size: 0.875rem;
    color: var(--text-sub);
}

.school-category-card__arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--card-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.school-category-card:hover .school-category-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   カスタムコンテンツセクション（ブロックエディタ用）
   ========================================================================== */

.custom-content-section {
    position: relative;
    padding: 6rem 2rem;
    background: #f8fafc;
    color: var(--text-main);
}

.custom-content-section .section-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ブロックスタイル調整 */
.custom-content-section h2,
.custom-content-section h3,
.custom-content-section h4 {
    color: var(--text-main);
}

.custom-content-section p {
    color: var(--text-sub);
}

.custom-content-section a {
    color: #4f46e5;
}

.custom-content-section a:hover {
    color: #6366f1;
}

/* Gutenbergブロックの対応 */
.custom-content-section .wp-block-group,
.custom-content-section .wp-block-columns {
    color: inherit;
}

.custom-content-section .shgk-event-card,
.custom-content-section .shgk-school-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--text-main);
}

.custom-content-section .shgk-event-card:hover,
.custom-content-section .shgk-school-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
