/* base.css */

/* CSS Reset & Variables */
:root {
  --primary-color: #3498db; /* 爽やかで落ち着いた青 */
  --secondary-color: #2c3e50; /* ダークネイビー */
  --accent-color: #2ecc71; /* アクセントグリーン */
  --text-color-dark: #333;
  --text-color-light: #f4f4f4;
  --bg-light: #fdfdfd;
  --bg-dark: #222;
  --border-color: #ddd;
  --font-main: "Poppins", "Noto Sans JP", sans-serif;
  --font-heading: "Poppins", "Noto Sans JP", sans-serif;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--bg-light);
  overflow-x: hidden; /* Prevent horizontal scroll due to animations */
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

ul {
  list-style: none;
}

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

/* Utility Classes */
.container {
  max-width: 1080px; /* コンテンツ領域を少し狭め、左右に余裕を持たせる */
  margin: 0 auto;
  padding: 0 20px; /* スマートフォンでの両端の余白は維持 */
}

.section-padding {
  padding: 80px 0;
}

.text-center {
  text-align: center;
}

.mt-5 {
  /* Utility for margin-top */
  margin-top: 50px;
}

/* Buttons (Common to all pages) */
.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-color-light);
  padding: 15px 30px;
  border-radius: 5px;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  text-align: center;
}

.btn:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

.btn.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--text-color-light);
  box-shadow: none;
}

.btn.btn-secondary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Section Titles (Common to Main & Sub Pages) */
.section-title,
.section-subtitle {
  font-family: var(--font-heading);
  font-size: 42px; /* section-title のデフォルト */
  font-weight: 700;
  /* text-align: center; は display: block; と margin: auto で置き換え */
  margin-bottom: 60px; /* section-title のデフォルト */
  color: var(--secondary-color);
  position: relative;
  /* display: inline-block; を block に変更し、margin: auto で中央寄せ */
  display: block;
  margin-left: auto; /* ここを追加 */
  margin-right: auto; /* ここを追加 */
  width: fit-content; /* コンテンツの幅に合わせるために追加 */
}
.section-title::after,
.section-subtitle::after {
  content: "";
  display: block;
  width: 60px; /* section-title のデフォルト */
  height: 4px; /* section-title のデフォルト */
  background-color: var(--primary-color);
  margin: 15px auto 0; /* 下線も中央に寄せる */
  border-radius: 2px;
}

/* Specific adjustments for section-subtitle (less prominent) */
.section-subtitle {
  font-size: 36px;
  margin-bottom: 40px;
}
.section-subtitle::after {
  width: 50px;
  height: 3px;
}

/* Image & Text Section Base (used in Mission, Company, Service Intro, Wholesale, EC Business) */
.image-text-section {
  display: flex;
  align-items: center;
  gap: 60px;
  flex-direction: row;
}

.image-text-section.reverse-layout .text-content {
  order: 2;
}

.image-text-section.reverse-layout .image-wrapper {
  order: 1;
}

.image-wrapper {
  flex: 1;
  min-width: 350px;
  text-align: center;
}

.image-wrapper img {
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.text-content {
  flex: 1.5;
  min-width: 350px;
}

.text-content p {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #555;
  text-align: left; /* コンテンツ内のテキストは左寄せを維持 */
}

/* Button size common to text-content areas (e.g., service pages, company page) */
.text-content .btn {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 14px;
  width: auto; /* Desktop default */
}

/* Page Hero Section (for all sub-pages) */
.page-hero {
  background-color: var(--secondary-color);
  color: var(--text-color-light);
  padding: 120px 0 80px;
  text-align: center;
  margin-top: var(--header-height);
}

.page-title {
  font-family: var(--font-heading);
  font-size: 58px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  display: inline-block;
}

.page-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 6px;
  background-color: var(--primary-color);
  margin: 15px auto 0;
  border-radius: 3px;
}

/* Contact Form Wrapper (Common to Main Page & Contact CTA) */
.contact-form-wrapper {
  background-color: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-color-dark);
}

.contact-form-wrapper label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper select,
.contact-form-wrapper textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: var(--font-main);
  font-size: 16px;
}

.contact-form-wrapper select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2C197.3L159.2%2C69.5c-3.1-3.1-8.2-3.1-11.3%2C0L5.4%2C197.3c-3.1%2C3.1-3.1%2C8.2%2C0%2C11.3s8.2%2C3.1%2C11.3%2C0l137.6-137.6c3.1-3.1%2C8.2-3.1%2C11.3%2C0l137.6%2C137.6c3.1%2C3.1%2C8.2%2C3.1%2C11.3%2C0S290.1%2C200.4%2C287%2C197.3z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 30px;
}

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

.contact-form-wrapper input[type="submit"] {
  background-color: var(--primary-color);
  color: var(--text-color-light);
  border: none;
  padding: 15px 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
  width: auto;
}

.contact-form-wrapper input[type="submit"]:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

.privacy-link {
  /* Used in Contact Section (index.html) */
  display: block;
  margin-top: 30px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.privacy-link:hover {
  color: var(--primary-color);
}

/* Contact CTA Section (for sub-pages) */
.contact-cta {
  background-color: var(--primary-color);
  color: var(--text-color-light);
  padding: 80px 0;
  text-align: center;
}
.contact-cta .section-subtitle {
  color: var(--text-color-light);
}
.contact-cta .section-subtitle::after {
  background-color: var(--accent-color);
}
.contact-cta p {
  max-width: 700px;
  margin: 0 auto 40px;
  font-size: 18px;
  line-height: 1.7;
}
.contact-cta .btn {
  background-color: var(--accent-color);
  border: none;
}
.contact-cta .btn:hover {
  background-color: var(--secondary-color);
}

/* Responsive Adjustments (General, applies to all pages unless overridden) */
@media (max-width: 992px) {
  .header .container {
    justify-content: center; /* ロゴを中央に */
  }
  .header .logo-img {
    margin-right: 0; /* ロゴの右マージンを解除 */
  }

  .hero h1 {
    font-size: 48px;
  }
  .hero p {
    font-size: 18px;
  }

  .section-title,
  .section-subtitle {
    font-size: 36px;
    margin-bottom: 40px;
    /* text-align: center; は .section-title, .section-subtitle の基本定義で常に適用される */
  }
  .section-title::after,
  .section-subtitle::after {
    width: 60px;
    height: 4px;
    /* margin: 15px auto 0; は基本定義で常に適用される */
  }

  .image-text-section {
    flex-direction: column; /* Stack vertically on smaller screens */
    gap: 30px;
  }
  .image-text-section .image-wrapper,
  .image-text-section .text-content {
    width: 100%;
    min-width: unset;
  }
  .text-content p {
    text-align: center;
  }
  .text-content .btn {
    width: 100%;
  }

  .page-hero {
    padding: 100px 0 60px;
  }
  .page-title {
    font-size: 48px;
  }
  .page-title::after {
    width: 60px;
    height: 4px;
  }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .sites-grid {
    grid-template-columns: 1fr; /* スマホでは1列に */
  }
  .site-item {
    min-height: unset; /* 高さの制約を解除 */
  }
  .related-links {
    flex-direction: column;
    gap: 15px;
  }
  .related-links .btn {
    width: 80%;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 40px;
  }
  .hero p {
    font-size: 16px;
  }
  .section-padding {
    padding: 60px 0;
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .btn {
    width: 80%;
    margin: 0 auto;
  }

  .image-wrapper img {
    max-width: 80%;
    margin: 0 auto;
  }

  .contact-cta p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .header {
    height: 70px;
  }
  .logo-img {
    height: 30px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero p {
    font-size: 14px;
  }
  .btn {
    padding: 12px 25px;
    font-size: 14px;
  }
  .section-title,
  .section-subtitle {
    /* サイズ調整のみ */
    font-size: 28px;
  }

  .image-text-section {
    padding: 40px 0;
  }
  .feature-item {
    padding: 20px;
  }
  .feature-item h3 {
    font-size: 20px;
  }
  .related-links .btn {
    width: 100%;
  }
  .contact-cta p {
    font-size: 15px;
  }
}
