/* Google Fonts for Japanese Mincho font */
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho+B1:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --section-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

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

/* ヘッダーだけコンテナ制限を外して全幅にする */
.header-bg .container {
  max-width: 100%;
  padding-left: 1.25rem;  /* お好みで微調整 */
  padding-right: 1.25rem; /* お好みで微調整 */
}


body {
    font-family: 'Shippori Mincho B1', 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: #fff;
    scroll-behavior: smooth;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ヒーローセクション */
.hero-section {
    background: transparent;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('会社全体.jpg') center/cover;
    opacity: 0;
    z-index: 1;
    animation: backgroundFadeIn 2s ease-out 0.5s forwards;
    transform: scale(1.1);
    animation: backgroundFadeIn 2s ease-out 0.5s forwards, backgroundZoom 2s ease-out 0.5s forwards;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0;
    animation: overlayFadeIn 1.5s ease-out 1.5s forwards;
}

.hero-content {
    position: relative;
    z-index: 3;
    opacity: 0;
    transform: translateY(50px);
    animation: heroContentSlideIn 2s ease-out 2s forwards;
}

/* 背景画像のフェードインアニメーション */
@keyframes backgroundFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.7;
    }
}

/* 背景画像のズームアニメーション */
@keyframes backgroundZoom {
    from {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
    }
}

/* オーバーレイのフェードインアニメーション */
@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* コンテンツのスライドインアニメーション */
@keyframes heroContentSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 4px 12px rgba(0,0,0,0.8), 0 2px 4px rgba(0,0,0,0.6);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 3px 8px rgba(0,0,0,0.8), 0 1px 3px rgba(0,0,0,0.6);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* モダンなヘッダー */
.header-bg {
    background: var(--bg-gradient);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-text {
    color: #FFFFFF;
}

/* ナビゲーションホバー効果 */
nav a {
    position: relative;
    transition: all 0.3s ease;
}

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

nav a:hover::after {
    width: 100%;
}

/* セクション見出しのスタイル */
.section-title {
    position: relative;
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--section-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--section-gradient);
    border-radius: 2px;
}

/* カードのホバー効果 */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* 製品カード */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--section-gradient);
}

.product-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.product-card img {
    transition: transform 0.4s ease;
    object-fit: contain;
    background: #f8f9fa;
    padding: 10px;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* タイムライン */
.timeline-container {
    position: relative;
}
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10px;
    height: 100%;
    width: 4px;
    background: var(--bg-gradient);
    border-radius: 2px;
}
.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 30px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    width: 24px;
    height: 24px;
    background: var(--bg-gradient);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 10;
}

/* フォームスタイル */
.form-input {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    background: var(--bg-gradient);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* パーティクル効果 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* グラスモーフィズム効果 */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 自動流れる製品スライダー */
.products-auto-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.products-auto-slider-track {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.products-auto-slider-wrapper {
    display: flex;
    width: 300%; /* 3倍の幅で重複を表示 */
    animation: autoSlide 45s linear infinite;
}

@keyframes autoSlide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-66.67%); /* 3分の2移動してループ */
    }
}

/* ホバー時も継続して流れる */

/* マップコンテナ */
.map-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.map-container iframe {
    display: block;
    border-radius: 12px;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .hero-section {
        height: 70vh;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-auto-slider-wrapper {
        animation-duration: 30s; /* モバイルでは少し速く */
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
/* =================================
   RESPONSIVE DESIGN CSS
   ================================= */

/* デスクトップ（大画面） */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .product-card:hover {
        transform: translateY(-20px) scale(1.05);
    }
}

/* ラップトップ */
@media (max-width: 1199px) and (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* タブレット */
@media (max-width: 991px) and (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .hero-section {
        height: 80vh;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    /* ナビゲーション調整 */
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* タイムライン調整 */
    .timeline-item {
        padding-left: 30px;
    }
    
    .timeline-item::before {
        width: 20px;
        height: 20px;
    }
}

/* モバイル（大） */
@media (max-width: 767px) and (min-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }
    
    .hero-section {
        height: 70vh;
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-top: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    /* ヘッダー調整 */
    .header-bg .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    nav a {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    /* フォーム調整 */
    .form-input {
        font-size: 16px; /* iOS拡大防止 */
    }
    
    /* ボタン調整 */
    .btn-primary {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* モバイル（小） */
@media (max-width: 575px) {
    .container {
        max-width: 100%;
        padding: 0 0.75rem;
    }
    
    .hero-section {
        height: 60vh;
        padding: 1.5rem 0.75rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    /* ヘッダー */
    .header-bg {
        padding: 0.75rem 0;
    }
    
    .header-bg .container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .header-bg h1 {
        font-size: 1.5rem;
    }
    
    .header-bg .text-xs {
        font-size: 0.7rem;
    }
    
    nav ul {
        gap: 0.25rem;
        font-size: 0.8rem;
    }
    
    /* セクション間隔調整 */
    section {
        padding: 3rem 0;
    }
    
    /* 会社情報グリッド */
    .company-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .company-info-item {
        grid-template-columns: 80px 1fr;
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* タイムライン */
    .timeline-container::before {
        left: 8px;
        width: 3px;
    }
    
    .timeline-item {
        padding-left: 25px;
        margin-bottom: 20px;
    }
    
    .timeline-item::before {
        width: 16px;
        height: 16px;
        left: 0;
    }
    
    .timeline-item h4 {
        font-size: 1rem;
    }
    
    .timeline-item p {
        font-size: 0.9rem;
    }
    
    /* 採用情報 */
    .recruit-info-grid {
        grid-template-columns: 100px 1fr;
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* フッター */
    footer .container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    footer .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* 極小画面（320px以下） */
@media (max-width: 320px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    nav ul {
        font-size: 0.75rem;
    }
    
    .company-info-item {
        grid-template-columns: 70px 1fr;
        font-size: 0.8rem;
    }
}

/* 横向きモバイル */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .header-bg .container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    nav ul {
        flex-direction: row;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #e2e8f0;
        --text-light: #a0aec0;
    }
    
    body {
        background-color: #1a202c;
        color: var(--text-dark);
    }
    
    .product-card {
        background: #2d3748;
        color: var(--text-dark);
    }
    
    .glass {
        background: rgba(45, 55, 72, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .particle {
        display: none;
    }
}

/* プリント対応 */
@media print {
    .header-bg,
    .particles,
    nav,
    footer {
        display: none;
    }
    
    .hero-section {
        height: auto;
        background: none;
        color: black;
    }
    
    .hero-title,
    .section-title {
        color: black;
        background: none;
        -webkit-text-fill-color: initial;
    }
    
    .product-card,
    .glass {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}







/* =================================
   RESPONSIVE DESIGN CSS
   ================================= */

/* デスクトップ（大画面） */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .product-card:hover {
        transform: translateY(-20px) scale(1.05);
    }
}

/* ラップトップ */
@media (max-width: 1199px) and (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* タブレット */
@media (max-width: 991px) and (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .hero-section {
        height: 80vh;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    /* ナビゲーション調整 */
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* タイムライン調整 */
    .timeline-item {
        padding-left: 30px;
    }
    
    .timeline-item::before {
        width: 20px;
        height: 20px;
    }
}

/* モバイル（大） */
@media (max-width: 767px) and (min-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }
    
    .hero-section {
        height: 70vh;
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-top: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    /* ヘッダー調整 */
    .header-bg .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    nav a {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    /* フォーム調整 */
    .form-input {
        font-size: 16px; /* iOS拡大防止 */
    }
    
    /* ボタン調整 */
    .btn-primary {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* モバイル（小） */
@media (max-width: 575px) {
    .container {
        max-width: 100%;
        padding: 0 0.75rem;
    }
    
    .hero-section {
        height: 60vh;
        padding: 1.5rem 0.75rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    /* ヘッダー */
    .header-bg {
        padding: 0.75rem 0;
    }
    
    .header-bg .container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .header-bg h1 {
        font-size: 1.5rem;
    }
    
    .header-bg .text-xs {
        font-size: 0.7rem;
    }
    
    nav ul {
        gap: 0.25rem;
        font-size: 0.8rem;
    }
    
    /* セクション間隔調整 */
    section {
        padding: 3rem 0;
    }
    
    /* 会社情報グリッド */
    .company-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .company-info-item {
        grid-template-columns: 80px 1fr;
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* タイムライン */
    .timeline-container::before {
        left: 8px;
        width: 3px;
    }
    
    .timeline-item {
        padding-left: 25px;
        margin-bottom: 20px;
    }
    
    .timeline-item::before {
        width: 16px;
        height: 16px;
        left: 0;
    }
    
    .timeline-item h4 {
        font-size: 1rem;
    }
    
    .timeline-item p {
        font-size: 0.9rem;
    }
    
    /* 採用情報 */
    .recruit-info-grid {
        grid-template-columns: 100px 1fr;
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* フッター */
    footer .container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    footer .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* 極小画面（320px以下） */
@media (max-width: 320px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    nav ul {
        font-size: 0.75rem;
    }
    
    .company-info-item {
        grid-template-columns: 70px 1fr;
        font-size: 0.8rem;
    }
}

/* 横向きモバイル */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .header-bg .container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    nav ul {
        flex-direction: row;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #e2e8f0;
        --text-light: #a0aec0;
    }
    
    body {
        background-color: #1a202c;
        color: var(--text-dark);
    }
    
    .product-card {
        background: #2d3748;
        color: var(--text-dark);
    }
    
    .glass {
        background: rgba(45, 55, 72, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .particle {
        display: none;
    }
}

/* プリント対応 */
@media print {
    .header-bg,
    .particles,
    nav,
    footer {
        display: none;
    }
    
    .hero-section {
        height: auto;
        background: none;
        color: black;
    }
    
    .hero-title,
    .section-title {
        color: black;
        background: none;
        -webkit-text-fill-color: initial;
    }
    
    .product-card,
    .glass {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}







/* =================================
   RESPONSIVE DESIGN CSS
   ================================= */

/* デスクトップ（大画面） */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .product-card:hover {
        transform: translateY(-20px) scale(1.05);
    }
}

/* ラップトップ */
@media (max-width: 1199px) and (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* タブレット */
@media (max-width: 991px) and (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .hero-section {
        height: 80vh;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    /* ナビゲーション調整 */
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* タイムライン調整 */
    .timeline-item {
        padding-left: 30px;
    }
    
    .timeline-item::before {
        width: 20px;
        height: 20px;
    }
}

/* モバイル（大） */
@media (max-width: 767px) and (min-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }
    
    .hero-section {
        height: 70vh;
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-top: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    /* ヘッダー調整 */
    .header-bg .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    nav a {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    /* フォーム調整 */
    .form-input {
        font-size: 16px; /* iOS拡大防止 */
    }
    
    /* ボタン調整 */
    .btn-primary {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* モバイル（小） */
@media (max-width: 575px) {
    .container {
        max-width: 100%;
        padding: 0 0.75rem;
    }
    
    .hero-section {
        height: 60vh;
        padding: 1.5rem 0.75rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    /* ヘッダー */
    .header-bg {
        padding: 0.75rem 0;
    }
    
    .header-bg .container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .header-bg h1 {
        font-size: 1.5rem;
    }
    
    .header-bg .text-xs {
        font-size: 0.7rem;
    }
    
    nav ul {
        gap: 0.25rem;
        font-size: 0.8rem;
    }
    
    /* セクション間隔調整 */
    section {
        padding: 3rem 0;
    }
    
    /* 会社情報グリッド */
    .company-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .company-info-item {
        grid-template-columns: 80px 1fr;
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* タイムライン */
    .timeline-container::before {
        left: 8px;
        width: 3px;
    }
    
    .timeline-item {
        padding-left: 25px;
        margin-bottom: 20px;
    }
    
    .timeline-item::before {
        width: 16px;
        height: 16px;
        left: 0;
    }
    
    .timeline-item h4 {
        font-size: 1rem;
    }
    
    .timeline-item p {
        font-size: 0.9rem;
    }
    
    /* 採用情報 */
    .recruit-info-grid {
        grid-template-columns: 100px 1fr;
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* フッター */
    footer .container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    footer .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* 極小画面（320px以下） */
@media (max-width: 320px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    nav ul {
        font-size: 0.75rem;
    }
    
    .company-info-item {
        grid-template-columns: 70px 1fr;
        font-size: 0.8rem;
    }
}

/* 横向きモバイル */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .header-bg .container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    nav ul {
        flex-direction: row;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #e2e8f0;
        --text-light: #a0aec0;
    }
    
    body {
        background-color: #1a202c;
        color: var(--text-dark);
    }
    
    .product-card {
        background: #2d3748;
        color: var(--text-dark);
    }
    
    .glass {
        background: rgba(45, 55, 72, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .particle {
        display: none;
    }
}

/* プリント対応 */
@media print {
    .header-bg,
    .particles,
    nav,
    footer {
        display: none;
    }
    
    .hero-section {
        height: auto;
        background: none;
        color: black;
    }
    
    .hero-title,
    .section-title {
        color: black;
        background: none;
        -webkit-text-fill-color: initial;
    }
    
    .product-card,
    .glass {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Video Modal Specific Styles */
#videoModal .relative {
    max-width: 90vw; /* 画面幅の90%を最大幅とする */
    max-height: 90vh; /* 画面高さの90%を最大高さとする */
    width: auto; /* コンテンツの幅に合わせる */
    height: auto; /* コンテンツの高さに合わせる */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: auto; /* 中央寄せのために追加 */
    padding: 0; /* 余白をなくす */
    box-sizing: border-box; /* パディングとボーダーを幅と高さに含める */
    overflow: hidden; /* モーダルからはみ出るコンテンツを隠す */
    background-color: rgba(0, 0, 0, 0.8); /* 動画の背景色を追加 */
    aspect-ratio: 9 / 16; /* 縦動画のアスペクト比を明示的に指定 */
}

#videoModal video {
    max-width: 100%;
    max-height: 100%;
    width: auto; /* アスペクト比を維持 */
    height: auto; /* アスペクト比を維持 */
    display: block; /* 余白をなくす */
    object-fit: contain; /* 動画が親要素に収まるように調整 */
    background-color: black; /* 動画自体の背景色を黒に設定 */
}

#videoModal video {
    max-width: 100%;
    max-height: 100%;
    width: auto; /* アスペクト比を維持 */
    height: auto; /* アスペクト比を維持 */
    display: block; /* 余白をなくす */
    object-fit: contain; /* 動画が親要素に収まるように調整 */
}

#videoModal .relative .absolute {
    top: 0; /* 閉じるボタンを上部に配置 */
    right: 0;
    z-index: 10; /* 閉じるボタンが動画の上に表示されるように */
    background: none; /* 背景を透明にする */
    color: white; /* ボタンの色を白に */
    text-shadow: 0 0 5px rgba(0,0,0,0.8); /* 視認性向上のため影を追加 */
    padding: 0.5rem 1rem; /* パディングを調整 */
}

#videoModal .relative .absolute:hover {
    color: #ccc; /* ホバー時の色 */
}

#videoModal video {
    max-width: 100%;
    max-height: 100%;
    width: auto; /* アスペクト比を維持 */
    height: auto; /* アスペクト比を維持 */
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    #videoModal .relative {
        max-width: 95%;
        max-height: 80vh;
    }
}

