/* Tailwind設定 */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

/* カスタムカラー */
:root {
    --primary: #FFB74D;
    --secondary: #4FC3F7;
}

/* カスタムボーダーラディウス */
.rounded-button {
    border-radius: 8px;
}

/* ヒーロー画像スライダー */
.hero-slide {
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide:not(.active) {
    opacity: 0;
}

/* スライドインジケーター */
.slide-indicator {
    cursor: pointer;
    background-color: rgba(255, 183, 77, 0.4);
    border: 2px solid rgba(255, 183, 77, 0.6);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slide-indicator.active {
    background-color: rgba(255, 183, 77, 0.9) !important;
    border-color: rgba(255, 183, 77, 1);
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(255, 183, 77, 0.4);
}

.slide-indicator:hover {
    background-color: rgba(255, 183, 77, 0.7) !important;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(255, 183, 77, 0.3);
}

/* 長期休業中の活動例のアニメーション */
.activity-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.activity-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}


/* カスタムアニメーション */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* スクロールアニメーション */
.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

.scroll-animate.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-delay-1 {
    transition-delay: 0.1s;
}

.scroll-animate-delay-2 {
    transition-delay: 0.2s;
}

.scroll-animate-delay-3 {
    transition-delay: 0.3s;
}

.scroll-animate-delay-4 {
    transition-delay: 0.4s;
}

.scroll-animate-delay-5 {
    transition-delay: 0.5s;
}

.scroll-animate-delay-6 {
    transition-delay: 0.6s;
}

.scroll-animate-delay-7 {
    transition-delay: 0.7s;
}

.scroll-animate-delay-8 {
    transition-delay: 0.8s;
}

/* プルダウンメニュー */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    top: 100%;
    left: 0;
    margin-top: -1px;
}

.dropdown-content a {
    color: #374151;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    border-radius: 6px;
    margin: 4px;
}

.dropdown-content a:hover {
    background-color: #f3f4f6;
    color: var(--primary);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropdown-toggle {
    color: var(--primary);
}

/* モバイル用プルダウンメニュー */
.mobile-dropdown {
    position: relative;
}

.mobile-dropdown-content {
    display: none;
    background-color: #f9fafb;
    padding-left: 1rem;
}

.mobile-dropdown-content a {
    color: #6b7280;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.mobile-dropdown-content a:hover {
    color: var(--primary);
}

.mobile-dropdown.active .mobile-dropdown-content {
    display: block;
}


/* トップアニメーション */

.top-content-taiyou {
    position: absolute;
    top: 20%;
    width: 100px;
    height: 100px;
    background: url('images/taiyou.png') no-repeat;
    background-size: contain;
    opacity: 0.9;
    z-index:10;
}

.top-content-moon {
    position: absolute;
    top: 20%;
    width: 100px;
    height: 100px;
    background: url('images/moon.png') no-repeat;
    background-size: contain;
    opacity: 0.9;
    z-index:10;
}

.top-content-toys {
    position: absolute;
    bottom: 20%;
    width: 100px;
    height: 100px;
    background: url('images/toys.png') no-repeat;
    background-size: contain;
    opacity: 0.9;
    z-index:10;
}

.top-content-study {
    position: absolute;
    bottom: 20%;
    width: 120px;
    height: 120px;
    background: url('images/study.png') no-repeat;
    background-size: contain;
    opacity: 0.9;
    z-index:10;
}

.taiyou {
    animation: floatDiagonalTaiyou 3s ease-in-out infinite;
    left: 15%;
    opacity: 0.95;
}

.moon {
    animation: floatDiagonalMoon 3s ease-in-out infinite;
    opacity: 0.95;
    right: 15%;
}

.toys {
    animation: floatDiagonalToys 3s ease-in-out infinite;
    opacity: 0.95;
    left: 15%;
}

.study {
    animation: floatDiagonalStudy 3s ease-in-out infinite;
    opacity: 0.95;
    right: 15%;
}

@keyframes floatDiagonalTaiyou {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-20px, -10px); }
    50%   { transform: translate(0, 0); }
    75%  { transform: translate(20px, 10px); }
    100% { transform: translate(0, 0); }
}

@keyframes floatDiagonalMoon {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(20px, -10px); }
    50%   { transform: translate(0, 0); }
    75%  { transform: translate(-10px, 10px); }
    100% { transform: translate(0, 0); }
}

@keyframes floatDiagonalToys {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-20px, 10px); }
    50%   { transform: translate(0, 0); }
    75%  { transform: translate(5px, 20px); }
    100% { transform: translate(0, 0); }
}

@keyframes floatDiagonalStudy {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(20px, 10px); }
    50%   { transform: translate(0, 0); }
    75%  { transform: translate(-4px, 20px); }
    100% { transform: translate(0, 0); } 
}


/* スクロールアニメーション */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-animate.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-delay-1 {
    transition-delay: 0.1s;
}

.scroll-animate-delay-2 {
    transition-delay: 0.2s;
}

.scroll-animate-delay-3 {
    transition-delay: 0.3s;
}

.scroll-animate-delay-4 {
    transition-delay: 0.4s;
}

.scroll-animate-delay-5 {
    transition-delay: 0.5s;
}

/* 左から右へのスライドアニメーション */
.scroll-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.scroll-slide-left.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* 右から左へのスライドアニメーション */
.scroll-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.scroll-slide-right.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* スケールアニメーション */
.scroll-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease-out;
}

.scroll-scale.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* 回転アニメーション */
.scroll-rotate {
    opacity: 0;
    transform: rotate(-10deg) translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-rotate.animate-in {
    opacity: 1;
    transform: rotate(0deg) translateY(0);
}

@media (max-width: 768px) {
    .top-content-taiyou {
        width: 50px;
    }
    .top-content-moon {
        width: 50px;
    }
    .top-content-toys {
        width: 60px;
    }
    .top-content-study {
        width: 60px;
    }

    .taiyou {
        top: 15%;
        left: 5%;
    }
    .moon {
        top: 15%;
        right: 5%;
    }
    .toys {
        left: 5%;
        bottom: 10%;
    }
    .study {
        right: 5%;
        bottom: 10%;
    }

    /* モバイル用のアニメーション調整 */
    .scroll-animate {
        transform: translateY(20px);
    }
    
    .scroll-slide-left {
        transform: translateX(-30px);
    }
    
    .scroll-slide-right {
        transform: translateX(30px);
    }
}

/* お知らせセクション */
.news-item {
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-4px);
}

.news-item:hover .line-clamp-2 {
    color: var(--primary);
}

/* テキストの行数制限 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* モーダルアニメーション */
#news-modal {
    transition: opacity 0.3s ease;
}

#news-modal:not(.hidden) {
    animation: fadeIn 0.3s ease;
}

#news-modal .bg-white {
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* モーダル内のスタイル */
#news-modal h4 {
    color: #374151;
    margin-bottom: 0.5rem;
}

#news-modal ul {
    margin-bottom: 1rem;
}

#news-modal li {
    margin-bottom: 0.25rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .news-item {
        margin-bottom: 1rem;
    }
    
    #news-modal .bg-white {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
}