/* =========================================
   Variables
   ========================================= */
:root {
    --clr-primary: #1e3a8a; /* 濃いブルー：信頼・堅実 */
    --clr-secondary: #2563eb; /* アクセントブルー */
    --clr-accent: #f59e0b; /* アクセントオレンジ：活気・注意 */
    --clr-text: #334155;
    --clr-text-light: #64748b;
    --clr-bg-light: #f8fafc;
    --clr-white: #ffffff;
    --font-main: 'Noto Sans JP', sans-serif;
}

/* =========================================
   Reset & Base
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-main);
    color: var(--clr-text);
    line-height: 1.7;
    background-color: var(--clr-white);
    letter-spacing: 0.05em;
}
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

/* Utility */
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; }
.bg-light { background-color: var(--clr-bg-light); }

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--clr-primary);
    font-weight: 900;
    margin-bottom: 50px;
    letter-spacing: 0.1em;
}
.section-title span {
    display: block;
    font-size: 1rem;
    color: var(--clr-text-light);
    font-weight: 500;
    margin-top: 5px;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--clr-accent);
    margin: 15px auto 0;
}

/* =========================================
   Header
   ========================================= */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    display: block;
    line-height: 1;
}
.logo img {
    height: 40px; 
    width: auto;
    display: block;
}
.global-nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
}
.global-nav a {
    font-weight: 700;
    font-size: 0.95rem;
}
.global-nav a:hover {
    color: var(--clr-secondary);
}
.btn-nav {
    background-color: var(--clr-primary);
    color: var(--clr-white) !important;
    padding: 10px 25px;
    border-radius: 50px;
}
.btn-nav:hover { background-color: var(--clr-secondary); }

/* =========================================
   Hero Section (スライドショー)
   ========================================= */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--clr-white);
    padding: 0 20px;
}
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.hero-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 58, 138, 0.8);
    z-index: 2;
}
.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: 1;
    animation: fadeSlideshow 24s infinite; /* 24秒で6枚 */
}

.item-1 { background-image: url('images/1.jpeg'); animation-delay: 0s; }
.item-2 { background-image: url('images/2.jpeg'); animation-delay: 4s; }
.item-3 { background-image: url('images/3.jpeg'); animation-delay: 8s; }
.item-4 { background-image: url('images/4.jpeg'); animation-delay: 12s; }
.item-5 { background-image: url('images/5.jpeg'); animation-delay: 16s; }
.item-6 { background-image: url('images/6.jpeg'); animation-delay: 20s; }

.hero-content {
    margin-top: 60px;
    position: relative;
    z-index: 10;
}
.hero-catch {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--clr-accent);
    margin-bottom: 15px;
    letter-spacing: 0.2em;
}
.hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.4;
    margin-bottom: 25px;
}
.hero-text {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}
.btn-primary {
    display: inline-block;
    background-color: var(--clr-accent);
    color: var(--clr-white);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 18px 50px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    background-color: #d97706;
}

@keyframes fadeSlideshow {
    0% { opacity: 0; }
    4% { opacity: 1; }
    17% { opacity: 1; }
    21% { opacity: 0; }
    100% { opacity: 0; }
}

/* =========================================
   Services Section (事業内容)
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.service-card {
    background: var(--clr-white);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden; /* 画像の角をカードの角に合わせる */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.service-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}
.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.service-card:hover .service-image img {
    transform: scale(1.08); /* マウスホバーで写真が少しズーム */
}
.service-content {
    padding: 40px 30px;
}
.service-content h3 {
    font-size: 1.3rem;
    color: var(--clr-primary);
    margin-bottom: 20px;
}
.service-content p {
    text-align: left;
    font-size: 0.95rem;
    color: var(--clr-text-light);
}

/* 画像とテキストのグラデーションなじませレイアウト (ダークモード化) */
.services-about-blend {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: var(--clr-primary); /* 背景色をダークブルーに */
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(30, 58, 138, 0.2);
    margin-top: 80px;
    min-height: 480px;
    overflow: hidden;
}
.services-blend-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 65%;
    height: 100%;
    /* ヒーロー画像と同じように、画像の上に暗いブルーのグラデーションを重ねて暗くする */
    background-image: linear-gradient(rgba(30, 58, 138, 0.7), rgba(30, 58, 138, 0.7)), url('images/4.jpeg');
    background-size: cover;
    background-position: center;
    /* 右側に向かって画像を透明にグラデーションさせる（背景のダークブルーとなじむ） */
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    z-index: 1;
}
.services-blend-text {
    position: relative;
    width: 55%;
    padding: 50px 50px 50px 0;
    z-index: 2;
    line-height: 1.9;
    font-size: 0.98rem;
    color: var(--clr-white); /* テキストを白に */
}
.services-blend-text p {
    margin-bottom: 1.5em;
    text-align: justify;
    color: rgba(255, 255, 255, 0.9); /* 少しだけ柔らかい白 */
}
.services-blend-text p:last-child {
    margin-bottom: 0;
}

/* =========================================
   Policy Section (会社方針)
   ========================================= */
.policy-box {
    display: flex;
    flex-direction: column;
    gap: 60px;
    max-width: 900px;
    margin: 0 auto;
}

/* 3つの理念カードの並び */
.principles-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
.principle-card {
    position: relative;
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    border: 1px solid #e2e8f0;
    padding: 50px 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.principle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(30, 58, 138, 0.12);
    border-color: var(--clr-accent);
    background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.card-bg-number {
    position: absolute;
    bottom: -15px;
    right: 5px;
    font-size: 7rem;
    font-weight: 900;
    color: rgba(30, 58, 138, 0.03);
    line-height: 1;
    pointer-events: none;
    transition: all 0.4s ease;
}
.principle-card:hover .card-bg-number {
    color: rgba(245, 158, 11, 0.06);
    transform: scale(1.1);
}

.card-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--clr-primary);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}
.card-en {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--clr-text-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
    z-index: 2;
}
.principle-card:hover .card-en {
    color: var(--clr-secondary);
}

/* 「すべては教育にあり。」の装飾 */
.policy-catch-outer {
    position: relative;
    text-align: center;
    padding: 60px 0;
    margin: 20px 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.04) 0%, rgba(255, 255, 255, 0) 70%);
}
.catch-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4.5rem;
    font-weight: 900;
    color: rgba(30, 58, 138, 0.02);
    letter-spacing: 0.3em;
    white-space: nowrap;
    pointer-events: none;
}
.policy-catch-inner {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--clr-primary);
    position: relative;
    display: inline-block;
    letter-spacing: 0.15em;
    padding: 0 40px;
}
.policy-catch-inner::before,
.policy-catch-inner::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
}
.policy-catch-inner::before {
    top: -15px;
    background: linear-gradient(90deg, transparent, var(--clr-accent), transparent);
}
.policy-catch-inner::after {
    bottom: -15px;
    background: linear-gradient(90deg, transparent, var(--clr-accent), transparent);
}

.policy-text {
    background: var(--clr-white);
    padding: 45px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.06);
    line-height: 2;
    font-size: 1.05rem;
}
.policy-text p {
    margin-bottom: 1.8em;
    text-align: justify;
}
.policy-text .strong-text {
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--clr-primary);
    text-align: center;
    margin-top: 2.5em;
    margin-bottom: 0;
}

/* =========================================
   Greeting Section (ご挨拶)
   ========================================= */
.greeting-box {
    max-width: 800px;
    margin: 0 auto;
    background: var(--clr-white);
    padding: 50px;
    border-radius: 10px;
    border-left: 6px solid var(--clr-primary);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    line-height: 2;
    text-align: justify;
}
.president-name {
    text-align: right;
    margin-top: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--clr-primary);
}

/* =========================================
   Contact Section
   ========================================= */
.contact-section {
    background: var(--clr-primary);
    color: var(--clr-white);
}
.contact-section .section-title { color: var(--clr-white); }
.contact-box {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}
.contact-box h2 { font-size: 2.2rem; margin-bottom: 15px; }
.contact-box p { margin-bottom: 40px; }
.contact-tel {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}
.tel-label { display: block; font-size: 1rem; margin-bottom: 5px; }
.tel-number { font-size: 3rem; font-weight: 900; letter-spacing: 0.1em; }
.btn-mail {
    display: inline-block;
    background-color: var(--clr-white);
    color: var(--clr-primary);
    font-weight: 900;
    padding: 18px 50px;
    border-radius: 50px;
}
.btn-mail:hover {
    background-color: var(--clr-bg-light);
    transform: translateY(-2px);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 50px 0 30px;
}
.footer-logo {
    color: var(--clr-white);
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 15px;
}

/* プライバシーポリシーのリンク装飾を追加 */
.footer-links {
    margin-top: 25px;
}
.footer-links a {
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.footer-links a:hover {
    color: var(--clr-accent);
    text-decoration: underline;
}

.copyright { margin-top: 30px; font-size: 0.85rem; }
/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
    .global-nav { display: none; } 
    .hero-title { font-size: 2rem; }
    .hero-catch { font-size: 1rem; }
    
    .tel-number { font-size: 2.2rem; }
    
    /* Services Blend のスマホ対応 */
    .services-about-blend {
        flex-direction: column;
        justify-content: flex-start;
    }
    .services-blend-img {
        position: relative;
        width: 100%;
        height: 300px;
        /* スマホでは下に向かって画像を透明に */
        -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
        mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    }
    .services-blend-text {
        width: 100%;
        padding: 0 25px 40px;
        margin-top: -60px; /* 画像の薄い部分にテキストを少し重ねる */
    }
    
    /* Policy / Greeting レスポンシブ対応 */
    .principles-container {
        grid-template-columns: 1fr; /* スマホでは縦並び */
        gap: 20px;
    }
    .principle-card {
        padding: 35px 20px;
    }
    .card-title {
        font-size: 1.6rem;
    }
    .policy-catch-outer {
        padding: 40px 0;
    }
    .policy-catch-inner {
        font-size: 1.6rem;
        padding: 0 20px;
    }
    .catch-bg-text {
        font-size: 2.5rem;
    }
    
    .policy-text, .greeting-box {
        padding: 25px;
        font-size: 0.95rem;
    }
}
/* =========================================
   スマホ用メニュー追加デザイン
   ========================================= */
.hamburger {
    display: none; width: 30px; height: 22px; cursor: pointer; position: relative; z-index: 1000;
}
.hamburger span {
    position: absolute; width: 100%; height: 3px; background-color: #1e3a8a; border-radius: 3px; transition: all 0.3s ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

@media (max-width: 768px) {
    .hamburger { display: block; }
    .global-nav {
        position: fixed; top: 0; right: -100%; width: 80%; max-width: 300px; height: 100vh;
        background-color: rgba(255, 255, 255, 0.98); box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: all 0.3s ease; z-index: 999; display: flex; align-items: center; justify-content: center;
    }
    .global-nav ul { flex-direction: column; gap: 30px; text-align: center; }
    .global-nav a { font-size: 1.2rem; }
    .global-nav.is-active { right: 0; }
}
/* =========================================
   変な改行を防ぐ魔法の箱（PC/スマホ完璧版）
   ========================================= */
/* PCの時は箱を横に並べる */
.text-block {
    display: inline-block;
}
/* PCの改行用タグを表示 */
.pc-br {
    display: inline;
}

@media (max-width: 768px) {
    /* スマホの時は箱を縦に積む（ここで綺麗に改行される！） */
    .hero-title .text-block,
    .hero-text .text-block {
        display: block;
    }
    /* スマホの時はPC用の改行を消して余分な隙間をなくす */
    .pc-br {
        display: none;
    }
}
/* =========================================
   ページトップへ戻るボタン
   ========================================= */
.page-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #1e3a8a; /* ボタンの色（会社の青色） */
    color: #ffffff;
    border-radius: 50%; /* まん丸にする */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}
/* スクロールして表示された時の状態 */
.page-top.is-show {
    opacity: 1;
    visibility: visible;
}
/* マウスを乗せた時に少し透明にする */
.page-top:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    /* スマホの時は少し小さくする */
    .page-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1.2rem;
    }
}