/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif JP', 'Yu Mincho', 'YuMincho', 'Hiragino Mincho ProN', 'Hiragino Mincho Pro', serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.8;
    overflow-x: hidden;
    font-size: 14px;
    position: relative;
}

/* Header with Menu */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    padding: 30px;
    z-index: 1000;
}

/* Hamburger Menu Button */
.menu-toggle {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Fullscreen Menu */
.fullscreen-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(245, 245, 245, 0.7) 100%);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.fullscreen-menu.active {
    right: 0;
}

.menu-content {
    text-align: center;
}

.menu-content nav {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 50px;
}

.menu-content nav a {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.fullscreen-menu.active .menu-content nav a {
    animation: slideInMenu 0.6s ease forwards;
}

.fullscreen-menu.active .menu-content nav a:nth-child(1) { animation-delay: 0.1s; }
.fullscreen-menu.active .menu-content nav a:nth-child(2) { animation-delay: 0.2s; }
.fullscreen-menu.active .menu-content nav a:nth-child(3) { animation-delay: 0.3s; }
.fullscreen-menu.active .menu-content nav a:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInMenu {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-content nav a:hover {
    color: #999;
    transform: translateX(10px);
}

.menu-social {
    display: flex;
    gap: 30px;
    justify-content: center;
    opacity: 0;
}

.fullscreen-menu.active .menu-social {
    animation: slideInMenu 0.6s ease 0.5s forwards;
}

.menu-social a {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: color 0.3s;
}

.menu-social a:hover {
    color: #333;
}

/* Video Background */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    background: #000;
}

.video-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.video-container video.loaded {
    opacity: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.fallback-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Video Loading Animation */
.video-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.video-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner::before,
.spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.spinner::before {
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: ripple 2s ease-out infinite;
}

.spinner::after {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    animation: ripple 2s ease-out infinite 1s;
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
    100% {
        transform: scale(0.8);
        opacity: 1;
    }
}

/* Hero Section */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.hero p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 300;
    color: #fff;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
    letter-spacing: 0.2em;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
}

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

/* Content Section */
.content {
    background: #fff;
    position: relative;
    z-index: 1;
}

.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

.section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
    letter-spacing: 0.05em;
}

/* What's New */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.news-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image {
    transform: scale(1.05);
}

.news-card-content {
    padding: 16px 16px 12px 16px;
}

.news-card h3 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: #222;
    font-weight: 600;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.2rem;
}

.news-date {
    font-family: 'Noto Sans JP', sans-serif;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 400;
}

.news-content {
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 0;
}

/* Profile */
.profile-section {
    position: relative;
    min-height: 100vh;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.profile-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.profile-section .section {
    position: relative;
    padding: 100px 0;
}

@media (max-width: 768px) {
    .profile-section {
        background-attachment: scroll !important;
    }
}

.profile-section h2 {
    color: #fff;
    margin-bottom: 40px;
}

.profile-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-content p {
    font-family: 'Noto Serif JP', 'Yu Mincho', serif;
    font-weight: 400;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 2;
    color: #fff;
}

.profile-content p strong {
    font-weight: 600;
    color: #fff;
}

/* Biography */
.biography-section {
    position: relative;
    margin-top: 80px;
    min-height: 100vh;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.biography-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.biography-section .section {
    position: relative;
    padding: 100px 0;
}

@media (max-width: 768px) {
    .biography-section {
        background-attachment: scroll !important;
    }
}

.biography-section h2 {
    color: #fff;
    margin-bottom: 40px;
}

.biography-section h3 {
    color: #fff !important;
}

.biography-section .profile-box {
    background: transparent;
    box-shadow: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.biography-section .profile-box p {
    color: #fff;
    font-size: 1rem;
    line-height: 2;
    margin-bottom: 20px;
}

.biography-section .profile-box h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Photos */
.photos-section {
    position: relative;
    margin-top: 80px;
    min-height: 60vh;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.photos-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.photos-section .section {
    position: relative;
    padding: 100px 0;
}

@media (max-width: 768px) {
    .photos-section {
        background-attachment: scroll !important;
    }
}

.photos-section h2 {
    color: #fff;
    margin-bottom: 40px;
}

.photos-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.photos-content p {
    font-size: 1rem;
    color: #fff;
    line-height: 2;
    margin-bottom: 40px;
}

.photos-content .view-button {
    display: inline-block;
    padding: 14px 40px;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.photos-content .view-button:hover {
    background: #333;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Scroll Animation */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Stagger animation delays */
.news-card {
    transition-delay: 0s;
}

.news-card:nth-child(1) { transition-delay: 0.1s; }
.news-card:nth-child(2) { transition-delay: 0.2s; }
.news-card:nth-child(3) { transition-delay: 0.3s; }
.news-card:nth-child(4) { transition-delay: 0.4s; }
.news-card:nth-child(5) { transition-delay: 0.5s; }
.news-card:nth-child(6) { transition-delay: 0.6s; }

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 40px 20px;
    margin-top: 80px;
}

footer .social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

footer .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

footer .social-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

/* Announcements Section */
.announcements-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px 40px;
}

.announcements-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
    letter-spacing: 0.05em;
}

.announcement-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.announcement-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.announcement-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.announcement-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.announcement-content {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.announcement-content a {
    color: #555;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.announcement-content a:hover {
    color: #333;
}

@media (max-width: 768px) {
    .announcements-section {
        margin: 40px auto;
    }

    .announcement-item {
        padding: 15px;
    }
}

/* YouTube Gallery with Swiper */
.youtube-gallery-section {
    background: #e8e8e8;
    padding: 40px 0;
    margin-top: 100px;
    width: 100%;
    max-width: none;
}

.youtube-gallery-section h2 {
    margin-bottom: 2rem;
}

.youtube-gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    padding: 0 50px;
}

.youtubeSwiper {
    padding: 20px 0 50px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.youtubeSwiper.swiper-initialized {
    opacity: 1;
}

.youtubeSwiper .swiper-slide {
    height: auto;
}

.youtube-video-item {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    height: 100%;
}

.youtube-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.youtube-video-item img {
    width: 100%;
    height: auto;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.youtube-video-item .video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* Swiper Navigation Buttons */
.youtubeSwiper .swiper-button-next,
.youtubeSwiper .swiper-button-prev {
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.youtubeSwiper .swiper-button-next:after,
.youtubeSwiper .swiper-button-prev:after {
    font-size: 20px;
}

.youtubeSwiper .swiper-button-next:hover,
.youtubeSwiper .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Swiper Pagination */
.youtubeSwiper .swiper-pagination-bullet {
    background: #333;
    opacity: 0.5;
}

.youtubeSwiper .swiper-pagination-bullet-active {
    opacity: 1;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.youtube-video-item:hover .play-button {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 25px solid #333;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    margin-left: 5px;
}

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16/9;
}

.video-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 36px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Common Button Styles */
.btn-primary {
    display: inline-block;
    padding: 14px 40px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-light {
    display: inline-block;
    padding: 14px 40px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border: 2px solid #fff;
}

.btn-light:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .youtube-gallery-container {
        padding: 0;
    }

    .play-button {
        width: 60px;
        height: 60px;
    }

    .play-button::after {
        border-left: 18px solid #333;
        border-top: 11px solid transparent;
        border-bottom: 11px solid transparent;
    }

    .video-modal-close {
        top: -40px;
        font-size: 28px;
        width: 40px;
        height: 40px;
    }
}
