/* 最適化されたCSS - 使用されているクラスのみ */

/* グローバル設定 */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #f59e0b;
    --accent-color: #059669;
    --text-color: #1f2937;
    --text-gray: #4b5563;
    --light-color: #ffffff;
    --dark-color: #374151;
    --highlight-color: #fbbf24;
    --background-color: #ffffff;
    --section-bg: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --transition: all 0.3s ease;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 60px 0;
}

/* ヘッダー */
.header {
    background-color: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(229, 231, 235, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* ヘッダー内のテキストカラーを確実に設定 */
.header,
.header *,
.navbar,
.navbar *,
.nav-menu,
.nav-menu * {
    color: var(--text-color) !important;
}

/* ナビゲーションリンクの個別設定 - 最高優先度 */
.header .nav-menu li a,
.header .navbar .nav-menu li a,
header.header .nav-menu li a,
header.header nav.navbar .nav-menu li a {
    color: #333333 !important;
    color: var(--text-color) !important;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 10px 0;
}

.header .nav-menu li a:hover,
.header .nav-menu li a.active,
.header .navbar .nav-menu li a:hover,
.header .navbar .nav-menu li a.active,
header.header .nav-menu li a:hover,
header.header .nav-menu li a.active {
    color: var(--accent-color) !important;
}

.navbar {
    padding: 1rem 0;
    background-color: transparent !important;
    background: transparent !important;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent !important;
    background: transparent !important;
}

.logo-img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: transparent !important;
    background: transparent !important;
}

.nav-menu li {
    margin-left: 30px;
    position: relative;
    background-color: transparent !important;
    background: transparent !important;
}

.nav-menu li a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    left: 0;
    bottom: -5px;
    transition: var(--transition);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

/* モバイルメニュー */
.menu-icon {
    display: none;
    cursor: pointer;
    flex-direction: column;
}

.menu-icon span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-color) !important;
    margin: 3px 0;
    transition: var(--transition);
}

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

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.1); /* 初期状態を少し拡大 */
    transition: none; /* keyframesアニメーションとの競合を防ぐ */
}

/* アクティブなスライドの縮小アニメーション */
.hero-slide.active {
    opacity: 1;
    animation: zoomOut 8s linear forwards;
}

/* スライド切り替え時のフェードイン効果（統一アニメーション） */
.hero-slide.fade-in {
    opacity: 1;
    animation: fadeInZoomOut 8s linear forwards;
}

/* 最初のスライドの初期表示専用（opacity変化なし） */
.hero-slide.fade-in.initial-display {
    opacity: 1;
    animation: zoomOut 8s linear forwards;
}

/* 縮小アニメーション定義（ぼかし効果付き） */
@keyframes zoomOut {
    0% {
        transform: scale(1.1);
        filter: blur(0px) brightness(1.0);
    }
    50% {
        transform: scale(1.05);
        filter: blur(0.5px) brightness(0.95);
    }
    100% {
        transform: scale(1.0);
        filter: blur(1px) brightness(0.9);
    }
}

@keyframes fadeInZoomOut {
    0% {
        opacity: 0;
        transform: scale(1.1);  /* 初期値と合わせる */
        filter: blur(0px) brightness(1.0);
    }
    10% {
        opacity: 1;  /* opacityを早めに完了 */
        transform: scale(1.09);
        filter: blur(0px) brightness(1.0);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
        filter: blur(0.5px) brightness(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1.0);
        filter: blur(1px) brightness(0.9);
    }
}

/* アニメーション無効化設定（アクセシビリティ対応） */
@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        animation: none !important;
        transition: opacity 0.5s ease-in-out !important;
        transform: scale(1.0) !important;
        filter: none !important;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.company-name {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.highlight {
    color: var(--highlight-color);
    font-weight: bold;
    font-size: 1.3em;
}

/* メインコンテンツ */
.main-content {
    margin-top: 0;
    padding-top: 0;
}

/* 企業理念セクション */
.philosophy {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.philosophy-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

.philosophy-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.philosophy-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.philosophy-text ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.philosophy-text ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.philosophy-text p {
    line-height: 1.8;
}

/* サービス紹介 */
.services {
    background-color: var(--section-bg);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.service-item {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.service-item h3 {
    font-size: 1.3rem;
    margin: 1rem;
    text-align: center;
    color: var(--primary-color);
}

.service-item p {
    padding: 0 1rem 1.5rem;
    line-height: 1.6;
}

/* 会社概要セクション */
.company-section {
    padding: 4rem 0;
    background-color: var(--background-color);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 1rem auto;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
}

.company-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.company-table th,
.company-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.company-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    width: 30%;
}

.company-table td {
    background-color: var(--card-bg);
}

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

.certificate-img {
    max-width: 300px;
    margin-top: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 取引銀行の定義リストレイアウト */
.bank-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    align-items: baseline;
    margin: 0;
}

.bank-info dt {
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    justify-self: start;
}

.bank-info dd {
    color: var(--text-gray);
    margin: 0;
    justify-self: start;
}

/* 役員の定義リストレイアウト */
.officer-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    align-items: baseline;
    margin: 0;
}

.officer-info dt {
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    justify-self: start;
}

.officer-info dd {
    color: var(--text-gray);
    margin: 0;
    justify-self: start;
}

.note {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* お問い合わせセクション */
.contact-section {
    padding: 4rem 0;
    background-color: var(--section-bg);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-item {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.phone-number {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 1rem 0;
    color: var(--accent-color);
}

.business-hours {
    color: var(--text-gray);
    font-size: 0.95rem;
}

address {
    font-style: normal;
    line-height: 1.6;
}

/* フッター */
.footer {
    background: var(--background-color);
    color: var(--text-color);
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info {
    flex: 1;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo .group-logo {
    height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
}

.footer-logo .group-logo:hover {
    opacity: 0.8;
}

.footer-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ページトップに戻るボタン */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* 最優先ヘッダーテキスト色強制設定 */
.header .nav-menu li a,
.header .navbar .nav-menu li a,
header.header .nav-menu li a,
header.header nav.navbar .nav-menu li a,
header.header nav.navbar ul.nav-menu li a {
    color: #333333 !important;
    background-color: transparent !important;
    background: transparent !important;
}

/* リンクのホバー状態 */
.header .nav-menu li a:hover,
.header .navbar .nav-menu li a:hover,
header.header .nav-menu li a:hover,
header.header nav.navbar .nav-menu li a:hover {
    color: #007bff !important;
}

/* アクティブ状態 */
.header .nav-menu li a.active,
.header .navbar .nav-menu li a.active,
header.header .nav-menu li a.active,
header.header nav.navbar .nav-menu li a.active {
    color: #007bff !important;
}
