/* =========================================
   1. リセットと基本設定
========================================= */
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    color: #ffffff;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   2. 星空アニメーション
========================================= */
#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40px 70px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #ffffff, rgba(0,0,0,0));
    background-size: 200px 200px;
    animation: twinkle 5s linear infinite;
}
@keyframes twinkle {
    0% { transform: translateY(0); }
    100% { transform: translateY(-200px); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   3. ヘッダーとナビゲーション (PC版)
========================================= */
header { 
    display: flex; 
    justify-content: space-between; 
    padding: 1.5rem 5%; 
    align-items: center; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    backdrop-filter: blur(10px); 
    background: rgba(10, 10, 10, 0.5);
    height: 80px;
}
.logo img { 
    height: 75px; 
    width: auto;
    mix-blend-mode: screen; 
    filter: brightness(1.2); 
    display: block;
}
nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}
nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 300;
    transition: 0.3s;
}
nav a:hover { color: #4facfe; }

/* PC版ではハンバーガーボタンを非表示 */
.menu-toggle { display: none; }

/* =========================================
   4. メインコンテンツ・ヒーロー (PC版)
========================================= */
.hero {
    position: relative;
    overflow: hidden;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.5s ease-out;
}
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 3rem;
    border-radius: 20px;
}

.page-header {
    height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: fadeIn 1s ease-out;
}

.content-section {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

/* 汎用タイトル・ボタン */
.section-title {
    font-size: 2.2rem;
    color: #fff;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 2px;
}
.section-title.text-left { text-align: left; }

.hero-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}
.btn-primary, .btn-secondary {
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: 0.3s ease;
}
.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.5);
}
.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}
.btn-text {
    color: #4facfe;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 1rem;
    transition: 0.3s;
}
.btn-text:hover { color: #00f2fe; transform: translateX(5px); }
.btn-large {
    padding: 1.2rem 4rem;
    font-size: 1.2rem;
    display: inline-block;
    margin-top: 2rem;
}

/* =========================================
   5. 各セクションのカードデザイン
========================================= */
/* トップページのカード群 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.card {
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    transition: 0.3s;
}
.card:hover { transform: translateY(-10px); background: rgba(255,255,255,0.1); }
.card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.card-link { display: inline-block; margin-top: 1rem; color: #4facfe; text-decoration: none; font-size: 0.9rem; border-bottom: 1px solid transparent; transition: 0.3s; }
.card:hover .card-link { border-bottom: 1px solid #4facfe; }

/* ニュースセクション */
.news-container { display: flex; flex-direction: column; gap: 1rem; }
.news-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: 0.3s;
}
.news-item:hover { background: rgba(255, 255, 255, 0.08); border-color: #4facfe; transform: translateX(10px); }
.news-date { color: #888; min-width: 100px; }
.news-category {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 1.5rem;
    min-width: 80px;
    text-align: center;
}
.news-title { color: #eaeaea; text-decoration: none; flex: 1; line-height: 1.5; }

/* About Teaser / CTA */
.about-flex { background: rgba(255, 255, 255, 0.02); padding: 4rem; border-radius: 16px; border-left: 4px solid #4facfe; }
.about-text h3 { font-size: 1.5rem; color: #fff; margin-bottom: 1.5rem; }
.about-text p { color: #ccc; line-height: 1.8; margin-bottom: 1.5rem; }
/* Message Teaser セクション (トップページ用) */
.message-flex {
    background: rgba(255, 255, 255, 0.02);
    padding: 4rem;
    border-radius: 16px;
    border-right: 4px solid #4facfe; /* Aboutとは逆の右側にアクセント */
    text-align: right; /* 全体を右寄せに */
    margin-top: 2rem;
}
.section-title.text-right {
    text-align: right;
}
.message-text h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
}
.message-text p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    display: inline-block;
    text-align: left; /* 文章自体は読みやすいように左揃え */
    max-width: 800px; /* 横に広がりすぎないように制限 */
}
.cta-section {
    text-align: center;
    background: radial-gradient(circle at center, rgba(79, 172, 254, 0.1) 0%, transparent 70%);
    padding: 8rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.cta-section h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.cta-section p { color: #ccc; font-size: 1.1rem; }

/* =========================================
   6. サブページ専用デザイン (About, Services, Contact)
========================================= */
/* About */
.vision-section { text-align: left; }
.vision-section h2 { color: #4facfe; font-size: 1.8rem; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 0.5rem; margin-top: 3rem; }
.vision-section h2:first-child { margin-top: 0; }
.vision-section p { line-height: 1.8; margin-bottom: 1.5rem; font-size: 1.05rem; }
.vision-list { list-style: none; padding: 0; margin-top: 1.5rem; }
.vision-list li { background: rgba(255,255,255,0.03); margin-bottom: 1rem; padding: 1.5rem; border-radius: 8px; border-left: 4px solid #4facfe; line-height: 1.6; }
.vision-list strong { color: #fff; font-size: 1.2rem; display: block; margin-bottom: 0.5rem; }

/* Services */
.services-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; margin-bottom: 4rem; }
.service-detail-card { display: flex; flex-direction: column; padding: 2.5rem 2rem; }
.service-icon { margin-bottom: 1.5rem; background: rgba(79, 172, 254, 0.1); width: 70px; height: 70px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 1px solid rgba(79, 172, 254, 0.3); }
.service-detail-card h3 { font-size: 1.4rem; margin-top: 0; margin-bottom: 1rem; color: #fff; letter-spacing: 1px; }
.service-desc { color: #ccc; line-height: 1.7; margin-bottom: 1.5rem; flex-grow: 1; }
.service-features { list-style: none; padding: 0; margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 1.5rem; }
.service-features li { position: relative; padding-left: 1.5rem; margin-bottom: 0.8rem; color: #eaeaea; font-size: 0.95rem; line-height: 1.5; }
.service-features li::before { content: "✓"; position: absolute; left: 0; color: #4facfe; font-weight: bold; }
.tech-stack-section { text-align: center; margin-top: 5rem; padding-top: 3rem; border-top: 1px solid rgba(255,255,255,0.1); }
.tech-stack-section h2 { font-size: 1.8rem; color: #fff; margin-bottom: 2rem; letter-spacing: 2px; }
.tech-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.tech-tag { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(79, 172, 254, 0.3); color: #4facfe; padding: 0.8rem 1.5rem; border-radius: 30px; font-size: 0.9rem; font-weight: 700; letter-spacing: 1px; transition: 0.3s; }
.tech-tag:hover { background: rgba(79, 172, 254, 0.2); transform: translateY(-3px); }

/* Contact */
.contact-card { max-width: 750px; margin: 0 auto; padding: 3rem 4rem; }
.contact-form .form-group { margin-bottom: 2rem; }
.contact-form label { display: block; margin-bottom: 0.8rem; color: #eaeaea; font-size: 1rem; font-weight: 700; letter-spacing: 1px; }
.contact-form .required { background: #e74c3c; color: #fff; font-size: 0.7rem; padding: 0.2rem 0.5rem; border-radius: 4px; margin-left: 0.5rem; vertical-align: middle; font-weight: normal; }
.contact-form input, .contact-form textarea, .contact-form select { width: 100%; padding: 1.2rem; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; color: #fff; font-family: inherit; font-size: 1rem; transition: border-color 0.3s ease, background 0.3s ease; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: none; border-color: #4facfe; background: rgba(0, 0, 0, 0.4); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(255, 255, 255, 0.3); }
.select-wrapper { position: relative; }
.select-wrapper::after { content: "▼"; font-size: 0.8rem; color: #4facfe; position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.contact-form select { appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer; }
.contact-form select option { background: #1a1a1a; color: #fff; padding: 1rem; }
.form-submit { text-align: center; margin-top: 3.5rem; }
.submit-btn { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: #fff; border: none; padding: 1.2rem 4rem; border-radius: 30px; cursor: pointer; font-size: 1.1rem; font-weight: bold; letter-spacing: 2px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3); }

/* =========================================
   7. フッター
========================================= */
footer {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 3rem 5% 1rem;
    color: #ccc;
    margin-top: auto;
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 2rem;
    text-align: left;
}
.footer-info { flex: 1; min-width: 300px; }
.footer-info h3 { color: #fff; margin-top: 0; font-size: 1.5rem; margin-bottom: 1.5rem; letter-spacing: 2px; }
.footer-info p { margin: 0.5rem 0; line-height: 1.6; font-size: 0.95rem; }
.sns-links { display: flex; gap: 1.5rem; margin-top: 1.5rem; }
.sns-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
}
.sns-links a[aria-label="Instagram"] { color: #fff; }
.sns-links a[aria-label="Instagram"]:hover {
    transform: translateY(-3px);
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    box-shadow: 0 4px 15px rgba(214, 36, 159, 0.4);
}
.sns-links a[aria-label="YouTube"] { color: #fff; }
.sns-links a[aria-label="YouTube"]:hover {
    transform: translateY(-3px);
    background: #FF0000;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}
.footer-map { flex: 1; min-width: 300px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; }

/* =========================================
   8. スマホ用レスポンシブ (max-width: 768px)
========================================= */
@media (max-width: 768px) {
    /* 汎用レイアウト */
    .content-section { padding: 4rem 5%; }
    .card-container { display: flex; flex-direction: column; align-items: center; }
    
    /* ニュース・About・CTA */
    .news-item { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
    .about-flex { padding: 2rem; }
    .cta-section h2 { font-size: 1.8rem; }
    
    /* Contact・フッター */
    .contact-card { padding: 2rem 1.5rem; }
    .footer-content { flex-direction: column; gap: 2rem; }
    .footer-map iframe { height: 200px; }

    /* ヒーロー（動画）の最適化（iOSバグ対策） */
    .hero {
        position: relative;
        width: 100vw;
        max-width: 100%;
        height: 50vh;
        min-height: 350px;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #000;
        padding: 0;
    }
    .hero-video {
        position: static !important;
        width: 100% !important;
        height: 100% !important;
        transform: none !important;
        -webkit-transform: none !important;
        object-fit: contain !important;
        object-position: 50% 50% !important; 
        -webkit-transform: translateZ(0);
        -webkit-backface-visibility: hidden;
    }
    .hero-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 10;
        text-align: center;
        border-radius: 0;
    }
    .hero h1 { font-size: 1.4rem !important; margin-bottom: 0.5rem; }
    .hero p { font-size: 0.85rem; margin-bottom: 1rem; }
    .hero-buttons { margin-top: 1rem; display: flex; gap: 0.8rem; justify-content: center; }
    .btn-primary, .btn-secondary { padding: 0.6rem 1.5rem; font-size: 0.85rem; }

    /* ヘッダーとハンバーガーメニュー */
    header {
        height: 70px;
        padding: 0 5%;
        position: relative;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 110;
        margin-left: auto;
    }
    .menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(15px);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 105;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s ease, opacity 0.3s ease;
    }
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }
    .nav-menu a {
        font-size: 1.5rem;
        font-weight: 400;
        letter-spacing: 2px;
    }
}
/* =========================================
   代表挨拶ページ（greeting.html）用デザイン
========================================= */
.greeting-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem;
}

.greeting-body h2 {
    color: #4facfe;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
    line-height: 1.4;
}

.greeting-body p {
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1.8rem;
    text-align: justify;
}

.greeting-body p:last-of-type {
    margin-bottom: 3.5rem;
}

/* 署名エリア */
.greeting-signature {
    text-align: right;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.greeting-signature .post {
    font-size: 0.9rem;
    color: #888;
    margin: 0 0 0.5rem 0;
}

.greeting-signature .name {
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
    letter-spacing: 2px;
    margin: 0;
}

/* スマホ表示での調整 */
@media (max-width: 768px) {
    .greeting-card {
        padding: 2.5rem 1.5rem;
    }
    .greeting-body h2 {
        font-size: 1.4rem;
        margin-bottom: 2rem;
    }
    .greeting-body p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}
/* スマホ時の Message Teaser 調整 */
    .message-flex {
        padding: 2rem;
        text-align: left; /* スマホでは左寄せに戻す */
        border-right: none;
        border-left: 4px solid #4facfe; /* スマホでは左側の線に統一 */
    }
    .section-title.text-right {
        text-align: left;
    }
    /* =========================================
   会社概要（about.html）テーブルデザイン
========================================= */
.company-profile-section h2 {
    color: #4facfe;
    font-size: 1.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.profile-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-table tr:last-child {
    border-bottom: none;
}

.profile-table th, .profile-table td {
    padding: 1.5rem 1rem;
    text-align: left;
    vertical-align: top;
    font-size: 1.05rem;
}

.profile-table th {
    color: #4facfe;
    font-weight: 700;
    width: 25%;
    min-width: 130px;
    letter-spacing: 1px;
}

.profile-table td {
    color: #ccc;
    line-height: 1.7;
}

/* スマホ表示でのテーブル崩れ防止（縦並び化） */
@media (max-width: 768px) {
    .profile-table tr {
        display: flex;
        flex-direction: column;
        padding: 1rem 0;
    }
    .profile-table th, .profile-table td {
        padding: 0.2rem 0;
        width: 100%;
        font-size: 0.95rem;
    }
    .profile-table th {
        margin-bottom: 0.3rem;
    }
}