/*
Theme Name: My Original Portfolio
Author: Kayoko Matsumoto
Description: リッチメディア型ポートフォリオテーマ
Version: 13.0 (Footer Perfect)
*/

/* ==============================================
   1. デザインシステム & 基本設定
   ============================================== */
:root {
    --bg-base: #ffffff;
    --bg-gray: #f4f6f9;
    --text-main: #333333;
    --text-muted: #6c757d;
    --accent-color: #232c65;
    --accent-hover: #3a458a;
    --border-color: #e9ecef;
    --max-width: 1200px;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --card-hover: 0 10px 20px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
body {
    margin: 0; padding: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-base);
    line-height: 1.8; letter-spacing: 0.03em;
    overflow-x: hidden; 
}
a { color: var(--text-main); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--accent-hover); }

/* ★ 画像を高画質にシャープにレンダリング */
img { 
    max-width: 100%; 
    height: auto; 
    vertical-align: bottom; 
    image-rendering: -webkit-optimize-contrast; 
    image-rendering: high-quality; 
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ==============================================
   2. ヘッダー（最強の絶対開くアコーディオン）
   ============================================== */
.site-header { background-color: #ffffff !important; position: relative; z-index: 9999; width: 100%; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.header-inner { max-width: 1400px !important; width: 95%; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
.header-logo img { height: 50px; width: auto; display: block; }
.header-right { display: flex; align-items: center; justify-content: flex-end; flex-grow: 1; }

.header-nav { overflow: visible !important; }
.header-nav ul { display: flex; align-items: center; gap: 25px; margin: 0 30px 0 0; padding: 0; list-style: none; }
.header-nav ul li a { white-space: nowrap; font-size: 15px; font-weight: bold; color: #232c65; display: block; padding: 10px; }

.header-nav ul li { position: relative; }
.header-nav ul .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 10000;
}
.header-nav ul li:hover > .sub-menu,
.header-nav ul li:focus-within > .sub-menu,
.header-nav ul li:active > .sub-menu {
    display: flex !important;
    flex-direction: column;
}
.header-nav ul .sub-menu li a { font-size: 13px; font-weight: normal; padding: 10px 20px; border-bottom: none; }
.header-nav ul .sub-menu li a:hover { background-color: var(--bg-gray); color: var(--accent-color); }

.header-btns { display: flex; align-items: center; gap: 15px; }
.btn-resource, .header-contact-btn { display: inline-block; white-space: nowrap; padding: 12px 30px; border-radius: 50px; font-size: 14px; font-weight: bold; text-align: center; transition: all 0.3s ease; }
.btn-resource { background-color: #000000; color: #ffffff !important; }
.btn-resource:hover { background-color: #333333; transform: translateY(-2px); }
.header-contact-btn { background-color: #232c65; color: #ffffff !important; }
.header-contact-btn:hover { background-color: var(--accent-hover); transform: translateY(-2px); }

/* ==============================================
   3. 共通セクション＆個別ページ
   ============================================== */
.section-wrapper { padding: 80px 0; }
.bg-gray { background-color: var(--bg-gray); }
.section-title { font-size: 24px; font-weight: bold; margin-bottom: 40px; border-bottom: 2px solid var(--text-main); padding-bottom: 10px; display: inline-block; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px; }
.media-card { background: var(--bg-base); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; height: 100%; }
.media-card:hover { transform: translateY(-4px); box-shadow: var(--card-hover); }
.media-card-img { width: 100%; aspect-ratio: 16 / 9; background-color: #e2e2e2; object-fit: cover; }
.media-card-content { padding: 24px; flex-grow: 1; display: flex; flex-direction: column; }
.media-card-category { font-size: 12px; font-weight: bold; color: var(--accent-color); margin-bottom: 8px; }
.media-card-title { font-size: 18px; font-weight: bold; margin: 0 0 12px 0; line-height: 1.5; }
.media-card-excerpt { font-size: 14px; color: var(--text-muted); margin: 0 0 16px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.media-card-tags { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-badge { display: inline-block; background-color: var(--bg-gray); color: var(--text-muted); font-size: 11px; font-weight: bold; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border-color); }

.slider-section { padding: 60px 0; background-color: var(--bg-gray); overflow: hidden; }
.swiper-slide a.slide-link { display: block; width: 100%; height: 100%; }
.swiper-slide { transition: transform 0.3s; opacity: 0.5; }
.swiper-slide-active { opacity: 1; transform: scale(1.02); }
.swiper-slide img { width: 100%; aspect-ratio: 1.4 / 1; object-fit: cover; border-radius: 12px; box-shadow: var(--card-shadow); }
.slider-section .swiper-button-next, .slider-section .swiper-button-prev { color: var(--accent-color) !important; background-color: #ffffff; width: 50px; height: 50px; border-radius: 50%; box-shadow: var(--card-shadow); display: flex; align-items: center; justify-content: center; }

.single-article-container { max-width: 800px; background-color: var(--bg-base); padding: 60px; border-radius: 12px; box-shadow: var(--card-shadow); margin: 0 auto; }
.article-category { font-size: 13px; font-weight: bold; color: var(--accent-color); margin-bottom: 12px; display: inline-block; padding: 4px 12px; background-color: var(--bg-gray); border-radius: 20px; }
.article-title { font-size: 32px; font-weight: bold; line-height: 1.4; margin: 0 0 20px 0; }
.article-h2 { font-size: 24px; font-weight: bold; color: var(--accent-color); margin: 50px 0 24px 0; padding-left: 16px; border-left: 6px solid var(--accent-color); }

.dx-demo-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 30px; margin-top: 40px; }
.admin-panel { background-color: #2c3e50; color: #fff; border-radius: 12px; padding: 30px; }
.panel-label { font-size: 11px; font-weight: bold; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); color: #95a5a6; }
.sync-btn { width: 100%; background-color: #3498db; color: #fff; border: none; padding: 15px; border-radius: 6px; font-weight: bold; cursor: pointer; transition: background 0.3s; }
.shop-frame { background-color: #fff; border: 4px solid #333; border-radius: 20px; padding: 40px; min-height: 400px; box-shadow: var(--card-shadow); }
.mockup-img-wrap { width: 100%; aspect-ratio: 1 / 1; background-color: #f8f9fa; border-radius: 8px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; }

/* ==============================================
   4. スプレッドシート連携
   ============================================== */
.spreadsheet-ui { background-color: #f1f3f4 !important; border: 1px solid #ddd; color: #333 !important; }
.spreadsheet-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.spreadsheet-table th, .spreadsheet-table td { border: 1px solid #e0e0e0; padding: 8px; text-align: left; }
.spreadsheet-table th { background-color: #f8f9fa; color: #70757a; font-weight: normal; }
.row-num { background-color: #f8f9fa; color: #70757a; text-align: center !important; width: 30px; }
.spreadsheet-table input, .spreadsheet-table select { width: 100%; border: none; outline: none; padding: 4px; background: transparent; font-size: 14px; }
.spreadsheet-table input:focus { background-color: #e8f0fe; box-shadow: inset 0 0 0 2px #1a73e8; }

.preview-lp { display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; padding: 50px 30px; }
.lp-content { transition: opacity 0.5s; display: flex; flex-direction: column; align-items: center; width: 100%; }
.lp-content h2, .lp-content h3 { font-size: 28px !important; font-weight: bold; color: #232c65; margin-bottom: 20px !important; line-height: 1.4; }

/* ==============================================
   5. その他のセクション（インフォグラフィック含む）
   ============================================== */
.architecture-section { background: #fff; padding: 40px; border-radius: 12px; box-shadow: var(--card-shadow); margin-bottom: 60px; }
.arch-diagram { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: 30px; }
.arch-group { width: 100%; max-width: 700px; padding: 30px; border-radius: 16px; position: relative; }
.security-warning-box { background-color: #fdf2f2; border: 1px solid #f5c6c6; border-left: 6px solid #e74c3c; border-radius: 8px; padding: 24px; margin-top: 40px; }
.warning-title { color: #c0392b; font-size: 18px; font-weight: bold; margin-bottom: 12px; }

.arch-label { position: absolute; top: -12px; left: 20px; background: #fff; padding: 0 10px; font-size: 12px; font-weight: bold; color: var(--accent-color); text-transform: uppercase; border-radius: 4px; }
.source-group { border: 2px dashed #e6dbb3; background-color: #fffdf2; }
.cloud-group { border: 2px solid var(--accent-color); background-color: #f0f4f8; }
.output-group { border: 2px solid #eaaaab; background-color: #fdf2f2; }
.arch-nodes { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.node { padding: 15px 20px; background: #fff; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.08); font-size: 14px; font-weight: bold; text-align: center; min-width: 120px; }
.node span { display: block; font-size: 11px; font-weight: normal; color: var(--text-muted); margin-top: 5px; }
.arch-arrow { font-size: 12px; font-weight: bold; color: var(--text-muted); text-align: center; padding: 10px 0; }

.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; margin: 40px 0; }
.tech-card { background: #fff; padding: 24px; border-radius: 8px; border: 1px solid var(--border-color); box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.tech-card h4 { color: var(--accent-color); margin-top: 0; border-bottom: 2px solid var(--border-color); padding-bottom: 10px; font-size: 16px; }
.tech-card p { font-size: 14px; margin-bottom: 0; line-height: 1.6; }

.contact-form-wrapper { max-width: 700px; margin: 60px auto; background: #fff; padding: 50px; border-radius: 12px; box-shadow: var(--card-shadow); }
.contact-form-wrapper h1, .contact-form-wrapper h2 { text-align: center; margin-bottom: 30px; }
form p { margin-bottom: 20px; font-weight: bold; }
form input[type="text"], form input[type="email"], form textarea, form select { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 6px; font-size: 16px; background: #fdfdfd; font-family: inherit; margin-top: 5px; box-sizing: border-box; }
form input[type="submit"] { display: block; width: 100%; max-width: 300px; margin: 40px auto 0; background-color: var(--accent-color); color: #fff; border: none; padding: 16px; font-size: 16px; font-weight: bold; border-radius: 50px; cursor: pointer; transition: 0.3s; }
form input[type="submit"]:hover { background-color: var(--accent-hover); transform: translateY(-2px); }

/* ==============================================
   6. スマホ・タブレット用レスポンシブ
   ============================================== */
@media (max-width: 991px) {
    * { overflow-wrap: break-word !important; }
    
    body { font-size: 12px !important; }
    h1, .article-title { font-size: 16px !important; line-height: 1.4 !important; margin-bottom: 15px !important; }
    h2, .article-h2 { font-size: 15px !important; margin: 20px 0 10px !important; padding-left: 10px !important; border-left-width: 4px !important; }
    h3, .warning-title, .arch-label, .media-card-title { font-size: 14px !important; line-height: 1.4 !important; margin-bottom: 10px !important; }
    h4, .panel-label, .tech-card h4 { font-size: 13px !important; margin-bottom: 8px !important; }
    p, li, td, th, .mockup-info p, .tech-card p, .media-card-excerpt { font-size: 12px !important; line-height: 1.6 !important; }
    .article-category, .tag-badge { font-size: 10px !important; padding: 4px 8px !important; }

    .header-inner { flex-direction: column !important; padding: 15px !important; gap: 15px !important; }
    .header-right { width: 100%; flex-direction: column !important; gap: 15px !important; }
    
    .header-nav { width: 100%; overflow: visible !important; padding: 0 !important; }
    .header-nav ul { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; margin: 0 !important; gap: 8px !important; padding: 0 !important; }
    .header-nav ul li a { background: #f4f6f9; border-radius: 20px !important; font-size: 12px !important; padding: 6px 12px !important; border: 1px solid #e9ecef; }

    .header-nav ul .sub-menu { position: absolute !important; top: 100% !important; left: 50% !important; transform: translateX(-50%) !important; width: 180px !important; z-index: 10000 !important; box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important; padding: 5px 0 !important; }
    .header-nav ul .sub-menu li a { background: #fff !important; border: none !important; border-radius: 0 !important; border-bottom: 1px solid #f4f6f9 !important; font-size: 12px !important; padding: 10px !important; }

    .header-btns { flex-direction: row !important; width: 100%; justify-content: space-between !important; padding: 0 !important; }
    .btn-resource, .header-contact-btn { width: 48% !important; padding: 10px 0 !important; font-size: 12px !important; margin: 0 !important; white-space: nowrap !important; }
    
    .dx-demo-container { grid-template-columns: 1fr; }
    .single-article-container, .architecture-section, .contact-form-wrapper { padding: 30px 15px !important; }
    
    .spreadsheet-ui { display: block !important; width: 100% !important; overflow-x: auto !important; white-space: nowrap !important; }
    .spreadsheet-table th, .spreadsheet-table td { padding: 4px !important; font-size: 11px !important; }
    .spreadsheet-table input, .spreadsheet-table select { padding: 2px !important; font-size: 11px !important; }

    .lp-content h2, .lp-content h3 { font-size: 20px !important; margin-bottom: 15px !important; }

    /* ★ スマホ用フッター */
    .site-footer { padding: 40px 0 20px !important; }
    .site-footer .container { padding: 0 20px !important; }
    .site-footer .footer-inner { margin-bottom: 25px !important; }
    .site-footer .footer-logo img { max-width: 110px !important; height: auto; }
    .site-footer .footer-contact-btn { font-size: 11px !important; padding: 8px 16px !important; }
    .site-footer-bottom, .site-footer p { font-size: 10px !important; margin-top: 10px !important; }
}

/* ==============================================
   7. フッター（究極のシンプル・右寄せ版）
   ============================================== */
.site-footer { background-color: var(--accent-color); color: #ffffff; padding: 60px 0 30px; margin-top: 80px; }

/* ロゴとボタンを左右両端に配置 */
.footer-inner { 
    display: flex !important; 
    justify-content: space-between !important; 
    align-items: center !important; 
    width: 100% !important;
    margin-bottom: 30px !important; 
}
.footer-logo img { height: 40px; filter: brightness(0) invert(1); }

/* ★ フッターメニューはレイアウトを崩す原因になるため完全に隠す */
.footer-nav { display: none !important; }

/* ★ お問い合わせボタンを確実に右端に寄せる */
.footer-contact-btn { 
    background-color: #ffffff; 
    color: var(--accent-color) !important; 
    padding: 12px 30px; 
    border-radius: 30px; 
    font-weight: bold; 
    font-size: 14px; 
    display: inline-block; 
    white-space: nowrap; 
    margin: 0 0 0 auto !important; /* 左側の余白を最大にして右に押し込む */
}

/* コピーライトは下段中央 */
.site-footer-bottom, .site-footer p {
    text-align: center !important;
    width: 100% !important;
    margin: 0 !important;
    font-size: 12px;
}