/*
Theme Name: Hiratsuka Life
Theme URI: https://hiratsuka-portal.com/
Author: Hiratsuka Life Portal
Description: 平塚市生活情報ポータル「Hiratsuka Life」公式テーマ。8カテゴリ導線・イベント・緊急導線を備えた地域生活情報ポータル向けデザイン。
Version: 1.2.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hiratsuka-life
*/

/* ===== Reset / Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", Meiryo, system-ui, -apple-system, sans-serif;
  color: #1f2a37;
  background: #ffffff;
  line-height: 1.75;
  font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: #14508c; text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.4em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e9f0;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 9px;
  background: #1a3352; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; flex-shrink: 0;
}
.brand-name { font-size: 19px; font-weight: 700; color: #16233a; line-height: 1.2; }
.brand-sub { font-size: 11px; color: #6b7686; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.main-nav > a, .nav-more > summary {
  display: inline-block; padding: 8px 12px; border-radius: 8px;
  color: #334155; font-size: 14.5px; font-weight: 500;
  cursor: pointer; list-style: none; white-space: nowrap;
}
.main-nav > a:hover, .nav-more > summary:hover { background: #f1f4f9; text-decoration: none; }
.nav-more { position: relative; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: " ▾"; font-size: 11px; color: #8a94a6; }
.nav-more-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid #e5e9f0; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20,35,60,.12);
  min-width: 190px; padding: 8px; z-index: 200;
}
.nav-more-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: #334155; font-size: 14px; }
.nav-more-menu a:hover { background: #f1f4f9; text-decoration: none; }
.nav-search-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid #dfe5ee; border-radius: 999px;
  color: #334155; font-size: 14px;
}
.nav-search-link:hover { background: #f1f4f9; text-decoration: none; }

.menu-toggle { display: none; }
.mobile-nav { display: none; }

/* Header search panel */
.header-search-panel { display: none; border-top: 1px solid #e5e9f0; background: #f7f9fc; padding: 14px 0; }
.header-search-panel.open { display: block; }
.header-search-panel .hero-search { max-width: 640px; margin: 0 auto; }
.header-search-panel .hero-search input[type="search"] { height: 48px; border: 1px solid #dfe5ee; }
.header-search-panel .hero-search button { height: 48px; padding: 0 22px; }

/* ===== Hero ===== */
.hero {
  background-color: #1a3352;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  color: #fff;
  padding: 72px 0 76px;
  text-align: center;
}
.hero h1 { font-size: clamp(24px, 4vw, 38px); font-weight: 700; letter-spacing: .02em; }
.hero p.lede { margin-top: 14px; font-size: clamp(14px, 2vw, 17px); color: #c9d6e6; }
.hero-search { max-width: 640px; margin: 30px auto 0; display: flex; gap: 10px; }
.hero-search input[type="search"] {
  flex: 1; height: 56px; border: none; border-radius: 12px;
  padding: 0 18px 0 44px; font-size: 15px; color: #1f2a37;
  background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") 16px center no-repeat;
}
.hero-search button {
  height: 56px; padding: 0 26px; border: none; border-radius: 12px;
  background: #0f9d76; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.hero-search button:hover { background: #0c8763; }
.hero-tags { margin-top: 18px; font-size: 13px; color: #b7c5d8; }
.hero-tags a {
  display: inline-block; margin: 4px 3px; padding: 5px 13px;
  background: rgba(255,255,255,.12); color: #e8eef6;
  border-radius: 999px; font-size: 12.5px;
}
.hero-tags a:hover { background: rgba(255,255,255,.22); text-decoration: none; }

/* Emergency strip */
.emg-strip { background: #f7f9fc; border-bottom: 1px solid #e9edf3; }
.emg-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px 0; }
.emg-card {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #e5e9f0; border-radius: 12px;
  padding: 12px 16px; font-size: 14px; font-weight: 600; color: #334155;
}
.emg-card:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(20,35,60,.08); }
.emg-card .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.emg-card.emg-red { border-color: #f3c9c9; }
.emg-card.emg-red .dot { background: #dd4b4b; }
.emg-card .dot.blue { background: #3968c8; }
.emg-card .dot.gray { background: #7a8699; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section-alt { background: #f7f9fc; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(21px, 3vw, 28px); font-weight: 700; color: #16233a; }
.section-head p { margin-top: 8px; color: #6b7686; font-size: 14.5px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 10px; }
.section-head-row h2 { font-size: clamp(20px, 3vw, 26px); color: #16233a; }
.section-head-row p { color: #6b7686; font-size: 14px; }
.see-all { font-size: 14px; font-weight: 600; color: #14508c; white-space: nowrap; }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
  background: #fff; border: 1px solid #e5e9f0; border-radius: 14px;
  padding: 30px 20px; text-align: center; transition: box-shadow .15s, transform .15s;
}
.cat-card:hover { text-decoration: none; box-shadow: 0 8px 24px rgba(20,35,60,.10); transform: translateY(-2px); }
.cat-icon {
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 26px;
}
.cat-card h3 { font-size: 17px; color: #16233a; }
.cat-card .en { display: block; font-size: 11.5px; color: #8a94a6; margin: 3px 0 10px; }
.cat-card .desc { font-size: 12.5px; color: #6b7686; line-height: 1.7; }
.cat-life    { border-color: #d5ece4; } .cat-life .cat-icon    { background: #e6f5f0; }
.cat-medical { border-color: #f3d6d6; } .cat-medical .cat-icon { background: #fdecec; }
.cat-child   { border-color: #d9edd5; } .cat-child .cat-icon   { background: #ecf6e9; }
.cat-house   { border-color: #ecdfc0; } .cat-house .cat-icon   { background: #f8f1df; }
.cat-event   { border-color: #f0d3e7; } .cat-event .cat-icon   { background: #f9e9f4; }
.cat-work    { border-color: #cfdcf5; } .cat-work .cat-icon    { background: #e8effb; }
.cat-spot    { border-color: #eeD9bf; } .cat-spot .cat-icon    { background: #fbefe0; }
.cat-learn   { border-color: #ddd7f5; } .cat-learn .cat-icon   { background: #edeafb; }

/* Event cards */
.event-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.event-card {
  background: #fff; border: 1px solid #e5e9f0; border-radius: 14px;
  padding: 0; display: block; overflow: hidden; transition: box-shadow .15s;
}
.event-card .card-thumb { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; display: block; background: #eef2f7; }
.event-card .card-body { padding: 22px 24px; }
.event-card:hover { text-decoration: none; box-shadow: 0 8px 24px rgba(20,35,60,.10); }
.event-meta-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
}
.badge-cat { background: #eef2f8; color: #44536b; }
.badge-hot { background: #dd4b4b; color: #fff; }
.badge-free { background: #e6f5f0; color: #0c8763; }
.badge-paid { background: #f8f1df; color: #8a6a1f; }
.badge-new { background: #0f9d76; color: #fff; }
.event-card h3 { font-size: 17px; color: #16233a; margin-bottom: 8px; }
.event-info { font-size: 13.5px; color: #55617a; line-height: 1.9; }
.event-info .row { display: flex; gap: 8px; }
.event-info .row .ico { flex-shrink: 0; }
.event-card .more { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: #14508c; }
.notice-empty {
  background: #f7f9fc; border: 1px dashed #cfd8e5; border-radius: 12px;
  padding: 34px 20px; text-align: center; color: #6b7686; font-size: 14.5px;
}

/* News list */
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-item {
  display: flex; gap: 18px; align-items: flex-start;
  background: #fff; border: 1px solid #e5e9f0; border-radius: 14px;
  padding: 20px 24px; transition: box-shadow .15s;
}
.news-item .news-thumb {
  width: 110px; height: 78px; object-fit: cover; border-radius: 10px;
  flex-shrink: 0; background: #eef2f7;
}
.news-item .news-body { flex: 1; min-width: 0; }
.news-item:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(20,35,60,.09); }
.news-item .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.news-item h3 { font-size: 16.5px; color: #16233a; margin-bottom: 6px; }
.news-item .excerpt { font-size: 13.5px; color: #6b7686; }
.news-item .date { font-size: 12.5px; color: #8a94a6; }

/* Quick access */
.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.qa-card {
  background: #fff; border: 1px solid #e5e9f0; border-radius: 14px;
  padding: 24px; display: block; transition: box-shadow .15s;
}
.qa-card:hover { text-decoration: none; box-shadow: 0 8px 24px rgba(20,35,60,.10); }
.qa-card h3 { font-size: 16px; color: #16233a; display: flex; align-items: center; gap: 8px; }
.qa-card p { margin-top: 6px; font-size: 13px; color: #6b7686; }
.qa-card.qa-red { border-left: 4px solid #dd4b4b; }
.qa-card.qa-blue { border-left: 4px solid #3968c8; }
.qa-card.qa-gray { border-left: 4px solid #7a8699; }

/* ===== Archive / Single ===== */
.page-title-band { background: #f2f5fa; border-bottom: 1px solid #e7ecf3; padding: 34px 0; }
.page-title-band h1 { font-size: clamp(20px, 3vw, 27px); color: #16233a; }
.page-title-band p { margin-top: 6px; color: #6b7686; font-size: 14px; }
.content-area { padding: 44px 0 72px; }
.post-list { display: flex; flex-direction: column; gap: 16px; max-width: 800px; margin: 0 auto; }

/* Article card grid (category / archive / search) */
.article-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.article-card {
  background: #fff; border: 1px solid #e5e9f0; border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.article-card:hover { text-decoration: none; box-shadow: 0 8px 24px rgba(20,35,60,.10); transform: translateY(-2px); }
.article-card .card-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: linear-gradient(135deg,#eef2f7,#e2e9f2); }
.article-card .card-noimg {
  width: 100%; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#1a3352,#2c4a73); color: #b9c9dd; font-size: 30px;
}
.article-card .card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-card h3 { font-size: 16px; color: #16233a; line-height: 1.55; }
.article-card .excerpt { font-size: 13px; color: #6b7686; }
.article-card .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.article-card .date { font-size: 12px; color: #8a94a6; margin-top: auto; }

/* Featured image on single */
.entry-featured { margin-bottom: 26px; }
.entry-featured img { width: 100%; height: auto; border-radius: 14px; display: block; }
.entry-content img { border-radius: 10px; height: auto; }

.entry { max-width: 760px; margin: 0 auto; }
.entry-header { margin-bottom: 26px; }
.entry-header .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.entry-header h1 { font-size: clamp(22px, 3.4vw, 30px); line-height: 1.5; color: #16233a; }
.entry-header .dates { margin-top: 10px; font-size: 13px; color: #8a94a6; }
.entry-content { font-size: 16px; }
.entry-content h2 {
  font-size: 21px; margin: 42px 0 16px; padding: 10px 14px;
  background: #f2f5fa; border-left: 4px solid #1a3352; border-radius: 4px; color: #16233a;
}
.entry-content h3 { font-size: 18px; margin: 32px 0 12px; color: #16233a; border-bottom: 2px solid #e5e9f0; padding-bottom: 6px; }
.entry-content p { margin: 14px 0; }
.entry-content ul, .entry-content ol { margin: 14px 0; }
.entry-content table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 14.5px; }
.entry-content th, .entry-content td { border: 1px solid #dfe5ee; padding: 10px 12px; text-align: left; }
.entry-content th { background: #f2f5fa; }
.entry-content a { text-decoration: underline; }

/* Event detail */
.event-detail-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.event-detail-table th, .event-detail-table td { border: 1px solid #dfe5ee; padding: 12px 14px; text-align: left; vertical-align: top; }
.event-detail-table th { background: #f2f5fa; width: 30%; white-space: nowrap; color: #334155; }
.link-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0; }
.link-card {
  display: block; border: 1px solid #cfdcf5; background: #f6f9ff;
  border-radius: 12px; padding: 16px 18px;
}
.link-card:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(20,35,60,.09); }
.link-card .lbl { font-size: 12px; color: #6b7686; }
.link-card .ttl { font-weight: 700; color: #14508c; font-size: 15px; word-break: break-all; }
.verified-note {
  margin: 22px 0; padding: 12px 16px; background: #fffbe8;
  border: 1px solid #eadf9e; border-radius: 10px; font-size: 13.5px; color: #6b5d1f;
}

/* Pagination */
.pagination { margin: 36px 0 0; text-align: center; }
.pagination .page-numbers {
  display: inline-block; min-width: 38px; padding: 8px 12px; margin: 0 3px;
  border: 1px solid #dfe5ee; border-radius: 9px; color: #334155; font-size: 14px;
}
.pagination .page-numbers.current { background: #1a3352; color: #fff; border-color: #1a3352; }
.pagination a.page-numbers:hover { background: #f1f4f9; text-decoration: none; }

/* ===== Footer ===== */
.site-footer { background: #16233a; color: #b9c4d4; margin-top: 40px; }
.footer-inner { padding: 48px 0 34px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin-top: 12px; font-size: 13px; line-height: 1.9; }
.footer-col h4 { color: #e6ecf4; font-size: 14px; margin-bottom: 12px; }
.footer-col a { display: block; color: #b9c4d4; font-size: 13px; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-disclaimer {
  border-top: 1px solid #2b3a54; margin-top: 30px; padding-top: 22px;
  font-size: 12px; color: #8fa0b8; line-height: 1.9;
}
.footer-copy { padding: 16px 0; border-top: 1px solid #2b3a54; font-size: 12px; color: #8fa0b8; text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .qa-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .main-nav { display: none; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; width: 42px; height: 42px;
    border: 1px solid #dfe5ee; border-radius: 10px; background: #fff;
    font-size: 20px; color: #334155; cursor: pointer;
  }
  .mobile-nav { display: none; border-top: 1px solid #e5e9f0; background: #fff; }
  .mobile-nav.open { display: block; }
  .mobile-nav a { display: block; padding: 13px 22px; color: #334155; font-size: 15px; border-bottom: 1px solid #f1f4f9; }
  .hero { padding: 48px 0 52px; }
  .hero-search { flex-direction: column; }
  .hero-search button { height: 50px; }
  .emg-inner { grid-template-columns: 1fr; gap: 8px; }
  .event-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .news-item .news-thumb { width: 84px; height: 62px; }
  .cat-grid { gap: 12px; }
  .cat-card { padding: 22px 12px; }
  .section { padding: 44px 0; }
  .link-cards { grid-template-columns: 1fr; }
  .event-detail-table th { width: 34%; }
}
