/* ===========================
   MELPOT Corporate Site
   Pure HTML/CSS/JS - GitHub Pages
   =========================== */

/* --- Brand Gradient --- */
:root {
  --gradient: linear-gradient(90deg, rgb(231, 59, 56) 0%, rgb(226, 187, 114) 100%);
  --accent: #d34a45;
  --shadow-sm: 0 2px 12px rgba(231, 59, 56, 0.12);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-heavy: 0 5px 15px rgba(0, 0, 0, 0.35);
  --blur: blur(8px);
  --radius-card: 16px;
  --bg: #ffffff;
  --bg-alt: #faf9f9;
  --text: #37352F;
  --text-sub: #666;
  --text-muted: #999;
  --font-sm: 0.85rem;
  --font-md: 1rem;
  --font-btn: 1.25rem;
  --font-lg: 1.75rem;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Inter", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

/* --- Focus Visible (keyboard navigation) --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Buttons/cards already have hover styles, so use subtle ring */
.btn:focus-visible,
.link-item:focus-visible,
.product-card:focus-visible,
.product-filter-btn:focus-visible {
  outline-offset: 3px;
}

/* --- Type Scale ---
   Display:  3rem (hero)
   H1:       2.25rem (page titles)
   H2:       1.5rem (section headings)
   H3:       1rem (card headings)
   Body:     0.9rem (paragraphs, lists)
   Small:    0.75rem (dates, labels, meta)
   --- */

/* --- Utility --- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-more {
  text-align: center;
  margin-top: 40px;
}

.section-note {
  text-align: center;
  margin-top: 32px;
  margin-bottom: 32px;
  font-size: var(--font-sm);
  color: var(--text-muted);
}

.text-link {
  color: inherit;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 48px;
  text-align: center;
}

.product-card:hover,
.philosophy-card:hover,
.career-feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.gradient-text,
.text-accent,
.product-card-category,
.contact-notices h3,
.career-detail-type,
.nav-link:hover,
.nav-link.active,
.product-filter-btn:hover,
.product-filter-btn.active,
.pagination-num:hover,
.pagination-num.active,
.article-body a:hover,
.works-detail-body a:hover,
.works-detail-info a:hover,
.contact-notices-small a:hover,
.article-link:hover,
.text-link:hover,
.link-item:hover .link-arrow,
.link-item:hover .link-title,
.link-item:hover .link-type,
.back-link:hover {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, rgb(231, 59, 56) 0%, rgb(226, 187, 114) 100%);
  margin: 0 auto 24px;
}

.btn {
  display: inline-block;
  position: relative;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: var(--font-btn);
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  padding: 2px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover {
  border-color: transparent;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  box-shadow: var(--shadow-sm);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
}

.btn-primary:hover {
  background: var(--gradient);
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #fff;
  background-clip: unset;
  opacity: 0.85;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover::before {
  opacity: 0;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid #E9E9E7;
}

.btn-outline:hover {
  border-color: transparent;
}

/* --- External Link Icon (whitelist) --- */
.article-body a[target="_blank"]::after,
.works-detail-info a[target="_blank"]::after,
.works-detail-body a[target="_blank"]::after,
.contact-notices-small a[target="_blank"]::after,
.policies-list a[target="_blank"]::after,
.link-item[target="_blank"] .link-title::after,
.news-item[target="_blank"] .news-title::after,
.footer-policies a[target="_blank"]::after,
.iote-card a[target="_blank"]:not(.news-item)::after,
.iote-footer-links a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 4px;
  vertical-align: -0.15em;
  -webkit-mask-image: url("../images/icon-external.svg");
  mask-image: url("../images/icon-external.svg");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background-color: #999;
  transition: none;
}

.policies-list a[target="_blank"]:hover::after,
.news-item[target="_blank"]:hover .news-title::after {
  background-color: var(--text-sub);
}

.article-body a[target="_blank"]:hover::after,
.works-detail-info a[target="_blank"]:hover::after,
.works-detail-body a[target="_blank"]:hover::after,
.contact-notices-small a[target="_blank"]:hover::after,
.link-item[target="_blank"]:hover .link-title::after {
  background: var(--gradient);
}

.footer-policies a[target="_blank"]::after {
  background-color: #555;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid #E9E9E7;
  z-index: 1000;
  display: flex;
  align-items: center;
}

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

.header-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.header-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

/* Underline hover component (shared) */
.nav-link,
.product-filter-btn,
.pagination-num,
.iote-lang a,
.iote-lang span {
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after,
.product-filter-btn::after,
.pagination-num::after,
.iote-lang a::after,
.iote-lang span::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after,
.product-filter-btn:hover::after,
.product-filter-btn.active::after,
.pagination-num:hover::after,
.pagination-num.active::after,
.iote-lang a:hover::after,
.iote-lang a.active::after,
.iote-lang span.active::after {
  width: 100%;
  left: 0;
}



.header-nav .btn-primary {
  padding: 8px 20px;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.lang-icon {
  width: 1.1em;
  height: 1.1em;
  fill: #666;
}

.header-nav .lang-switcher a {
  font-size: var(--font-sm);
  font-weight: 700;
  padding: 2px 6px;
  color: var(--text-sub);
  -webkit-text-fill-color: var(--text-sub);
  text-decoration: none;
  border-radius: 3px;
}

.header-nav .lang-switcher a:hover {
  background: #f0f0f0;
}

.header-nav .lang-switcher a.active {
  background: var(--gradient);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.mobile-nav-main {
  display: contents;
}

.mobile-nav-footer,
.mobile-nav-social-label {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #37352F;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero Slider --- */
.hero {
  margin-top: 64px;
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #111;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img,
.hero-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 80px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
  pointer-events: none;
  opacity: 0;
}

.hero:hover .hero-arrow {
  pointer-events: auto;
  opacity: 1;
  color: rgba(255, 255, 255, 0.7);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.15);
  color: rgba(255, 255, 255, 1);
}

.hero-arrow svg {
  display: block;
  width: 48px;
  height: 48px;
}

.hero-arrow-prev {
  left: 0;
}

.hero-arrow-next {
  right: 0;
}

.hero-pager {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.hero-dot {
  width: 40px;
  height: 3px;
  border-radius: 2px;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s;
}

.hero-dot.active {
  background: #fff;
}

/* --- Business Section --- */
.business-sections {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.business-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.business-section p {
  font-size: var(--font-md);
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 24px;
  text-align: center;
}

.business-section .grid-3col {
  grid-template-columns: repeat(3, 1fr);
}

/* --- Shared 3-Column Grid --- */
.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Products Section --- */

.product-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #E9E9E7;
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: var(--font-sm);
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-body {
  padding: 16px;
}

.product-card-category {
  font-size: var(--font-sm);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.product-card-title {
  font-size: var(--font-md);
  font-weight: 600;
  line-height: 1.5;
}

.product-card-year {
  font-size: var(--font-sm);
  color: var(--text-sub);
  margin-top: 4px;
}

/* --- Product List Filter --- */
.product-filter {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.product-filter-btn {
  padding: 8px 20px;
  border-radius: 0;
  font-size: var(--font-md);
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text);
  transition: all 0.2s;
}


/* --- News Section --- */
.news-list {
  max-width: 1080px;
  margin: 0 auto;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 16px;
  border-bottom: 1px solid #E9E9E7;
  transition: background 0.2s;
}

.news-item:hover {
  background: var(--bg-alt);
}

.news-item .news-arrow {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
  transition: transform 0.2s, color 0.2s;
}

.news-item:hover .news-arrow {
  color: var(--text-muted);
  transform: translateX(4px);
}

.news-date {
  font-size: var(--font-sm);
  color: var(--text-sub);
  white-space: nowrap;
  min-width: 100px;
  padding-top: 2px;
}

.news-category {
  font-size: var(--font-sm);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 3px;
  white-space: nowrap;
}

.news-category.press-release {
  background: rgba(180, 52, 48, 0.1);
  color: #b43430;
}

.news-category.information {
  background: rgba(37, 99, 186, 0.1);
  color: #2563ba;
}

.news-category.media {
  background: rgba(5, 122, 85, 0.1);
  color: #057a55;
}

.news-title {
  font-size: var(--font-md);
  font-weight: 500;
  flex: 1;
  line-height: 1.8;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
  padding: 20px 0;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  font-size: var(--font-sm);
  color: var(--text-muted);
}

.pagination-num {
  display: inline-block;
  min-width: 24px;
  font-size: var(--font-md);
  font-weight: 700;
  font-family: inherit;
  line-height: inherit;
  color: var(--text-sub);
  padding: 2px 6px;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.2s;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}


/* --- CTA Banner --- */
.cta-banner {
  background: var(--gradient);
  padding: 60px 24px;
  text-align: center;
  color: #fff;
}

.cta-banner h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.cta-banner .btn {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  font-weight: 700;
}

.cta-banner .btn:hover {
  background: #fff;
  border-color: #fff;
  color: var(--accent);
  -webkit-text-fill-color: unset;
}

/* --- Footer --- */
.footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 60px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 16px;
}

.footer-social-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-social a:hover {
  opacity: 1;
}

.footer-social a img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  filter: brightness(0) invert(0.5);
  transition: filter 0.2s;
}

.footer-social a:hover img {
  filter: brightness(0) invert(1);
}

.footer-policies {
  display: flex;
  gap: 24px;
  transform: translateY(2px);
}

.footer-bottom-row {
  border-top: 1px solid #333;
  padding: 16px 0;
  text-align: center;
}

.footer-bottom-row .footer-copyright {
  font-size: var(--font-sm);
  color: #bbb;
}

.footer-policies a {
  font-size: var(--font-sm);
  color: #bbb;
  line-height: 1;
  transition: color 0.2s;
}

.footer-policies a:hover {
  color: #ccc;
}

.footer-policies a[target="_blank"]:hover::after {
  background-color: #ccc;
}

/* --- Error Page --- */
.error-content {
  text-align: center;
}

.error-image {
  display: block;
  width: 280px;
  max-width: 100%;
  margin: 0 auto 40px;
}

/* --- Page Header (sub pages) --- */
.page-header {
  margin-top: 64px;
  padding: 60px 24px;
  background: var(--bg-alt);
  border-bottom: 1px solid #E9E9E7;
  text-align: center;
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
}


/* --- Company Page --- */
.company-section {
  padding: 60px 0;
  border-bottom: 1px solid #f0f0f0;
}

.company-section:last-child {
  border-bottom: none;
}

.company-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.company-text {
  font-size: var(--font-md);
  color: var(--text-sub);
  line-height: 1.8;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.company-text + .company-text {
  margin-top: 12px;
}

.company-catchphrase {
  font-size: var(--font-lg);
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text);
}


.philosophy-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
}

/* Info card component (shared: philosophy-card, career-feature) */
.philosophy-card,
.career-feature {
  padding: 24px;
  border: 1px solid #E9E9E7;
  border-radius: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.philosophy-card h3,
.career-feature h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.philosophy-card p,
.career-feature p {
  font-size: var(--font-md);
  color: var(--text-sub);
  line-height: 1.8;
}

/* --- History --- */
.history-list {
  position: relative;
  padding-left: 24px;
}

.history-list::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #E9E9E7;
}

.history-item {
  position: relative;
  padding: 12px 0 12px 24px;
}

.history-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 20px;
  width: 10px;
  height: 10px;
  background: var(--gradient);
  border-radius: 50%;
}

.history-date {
  font-size: var(--font-sm);
  color: var(--text-sub);
  font-weight: 600;
}

.history-text {
  font-size: var(--font-md);
  margin-top: 4px;
}

/* --- Career Page --- */
.career-intro {
  text-align: center;
  max-width: 1080px;
  margin: 0 auto 48px;
}

.career-intro p {
  font-size: var(--font-md);
  color: var(--text-sub);
  line-height: 1.8;
}

.career-features {
  margin-bottom: 60px;
}


.link-list {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border: 1px solid #E9E9E7;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.link-item:hover {
  border-color: transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--gradient) border-box;
  box-shadow: var(--shadow-sm);
}

.link-arrow {
  font-size: 1.5rem;
  color: var(--text-sub);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.link-item:hover .link-arrow {
  transform: translateX(4px);
  color: var(--accent);
}


.link-title {
  font-size: 1rem;
  font-weight: 600;
}

.link-type {
  font-size: var(--font-sm);
  color: var(--text-sub);
  margin-top: 2px;
}

/* --- Contact Page --- */
.contact-notices {
  max-width: 1080px;
  margin: 0 auto 48px;
  padding: 24px;
  background: #fff8f8;
  border: 1px solid #fde2e2;
  border-radius: 8px;
}

.contact-notices h3 {
  font-size: var(--font-md);
  font-weight: 600;
  margin-bottom: 12px;
}

.contact-notices ul {
  list-style: disc;
  padding-left: 20px;
}

.contact-notices li {
  font-size: var(--font-md);
  color: var(--text-sub);
  margin-bottom: 6px;
  line-height: 1.8;
}

.contact-notices-small {
  max-width: 1080px;
  margin: 32px auto 0;
}

.contact-notices-small p {
  font-size: var(--font-sm);
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 4px;
}

/* --- Policies Page --- */
.policies-section {
  margin-bottom: 40px;
}

.policies-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #E9E9E7;
}

.policies-list a {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: var(--font-md);
  transition: background 0.2s;
}

.policies-list a:hover {
  background: var(--bg-alt);
}


/* --- News Article --- */
.article-header {
  margin-bottom: 32px;
}

.article-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.article-body {
  font-size: var(--font-md);
  line-height: 2;
  max-width: 720px;
  margin: 0 auto;
}

.article-body p {
  margin-bottom: 1.5em;
}

.article-body ol {
  list-style: decimal;
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.article-body ol ol {
  list-style: decimal;
  margin-bottom: 0;
}

.article-body ul {
  list-style: disc;
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.article-body li {
  margin-bottom: 0.5em;
}

.article-body .article-gallery {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.article-body .article-gallery img {
  width: calc(50% - 0.5rem);
  border-radius: 8px;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 1em;
  padding-left: 12px;
  border-left: 3px solid;
  border-image: var(--gradient) 1;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em 0;
}

.article-body .article-thumbnail {
  margin: 0 0 2em;
  border-radius: 8px;
  overflow: hidden;
}

.article-body .article-thumbnail img {
  margin: 0;
  border-radius: 0;
  width: 100%;
}

.article-body .article-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1.5em 0;
  border-radius: 8px;
  overflow: hidden;
}

.article-body .article-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.article-link {
  color: inherit;
}


.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #E9E9E7;
}

.article-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid #E9E9E7;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.article-nav a:hover {
  border-color: transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--gradient) border-box;
  box-shadow: var(--shadow-sm);
}

.article-nav-prev {
  text-align: right;
}

.article-nav-label {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.article-nav-prev .article-nav-label {
  justify-content: flex-end;
}

.article-nav-label .icon {
  vertical-align: -0.15em;
}

.article-nav-title {
  font-size: var(--font-sm);
  font-weight: 500;
  line-height: 1.5;
}

.article-back {
  margin-top: 48px;
  text-align: center;
}

/* --- Career Detail Page --- */
.career-detail-header {
  margin-bottom: 8px;
}

.career-detail-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.career-detail-type {
  font-size: var(--font-sm);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.career-detail-block {
  margin-bottom: 48px;
}

.career-detail-section {
  margin-bottom: 32px;
}

.career-detail-section h3 {
  font-size: var(--font-md);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.career-detail-section p,
.career-detail-section ul {
  font-size: var(--font-md);
  line-height: 1.8;
  color: var(--text-sub);
}

.career-detail-section ul,
.career-detail-section ol {
  padding-left: 20px;
}

.career-detail-section ul {
  list-style: disc;
}

.career-detail-section ol {
  list-style: decimal;
}

.career-detail-section li {
  margin-bottom: 4px;
}

.career-detail-note {
  font-size: var(--font-sm);
  color: var(--text-muted);
  display: inline-block;
  margin-top: 4px;
}

.career-candidate ul {
  list-style: none;
  padding: 0;
  text-align: center;
}

.career-candidate li {
  margin-bottom: 0.5em;
}

.career-detail-apply {
  margin-top: 48px;
  text-align: center;
}

.back-link {
  color: var(--text-sub);
  transition: color 0.2s;
}


.back-icon .icon {
  vertical-align: -0.15em;
}

.career-detail-back {
  text-align: center;
  margin-top: 24px;
  font-size: var(--font-sm);
}

/* --- Works Detail Page --- */
.works-detail-hero {
  margin-bottom: 8px;
  border-radius: 12px;
  overflow: hidden;
}

.works-detail-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.works-detail-hero .article-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.works-detail-hero .article-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.works-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.works-detail-meta .product-card-category {
  font-size: var(--font-sm);
}

.works-detail-meta .works-detail-year {
  font-size: var(--font-sm);
  color: var(--text-sub);
}

.works-detail-body {
  font-size: var(--font-md);
  line-height: 2;
  margin-bottom: 48px;
}

.works-detail-body p {
  margin-bottom: 1.5em;
}

.works-detail-body .copyright {
  font-size: var(--font-sm);
  color: #bbb;
  margin-top: 0;
  margin-bottom: 2em;
}

.works-detail-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 1em;
  padding-left: 12px;
  border-left: 3px solid;
  border-image: var(--gradient) 1;
}

.works-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em 0;
}

.works-detail-body .article-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1.5em 0;
  border-radius: 8px;
  overflow: hidden;
}

.works-detail-body .article-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Info table component (shared: works-detail-info, company-table) */
.works-detail-info {
  margin-bottom: 48px;
}

.works-detail-info table,
.company-table {
  width: 100%;
  border-collapse: collapse;
}

.works-detail-info th,
.works-detail-info td,
.company-table th,
.company-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #E9E9E7;
  font-size: var(--font-md);
  text-align: left;
  vertical-align: top;
}

.works-detail-info td ul,
.works-detail-info td ol {
  margin: 0;
  padding-left: 20px;
}

.works-detail-info td ul {
  list-style: disc;
}

.works-detail-info td ol {
  list-style: decimal;
}

.works-detail-info td li {
  margin-bottom: 2px;
}

.works-detail-info th,
.company-table th {
  width: 160px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

.article-body a,
.works-detail-info a,
.works-detail-body a,
.contact-notices-small a {
  color: inherit;
}


.works-detail-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: calc(100vh - 64px);
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    padding: 24px;
    z-index: 999;
    overflow-y: auto;
  }

  .header-nav.open {
    display: flex;
  }

  /* Main nav links */
  .mobile-nav-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    position: absolute;
    top: 48px;
    left: 24px;
  }

  .header-nav .nav-link {
    font-size: 2.25rem;
    font-weight: 700;
    padding-bottom: 0;
  }

  .header-nav .nav-link::after {
    display: none;
  }

  .header-nav .btn-primary {
    border: none;
    background: none;
    color: var(--text);
    padding: 0;
    font-size: var(--font-lg);
    font-weight: 700;
  }

  /* Footer section */
  .mobile-nav-footer {
    display: block;
    position: absolute;
    bottom: 15%;
  }

  .mobile-nav-social-label {
    display: block;
  }


  .mobile-nav-social {
    display: flex;
    gap: 24px;
    align-items: center;
  }

  .mobile-nav-social img {
    width: 40px;
    height: 40px;
    filter: brightness(0);
  }

  .mobile-nav-social-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 10px;
  }


  .mobile-nav-policies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .mobile-nav-policies a {
    font-size: var(--font-sm);
    color: var(--text-sub);
    -webkit-text-fill-color: var(--text-sub);
  }

  /* Lang switcher */
  .header-nav .lang-switcher {
    position: absolute;
    top: 64px;
    right: 24px;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .header-nav .lang-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .header-nav .lang-switcher a {
    font-size: 1.25rem;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
    background: none;
  }

  .header-nav .lang-switcher a:hover,
  .header-nav .lang-switcher a.active {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }


  .hamburger {
    display: flex;
  }

  .business-sections {
    gap: 40px;
  }

  .grid-3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .news-item a {
    flex-direction: column;
    gap: 8px;
  }

  .news-date {
    min-width: auto;
  }


  .philosophy-cards {
    grid-template-columns: 1fr;
  }


  .page-header {
    padding: 40px 24px;
  }

  .page-header h1 {
    font-size: var(--font-lg);
  }

  .hero {
    aspect-ratio: 16 / 9;
  }


  .article-nav {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .article-nav-prev {
    text-align: left;
  }

  .link-item {
    padding: 16px;
  }

  .section {
    padding: 48px 0;
  }
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .footer-policies {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .grid-3col,
  .business-section .grid-3col {
    grid-template-columns: 1fr;
  }

  .business-sections {
    gap: 32px;
  }

  .news-item {
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .news-item .news-title {
    flex-basis: 100%;
    order: 2;
  }

  .news-item .news-arrow {
    display: none;
  }

  .works-detail-info th,
  .works-detail-info td,
  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
  }

  .works-detail-info th,
  .company-table th {
    border-bottom: none;
    padding-bottom: 4px;
  }

  .works-detail-info td,
  .company-table td {
    padding-top: 0;
  }

  .article-body .article-gallery {
    flex-direction: column;
  }

  .article-body .article-gallery img {
    width: 100%;
  }

  .hero {
    aspect-ratio: 4 / 3;
  }

  .container {
    padding: 0 16px;
  }
}


/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
