@charset "utf-8";

/* ==========================================================================
   Base Styles & Variables
   ========================================================================== */
:root {
    /* Colors (青空をベースにした明るいトーン) */
    --primary-color: #0066cc;    /* 先進性と信頼感を示すメインブルー */
    --secondary-color: #e6f2ff;  /* 背景等に使う薄いブルー */
    --accent-color: #00a8ff;     /* アクセントの明るい水色 */
    --text-color: #333333;       /* ベーステキスト（視認性重視） */
    --light-text: #666666;       /* サブテキスト */
    --bg-color: #ffffff;         /* 基本背景色 */
    --section-bg: #f8fbff;       /* セクション用背景色（ほんのり青） */
    --footer-bg: #0b2239;        /* フッターの深いブルー（信頼感） */
    
    /* Typography */
    --font-main: 'Noto Sans JP', 'Inter', sans-serif;
    
    /* Effects */
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--bg-color);
    letter-spacing: 0.03em;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px; /* ロゴ画像の高さ目安 */
    width: auto;
}

.logo .text-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

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

.nav-item {
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-color);
}

/* カレントページのアンダーライン演出 */
.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-item:hover::after, .nav-item.active::after {
    width: 100%;
}

/* ナビ内のお問い合わせボタン */
.btn-contact-nav {
    background-color: var(--primary-color);
    color: white !important;
    padding: 10px 24px;
    border-radius: 30px;
}

.btn-contact-nav::after {
    display: none; /* 下線を非表示 */
}

.btn-contact-nav:hover {
    background-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 168, 255, 0.3);
    transform: translateY(-2px);
}

/* ハンバーガーメニュー (スマホ用) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 22px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.is-active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
    opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* ==========================================================================
   Hero & Page Headers
   ========================================================================== */
.hero {
    margin-top: 70px;
    height: 85vh;
    min-height: 500px;
    /* トップページ背景画像 */
    background: linear-gradient(rgba(0, 50, 120, 0.6), rgba(0, 150, 255, 0.3)), url('images/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

/* ネットワークの光のラインが流れる演出 (CSSアニメーション) */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: skewX(-25deg);
    animation: flowLight 6s infinite linear;
    pointer-events: none;
}

@keyframes flowLight {
    0% { left: -100%; }
    100% { left: 100%; }
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    letter-spacing: 2px;
    /* 文字が徐々に浮き上がってくるアニメーション */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.5s ease forwards 0.3s;
}

.hero-content .subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 3px;
    margin-bottom: 40px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
    /* 文字が徐々に浮き上がってくるアニメーション (少し遅れて開始) */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.5s ease forwards 0.9s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 下層ページのヘッダー */
.page-header {
    margin-top: 70px;
    padding: 100px 20px;
    background-color: var(--section-bg);
    text-align: center;
    border-bottom: 1px solid #e1e8f0;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0; /* 左寄せに変更 */
    width: 360px; /* 20%拡大 */
    height: 100%;
    background-image: url('images/ant.png');
    background-size: cover;
    background-position: top center;
    opacity: 0.15; /* 透明度を落として少しクリアに */
    pointer-events: none;
    z-index: 0;
}

.page-header h1, .page-header p {
    position: relative;
    z-index: 1; /* テキストが透かしの上にくるようにする */
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-header p {
    color: var(--light-text);
    font-size: 1.1rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: var(--primary-color);
    padding: 16px 45px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ==========================================================================
   Layouts & Components
   ========================================================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 20px;
}

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

/* トップページ事業内容セクションの背景画像設定 */
.index-services-bg {
    background: linear-gradient(rgba(248, 251, 255, 0.85), rgba(248, 251, 255, 0.85)), url('images/services-bg.jpg') center/cover no-repeat;
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .index-services-bg {
        background-attachment: scroll; /* スマホでは負荷軽減のため固定を解除 */
    }
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

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

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

.card {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
    text-align: center;
    border: 1px solid #f0f4f8;
    overflow: hidden;
}

.service-image-box {
    width: 100%;
    height: 180px;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
}

.service-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .service-image-box img {
    transform: scale(1.1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 102, 204, 0.1);
    border-color: var(--secondary-color);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card p {
    color: var(--light-text);
    text-align: left;
    font-size: 0.95rem;
}

.vision-text {
    text-align: center;
    font-size: 1.25rem;
    line-height: 2.2;
    margin-bottom: 40px;
    font-weight: 500;
}

/* ==========================================================================
   Company Table
   ========================================================================== */
.company-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
}

.company-table th, .company-table td {
    padding: 25px;
    border-bottom: 1px solid #e1e8f0;
    text-align: left;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}

.company-table th {
    width: 25%;
    background-color: var(--section-bg);
    font-weight: 600;
    color: var(--primary-color);
}

/* ==========================================================================
   Contact Box
   ========================================================================== */
.contact-box {
    text-align: center;
    background-color: white;
    padding: 70px 30px;
    border-radius: 12px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border-top: 5px solid var(--primary-color);
}

.contact-box h2 {
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.mail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 18px 40px;
    border-radius: 30px;
    transition: var(--transition);
}

.mail-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 168, 255, 0.4);
    color: white;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--footer-bg);
    color: white;
    padding: 80px 20px 30px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-info h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.footer-info p {
    color: #a0aec0;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #a0aec0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    color: #a0aec0;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    /* Header & Nav */
    .hamburger {
        display: block;
    }
    
    .global-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: rgba(255, 255, 255, 0.98);
        transition: var(--transition);
        padding: 40px 20px;
        overflow-y: auto;
    }
    
    .global-nav.is-open {
        left: 0;
    }
    
    .global-nav .nav-list {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }
    
    .btn-contact-nav {
        display: inline-block;
        margin-top: 20px;
    }

    /* Layouts */
    .container {
        padding: 60px 20px;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .grid-2 div {
        order: unset !important; /* スマホではDOM順に表示 */
    }

    /* Typography */
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content .subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .vision-text {
        font-size: 1.05rem;
    }

    /* Company Table */
    .company-table th, .company-table td {
        display: block;
        width: 100%;
    }
    
    .company-table th {
        border-bottom: none;
        padding-bottom: 10px;
        background-color: transparent;
    }
    
    .company-table td {
        padding-top: 0;
        margin-bottom: 15px;
    }
    
    .company-table tr {
        border-bottom: 1px solid #e1e8f0;
        display: block;
    }
}

/* ==========================================================================
   News Styles
   ========================================================================== */
.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e8f0;
    transition: var(--transition);
    background: white;
}

.news-item:hover {
    background-color: #f0f7ff;
    padding-left: 30px;
}

.news-date {
    font-size: 0.9rem;
    color: var(--light-text);
    width: 100px;
    flex-shrink: 0;
}

.news-label {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 4px;
    margin-right: 20px;
    flex-shrink: 0;
}

.news-title {
    font-weight: 500;
    color: var(--text-color);
}

/* News Detail */
.news-detail {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.news-meta {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.news-category {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.news-detail-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    line-height: 1.3;
}

.news-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.news-box {
    background-color: var(--section-bg);
    padding: 30px;
    border-left: 4px solid var(--primary-color);
    margin: 30px 0;
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .news-date {
        width: auto;
    }
    .news-detail {
        padding: 40px 20px;
    }
    .news-detail-title {
        font-size: 1.6rem;
    }
}
