/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    --primary-color: #ffffff; /* 白基調 */
    --primary-light: #f8f9fa; /* 薄いグレー（背景用） */
    --accent-color: #4a148c; /* 深い紫 (Deep Purple) */
    --accent-light: #7c43bd; /* 薄い紫 */
    --text-color: #333333; /* ダークグレー */
    --text-light: #666666; /* ライトグレー文字 */
    --border-color: #dddddd;
    
    --font-heading: 'Inter', 'Noto Sans JP', sans-serif;
    --font-body: 'Inter', 'Noto Sans JP', sans-serif;
    
    --container-width: 1100px;
    --header-height: 80px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto; /* Managed by JS */
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--primary-color);
    line-height: 1.6;
    overflow-x: hidden;
    /* Font smoothing for premium look */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding-top: 100px;
    padding-bottom: 100px;
}

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

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

.section-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(74, 20, 140, 0.1);
    color: var(--accent-color);
    font-weight: 600;
    font-size: 14px;
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74, 20, 140, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 20, 140, 0.4);
    color: #ffffff;
}

.btn-contact {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff !important;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.btn-contact:hover {
    background-color: var(--accent-light);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

.logo span {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
}

/* Desktop Nav */
.nav-links ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
}

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

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

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

/* Hamburger Menu Icon */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 2000;
    width: 30px;
    height: 24px;
    position: relative;
}

.hamburger .bar {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.4s ease;
}

.hamburger .bar:nth-child(1) { top: 0; }
.hamburger .bar:nth-child(2) { top: 11px; }
.hamburger .bar:nth-child(3) { top: 22px; }

/* Hamburger Active State (X shape) */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    /* Fixed background image with linear-gradient overlay */
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.9)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    z-index: 2;
}

.hero-catchphrase {
    font-size: 48px;
    color: var(--text-color);
    margin-bottom: 24px;
    letter-spacing: 2px;
}

.hero-subtext {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    text-align: center;
}

.about-text {
    max-width: 700px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 20px;
}

/* ==========================================================================
   Programs Section
   ========================================================================== */
.program-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.program-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    height: 100%;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.card-image-wrapper {
    height: 240px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.program-card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 30px;
}

.card-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.target-badge {
    display: inline-block;
    font-size: 12px;
    color: var(--accent-light);
    border: 1px solid var(--accent-light);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.card-text {
    font-size: 15px;
    color: var(--text-light);
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features .container {
    max-width: 800px;
}

.feature-list {
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.feature-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.feature-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-color);
    opacity: 0.3;
    line-height: 1;
}

.feature-text h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-text p {
    font-size: 15px;
    color: var(--text-light);
}

/* ==========================================================================
   Access Section
   ========================================================================== */
.access-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.info-box h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.open-date {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.address {
    font-size: 16px;
    color: var(--text-light);
}

.map-placeholder {
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
}

/* ==========================================================================
   Footer & Contact
   ========================================================================== */
.footer {
    background-color: var(--accent-color);
    color: #ffffff;
}

.footer .section-title {
    color: #ffffff;
}

.contact-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 60px;
}

.contact-box h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.contact-box p {
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Demo Form Styles */
.demo-form {
    text-align: left;
}

.demo-form input,
.demo-form textarea {
    width: 100%;
    padding: 16px;
    margin-bottom: 20px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
}

.demo-form .btn-primary {
    background-color: #ffffff;
    color: var(--accent-color);
    width: 100%;
}

.demo-form .btn-primary:hover {
    background-color: rgba(255,255,255,0.9);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 14px;
    opacity: 0.8;
}

.footer-bottom a {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   Responsive Styles (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 900px) {
    .program-cards {
        grid-template-columns: 1fr;
    }
    
    .access-content {
        grid-template-columns: 1fr;
    }
    
    .hero-catchphrase {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation Rules */
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: var(--header-height);
        right: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: rgba(255, 255, 255, 0.98);
        padding: 40px;
        /* Mobile menu starts hidden (slid out to the right) */
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        z-index: 999;
    }
    
    /* Active class slides it in */
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links ul {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .nav-link {
        font-size: 18px;
    }
    
    .hero-catchphrase {
        font-size: 28px;
    }
    
    .hero {
        background-attachment: scroll; /* Disable fixed background on mobile for performance/ux */
    }
}
