:root {
    --primary: #00509d;    /* 背景・ボタン用のロイヤルブルー */
    --text-dark: #002147;  /* 学校名・メニュー用の元の濃いネイビー */
    --accent: #c0392b;     /* アクセントレッド */
    --gold: #d4af37;       /* ゴールド */
    --bg-slate: #f8fafc; 
    --bg-pearl: #fffefb;
    --transition: all 0.3s ease;
}

/* Base Style - 基本文字色は元の濃いグレー (#333) */
body { font-family: 'Inter', 'Segoe UI', sans-serif; margin: 0; padding: 0; color: #333; line-height: 1.6; background: #fff; overflow-x: hidden; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

/* Top Bar */
.top-bar { background-color: var(--primary); color: #fff; padding: 10px 0; font-size: 0.85rem; z-index: 1100; position: relative; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-info a { color: #fff !important; font-weight: 600; margin-right: 25px; display: inline-flex; align-items: center; }
.top-info i { color: var(--gold); margin-right: 8px; }

/* SNSアイコンの分離 (15pxの隙間を確保) */
.top-right-group { display: flex; align-items: center; gap: 20px; }
.top-social { display: flex; align-items: center; gap: 15px !important; } 
.top-social a { color: #fff; font-size: 1.1rem; display: inline-block; line-height: 1; }

.search-box-inline { display: flex; align-items: center; background: rgba(255,255,255,0.2); border-radius: 20px; padding: 2px 15px; border: 1px solid rgba(255,255,255,0.25); }
.search-box-inline input { background: transparent; border: none; color: #fff; padding: 5px; outline: none; width: 140px; font-size: 0.8rem; }
.search-box-inline button { background: transparent; border: none; color: var(--gold); cursor: pointer; }
.portal-link { color: var(--gold) !important; font-weight: 800; border-left: 2px solid rgba(255,255,255,0.2); padding-left: 15px; margin-left: 5px; }

/* Header - 2-Line Text Stack & Original Dark Color */
.site-header { background: #fff; border-bottom: 1px solid #f1f5f9; padding: 15px 0; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.header-container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.logo-brand { display: flex; align-items: center; gap: 20px; text-decoration: none; flex-shrink: 0; }
.logo-img { height: 85px; width: auto; max-width: 280px; object-fit: contain; border-radius: 8px; }

.logo-text-group { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
/* 学校名は元の濃いネイビーに固定 */
.logo-title { color: var(--text-dark); font-size: 2.4rem; font-weight: 900; line-height: 1.1; margin: 0; letter-spacing: -1px; display: block; }
.logo-motto { font-size: 0.9rem; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; margin-top: 5px; font-weight: 700; display: block; }

/* メインメニューも元の濃いネイビーに固定 (1.05rem) */
#mainNav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 25px; }
#mainNav a { font-weight: 800; text-transform: uppercase; font-size: 1.05rem; color: var(--text-dark); }
#mainNav a:hover { color: var(--primary); }

/* Stats Banner Overlay */
.stats-banner-wrapper { position: relative; z-index: 20; margin-top: -60px; }
.stats-banner { background: var(--primary); color: #fff; padding: 50px 0; border-radius: 15px; display: flex; justify-content: space-around; width: 95%; max-width: 1150px; margin: 0 auto; box-shadow: 0 30px 60px rgba(0,80,157,0.25); text-align: center; }
.stat-item h3 { font-size: 2.8rem; color: var(--gold); margin: 0; font-weight: 900; }

/* Section Themes */
.section-padding { padding: 100px 0; }
.bg-white { background: #ffffff; }
.bg-slate { background: var(--bg-slate); }
.bg-pearl { background: var(--bg-pearl); }
.bg-primary { background: var(--primary); color: #fff; }

/* Grid & Cards */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }

.reveal { opacity: 0; transform: translateY(40px); transition: 1s cubic-bezier(0.165, 0.84, 0.44, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

.card { background: #fff; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid #f1f5f9; transition: var(--transition); height: 100%; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.card img { width: 100%; height: 220px; object-fit: cover; }
.card-content { padding: 30px; flex-grow: 1; }

.activity-card { padding: 25px; text-align: center; background: #fff; border-radius: 12px; border: 1px solid #f1f5f9; transition: var(--transition); }
.activity-card:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.activity-card i { font-size: 2.2rem; margin-bottom: 12px; color: var(--gold); }
.activity-card:hover i { color: #fff; }

.leader-card { background: #fff; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid #f1f5f9; text-align: center; }
.leader-img { width: 100%; height: 350px; object-fit: cover; }

/* Footer - 元の色 (#001022) を完全維持 */
.site-footer { background: #001022; color: #fff; padding: 80px 0 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-h3 { color: var(--gold); margin-bottom: 25px; font-size: 1.2rem; border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 5px; }

/* Dropdown Menu Styles (Fixed Priority) */
#mainNav ul .dropdown { position: relative; display: flex; align-items: center; }
#mainNav ul .dropdown-menu { display: none !important; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.1); list-style: none; padding: 10px 0; margin: 0; min-width: 180px; z-index: 1000; border-radius: 8px; border: 1px solid #f1f5f9; flex-direction: column; gap: 0; }
#mainNav ul .dropdown:hover .dropdown-menu { display: flex !important; }
#mainNav ul .dropdown-menu li { display: block; margin: 0; width: 100%; }
#mainNav ul .dropdown-menu a { display: flex !important; align-items: center; gap: 10px; padding: 12px 20px !important; color: var(--text-dark) !important; font-size: 0.95rem !important; text-transform: none !important; font-weight: 600 !important; border-left: none !important; width: 100%; box-sizing: border-box; }
#mainNav ul .dropdown-menu a:hover { background: #f8fafc !important; color: var(--primary) !important; }

/* Enhanced SNS Icons & Hover Animations */
.top-social a, .footer-social-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    text-decoration: none;
}
.top-social a {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff !important;
    font-size: 1.1rem;
}
.footer-social-link {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff !important;
    font-size: 1.3rem;
}
.top-social a:hover, .footer-social-link:hover {
    transform: translateY(-5px) scale(1.15);
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
/* Facebook */
.top-social a.fb-link:hover, .footer-social-link.fb:hover {
    background: #1877F2 !important;
    border-color: #1877F2 !important;
}
/* Instagram */
.top-social a.ig-link:hover, .footer-social-link.ig:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important;
    border-color: #d6249f !important;
}
/* TikTok */
.top-social a.tt-link:hover, .footer-social-link.tt:hover {
    background: #010101 !important;
    border-color: #00f2fe !important;
    text-shadow: 1px 1px 0px #fe0979, -1px -1px 0px #00f2fe;
    box-shadow: 0 8px 20px rgba(0,242,254,0.4);
}
/* YouTube */
.top-social a.yt-link:hover, .footer-social-link.yt:hover {
    background: #FF0000 !important;
    border-color: #FF0000 !important;
}

/* =========================================
   Mega Menu Styles (Image + Links)
   ========================================= */
#mainNav ul li.mega-dropdown { position: relative; }
#mainNav ul li.mega-dropdown .mega-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: -100px; /* 親メニューに対して少し左にずらしてバランスを取る */
    width: 550px;
    background: #fff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    padding: 15px;
    z-index: 1000;
}
#mainNav ul li.mega-dropdown:hover .mega-menu { display: block !important; }
#mainNav ul li.mega-dropdown .mega-menu-content { display: flex; gap: 20px; }
#mainNav ul li.mega-dropdown .mega-menu-img { width: 220px; height: 180px; border-radius: 8px; overflow: hidden; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
#mainNav ul li.mega-dropdown .mega-menu-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
#mainNav ul li.mega-dropdown:hover .mega-menu-img img { transform: scale(1.05); }
#mainNav ul li.mega-dropdown .mega-menu-links { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
#mainNav ul li.mega-dropdown .mega-menu-links a { 
    display: flex !important; 
    align-items: center; 
    gap: 12px; 
    padding: 12px 15px !important; 
    color: var(--text-dark) !important; 
    font-size: 0.95rem !important; 
    text-transform: none !important; 
    font-weight: 700 !important; 
    border-left: none !important; 
    border-bottom: 1px solid #f1f5f9 !important;
    transition: all 0.3s ease !important;
}
#mainNav ul li.mega-dropdown .mega-menu-links a:last-child { border-bottom: none !important; }
#mainNav ul li.mega-dropdown .mega-menu-links a:hover { background: #f8fafc; color: var(--primary) !important; padding-left: 20px !important; }

/* =========================================
   Responsive Media Queries (SEO/Mobile Optimized)
   ========================================= */
@media (max-width: 1100px) {
    .footer-grid, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .header-container { 
        flex-direction: row !important; 
        justify-content: space-between !important; 
        align-items: center !important; 
        padding: 10px 20px;
        gap: 10px !important;
    }
    .logo-brand { gap: 10px !important; }
    .logo-img { height: 50px !important; }
    .logo-title { font-size: 1.35rem !important; }
    .logo-motto { font-size: 0.7rem !important; margin-top: 2px !important; }
    
    .section-padding { padding: 60px 0; }
    .stats-banner-wrapper { margin-top: -30px; }
    .stats-banner { 
        flex-direction: column; 
        gap: 25px; 
        padding: 30px 20px;
    }
    
    #mainNav ul li.mega-dropdown .mega-menu { position: static; width: 100%; box-shadow: none; border: none; padding: 0; }
    #mainNav ul li.mega-dropdown .mega-menu-content { flex-direction: column; gap: 10px; }
    #mainNav ul li.mega-dropdown .mega-menu-img { width: 100%; height: 150px; }
}

@media (max-width: 768px) {
    .footer-grid, .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .logo-title { font-size: 1.15rem !important; }
    
    /* Show motto on mobile and keep it clean */
    .logo-motto { display: block !important; font-size: 0.65rem !important; margin-top: 2px !important; }
    
    /* Show top bar on mobile and stack it vertically to save space without clipping */
    .top-bar { display: block; padding: 8px 0; }
    .top-bar .container { flex-direction: column; gap: 8px; align-items: center; text-align: center; }
    .top-info { display: flex; flex-direction: column; gap: 6px; align-items: center; }
    .top-info a { margin-right: 0; }
    
    /* Ensure forms are fully responsive on small screens */
    form, .form-container {
        padding: 20px !important;
        box-shadow: 5px 5px 0 0 var(--accent), 0 5px 15px rgba(0,0,0,0.05) !important;
    }
}

/* =========================================
   Testimonials (Parent Voices)
   ========================================= */
.testimonial-section {
    background: #fff;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}
.testimonial-card {
    background: var(--bg-slate);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px 30px;
    position: relative;
    transition: all 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    border-color: var(--gold);
}
.testimonial-quote {
    font-size: 1rem;
    color: #475569;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 25px;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}
.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
    background: #e2e8f0;
}
.testimonial-name {
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 4px 0;
    font-size: 1.05rem;
}
.testimonial-meta {
    font-size: 0.85rem;
    color: var(--accent);
    margin: 0;
    font-weight: 600;
}
.quote-icon {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: rgba(212, 175, 55, 0.2);
}

/* =========================================
   Connect With Our Community (SNS Promote)
   ========================================= */
.sns-promote-section {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 100px 0;
    position: relative;
}
.sns-promote-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}
.sns-promote-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.sns-promote-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    border-color: rgba(255, 255, 255, 0.25);
}
.sns-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.sns-promote-card:hover .sns-icon-wrapper {
    transform: scale(1.1);
}
.sns-promote-card.fb:hover .sns-icon-wrapper { background: #1877F2; }
.sns-promote-card.ig:hover .sns-icon-wrapper { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.sns-promote-card.tt:hover .sns-icon-wrapper { background: #010101; border-color: #00f2fe; text-shadow: 1px 1px 0px #fe0979, -1px -1px 0px #00f2fe; }
.sns-promote-card.yt:hover .sns-icon-wrapper { background: #FF0000; }

.sns-promote-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.sns-promote-desc {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}
.sns-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.sns-btn.fb { background: #1877F2; color: #fff; }
.sns-btn.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #fff; }
.sns-btn.tt { background: #fff; color: #000; }
.sns-btn.yt { background: #FF0000; color: #fff; }

.sns-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

@media (max-width: 992px) {
    .sns-promote-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sns-promote-grid, .testimonial-grid { grid-template-columns: 1fr; }
}

/* =========================================
   Floating Social Bar
   ========================================= */
.floating-social-bar {
    position: fixed;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}
.floating-social-link {
    width: 46px;
    height: 46px;
    background: rgba(0, 33, 71, 0.85); /* var(--text-dark) with opacity */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.floating-social-link:hover {
    transform: scale(1.18) translateX(-5px);
    color: #fff !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.floating-social-link.fb:hover { background: #1877F2 !important; border-color: #1877F2; }
.floating-social-link.ig:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important; border-color: #d6249f; }
.floating-social-link.tt:hover { background: #010101 !important; border-color: #00f2fe !important; text-shadow: 1px 1px 0px #fe0979, -1px -1px 0px #00f2fe; box-shadow: 0 8px 20px rgba(0,242,254,0.4); }
.floating-social-link.yt:hover { background: #FF0000 !important; border-color: #FF0000; }

@media (max-width: 992px) {
    .floating-social-bar {
        display: none; /* Hide floating bar on tablets and mobile devices */
    }
}
