/* 修正後のCSS（重複を削除し、アニメーションを確実に適用） */

/* 基本設定 */
:root {
    --primary: #FF9E9E;
    --secondary: #A5D8FF;
    --accent: #FFD166;
    --text: #333333;
    --light-bg: #FFF9F2;
    --white: #ffffff;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    position: relative;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* 背景要素の基本スタイル */
.hand-drawn-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.bg-ellipse, .bg-circle {
    position: absolute;
    filter: blur(12px);
    opacity: 0.5;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

/* 楕円形要素 */
.bg-ellipse {
    border-radius: 50%;
    width: 300px;
    height: 200px;
}

/* 円形要素 */
.bg-circle {
    border-radius: 50%;
    width: 150px;
    height: 150px;
}

/* 個別配置とアニメーション設定 */
.bg-ellipse-1 {
    background-color: var(--secondary);
    top: 10%;
    left: 5%;
    width: 250px;
    height: 250px;
    animation: float-wide 8s infinite;
}

.bg-circle-1 {
    background-color: var(--primary);
    top: 15%;
    right: 20%;
    width: 250px;
    height: 250px;
    animation: pulse-large 8s infinite;
}

.bg-circle-3 {
    background-color: var(--accent);
    top: 50%;
    left: 20%;
    width: 100px;
    height: 100px;
    animation: float-vertical 8s infinite;
}

.bg-circle-4 {
    background-color: var(--primary);
    top: 60%;
    left: 10%;
    width: 230px;
    height: 230px;
    animation: pulse-slow 8s infinite;
}

.bg-circle-5 {
    background-color: var(--secondary);
    bottom: 15%;
    right: 15%;
    width: 200px;
    height: 200px;
    animation: float-diagonal 6s infinite;
}

.bg-circle-6 {
    background-color: var(--accent);
    top: 30%;
    right: 5%;
    width: 180px;
    height: 180px;
    animation: pulse-large 9s infinite;
}

.bg-circle-7 {
    background-color: var(--primary);
    bottom: 40%;
    right: 50%;
    width: 200px;
    height: 200px;
    animation: float-slow 8s infinite;
}

/* アニメーション定義 */
@keyframes float-wide {
    0%, 100% { transform: translate(-20px, -30px) rotate(10deg) scale(1); }
    50% { transform: translate(40px, 50px) rotate(-15deg) scale(1.2); }
}

@keyframes float-reverse-wide {
    0%, 100% { transform: translate(30px, 40px) rotate(-10deg) scale(1); }
    50% { transform: translate(-50px, -60px) rotate(20deg) scale(1.3); }
}

@keyframes pulse-large {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.4; }
    50% { transform: scale(1.5) rotate(15deg); opacity: 0.7; }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-60px) rotate(10deg); }
}

@keyframes float-vertical {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-80px); }
}

@keyframes pulse-slow {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

@keyframes float-diagonal {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -50px); }
}

/* セクションスタイル */
section {
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}


/* セクションごとに背景要素が透けるように */

/* ヘッダー */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    position: relative;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.logo span {
    color: var(--text);
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--primary);
}

.nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    bottom: -5px;
    left: 0;
    transition: width 0.3s;
}

.nav a:hover:after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    margin: 5px 0;
    transition: all 0.3s;
}

/* ヒーローセクション */
.hero {
    display: flex;
    align-items: center;
    min-height: 500px;
    gap: 50px;
    margin: 50px 0;
}

.hero-content {
    flex: 1;
}

.hero h2 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--primary);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 126, 126, 0.3);
}

.phone-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--white);
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--primary);
    transition: all 0.3s;
}

.phone-button:hover {
    background-color: var(--primary);
    color: white;
}

.hero-image {
    flex: 1;
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.hero-image:hover .hero-photo {
    transform: scale(1.05);
}

.photo-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 10px solid var(--white);
    border-radius: 10px;
    box-sizing: border-box;
    pointer-events: none;
}

/* セクション共通 */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text);
}

/* 特徴セクション */
.features {
    margin: 100px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

/* アクセスセクション */
.access {
    margin: 100px 0;
    background-color: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.access-card {
    padding: 20px;
}

.access-card h4 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.access-card h4 i {
    color: var(--accent);
}

.map-container {
    position: relative;
    padding-bottom: 75%;
    height: 0;
    overflow: hidden;
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 合格実績セクション */
.results {
    margin: 100px 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.result-card {
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.result-icon {
    font-size: 2rem;
    color: var(--primary);
}

.result-content h4 {
    margin-bottom: 10px;
    color: var(--text);
}

.big-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 10px 0;
}

.big-number span {
    font-size: 1rem;
    font-weight: normal;
}

/* 生徒の声セクション */
.voice {
    margin: 100px 0;
    background-color: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.voice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.voice-card {
    display: flex;
    gap: 20px;
    align-items: center;
}

.voice-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 5px solid var(--light-bg);
}

.voice-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.voice-text {
    font-style: italic;
    margin-bottom: 10px;
}

.voice-name {
    font-weight: 600;
    color: var(--primary);
}

.voice-rating {
    color: var(--accent);
    margin-top: 5px;
}

/* お知らせセクション */
.news {
    margin: 100px 0;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 20px;
    align-items: center;
}

.news-date {
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
    width: 100px;
}

.news-content h4 {
    margin-bottom: 5px;
}

.news-button {
    text-align: center;
    margin-top: 30px;
}

/* お問い合わせセクション */
.contact {
    margin: 100px 0;
    background-color: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 50px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info h4 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    width: 20px;
    color: var(--primary);
}

.sns-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.sns-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.sns-links a:hover {
    transform: translateY(-3px);
    background-color: var(--accent);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.submit-button:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 126, 126, 0.3);
}

/* フッター */
.footer {
    background-color: var(--primary);
    color: white;
    padding: 50px 0 20px;
    margin-top: 100px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.footer-logo .logo {
    color: white;
    font-size: 1.8rem;
}

.footer-logo .logo span {
    color: white;
}

.footer-logo p {
    margin-top: 10px;
    opacity: 0.8;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        margin-top: 30px;
        height: 300px;
    }
    
    .access-grid,
    .voice-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-grid,
    .results-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}