/* フォント */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans JP', sans-serif; color: #333; line-height: 1.6; overflow-x: hidden; background: #fff; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ヘッダー */
.custom-header { position: fixed; top: 0; left: 0; width: 100%; background: transparent; z-index: 1000; padding: 15px 0; transition: all 0.3s ease; }
.custom-header.scrolled { background: rgba(255,255,255,0.97); box-shadow: 0 2px 20px rgba(0,0,0,0.08); padding: 10px 0; }
.custom-header.scrolled .nav-list li a { color: #333; }
.custom-header.scrolled .nav-list li a::after { background: #333; }
.custom-header.scrolled .hamburger span { background: #333; }
.header-container { max-width: 1400px; margin: 0 auto; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; }
.logo img { height: 50px; width: auto; padding: 5px 0; }
.nav-list { display: flex; gap: 35px; align-items: center; margin: 0 20px 0 0; }
.nav-top a { background: #29a9b8; border: 1px solid #29a9b8; color: white !important; padding: 6px 18px; border-radius: 20px; font-weight: 700; font-size: 14px; letter-spacing: 0.08em; transition: all 0.3s; }
.nav-top a:hover { background: white !important; color: #29a9b8 !important; opacity: 1; }
.nav-top a::after { display: none !important; }
.nav-list li a { color: #333; font-weight: 500; font-size: 15px; transition: opacity 0.3s; position: relative; }
.nav-list li a:hover { opacity: 0.8; }
.nav-list li a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: #333; transition: width 0.3s; }
.nav-list li a:hover::after { width: 100%; }
.btn-contact { background: #29a9b8; border: 1px solid #29a9b8; color: white; padding: 12px 28px; border-radius: 30px; font-weight: 500; font-size: 15px; display: flex; align-items: center; gap: 8px; transition: all 0.3s; }
.btn-contact:hover { background: #fff; color: #29a9b8; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.hamburger { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: 10px; }
.hamburger span { display: block; width: 30px; height: 3px; background: #333; transition: all 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(8px, -8px); }
.mobile-menu { position: fixed; top: 80px; left: 0; width: 100%; height: calc(100vh - 80px); background: rgba(90,155,213,0.98); backdrop-filter: blur(10px); transform: translateX(-100%); transition: transform 0.3s; overflow-y: auto; padding: 30px; z-index: 999; }
.mobile-menu.active { transform: translateX(0); }
.mobile-nav-list li { border-bottom: 1px solid rgba(255,255,255,0.2); }
.mobile-nav-list li a { display: block; padding: 20px 10px; color: white; font-size: 18px; font-weight: 500; }
.btn-contact-mobile { display: block; background: #29a9b8; color: white; padding: 16px; border: 1px solid #29a9b8; border-radius: 30px; font-weight: 500; font-size: 16px; text-align: center; margin-top: 20px; }
body.menu-open { overflow: hidden; }

/* ページヒーロー共通 */
.page-hero { padding-top: 80px; }
.page-hero-container { display: flex; align-items: stretch; min-height: 280px; }
.page-hero-content { flex: 1; background: #f8f9fa; display: flex; flex-direction: column; justify-content: center; padding: 60px 60px; }
.page-hero-title { font-size: 64px; font-weight: 800; color: #333; line-height: 1; margin-bottom: 12px; }
.page-hero-subtitle { font-size: 20px; font-weight: 500; color: #666; }
.page-hero-image { flex: 1; overflow: hidden; }
.page-hero-image img { width: 100%; height: 100%; object-fit: cover; }

/* お問い合わせセクション */
.contact-section { position: relative; padding: 100px 0; background-image: url(https://hakkenkan-f.co.jp/wp-content/themes/lightning-child/images/common/common-contact.jpg); background-size: cover; background-position: center; }
.contact-container { max-width: 1200px; margin: 0 auto; padding: 0 30px; }
.contact-cards { display: grid; grid-template-columns: repeat(2,1fr); gap: 40px; }
.contact-card { background: rgba(255,255,255,0.7); backdrop-filter: blur(5px); padding: 40px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s; text-decoration: none; }
.contact-card:hover { background: rgba(255,255,255,0.9); }
.contact-main-content { display: flex; flex-direction: column; gap: 10px; }
.contact-header-row { display: flex; align-items: center; gap: 15px; }
.contact-icon img { width: 52px; height: 52px; object-fit: contain; }
.contact-title { font-size: 60px; font-weight: 700; color: #333; line-height: 1; }
.contact-text { font-size: 20px; color: #333; font-weight: 700; }
.contact-arrow { font-size: 24px; color: #333; }

/* フッター */
.custom-footer { background: #2C2C2C; color: white; padding: 60px 0 0; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 30px; display: flex; gap: 80px; margin-bottom: 60px; position: relative; }
.footer-container::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: 1px; background: #fff; }
.footer-left { flex: 1; }
.footer-logo { margin-bottom: 24px; max-width: 238px; }
.footer-logo img { width: 100%; }
.footer-company p { font-size: 14px; line-height: 2; color: #ccc; }
.footer-company a { color: #ccc; }
.footer-company a:hover { color: #29a9b8; }
.footer-map { border-radius: 8px; overflow: hidden; margin-top: 20px; }
.footer-right { flex: 1; }
.footer-menu { display: flex; gap: 60px; margin-bottom: 30px; }
.footer-menu-column h4 { font-size: 16px; font-weight: 700; margin-bottom: 16px; border-bottom: 1px solid #fff; padding-bottom: 8px; }
.footer-menu-column h4 a { color: white; }
.footer-menu-column h4 a:hover { color: #29a9b8; }
.footer-img img { width: 100%; border-radius: 8px; }
.footer-bottom { border-top: 1px solid #444; padding: 30px max(30px, calc((100% - 1200px) / 2 + 30px)); display: flex; justify-content: space-between; align-items: center; }
.footer-privacy a { color: #ccc; font-size: 13px; }
.footer-privacy a:hover { color: #29a9b8; }
.footer-copyright { font-size: 13px; color: #999; }

/* レスポンシブ */
@media (max-width: 768px) {
    .header-container { padding: 0 20px; }
    .nav { display: none; }
    .logo img { width: 130px; height: auto; padding: 0; }
    .hamburger { display: flex; padding: 10px 0 10px 10px; }
    .btn-contact { padding: 10px 20px; font-size: 16px; border-radius: 50px; white-space: nowrap; }
    .page-hero-container { flex-direction: column; }
    .page-hero-content { padding: 40px 20px; }
    .page-hero-image { display: none; }
    .page-hero-title { font-size: 40px; }
    .contact-section { padding: 60px 0; }
    .contact-cards { grid-template-columns: 1fr; gap: 20px; }
    .contact-card { padding: 30px 20px; }
    .contact-title { font-size: 40px; }
    .footer-container { flex-direction: column; gap: 40px; padding: 0 20px; }
    .footer-container::after { display: none; }
    .footer-menu { flex-direction: column; gap: 20px; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; padding: 20px; }

    /* ===== 全ページ共通モバイル修正 ===== */

    /* 画像の固定高さ解除（inline style上書き） */
    img { height: auto !important; max-width: 100% !important; }

    /* 大見出しフォントサイズ縮小 */
    [style*="font-size:48px"] { font-size: 26px !important; }
    [style*="font-size:64px"] { font-size: 32px !important; }
    [style*="font-size:40px"] { font-size: 24px !important; }

    /* セクション余白縮小 */
    [style*="padding:80px 0"] { padding: 40px 0 !important; }
    [style*="padding:100px 0"] { padding: 50px 0 !important; }
    [style*="padding:60px 0"] { padding: 30px 0 !important; }

    /* コンテナ横パディング縮小 */
    [style*="padding:0 30px"] { padding-left: 16px !important; padding-right: 16px !important; }

    /* flex-wrap:nowrap を強制的にwrapへ */
    [style*="flex-wrap:nowrap"] { flex-wrap: wrap !important; }

    /* gap縮小 */
    [style*="gap:60px"] { gap: 20px !important; }
    [style*="gap:80px"] { gap: 24px !important; }

    /* テーブルスクロール */
    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* スクリーン全体の横溢れ防止 */
    section, .doc-wrapper, .doc { overflow-x: hidden; }
}
