
:root {
    --primary-color: #f26524; /* Vivid Orange */
    --secondary-color: #37bdbf; /* Bright Teal */
    --dark-color: #2c3e50; /* Dark Blue Gray */
    --light-color: #ffffff;
    --text-color: #34495e; /* Softer Black */
    --font-family-base: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif;
    --font-family-heading: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family-base);
    color: var(--text-color);
    line-height: 1.8;
    /* ✅ 可読性向上のため、基本の文字サイズをclampで設定 */
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.1rem);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-family-heading);
    font-weight: 700;
    color: var(--dark-color);
}

/* ✅ 可読性向上のため、見出しサイズをclampで設定 */
h2 {
    font-size: clamp(1.8rem, 4vw + 1rem, 2.5rem);
}

h3 {
    font-size: clamp(1.2rem, 3vw + 1rem, 1.75rem);
}

.navbar {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 600;
    color: var(--dark-color);
    transition: color 0.3s ease, transform 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* ✅ タッチ操作の快適性向上のため、タップ時のスタイルを追加 */
.nav-link:active {
    transform: scale(0.95); /* 少し小さくしてフィードバック */
}

.carousel-item {
    height: 600px;
    position: relative;
}

.carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.carousel-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.carousel-caption h1 {
    color: #f9ad3b !important;
    font-weight: 700; /* フォントの太さを指定 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* 影を付けて立体感を出す */
    /* ✅ 可読性向上のため、clampで見出しサイズを可変に */
    font-size: clamp(1.8rem, 5vw + 1rem, 3.5rem);
}

.carousel-caption .lead {
    /* ✅ 可読性向上のため、clampでリード文のサイズを可変に */
    font-size: clamp(1rem, 2vw + 0.5rem, 1.2rem);
}

.carousel-control-prev, .carousel-control-next {
    z-index: 2;
}

.hero-section {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    padding: 120px 0;
    color: var(--light-color);
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    color: var(--light-color);
    font-size: clamp(2.8rem, 5vw + 1rem, 3.5rem);
}

.hero-section .lead {
    margin-bottom: 30px;
    font-size: clamp(1.1rem, 2vw + 0.8rem, 1.4rem);
}

.btn-primary {
    background-color: var(--light-color);
    color: var(--primary-color);
    border: 2px solid var(--light-color);
    padding: 15px 35px;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--light-color);
    border-color: var(--light-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ✅ タッチ操作の快適性向上のため、タップ時のスタイルを追加 */
.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.features-section {
    padding: 80px 0;
}

.features-section .feature-card {
    background: var(--light-color);
    padding: 40px 30px;
    border-radius: 15px;
    transition: all 0.3s ease;
    height: 100%;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.features-section .feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.features-section .feature-card h3 {
    margin-bottom: 20px;
    font-weight: 700;
}

/* カード見出しの個別カラー設定 */
.features-section .row .col-md-4:nth-child(1) .feature-card h3 {
    color: #f26524; /* オレンジ */
}

.features-section .row .col-md-4:nth-child(2) .feature-card h3 {
    color: #f9ad3b; /* 黄色 */
}

.features-section .row .col-md-4:nth-child(3) .feature-card h3 {
    color: #37bdbf; /* 緑色 */
}
.features-section .row .col-md-4:nth-child(4) .feature-card h3 {
    color: #f26524; /* オレンジ */
}

.features-section .row .col-md-4:nth-child(5) .feature-card h3 {
    color: #f9ad3b; /* 黄色 */
}

.teacher-section .teacher-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.teacher-section .teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

/* 画像がコンテナからはみ出す問題の修正(iPhone Safari対応) */
.teacher-section .img-fluid,
.class-section .img-fluid {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-section .card-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.footer-section {
    background-color: var(--secondary-color);
    color: var(--light-color);
    padding: 40px 0;
}

.footer-section p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments */
/* clamp()を導入したため、多くのfont-size指定が不要になります */
@media (max-width: 768px) {
    .carousel-item {
        height: 450px; /* 中間サイズ画面での高さを調整 */
    }

    .hero-section {
        padding: 80px 0;
    }
}

@media (max-width: 576px) {
    .carousel-item {
        height: 300px; /* スマートフォンでの高さを調整 */
    }
}
