/* ============================================
   くさのエンジニアリング - スタイルシート
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #0068B7;
  --color-primary-dark: #004C8C;
  --color-accent: #0091DA;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-bg: #FFFFFF;
  --color-bg-light: #F5F7FA;
  --color-bg-dark: #1A2A3A;
  --color-border: #E0E0E0;
  --color-danger: #D32F2F;
  --font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --max-width: 1100px;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--color-primary-dark);
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* --- Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

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

.section-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--color-text);
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  margin: 16px auto 0;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 48px;
  font-size: 15px;
}

.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
  border: none;
  letter-spacing: 0.5px;
}

.btn-primary:hover,
.btn-outline:hover,
.btn-white:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:hover {
  transform: translateY(-1px);
}

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

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

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

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

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

.btn-white:hover {
  background-color: #f0f0f0;
  color: var(--color-primary-dark);
}

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

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #fff;
  transition: box-shadow 0.3s;
}

.header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-top {
  background-color: var(--color-bg-dark);
  color: #fff;
  font-size: 13px;
  padding: 6px 0;
}

.header-top .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
}

.header-top a {
  color: #fff;
}

.header-top .tel {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.header-top .hours {
  font-size: 12px;
  opacity: 0.8;
}

.header-main {
  padding: 0;
  border-bottom: 1px solid var(--color-border);
}

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

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

.nav-list {
  display: flex;
  gap: 8px;
}

.nav-list a {
  display: block;
  padding: 8px 18px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
  position: relative;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--color-primary);
}

.nav-list a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: var(--color-text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

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

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* --- Hero Carousel --- */
.hero {
  position: relative;
  height: 70vh;
  min-height: 400px;
  max-height: 700px;
  overflow: hidden;
  margin-top: calc(80px + 33px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 20px;
}

.hero-slide-content h2 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 24px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-slide-content p {
  font-size: 18px;
  margin-bottom: 32px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 12px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

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

/* Hero placeholder backgrounds */
.hero-slide-bg.slide-logo {
  background-size: contain;
  background-repeat: no-repeat;
  background-color: #fff;
}

.hero-slide-bg.slide-1 {
  background: linear-gradient(135deg, #0068B7 0%, #0091DA 100%);
}

.hero-slide-bg.slide-2 {
  background: linear-gradient(135deg, #1A2A3A 0%, #2C4A6A 100%);
}

.hero-slide-bg.slide-3 {
  background: linear-gradient(135deg, #004C8C 0%, #0068B7 100%);
}

/* --- Page Banner --- */
.page-banner {
  background: linear-gradient(135deg, #0068B7 0%, #004C8C 100%);
  color: #fff;
  padding: 60px 0 50px;
  margin-top: calc(80px + 33px);
  text-align: center;
}

.page-banner h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.breadcrumb {
  font-size: 14px;
  opacity: 0.8;
}

.breadcrumb a {
  color: #fff;
  opacity: 0.8;
}

.breadcrumb a:hover {
  opacity: 1;
}

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

.news-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.news-date {
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.news-text {
  font-size: 15px;
}

/* --- Products Grid --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-image {
  aspect-ratio: 4 / 3;
  background-color: var(--color-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

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

.product-info {
  padding: 20px;
}

.product-info h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.product-info p {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* --- Company Table --- */
.company-table {
  margin: 0 auto;
  max-width: 800px;
}

.company-table tr {
  border-bottom: 1px solid var(--color-border);
}

.company-table th,
.company-table td {
  padding: 16px 20px;
  text-align: left;
  font-size: 15px;
  vertical-align: top;
}

.company-table th {
  width: 160px;
  background-color: var(--color-bg-light);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

/* --- About Overview (index) --- */
.about-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text);
}

.about-text p {
  margin-bottom: 24px;
  color: var(--color-text-light);
  line-height: 1.9;
}

.about-summary th,
.about-summary td {
  padding: 10px 16px;
  font-size: 14px;
}

.about-summary th {
  width: 100px;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, #0068B7 0%, #0091DA 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-banner .tel-number {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.cta-banner .hours {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 24px;
}

/* --- Map --- */
.map-container {
  width: 100%;
  margin-bottom: 16px;
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 8px;
}

.map-link {
  text-align: right;
  margin-bottom: 40px;
}

.access-info {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 32px;
}

.access-info-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 15px;
}

.access-info-item:last-child {
  margin-bottom: 0;
}

.access-info-label {
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  min-width: 80px;
}

/* --- Contact Form --- */
.contact-phone {
  background: var(--color-bg-light);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  margin-bottom: 48px;
}

.contact-phone h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text-light);
}

.contact-phone .tel-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 2px;
}

.contact-phone .hours {
  font-size: 14px;
  color: var(--color-text-light);
  margin-top: 4px;
}

.contact-form {
  max-width: 700px;
  margin: 0 auto;
}

.contact-form p {
  text-align: center;
  margin-bottom: 32px;
  color: var(--color-text-light);
  font-size: 15px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--color-text);
}

.form-group label .required {
  color: var(--color-danger);
  margin-left: 4px;
  font-size: 12px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 15px;
  font-family: var(--font-family);
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 104, 183, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 160px;
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--color-danger);
}

.form-error {
  color: var(--color-danger);
  font-size: 13px;
  margin-top: 4px;
  display: none;
}

.form-submit {
  text-align: center;
  margin-top: 32px;
}

.form-submit .btn {
  min-width: 200px;
  font-size: 16px;
  padding: 16px 48px;
}

/* --- Footer --- */
.footer {
  background-color: var(--color-bg-dark);
  color: #fff;
  padding: 60px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo img {
  height: 50px;
  margin-bottom: 16px;
}

.footer-company-info {
  font-size: 14px;
  line-height: 2;
  opacity: 0.8;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.footer-nav a {
  color: #fff;
  opacity: 0.8;
  font-size: 14px;
  padding: 4px 0;
  transition: opacity 0.3s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--color-primary-dark);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* --- Responsive --- */
@media (max-width: 1023px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-overview {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-slide-content h2 {
    font-size: 28px;
  }
}

@media (max-width: 767px) {
  .header-top {
    display: none;
  }

  .header-main .container {
    height: 64px;
  }

  .header-logo img {
    height: 44px;
  }

  .hero {
    margin-top: 64px;
  }

  .page-banner {
    margin-top: 64px;
    padding: 40px 0 30px;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    gap: 0;
    border-top: 1px solid var(--color-border);
  }

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

  .nav-list a {
    padding: 16px 24px;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 15px;
  }

  .nav-list a:last-child {
    border-bottom: none;
  }

  .nav-list a.active {
    border-bottom: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    background-color: var(--color-bg-light);
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 22px;
  }

  .section-subtitle {
    font-size: 14px;
    margin-bottom: 32px;
  }

  .hero-slide-content h2 {
    font-size: 20px;
    line-height: 1.6;
  }

  .hero-slide-content p {
    font-size: 14px;
  }

  .hero {
    min-height: 320px;
    height: 50vh;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-nav {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 16px;
  }

  .cta-banner {
    padding: 40px 0;
  }

  .cta-banner h2 {
    font-size: 20px;
  }

  .cta-banner .tel-number {
    font-size: 28px;
  }

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

  .company-table th {
    padding-bottom: 4px;
  }

  .company-table td {
    padding-top: 4px;
    padding-bottom: 16px;
  }

  .page-banner h1 {
    font-size: 24px;
  }

  .page-banner {
    padding: 36px 0 28px;
  }

  .contact-phone .tel-number {
    font-size: 26px;
  }

  .btn {
    padding: 12px 28px;
    font-size: 14px;
  }

  .form-submit .btn {
    width: 100%;
    padding: 16px;
  }

  .map-container iframe {
    height: 300px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}
