/*
Theme Name: Shinshu Kids IT Contest
Theme URI: https://shinshu-kids-it.com/
Description: 信州キッズITコンテストのWordPressテーマ
Author: KCIC Team
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shinshu-kids-it
*/

/* Base Styles */
:where([class^="ri-"])::before { content: "\f3c2"; }

body {
    font-family: 'Kosugi Maru', sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    height: 600px;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    z-index: 0;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-color: rgba(0,0,0,0.5); */
    background: linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-parallax-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-parallax-item {
    position: absolute;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.hero-parallax-item.item-1 {
    top: 10%;
    right: 10%;
    width: 200px;
    height: 200px;
}

.hero-parallax-item.item-2 {
    top: 40%;
    right: 25%;
    width: 150px;
    height: 150px;
}

.hero-parallax-item.item-3 {
    top: 20%;
    right: 40%;
    width: 180px;
    height: 180px;
}
.hero-parallax-item.item-4 {
    top: 60%;
    right: 15%;
    width: 160px;
    height: 160px;
}

.hero-parallax-item.item-5 {
    top: 30%;
    right: 55%;
    width: 140px;
    height: 140px;
}

.hero-parallax-item.item-6 {
    top: 70%;
    right: 35%;
    width: 170px;
    height: 170px;
}

.hero-parallax-item.item-7 {
    top: 15%;
    right: 70%;
    width: 130px;
    height: 130px;
}

.hero-parallax-item.item-8 {
    top: 45%;
    right: 80%;
    width: 190px;
    height: 190px;
}

.hero-parallax-item.item-9 {
    top: 55%;
    right: 60%;
    width: 150px;
    height: 150px;
}

.hero-parallax-item.item-10 {
    top: 25%;
    right: 85%;
    width: 140px;
    height: 140px;
}

.hero-parallax-item.item-11 {
    top: 75%;
    right: 75%;
    width: 180px;
    height: 180px;
}


.hero-parallax-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Form Elements */
input[type="checkbox"], input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    display: none;
}

.custom-checkbox {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 2px solid #4A86E8;
    border-radius: 4px;
    position: relative;
}

input[type="checkbox"]:checked + .custom-checkbox::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 12px;
    border-right: 2px solid #4A86E8;
    border-bottom: 2px solid #4A86E8;
    transform: rotate(45deg);
}

.custom-radio {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 2px solid #4A86E8;
    border-radius: 50%;
    position: relative;
}

input[type="radio"]:checked + .custom-radio::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    background-color: #4A86E8;
    border-radius: 50%;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4A86E8;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* News Badges */
.news-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.badge-events {
    background-color: #FFD166;
    color: #333;
}

.badge-update {
    background-color: #06D6A0;
    color: #333;
}

.badge-support {
    background-color: #EF476F;
    color: white;
}

/* Timeline */
.timeline-item {
    position: relative;
    padding-left: 28px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4A86E8;
}

.timeline-item::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 12px;
    width: 2px;
    height: calc(100% - 12px);
    background-color: #4A86E8;
}

.timeline-item:last-child::after {
    display: none;
}

/* Article Content */
.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: #1a202c;
}

.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: #1a202c;
}

.article-content blockquote {
    border-left: 4px solid #4A86E8;
    padding-left: 1rem;
    font-style: italic;
    margin: 1.5rem 0;
    color: #4a5568;
}

.article-content ul, .article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    margin: 1.5rem 0;
    border-radius: 8px;
}

/* Tag Cloud */
.tag-cloud span {
    transition: all 0.3s ease;
}

.tag-cloud span:hover {
    transform: scale(1.05);
}

/* WordPress Specific Styles */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.wp-block-quote {
    border-left: 4px solid #4A86E8;
    padding-left: 1rem;
    margin: 1.5rem 0;
}

.wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.alignfull {
    margin: 2rem calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

.alignwide {
    margin: 2rem calc(25% - 25vw);
    max-width: 100vw;
    width: 100vw;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .mobile-menu {
        display: none;
    }

    .mobile-menu.active {
        display: block;
    }

    .nav-links {
        flex-direction: column;
    }
}

/* Utility Classes */
.text-primary { color: #4A86E8; }
.bg-primary { background-color: #4A86E8; }
.border-primary { border-color: #4A86E8; }

.text-secondary { color: #FF9843; }
.bg-secondary { background-color: #FF9843; }
.border-secondary { border-color: #FF9843; }

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    display: block;
    height: auto;
    left: 5px;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* 2024 Contest Details Styles */
/* Tab Navigation */
.category-tab {
    transition: all 0.3s ease;
}

.category-tab:hover {
    background-color: #f3f4f6;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Winner Cards */
#winners hr {
    margin: 35px 0;
}
#winners .bg-blue-50,
#winners .bg-green-50,
#winners .bg-orange-50 {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#winners .bg-yellow-400 {
    background-color: #fbbf24;
    color: #92400e;
}

#winners .bg-blue-400 {
    background-color: #60a5fa;
    color: white;
}

#winners .bg-purple-400 {
    background-color: #a78bfa;
    color: white;
}

#winners .bg-orange-400 {
    background-color: #fb923c;
    color: white;
}

#winners .bg-gray-400 {
    background-color: #9ca3af;
    color: white;
}

/* Gallery Styles */
#gallery .gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

#gallery .gallery-item:hover {
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* Testimonial Slider */
.testimonial-slider {
    overflow: hidden;
    position: relative;
}

.testimonial-slides {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-slide {
    min-width: 100%;
}

.slider-controls {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dot.active {
    background-color: #4A86E8;
}

/* Resources Section */
#resources .bg-blue-50,
#resources .bg-green-50,
#resources .bg-purple-50 {
    transition: all 0.3s ease;
}

#resources .bg-blue-50:hover,
#resources .bg-green-50:hover,
#resources .bg-purple-50:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Custom Field Content Styles */
/* Winners Section */
#winners h2,
#gallery h2,
#testimonials h2,
#resources h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
}

#winners h3,
#gallery h3,
#testimonials h3,
#resources h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

#winners h4,
#gallery h4,
#testimonials h4,
#resources h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

/* Gallery Content */
.gallery-content {
    line-height: 1.6;
}

.gallery-content p {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.gallery-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.gallery-content figure {
    margin: 16px 0;
}

.gallery-content figcaption {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-top: 8px;
}

.gallery-content .wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.gallery-content .wp-block-gallery .blocks-gallery-item {
    margin: 0;
}

.gallery-content .wp-block-gallery .blocks-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #winners h2,
    #gallery h2,
    #testimonials h2,
    #resources h2 {
        font-size: 1.5rem;
    }

    .gallery-content .wp-block-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Button Styles */
.rounded-button {
    border-radius: 8px;
}

/* Background Colors for Sections */
.bg-yellow-50 {
    background-color: #fffbeb;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-green-50 {
    background-color: #f0fdf4;
}

.bg-purple-50 {
    background-color: #faf5ff;
}

.bg-orange-50 {
    background-color: #fff7ed;
}

.bg-pink-50 {
    background-color: #fdf2f8;
}

/* Single Post Navigation */
.post-navigation {
    transition: all 0.3s ease;
}

.post-navigation:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Sidebar Styles */
.sidebar-widget {
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-1px);
}

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

/* Search Form */
.search-form input[type="search"] {
    transition: all 0.3s ease;
}

.search-form input[type="search"]:focus {
    box-shadow: 0 0 0 3px rgba(74, 134, 232, 0.1);
}

/* Category List */
.category-list li {
    transition: all 0.2s ease;
}

.category-list li:hover {
    background-color: #f8fafc;
}

/* Tag Cloud */
.tag-cloud a {
    transition: all 0.2s ease;
}

.tag-cloud a:hover {
    transform: scale(1.05);
}

