/* 基本設定 */
:root {
  --header-height: 76px; /* ヘッダーの高さを変数として定義 */
  scroll-padding-top: var(--header-height); /* スムーススクロール時のパディング */

  /* ブランドカラー */
  --primary-color: #AC0700;
  --text-color: #3D3D3D;
  --white-color: #FFFFFF;
  --light-bg: #f9fafb;
  --border-color: #e5e7eb;
  --hover-color: rgba(172, 7, 0, 0.1);
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-color);
  padding-top: var(--header-height); /* ヘッダーの高さ分のパディングを追加 */
  background-color: var(--white-color);
}

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

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

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

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  opacity: 0.9;
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white-color);
}

/* ヘッダー */
header {
  background-color: var(--white-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: var(--header-height); /* ヘッダーの高さを明示的に設定 */
  display: flex;
  align-items: center;
}

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

.navbar-brand {
  font-weight: 700;
}

.navbar-brand img{
  height: 60px;
}

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

.navbar-toggler {
  padding: 0.25rem 0.5rem;
  font-size: 1.25rem;
  background-color: transparent;
  z-index: 1001;
  display: inline-flex;
  margin-left: auto;
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--primary-color);
}

.nav-link.active {
  color: var(--primary-color);
}

.login-btn,
.register-btn {
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
}

.login-btn {
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.login-btn:hover {
  background-color: var(--hover-color);
}

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

.register-btn:hover {
  background-color: var(--primary-color);
  opacity: 0.9;
  color: var(--white-color);
}

/* ヒーローセクション */
.hero-section {
  background-color: var(--white-color);
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
  margin-bottom:80px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  line-height: 1.2;
}

.hero-content h1 .highlight {
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.hero-content h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: var(--hover-color);
  z-index: -1;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.search-box {
  background-color: var(--white-color);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.input-group-text {
  background-color: var(--white-color);
  border-right: none;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(172, 7, 0, 0.25);
}

.advanced-search-link a {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 500;
}

.hero-image-container {
  position: relative;
}

.hero-image {
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.search-stats {
  position: absolute;
  bottom: 30px;
  left: 20px;
  display: flex;
  gap: 15px;
}

.stat-item {
  background-color: var(--white-color);
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.plus {
  font-size: 1rem;
  margin-left: 2px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-color);
}

.hero-wave {
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: auto;
}

/* カテゴリセクション */
.category-section {
  padding: 80px 0;
  background-color: var(--light-bg);
}

.section-header {
  margin-bottom: 50px;
}

.section-subtitle {
  display: inline-block;
  background-color: var(--hover-color);
  color: var(--primary-color);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-color);
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-color);
  max-width: 700px;
  margin: 0 auto;
}

.category-card {
  display: block;
  background-color: var(--white-color);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.category-icon {
  width: 70px;
  height: 70px;
  background-color: var(--hover-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.category-icon i {
  font-size: 30px;
  color: var(--primary-color);
}

.category-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color);
}

.job-count {
  display: inline-block;
  background-color: var(--light-bg);
  color: var(--text-color);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* 地域別セクション */
.area-section {
  padding: 80px 0;
  background-color: var(--white-color);
}

.area-map-container {
  margin-top: 50px;
}

.area-map {
  background-color: var(--light-bg);
  border-radius: 10px;
  padding: 20px;
  height: 100%;
  min-height: 400px;
}

.area-list {
  height: 100%;
}

.area-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--white-color);
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
}

.area-card:hover {
  background-color: var(--hover-color);
  transform: translateX(5px);
}

.area-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-color);
}

.area-card .job-count {
  font-size: 0.8rem;
  background-color: var(--light-bg);
  padding: 2px 8px;
  border-radius: 20px;
  color: var(--text-color);
}

.area-card i {
  color: var(--primary-color);
}

/* 新着求人セクション */
.latest-jobs-section {
  padding: 80px 0;
  background-color: var(--light-bg);
}

.job-card {
  background-color: var(--white-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
}

.job-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.job-card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.company-logo {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 15px;
  border: 1px solid var(--border-color);
}

.job-card-title {
  display: inline-block;
  vertical-align: middle;
}

.job-card-title h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-color);
}

.company-name {
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 0;
}

.job-type {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.job-type.full-time {
  background-color: var(--hover-color);
  color: var(--primary-color);
}

.job-type.part-time {
  background-color: rgba(121, 154, 163, 0.1);
  color: #799aa3;
}

.job-type.seasonal {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.job-card-body {
  padding: 20px;
}

.job-info {
  margin-bottom: 15px;
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-color);
}

.info-item i {
  margin-right: 8px;
  color: var(--primary-color);
}

.job-excerpt {
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 15px;
  line-height: 1.6;
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  background-color: var(--light-bg);
  color: var(--text-color);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.job-card-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-date {
  font-size: 0.8rem;
  color: var(--text-color);
}

/* 特集企業セクション */
.featured-companies-section {
  padding: 80px 0;
  background-color: var(--white-color);
}

.company-card {
  background-color: var(--white-color);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
}

.company-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.company-logo-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  overflow: hidden;
}

.company-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color);
}

.company-industry,
.company-location,
.company-jobs {
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 8px;
}

.company-location i,
.company-jobs i {
  color: var(--primary-color);
  margin-right: 5px;
}

/* 特集記事セクション */
.featured-articles-section {
  padding: 80px 0;
  background-color: var(--light-bg);
}

.article-card {
  background-color: var(--white-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.article-image {
  position: relative;
}

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

.article-category {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.article-content {
  padding: 20px;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color);
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 15px;
  line-height: 1.6;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-color);
  margin-bottom: 15px;
}

.article-meta i {
  margin-right: 5px;
  color: var(--primary-color);
}

.read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
}

.read-more i {
  transition: all 0.3s ease;
}

.read-more:hover i {
  transform: translateX(5px);
}

/* CTA セクション */
.cta-section {
  padding: 80px 0;
  background-color: var(--white-color);
}

.cta-card {
  background-color: var(--primary-color);
  border-radius: 10px;
  padding: 40px;
  color: var(--white-color);
  box-shadow: 0 10px 30px rgba(172, 7, 0, 0.2);
}

.cta-card h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.cta-card p {
  font-size: 1.1rem;
  margin-bottom: 0;
  opacity: 0.9;
}

/* フッター */
.footer {
  background-color: var(--text-color);
  color: var(--white-color);
  padding: 80px 0 0;
}

.footer-logo {
  height: 40px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-color);
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--white-color);
}

.footer-links {
  list-style: none;
  padding-left: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--white-color);
  padding-left: 5px;
}

.contact-info {
  margin-top: 20px;
}

.contact-item {
  display: flex;
  margin-bottom: 15px;
}

.contact-item i {
  margin-right: 15px;
  margin-top: 5px;
  color: var(--primary-color);
}

.contact-item p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 20px 0;
  margin-top: 60px;
}

.copyright {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-bottom-links a:hover {
  color: var(--white-color);
}

/* トップに戻るボタン */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: none;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.back-to-top:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px);
}

/* アニメーション */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* レスポンシブ対応 */
@media (max-width: 991.98px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .cta-card {
    padding: 30px;
  }

  .footer-bottom-links {
    justify-content: center;
    margin-top: 15px;
  }

  .copyright {
    text-align: center;
  }

  /* モバイルナビゲーションの調整 */
  .navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }
  
  .navbar-brand {
    max-width: 70%;
    margin-right: 0;
  }
  
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
    background-color: transparent;
    z-index: 1001;
    display: inline-flex;
    margin-left: auto;
  }

  .navbar-toggler:focus {
    box-shadow: none;
    outline: none;
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2860, 60, 60, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }

  .navbar-collapse {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    max-width: 300px;
  }

  .navbar-nav {
    width: 100%;
  }

  .nav-item {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

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

  .nav-link {
    color: var(--text-color);
    padding: 8px 0;
    display: block;
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .search-box {
    padding: 20px;
  }

  .search-stats {
    position: static;
    margin-top: 20px;
    justify-content: center;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .category-section,
  .area-section,
  .latest-jobs-section,
  .featured-companies-section,
  .featured-articles-section,
  .cta-section {
    padding: 50px 0;
  }

  .area-map {
    margin-bottom: 30px;
  }

  .cta-card h2 {
    font-size: 1.5rem;
  }

  .cta-card p {
    font-size: 1rem;
  }
}

@media (max-width: 575.98px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 0.7rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-description {
    font-size: 0.9rem;
  }

  .job-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .company-logo {
    margin-bottom: 10px;
  }

  .job-type {
    position: static;
    display: inline-block;
    margin-top: 10px;
  }

  .cta-card {
    padding: 20px;
  }
}
