:root {
  --primary-color: #5d5d5d; /* Elegant dark grey for text */
  --bg-color: #fcfbf9; /* Ivory very close to white */
  --white: #ffffff;
  --accent-color: #8c8378; /* Muted brown/gray accent */
  --border-color: #e5e0da;
  --font-serif: "Shippori Mincho", "Noto Serif JP", serif;
  --font-sans: "Inter", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --spacing-sm: 16px;
  --spacing-md: 32px;
  --spacing-lg: 64px;
  --spacing-xl: 120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--primary-color);
  font-family: var(--font-serif);
  font-size: 1.1rem; /* Base size increased */
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
  color: var(--accent-color);
  opacity: 0.8;
}

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

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

/* Header */
header {
  background-color: transparent;
  padding: var(--spacing-md) 0;
  position: relative;
  z-index: 10;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 600; /* slightly bolder */
  letter-spacing: 0.1em;
  margin: 0;
}

.nav-links {
  display: flex;
  gap: 44px; /* Increased gap */
  list-style: none;
  font-family: var(--font-sans);
  font-size: 1.25rem; /* ~20px */
  letter-spacing: 0.05em;
  color: var(--accent-color);
  font-weight: 700; /* Bold */
  margin: 0;
}

/* Hero Section */
.hero {
  position: relative;
  height: 75vh;
  min-height: 500px;
  background-image: url('homepagedata/homepage hirokopan assets/hiroko_cooking.JPG?v=5');
  background-size: cover;
  background-position: center 40%;
  margin-bottom: var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: 4px;
}

.hero-content h2 {
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: var(--spacing-sm);
}
.hero-content p {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 2;
}
.hero-content p + p {
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Section Common */
.section {
  padding: var(--spacing-lg) 0;
  margin-bottom: var(--spacing-md);
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: var(--spacing-lg);
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background-color: var(--accent-color);
  margin: 16px auto 0;
}

/* News Section */
.news-list {
  list-style: none;
  max-width: 800px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
}
.news-item {
  border-bottom: 1px solid var(--border-color);
}
.news-link {
  display: flex;
  padding: var(--spacing-sm) 0;
  align-items: center;
}
.news-date {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  min-width: 120px;
  color: var(--accent-color);
}
.news-title {
  font-size: 1.2rem;
}

/* Skeleton Loading for News */
.news-skeleton {
  animation: news-skeleton-pulse 1.5s ease-in-out infinite;
}
.news-skeleton-item {
  display: flex;
  padding: var(--spacing-sm) 0;
  align-items: center;
}
.news-skeleton-date {
  width: 100px;
  height: 18px;
  background-color: var(--border-color);
  border-radius: 4px;
  margin-right: 20px;
}
.news-skeleton-title {
  flex-grow: 1;
  max-width: 400px;
  height: 18px;
  background-color: var(--border-color);
  border-radius: 4px;
}
@keyframes news-skeleton-pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* News Info Messages */
.news-empty, .news-error {
  text-align: center;
  padding: var(--spacing-md) 0;
  color: var(--accent-color);
  font-family: var(--font-sans);
  font-size: 1rem;
}


/* Cards (Courses) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.card {
  background: var(--white);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.03);
}

.card-img-wrap {
  width: 100%;
  height: 220px;
  overflow: hidden;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.card-content {
  padding: var(--spacing-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.card-title {
  font-size: 1.4rem;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}
.card-desc {
  font-size: 1.1rem;
  color: var(--accent-color);
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

.voice-box {
  background: var(--bg-color);
  padding: var(--spacing-sm);
  display: flex;
  gap: var(--spacing-sm);
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
  font-size: 1.05rem;
}
.voice-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Products Grid */
.products-wrapper {
  margin-bottom: var(--spacing-xl);
}
.products-subtitle {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: var(--spacing-md);
  color: var(--accent-color);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.product-item {
  text-align: center;
}
.product-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 12px;
  transition: opacity 0.3s ease;
}
.product-item:hover img {
  opacity: 0.8;
}
.product-name {
  font-size: 1.1rem;
  font-family: var(--font-sans);
}

/* Button */
.btn-wrap {
  text-align: center;
  margin-top: auto;
}
.btn {
  display: inline-block;
  padding: 14px 36px;
  background-color: var(--primary-color);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  border: 1px solid var(--primary-color);
}
.btn:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

/* Business PR */
.business-header-text {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--spacing-md);
}

/* Amway Buttons */
.amway-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.amway-btn {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  padding: 10px 20px;
  margin-top: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--white);
  color: var(--primary-color);
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.amway-card:hover .amway-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* Footer */
footer {
  background-color: var(--bg-color);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  text-align: center;
  border-top: 1px solid var(--border-color);
}

/* Footer Links Row */
.footer-links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--spacing-lg);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}
.footer-links-row a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 4px 8px;
}
.footer-links-row a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}
.footer-divider {
  color: var(--accent-color);
  user-select: none;
}

.copyright {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--accent-color);
  letter-spacing: 0.05em;
  line-height: 1.8;
}

/* Legal Pages (Privacy / Tokushoho) */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-lg) 0 var(--spacing-xl);
}
.legal-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: var(--spacing-md);
  position: relative;
}
.legal-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background-color: var(--accent-color);
  margin: 16px auto 0;
}
.legal-intro {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  font-size: 1rem;
  line-height: 2;
  color: var(--accent-color);
}
.legal-section {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}
.legal-section:last-of-type {
  border-bottom: none;
}
.legal-section h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.legal-section p {
  font-size: 1rem;
  line-height: 2;
}
.legal-section p + p {
  margin-top: 12px;
}
.legal-list {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}
.legal-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.9;
}
.legal-list li::before {
  content: '●';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-size: 0.6rem;
  top: 0.5em;
}
.legal-footer-info {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  text-align: right;
  font-size: 0.95rem;
  color: var(--accent-color);
}
.legal-footer-info p {
  margin-bottom: 4px;
}

/* Legal Table (Tokushoho) */
.legal-table-wrap {
  margin-bottom: var(--spacing-lg);
  overflow-x: auto;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.legal-table th,
.legal-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
}
.legal-table th {
  width: 200px;
  font-weight: 500;
  background-color: rgba(140, 131, 120, 0.06);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  white-space: nowrap;
}
.legal-table td {
  font-family: var(--font-sans);
}

/* iPad / Tablet */
@media (max-width: 1024px) {
  .hero {
    height: 60vh;
    min-height: 450px;
    background-position: center 45%;
  }
}

/* Smartphone */
@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: unset;
    aspect-ratio: 4 / 3;
    background-position: center center;
  }
  .hero-content {
    padding: var(--spacing-sm) var(--spacing-sm);
  }
  .hero-content h2 {
    font-size: 1.6rem;
  }
  .hero-content p {
    font-size: 0.85rem;
  }
}

/* Small Smartphone */
@media (max-width: 480px) {
  .hero {
    aspect-ratio: 3 / 2;
    background-position: center 50%;
  }
  .hero-content h2 {
    font-size: 1.3rem;
  }
  .hero-content p {
    font-size: 0.8rem;
  }
}
