@charset "UTF-8";

/* =========================================
   Project 005: Mirai Academy - Main Stylesheet
   Theme: Academic, Trustworthy, Blue/White
   ========================================= */

/* 1. Variables */
:root {
    /* Colors */
    --color-primary: #0044cc;
    /* Academic Blue */
    --color-primary-dark: #003399;
    --color-secondary: #ff9900;
    /* Energetic Orange */
    --color-accent: #ffcc00;
    /* Bright Yellow */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-bg: #f9f9f9;
    --color-white: #ffffff;
    --color-border: #e0e0e0;

    /* Fonts */
    --font-main: "Noto Sans JP", sans-serif;
    --font-en: "Montserrat", sans-serif;

    /* Layout */
    --container-width: 94%;
    /* Fluid Width */
    --container-max-width: 1800px;
    --header-height: 90px;
    --radius-sm: 2px;
    --radius-md: 3px;
    --radius-lg: 3px;
    /* Uniform sharp look */
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 2. Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 2.0;
    /* Luxurious line-height */
    font-weight: 400;
    padding-bottom: 0;
    font-size: 16px;
}

/* Mobile Sticky Footer Padding */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    /* Sharp images */
    width: 100%;
    /* Fill container */
}

ul {
    list-style: none;
}

/* 3. Utilities */
.container {
    width: var(--container-width);
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0;
    /* Fluid layout relies on width % */
}

@media (max-width: 768px) {
    .container {
        width: 92%;
    }
}

.section {
    padding: 140px 0;
    /* Luxurious spacing */
}

@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }
}

.bg-white {
    background-color: var(--color-white);
}

.bg-light {
    background-color: #f4f7fa;
}

.bg-primary {
    background-color: var(--color-primary);
    color: white;
}

.bg-dark {
    background-color: #1a1a1a;
    color: white;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.text-accent {
    color: var(--color-secondary);
}

.mb-10 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 30px;
}

.mb-30 {
    margin-bottom: 45px;
}

.mb-40 {
    margin-bottom: 60px;
}

.mb-60 {
    margin-bottom: 80px;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 20px 50px;
    border-radius: var(--radius-md);
    /* Sharp buttons */
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    border: none;
    line-height: 1;
    letter-spacing: 0.05em;
}

.btn-sm {
    padding: 12px 30px;
    font-size: 0.95rem;
}

.btn-huge {
    padding: 25px 80px;
    /* Massive padding */
    font-size: 1.4rem;
    /* Huge text */
    border-radius: 60px;
    box-shadow: 0 10px 20px rgba(255, 153, 0, 0.3);
    letter-spacing: 0.1em;
}

.btn-huge:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 153, 0, 0.4);
}

.btn-primary {
    background: var(--color-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.25);
}

.btn-primary:hover {
    background: #e68a00;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.35);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-4px);
}

/* 4. Header */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    height: var(--header-height);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    /* Minimal separator */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-main);
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
    z-index: 1001;
    /* Above mobile menu */
}

/* Voice Config (Graduates/Parents) */
.voice-grid,
.graduates-grid,
.parents-grid {
    display: grid;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.voice-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.voice-header {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.voice-img-wrapper {
    flex-shrink: 0;
}

/* Specific image sizes */
.graduates-grid .voice-img-wrapper {
    flex: 0 0 150px;
}

.parents-grid .voice-img-wrapper {
    flex: 0 0 100px;
}

.graduates-grid .voice-img-wrapper img,
.parents-grid .voice-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.parents-grid .voice-img-wrapper img {
    border-radius: 50%;
    /* Parents were circles */
}

/* Mobile Menu Container & Responsive Layout */
@media (max-width: 1100px) {
    .menu-toggle {
        display: block;
        position: absolute;
        /* Fix toggle to right corner */
        right: 20px;
        top: 25px;
    }

    .header-inner {
        justify-content: flex-start;
        /* Logo left-aligned */
        position: relative;
    }

    .logo {
        margin: 0;
        /* Left align, not centered */
    }

    /* Remove nav from flow so it doesn't push logo */
    nav {
        position: absolute;
        width: 0;
        height: 0;
        overflow: visible;
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        /* Wider width for mobile usability */
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 100px 40px 40px;
        /* Adjust padding */
        box-shadow: none;
        transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        align-items: center;
        text-align: center;
        overflow-y: auto;
        /* Scrollable if too tall */
    }

    .nav-list.active {
        right: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 15px 0;
        width: 100%;
        display: block;
    }

    /* Overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        z-index: 999;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* === Layout Fixes for Tablet/Mobile === */

    /* 1. Collapse ALL grids to single column - FORCED */
    .feature-grid,
    .course-grid,
    .achievement-grid,
    .footer-grid,
    .voice-grid,
    .graduates-grid,
    .parents-grid,
    .lp-benefit-grid,
    [class*="-grid"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* 2. Stack Course Cards (Image on top, Text below) */
    .course-card {
        flex-direction: column !important;
    }

    .course-img {
        width: 100% !important;
        height: 250px !important;
        min-height: 250px;
    }

    .course-content {
        width: 100% !important;
        padding: 30px;
    }

    /* 3. CTA Split Stack */
    .cta-split {
        flex-direction: column-reverse !important;
    }

    .cta-image-side,
    .cta-content-side {
        width: 100% !important;
        min-height: 300px;
    }

    .cta-content-side {
        padding: 60px 30px;
    }

    /* 4. Adjust Hero & Section Title Sizes for Mobile */
    .hero-title {
        font-size: 1.6rem !important;
    }

    .hero-text {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }

    .hero-tag {
        font-size: 0.7rem;
        padding: 5px 12px;
        margin-bottom: 15px;
    }

    .hero .btn {
        font-size: 0.9rem;
        padding: 14px 25px;
    }

    .section-title {
        font-size: 1.8rem !important;
    }

    .section-subtitle {
        font-size: 0.75rem;
    }

    /* LP specific titles */
    .lp-title {
        font-size: 1.8rem !important;
    }

    .lp-subtitle {
        font-size: 1rem;
    }

    /* 5. Voice/Graduates Stack */
    .voice-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .voice-grid,
    .graduates-grid,
    .parents-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .voice-img-wrapper {
        margin-bottom: 20px;
        width: 120px !important;
        height: 120px !important;
        flex: 0 0 auto !important;
    }

    /* 6. Voice Banner Grid (合格者/保護者の声) */
    .voice-banner-grid {
        grid-template-columns: 1fr !important;
    }

    .voice-banner-grid a {
        padding: 40px 25px !important;
    }

    .voice-banner-grid h3 {
        font-size: 1.3rem !important;
    }

    /* 7. CTA Section Mobile */
    .cta-main-title {
        font-size: 1.6rem !important;
    }

    .cta-main-text {
        font-size: 0.95rem !important;
        margin-bottom: 30px !important;
    }

    /* Buttons smaller on mobile */
    .btn-huge {
        padding: 16px 30px !important;
        font-size: 1rem !important;
        min-width: auto !important;
    }

    /* 8. Hide elements on mobile */
    .hide-mobile {
        display: none !important;
    }

    /* 9. News Article Layout */
    .news-article {
        flex-wrap: wrap !important;
    }

    .news-meta {
        display: flex;
        flex-direction: column;
        gap: 5px;
        min-width: 90px;
    }

    .news-article a {
        width: 100%;
    }

    /* 10. LP Hero smaller on mobile */
    .lp-hero {
        padding: 60px 20px !important;
    }

    .lp-hero .lp-title {
        font-size: 1.5rem !important;
    }

    .lp-hero .lp-subtitle {
        font-size: 0.9rem !important;
    }

    .urgency-badge {
        font-size: 0.8rem !important;
        padding: 8px 15px !important;
    }

    /* 11. LP Contact Form Header */
    .lp-contact-header h2 {
        font-size: 1.5rem !important;
    }
}

/* Parallax Effect */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Mobile Disable Parallax */
@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* Split CTA */
.cta-split {
    display: flex;
    min-height: 500px;
}

.cta-image-side {
    width: 50%;
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 300px;
}

.cta-content-side {
    width: 50%;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-bg);
}

@media (max-width: 768px) {
    .cta-split {
        flex-direction: column-reverse;
    }

    .cta-image-side,
    .cta-content-side {
        width: 100%;
    }

    .cta-content-side {
        padding: 60px 30px;
    }
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-md);
    /* Sharp */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.nav-list {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
    position: relative;
    padding: 10px 0;
}

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

.nav-link:hover::after {
    width: 100%;
}

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

/* 5. Hero Section */
.hero {
    margin-top: var(--header-height);
    height: 90vh;
    /* Original immersive height */
    min-height: 600px;
    background: linear-gradient(rgba(0, 30, 90, 0.7), rgba(0, 20, 60, 0.7)), url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?w=2000&q=85') center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-tag {
    display: inline-block;
    background: var(--color-secondary);
    color: white;
    padding: 8px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    margin-bottom: 30px;
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.hero-title {
    font-size: 5vw;
    /* Responsive huge sizing */
    font-weight: 900;
    margin-bottom: 30px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

@media (min-width: 1600px) {
    .hero-title {
        font-size: 5.5rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-text {
    font-size: 1.4rem;
    margin-bottom: 50px;
    opacity: 0.95;
    font-weight: 500;
}

/* Page Hero (Sub-pages) - Consistent height */
.page-hero,
.hero-courses,
.hero-teachers,
.hero-graduates,
.hero-parents,
.hero-contact {
    height: 350px !important;
    /* Fixed sub-page hero height */
    min-height: 300px;
    max-height: 400px;
}

/* Mobile: adjusted hero heights */
@media (max-width: 1100px) {
    .hero {
        height: auto;
        /* Allow content to determine height */
        min-height: 500px;
        padding: 80px 20px;
    }

    .page-hero,
    .hero-courses,
    .hero-teachers,
    .hero-graduates,
    .hero-parents,
    .hero-contact {
        height: 280px !important;
        min-height: 250px;
    }
}

/* 6. Section Titles */
.section-header {
    text-align: center;
    margin-bottom: 100px;
}

.section-title {
    font-size: 2.8rem;
    color: var(--color-primary);
    margin-bottom: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-secondary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    display: block;
    font-family: var(--font-en);
    color: var(--color-secondary);
    font-weight: 700;
    letter-spacing: 0.2em;
    font-size: 0.9rem;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.achievement-card {
    background: #fdfdfd;
    padding: 40px 20px;
    text-align: center;
    border: 1px solid #eee;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border: 1px solid transparent;
}

.achievement-label {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 700;
}

.achievement-number {
    font-size: 4.5rem;
    /* Massive size */
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
    font-family: var(--font-en);
    /* Use English font for numbers */
    margin-bottom: 5px;
    display: block;
}

.achievement-unit {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-left: 5px;
}

/* 7. Features (3 Cards) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-card {
    background: white;
    padding: 60px 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid #eee;
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.feature-icon {
    width: 100px;
    height: 100px;
    background: #e6f0ff;
    color: var(--color-primary);
    border-radius: var(--radius-md);
    /* Sharp */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 30px;
}

.feature-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: var(--color-primary);
    font-weight: 700;
}

/* 8. Course Section (Tab or Grid) */
.course-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.course-card {
    display: flex;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.course-img {
    width: 45%;
    background-size: cover;
    background-position: center;
    /* Sharp corners handled by container overflow hidden + radius-md */
}

.course-content {
    width: 55%;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-label {
    background: var(--color-primary);
    color: white;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    /* Sharp */
    display: inline-block;
    margin-bottom: 20px;
    align-self: flex-start;
    font-weight: 700;
}

.course-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.course-desc {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 30px;
}

/* 9. News Section */
.news-list {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-md);
    padding: 20px 40px;
    box-shadow: var(--shadow-sm);
}

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

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-family: var(--font-en);
    color: var(--color-text-light);
    font-weight: 700;
    width: 100px;
}

.news-category {
    background: #eee;
    color: #666;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 15px;
}

.news-link {
    flex: 1;
    font-weight: 500;
}

.news-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* 10. CTA Area */
.cta-area {
    background: var(--color-primary);
    color: white;
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    /* Pattern example */
    opacity: 0.1;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* 11. Footer */
.footer {
    background: #222;
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

.footer-info p {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
    padding-bottom: 5px;
}

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

.footer-links a {
    color: #ccc;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #777;
}

/* 12. Responsive */
/* Responsive rules consolidated under 1100px breakpoint */

/* 13. Mobile Sticky Footer CTA */
.sticky-footer {
    display: none;
    /* Hidden by default (desktop) */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 12px 15px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    /* iOS safe area */
}

.sticky-footer-inner {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.sticky-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    background: #f3f4f6;
    color: var(--color-primary);
    transition: all 0.3s ease;
}

.sticky-btn.conversion {
    background: var(--color-secondary);
    color: white;
}

.sticky-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Show on mobile only */
@media (max-width: 1100px) {
    .sticky-footer {
        display: block;
    }

    /* Add padding to body to prevent footer overlap */
    body {
        padding-bottom: 85px;
    }
}