/* ========================================
   Footer Styles
   ======================================== */

.site-footer {
  position: relative;
  margin-top: 0;
  color: var(--color-gray-700);
}

.site-footer::before {
  content: '';
  position: absolute;
  bottom: 286px;
  left: 0;
  width: 100%;
  height: 800px;
  background-image: url('../images/top/top_back-resized.webp');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  display: none;
}

@media (min-width: 769px) {
  .site-footer::before {
    bottom: 400px;
  }
}

/* Footer Solving Power Challenges Section - PC版（元のスタイル） */
.footer-solving-content {
  position: relative;
  color: var(--color-white);
  text-align: center;
  padding: var(--spacing-lg) 0 var(--spacing-lg);
  z-index: 2;
  margin-top: 0;
  margin-bottom: calc(var(--spacing-2xl) * 1.35);
}

/* トップ・他ページと同じ幅になるよう .container の標準パディングを使用 */
.footer-solving-content .container {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.footer-solving-content .services-section-title {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  color: var(--color-white);
  margin: var(--spacing-lg) auto 0;
  position: relative;
  z-index: 10;
  text-align: center;
  display: block;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-radius: var(--spacing-sm);
}

.footer-solving-content .services-section-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background-image: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--spacing-sm);
  z-index: -1;
  display: block;
}

.footer-solving-content .services-section-text {
  color: #ffffff;
  margin-bottom: 0;
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  text-align: center;
}

.footer-solving-content .services-contact {
  margin-top: var(--spacing-lg);
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.footer-solving-content .btn {
  width: 50%;
  padding: calc(var(--spacing-md) * 1.2) var(--spacing-xl);
  background: linear-gradient(to bottom, #ffffff, #808080);
  color: #000;
  border: none;
  border-radius: var(--spacing-sm);
  min-width: unset;
  max-width: unset;
  box-shadow: none;
  text-shadow: none;
  position: relative;
  overflow: hidden;
  transition: color 1s ease;
}

.footer-solving-content .btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #ffffff, #c0c0c0);
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 0;
}

.footer-solving-content .btn:hover {
  color: #555;
}

.footer-solving-content .btn:hover::before {
  opacity: 0.5;
}

.footer-solving-content .btn > * {
  position: relative;
  z-index: 1;
}

/* Footer Links Section */
.footer-links-section {
  padding: var(--spacing-2xl) 0;
  margin-bottom: 0;
  position: relative;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-4xl);
}

.footer-col {
  min-width: 0;
}

.footer-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  margin-bottom: 0;
  text-align: left !important;
}

.footer-links {
  margin: 0;
  padding: 0;
  line-height: 1.3;
  font-size: var(--font-size-sm);
  text-align: left !important;
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: var(--color-gray-700);
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-base), text-shadow var(--transition-base);
  line-height: 2;
  display: inline;
  text-align: left !important;
}

.footer-links a:hover {
  color: inherit;
}

/* Footer Bottom Section */
.footer-bottom-section {
  padding-top: calc(var(--spacing-xl) + 10px);
  padding-right: 0;
  padding-bottom: calc(var(--spacing-xl) + var(--spacing-sm));
  padding-left: 0;
  margin-top: 0;
  position: relative;
}

/* PC版: footer menuとその下のコンテンツを一つのブロックにまとめる */
@media (min-width: 769px) {
  .footer-links-section {
    background-color: rgba(34, 34, 34, 0.9);
    padding-bottom: 0;
  }
  
  .footer-bottom-section {
    background-color: rgba(34, 34, 34, 0.9);
    padding-top: calc(20px + 10px);
    padding-right: 0;
    padding-bottom: calc(var(--spacing-xl) + var(--spacing-sm));
    padding-left: 0;
    /* margin-top: 20px; */
  }
}

.footer-bottom-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--spacing-xl);
  margin-bottom: 0;
}

.footer-company-block {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-xl);
  margin-right: var(--spacing-xl);
}

.footer-company-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0;
  margin-top: 0;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  margin-left: auto;
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-left: 0;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background-color: transparent;
  transition: background-color var(--transition-fast);
}

.footer-social-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.footer-social-link img {
  width: 20px;
  height: 20px;
  display: block;
}

.footer-logo img {
  height: 40px;
  width: auto;
  display: block;
  fill: #ffffff;
  color: #ffffff;
}

.footer-company-info {
  color: var(--color-white);
}

.footer-company-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  margin: 0;
  margin-bottom: 0.3em;
  line-height: 1.3;
}

.footer-company-info p {
  font-size: var(--font-size-sm);
  margin: 0;
  margin-bottom: 0.1em;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
}

/* 電話番号リンク - PC版（通常のテキストとして表示） */
@media (min-width: 769px) {
  .footer-tel-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    cursor: default;
    pointer-events: none;
  }
  
  .footer-links-section[data-lazy-block],
  .footer-links-section[data-lazy-block].lazy-loaded {
    /* top: 40px; */
  }
}

/* 電話番号リンク - スマホ版（タップで電話発信可能） */
@media (max-width: 768px) {
  .footer-tel-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
  }
  
  .footer-tel-link:active {
    color: var(--color-white);
  }
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-legal a {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-base), text-shadow var(--transition-base);
}

@media (min-width: 769px) {
  .footer-links a:hover,
  .footer-legal a:hover {
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5), 0 0 30px rgba(255, 255, 255, 0.3);
  }
}

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

.footer-copyright-wrapper {
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-copyright {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  text-align: center;
}

/* PC版: footer copyrightのmargin-bottomを調整 */
@media (min-width: 769px) {
  .footer-bottom-section .footer-copyright-wrapper .footer-copyright {
    margin-bottom: -20px;
  }
}

/* Page Top Button */
.page-top-btn {
  min-width: 140px;
  height: 48px;
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 0 var(--spacing-lg);
  transition: all var(--transition-base);
  justify-self: end;
  align-self: center;
}

.page-top-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
}

.page-top-line {
  display: none;
}

.page-top-arrow {
  display: none;
}

.page-top-text {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.05em;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.footer-solving-content {
  position: relative;
}

.footer-links-section,
.footer-bottom-section {
  position: relative;
  z-index: 1;
}

.footer-links-section {
  z-index: 2;
}

.site-footer,
.footer-bottom-section,
.footer-links-section,
.footer-solving-content {
  display: block;
}

.site-footer *,
.footer-solving-content * {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .site-footer {
    margin-top: 0;
  }
  
  .footer-solving-content {
    margin-top: 0;
    padding: 0 0 var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
  }

  .footer-solving-content .container {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    max-width: 100%;
  }

  .footer-solving-content .services-section-title {
    margin-top: 0;
    padding: var(--spacing-md) var(--spacing-xl);
  }

  .footer-solving-content .services-section-text {
    font-size: 0.875rem;
    max-width: 100%;
    line-height: var(--line-height-tight);
    margin-top: var(--spacing-sm);
  }

  .footer-solving-content .services-contact {
    margin-top: var(--spacing-lg) !important;
  }

  .footer-solving-content .btn {
    width: 80%;
    padding: var(--spacing-sm) var(--spacing-xl);
  }
  
  .site-footer .footer-links-section {
    display: none;
  }

  .footer-bottom-section {
    padding-top: calc(var(--spacing-lg) + 10px);
    padding-right: 0;
    padding-bottom: var(--spacing-md);
    padding-left: 0;
  }

  .footer-bottom-wrapper {
    flex-direction: column;
    gap: var(--spacing-lg);
  }
  
  .footer-company-block {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  
  .footer-company-info {
    gap: 0;
  }
  
  .footer-company-info p {
    margin: 0;
    margin-bottom: 0;
    line-height: 1.2;
  }
  
  .footer-company-info .footer-company-address {
    margin-top: 4px;
    margin-bottom: -8px;
  }
  
  .footer-company-info .footer-company-tel {
    margin-bottom: -8px;
  }
  
  .footer-copyright-wrapper {
    margin-top: 0;
  }
  
  .footer-actions {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    flex-wrap: nowrap;
  }
  
  .footer-social-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }
  
  .footer-social-link {
    width: 36px;
    height: 36px;
  }
  
  .footer-actions .page-top-btn {
    width: auto;
  }
  
  .page-top-btn {
    margin-top: 0;
  }
}

@media (max-width: 576px) {
  .footer-solving-content .services-section-text {
    font-size: 0.8125rem;
  }
}

@media (max-width: 576px) {
  .site-footer {
    margin-top: 0;
  }
  
  .footer-bottom-section {
    padding-top: calc(var(--spacing-lg) + 10px);
    padding-right: 0;
    padding-bottom: var(--spacing-md);
    padding-left: 0;
  }
  
  .footer-title {
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-xs);
  }
  
  .footer-links a {
    font-size: var(--font-size-xs);
  }
}
