:root {
    --primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --warning: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --dark: #1a1a2e;
    --light: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-800: #343a40;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.15);
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-lg: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    color: var(--dark);
    overflow-x: hidden;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* ナビゲーション */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-brand img {
    height: 45px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    padding: 0.8rem 1.2rem !important;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

/* ヒーローセクション */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--primary);
    position: relative;
    overflow: hidden;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.15"/><circle cx="75" cy="75" r="1.5" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.8" fill="white" opacity="0.12"/><circle cx="10" cy="60" r="0.6" fill="white" opacity="0.08"/><circle cx="90" cy="40" r="1.2" fill="white" opacity="0.14"/><circle cx="15" cy="85" r="0.4" fill="white" opacity="0.06"/><circle cx="65" cy="30" r="2" fill="white" opacity="0.08"/><circle cx="35" cy="70" r="0.7" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: grain 15s linear infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><pattern id="stars" width="200" height="200" patternUnits="userSpaceOnUse"><polygon points="100,10 104,28 122,28 108,40 112,58 100,46 88,58 92,40 78,28 96,28" fill="white" opacity="0.05"/><polygon points="50,80 52,86 58,86 53,90 55,96 50,92 45,96 47,90 42,86 48,86" fill="white" opacity="0.08"/><polygon points="150,120 152,126 158,126 153,130 155,136 150,132 145,136 147,130 142,126 148,126" fill="white" opacity="0.06"/><polygon points="30,150 32,156 38,156 33,160 35,166 30,162 25,166 27,160 22,156 28,156" fill="white" opacity="0.07"/><polygon points="170,50 172,56 178,56 173,60 175,66 170,62 165,66 167,60 162,56 168,56" fill="white" opacity="0.04"/></pattern></defs><rect width="200" height="200" fill="url(%23stars)"/></svg>');
    animation: stars 25s linear infinite reverse;
    pointer-events: none;
}

@keyframes grain {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-30px, -20px) rotate(90deg);
    }
    50% {
        transform: translate(-50px, -50px) rotate(180deg);
    }
    75% {
        transform: translate(-20px, -30px) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

@keyframes stars {
    0% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-40px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, -60px) scale(0.9);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* 浮遊する図形を追加 */
.hero-content::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float1 6s ease-in-out infinite;
    z-index: -1;
}

.hero-content::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 15%;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    animation: float2 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes float1 {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translateX(0) rotate(0deg) scale(1);
    }
    33% {
        transform: translateX(30px) rotate(120deg) scale(1.2);
    }
    66% {
        transform: translateX(-20px) rotate(240deg) scale(0.8);
    }
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 300;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.btn-hero {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-hero-primary {
    background: white;
    color: var(--dark);
    box-shadow: var(--shadow-lg);
}

.btn-hero-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* セクション共通スタイル */
.section {
    padding: 5rem 0;
    position: relative;
}

.section-alt {
    background: var(--gray-100);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--gray-800);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* About セクション */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-content {
    padding: 2rem;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--gray-800);
}

.about-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.about-image:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Features セクション */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: rotateY(360deg);
}

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--gray-800);
    line-height: 1.6;
}

/* コースセクション */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.course-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--warning);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
}

.course-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.course-content p {
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.course-features {
    list-style: none;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.course-features li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.course-features li::before {
    content: '✓';
    color: #43e97b;
    font-weight: bold;
    margin-right: 0.8rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* 価格エリアを下部に固定 */
.course-price {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

.price-amount {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.price-detail {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-800);
    font-weight: 500;
}

/* ギャラリーセクション - 更新版 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-text p {
    font-size: 0.9rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ポップアップモーダル */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    max-height: 90vh;
    width: 100%;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-container {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.popup-content {
    display: none;
    padding: 2rem;
}

.popup-content.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.popup-image {
    position: relative;
}

.popup-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.popup-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-text p {
    color: var(--gray-800);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.popup-text ul {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
}

.popup-text li {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    color: var(--gray-800);
    font-weight: 500;
}

.popup-text li::before {
    content: '✓';
    color: #43e97b;
    font-weight: bold;
    margin-right: 1rem;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .popup-container {
        margin: 1rem;
        max-height: 85vh;
    }
    
    .popup-content.active {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .popup-text h2 {
        font-size: 1.5rem;
    }
    
    .gallery-text h3 {
        font-size: 1.1rem;
    }
    
    .gallery-text p {
        font-size: 0.8rem;
    }
}

/* スクロールバーカスタマイズ（ポップアップ内） */
.popup-container::-webkit-scrollbar {
    width: 6px;
}

.popup-container::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.popup-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* 講師セクション */
.teacher-section {
    background: var(--primary);
    color: white;
    position: relative;
}

.teacher-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.teacher-image {
    position: relative;
}

.teacher-image img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.teacher-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.teacher-role {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.teacher-info h4 {
    color: #ffd93d;
    margin: 2rem 0 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.teacher-info h4:first-child {
    margin-top: 0;
}

.teacher-info p {
    line-height: 1.7;
    opacity: 0.95;
}

.teacher-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.teacher-section .container {
    position: relative;
    z-index: 2;
}

.teacher-section .section-title {
    color: #ffd93d !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffd93d !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-size: clamp(2.5rem, 4vw, 3.5rem) !important;
}

/* コンタクトセクション */
.contact-container {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.contact-image {
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.contact-image img {
    max-width: 100%;
    border-radius: var(--border-radius);
}

.contact-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.contact-features {
    margin: 2rem 0;
}

.contact-feature {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 500;
}

.contact-feature i {
    color: #00b900;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.btn-line {
    background: #00b900;
    color: white;
    padding: 1.2rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-line:hover {
    background: #009900;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* フッター */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

/* レスポンシブ */
@media (max-width: 768px) {

    .about-grid,
    .teacher-grid,
    .contact-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-hero {
        width: 100%;
        max-width: 300px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 3rem 0;
    }

    .about-image {
        transform: none;
    }

    .about-image:hover {
        transform: none;
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}