/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #333;
  line-height: 1.7;
  background: #f7f9f6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; }

a { color: #1a6b3c; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.site-header {
  background: #fff;
  border-bottom: 3px solid #2d8a4e;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.site-logo a {
  color: #1a5c32;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.site-logo .tagline {
  display: block;
  font-size: .75rem;
  font-weight: 400;
  color: #666;
  margin-top: .15rem;
}

.header-utils {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  font-size: .85rem;
}

.header-utils a {
  color: #444;
  padding: .25rem 0;
}

.header-utils a:hover { color: #2d8a4e; }

/* ===== Navigation ===== */
.site-nav {
  background: #2d8a4e;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  padding: .75rem 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.nav-list li a {
  display: block;
  color: #fff;
  padding: .85rem 1.1rem;
  font-size: .9rem;
  text-decoration: none;
  transition: background .2s;
}

.nav-list > .nav-item > a:hover,
.nav-list > .nav-item.is-active > a {
  background: rgba(0,0,0,.15);
  text-decoration: none;
}

.nav-item {
  position: relative;
}

.nav-sub {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #1a6b3c;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  z-index: 100;
  max-height: 70vh;
  overflow-y: auto;
}

.nav-item:hover .nav-sub,
.nav-item.sub-open .nav-sub {
  display: block;
}

.nav-sub a {
  display: block;
  color: #fff;
  padding: .6rem 1rem;
  font-size: .85rem;
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,.1);
}

.nav-sub a:hover,
.nav-sub a.is-active {
  background: rgba(0,0,0,.2);
  text-decoration: none;
}

/* ===== Main ===== */
.site-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
}

.page-banner {
  background: linear-gradient(135deg, #2d8a4e 0%, #1a6b3c 100%);
  color: #fff;
  margin: 0 -1.25rem 1.5rem;
  padding: 2rem 1.25rem;
}

.page-banner h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.breadcrumb {
  font-size: .8rem;
  color: rgba(255,255,255,.85);
  margin-bottom: .5rem;
}

.breadcrumb a { color: #fff; }

.romlicontainer {
  background: #fff;
  padding: 1.75rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* ===== Home ===== */
.home-hero {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  margin: 0 -1.25rem 1.5rem;
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.home-hero h1 {
  margin: 0 0 .75rem;
  font-size: 1.5rem;
  color: #1a5c32;
}

.home-hero p {
  margin: 0;
  color: #444;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.home-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.home-card {
  flex: 1 1 280px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}

.home-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  text-decoration: none;
}

.home-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.home-card-body {
  padding: 1rem 1.25rem;
  flex: 1;
}

.home-card-body h2 {
  margin: 0 0 .5rem;
  font-size: 1rem;
  color: #1a5c32;
}

.home-card-body p {
  margin: 0;
  font-size: .875rem;
  color: #555;
}

.home-news {
  background: #fff;
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.home-news h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: #1a5c32;
  border-bottom: 2px solid #2d8a4e;
  padding-bottom: .5rem;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list li {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid #eee;
}

.news-list li:last-child { border-bottom: none; }

.news-list .date {
  color: #888;
  font-size: .85rem;
  min-width: 6.5rem;
}

.article-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.article-card {
  flex: 1 1 260px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s;
}

.article-card:hover {
  border-color: #2d8a4e;
  text-decoration: none;
}

.article-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.article-card h3 {
  margin: 0;
  padding: .85rem 1rem .25rem;
  font-size: .95rem;
  color: #1a5c32;
}

.article-card p {
  margin: 0;
  padding: 0 1rem 1rem;
  font-size: .8rem;
  color: #666;
}

/* ===== Blog (r-template_blog) ===== */
.blog-container { margin-top: 1rem; }

.blog-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.blog-card {
  flex: 1 1 280px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1.25rem;
}

.blog-title {
  margin: 0 0 .5rem;
  font-size: 1rem;
}

.blog-title a { color: #1a5c32; }

.blog-preview p {
  margin: 0;
  font-size: .875rem;
  color: #555;
}

/* ===== Contact form ===== */
.inquiry-form dl {
  margin: 0;
}

.inquiry-form dt {
  font-weight: 600;
  margin-top: 1rem;
}

.inquiry-form dt:first-child { margin-top: 0; }

.inquiry-form dd {
  margin: .35rem 0 0;
}

.inquiry-form input[type="text"],
.inquiry-form input[type="email"],
.inquiry-form textarea {
  width: 100%;
  max-width: 480px;
  padding: .5rem .75rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-family: inherit;
  font-size: .95rem;
}

.inquiry-form textarea { min-height: 120px; resize: vertical; }

.inquiry-form .required { color: #c00; }

.inquiry-form .btn-row {
  margin-top: 1.25rem;
  display: flex;
  gap: .75rem;
}

.inquiry-form button,
.inquiry-form input[type="submit"],
.inquiry-form input[type="reset"] {
  padding: .55rem 1.5rem;
  border: none;
  border-radius: 3px;
  font-size: .9rem;
  cursor: pointer;
}

.inquiry-form input[type="submit"] {
  background: #2d8a4e;
  color: #fff;
}

.inquiry-form input[type="reset"] {
  background: #eee;
  color: #333;
}

/* ===== Sidebar banners ===== */
.side-banners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.side-banners a {
  display: block;
  flex: 0 0 auto;
}

.side-banners img {
  max-width: 160px;
  border-radius: 3px;
}

/* ===== Footer ===== */
.site-footer {
  background: #2a2a2a;
  color: #ccc;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
}

.footer-nav a {
  color: #ddd;
  font-size: .85rem;
}

.footer-nav a:hover { color: #fff; }

.footer-address {
  font-style: normal;
  font-size: .85rem;
  line-height: 1.8;
}

.footer-copy {
  text-align: center;
  font-size: .75rem;
  color: #888;
  padding: .75rem 1.25rem;
  border-top: 1px solid #444;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-list {
    display: none;
    flex-direction: column;
  }

  .nav-list.is-open { display: flex; }

  .nav-list > .nav-item > a { padding: .7rem 0; }

  .nav-sub {
    position: static;
    box-shadow: none;
    background: rgba(0,0,0,.12);
    max-height: none;
  }

  .nav-item.sub-open .nav-sub { display: block; }
  .nav-item:hover .nav-sub { display: none; }
  .nav-item.sub-open:hover .nav-sub { display: block; }

  .page-banner h1 { font-size: 1.3rem; }

  .romlicontainer { padding: 1.25rem; }

  .footer-inner { flex-direction: column; }
}
