/*
=======================================================================
WebTools Pro - 共通統合スタイルシート (style.css)
=======================================================================
*/

/* --- 1. 変数定義 & 全体の基本設定 --- */
:root {
    /* メインコンテンツエリア（眩しさを抑えた落ち着いたグレー） */
    --bg-color: #f0f2f5;        /* トーンを落としたライトグレー（背景） */
    --card-bg: #fcfcfd;         /* 目に優しいオフホワイト（カード） */
    --text-main: #334155;       /* 柔らかいダークスレート（主文字） */
    --text-muted: #64748b;      /* 控えめなグレー（補足文字） */
    
    /* ボタン用アクセントブルー */
    --btn-blue: #2563eb;        /* 視認性の良い鮮やかなブルー */
    --btn-blue-hover: #1d4ed8;  /* ホバー時の深みのあるブルー */

    /* ヘッダー・フッター用のダーク引き締めカラー */
    --header-footer-bg: #0f172a;    /* 深みのあるダークスレート */
    --header-footer-text: #f8fafc;  /* ヘッダー・フッター内の明るい文字 */
    --header-footer-muted: #94a3b8; /* ヘッダー・フッター内の控えめな文字 */
    --header-footer-border: #1e293b;/* ダーク背景に馴染むボーダー */
    --accent-sky: #38bdf8;          /* ヘッダー用のライトブルー */

    --card-border: #e2e8f0;     /* カード等のボーダー */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

main, .hero, .tools-container, .container, .document-container, .contact-container {
    flex: 1;
}

/* --- 2. 共通ヘッダー (ダークカラー適用) --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-footer-bg);
    border-bottom: 1px solid var(--header-footer-border);
    width: 100%;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 38px;
    width: auto;
    border-radius: 6px;
    transition: opacity 0.2s ease;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--header-footer-text);
    transition: color 0.2s ease;
}

.logo:hover .logo-img { opacity: 0.85; }
.logo:hover .logo-text { color: var(--accent-sky); }

nav { display: flex; gap: 24px; }
nav a {
    color: var(--header-footer-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

nav a:hover, nav a.active {
    color: var(--accent-sky);
}

/* --- 3. ホーム画面：ヒーローセクション --- */
.hero {
    text-align: center;
    padding: 50px 20px 30px 20px;
    max-width: 800px;
    margin: 0 auto;
    flex: 0;
}

.hero h1 {
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

/* 「快適」のグラデーション青色指定 */
.hero h1 span {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- 4. ホーム画面：ツール一覧グリッド＆カード --- */
.tools-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    box-sizing: border-box;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 24px;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    line-height: 1;
    opacity: 0.9;
}

.tool-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.tool-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
}

/* ツールを開くボタン（青色アクセント） */
.btn-primary {
    display: inline-block;
    text-align: center;
    padding: 10px 18px;
    background-color: var(--btn-blue);
    color: #ffffff;
    border: none;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--btn-blue-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* --- 5. 汎用スタイル --- */
.container, .document-container, .contact-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 36px;
    margin: 40px auto;
    max-width: 800px;
    width: 90%;
    box-sizing: border-box;
    box-shadow: var(--shadow-sm);
}

/* --- 6. 共通フッター (ダークカラー適用) --- */
footer {
    width: 100%;
    background: var(--header-footer-bg);
    border-top: 1px solid var(--header-footer-border);
    padding: 35px 20px;
    text-align: center;
    margin-top: auto;
    color: var(--header-footer-muted);
    font-size: 0.85rem;
    box-sizing: border-box;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--header-footer-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.footer-links a:hover, .footer-links a.active {
    color: var(--accent-sky);
}

/* --- 7. レスポンシブ対応 --- */
@media (max-width: 600px) {
    header { flex-direction: column; gap: 12px; padding: 14px 20px; }
    .logo-text { font-size: 1.25rem; }
    nav { gap: 14px; flex-wrap: wrap; justify-content: center; }
    nav a { font-size: 0.85rem; }
    .hero { padding: 35px 15px 15px 15px; }
    .hero h1 { font-size: 1.75rem; }
    .hero p { font-size: 0.95rem; }
    .tools-container { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
    .container, .document-container, .contact-container { padding: 20px; margin: 20px auto; }
}

@media (max-width: 768px) { body { zoom: 1; } }

/* --- 8. 広告枠 --- */
.ad-slot { margin: 30px auto; text-align: center; max-width: 728px; width: 100%; }
.ad-label { font-size: 0.75rem; color: #94a3b8; letter-spacing: 0.05em; margin-bottom: 6px; display: block; }
.ad-wrapper {
    min-height: 90px;
    background: #e2e8f0;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}