/* ==========================================================================
   幸友建設株式会社 - Responsive Design System
   Optimized for Mobile (Min-Width 375px) & High-End UX
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

/* --- Root Design Tokens --- */
:root {
  /* Color Palette - Construction & Modern Trust */
  --primary-navy: #0b132b;
  --primary-blue: #1c2541;
  --accent-gold: #c5a059;
  --accent-gold-hover: #b38e46;
  --accent-cyan: #3a86ff;
  
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-glass: rgba(255, 255, 255, 0.92);
  --bg-card: rgba(255, 255, 255, 0.98);
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-white: #ffffff;
  
  --border-light: rgba(226, 232, 240, 0.85);
  --border-gold: rgba(197, 160, 89, 0.4);

  --gradient-brand: linear-gradient(135deg, #1c2541 0%, #0b132b 100%);
  --gradient-gold: linear-gradient(135deg, #d4af37 0%, #c5a059 100%);
  --gradient-hero: linear-gradient(135deg, #0b132b 0%, #1c2541 100%);
  
  /* Fonts */
  --font-family: 'Plus Jakarta Sans', 'Noto Sans JP', -apple-system, sans-serif;
  
  /* Spacing & Layout */
  --container-max-width: 1200px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(11, 19, 43, 0.05);
  --shadow-md: 0 10px 24px -4px rgba(11, 19, 43, 0.1);
  --shadow-lg: 0 20px 40px -10px rgba(11, 19, 43, 0.16);
  --shadow-gold: 0 4px 18px rgba(197, 160, 89, 0.3);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-family);
  font-size: 16px;
  scroll-behavior: smooth;
  color: var(--text-primary);
  background-color: var(--bg-main);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px; /* 超小型スマホ画面でも横スクロールを防止 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  word-break: auto-phrase;
  overflow-wrap: break-word;
}

.inline-block {
  display: inline-block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
}

ul {
  list-style: none;
}

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

/* --- Layout Container --- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.15rem; /* 375pxスマホで圧迫感のない余白 */
  }
}

.section-padding {
  padding: 5.5rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 3.5rem 0;
  }
}

/* --- Headers & Typography --- */
.text-center { text-align: center; }

.section-tag {
  display: inline-block;
  font-size: 0.825rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.85rem;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.85rem;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.55rem; /* 375pxで読みやすい見出しサイズ */
  }
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 3rem auto;
}

@media (max-width: 480px) {
  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }
}

/* --- Glass Cards --- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

@media (max-width: 480px) {
  .glass-card {
    padding: 1.35rem; /* スマホカードのパディング最適化 */
  }
}



/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .btn {
    width: 100%; /* スマホ画面で押しやすい全幅ボタン */
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    white-space: normal;
  }
}

.btn-primary {
  background: var(--gradient-gold);
  color: #0b132b;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.45);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

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

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
}

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

.brand-logo-img {
  height: 26px; /* ロゴサイズを小ぶりに見やすく固定 */
  width: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 480px) {
  .brand-logo-img {
    height: 22px;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-secondary);
  position: relative;
  padding: 0.4rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent-gold);
  transition: width var(--transition-fast);
  border-radius: var(--radius-full);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-gold);
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

/* Mobile Navigation */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text-primary);
  font-size: 1.4rem;
}

@media (max-width: 900px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-surface);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }

  .nav-menu.is-active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu .btn {
    width: 100%;
    text-align: center;
  }
}

/* --- Hero Carousel & Header Section --- */
.hero-carousel-section {
  position: relative;
  min-height: 480px;
  background-color: #0b132b;
  color: var(--text-white);
  display: flex;
  align-items: center;
  overflow: hidden;
}

@media (max-width: 480px) {
  .hero-carousel-section {
    min-height: 420px;
  }
}

.carousel-bg-wrapper {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.carousel-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.18);
  transition: opacity 2.2s cubic-bezier(0.4, 0, 0.2, 1), transform 8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.carousel-bg-slide.active {
  opacity: 0.55;
  transform: scale(1);
}

/* --- Hero Section & Typography --- */
.hero-overlay-content {
  position: relative;
  z-index: 2;
  padding: 6rem 0 6.5rem 0;
  text-align: left; /* PC表示では標準の左寄せスタイル */
}

.hero-badge-tag {
  display: inline-block;
  padding: 0.4rem 1.25rem;
  background: rgba(197, 160, 89, 0.25);
  border: 1px solid var(--accent-gold);
  color: #f1c40f;
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.hero-main-heading {
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
  width: 100%;
}

.page-banner-title {
  font-size: clamp(1.75rem, 5.5vw, 2.6rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.heading-line-1 {
  display: block;
  font-size: 3.1rem; /* PC表示での重厚で美しい大見出しサイズ */
  letter-spacing: -0.01em;
}

.heading-line-2 {
  display: block;
  font-size: 3.5rem;
  margin-top: 0.25rem;
}

.hero-sub-text {
  font-size: 1.2rem;
  color: #cbd5e1;
  max-width: 650px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ヒーローボタン領域 (PC表示) */
.hero-cta-wrapper {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: flex-start; /* PCでは左寄せ配置 */
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

/* ==========================================================================
   スマホ・タブレット表示制御 (画面幅 768px 以下で切り替え)
   ========================================================================== */
@media (max-width: 768px) {
  .hero-overlay-content {
    padding: 3.5rem 1.25rem 4rem 1.25rem;
    text-align: center; /* スマホ表示のみ中央寄せ */
  }

  .hero-badge-tag {
    font-size: 0.78rem;
    margin-bottom: 1.25rem;
  }

  .hero-main-heading {
    margin: 0 auto 2rem auto; /* 下の説明文との間をゆったりと拡張 */
    line-height: 1.25;
  }

  /* 1行目と2行目の文字サイズを大きく統一＆行間を縮小 */
  .heading-line-1,
  .heading-line-2 {
    display: block;
    font-size: clamp(1.25rem, 5.5vw, 2.05rem); /* サイズを大きめに最適化 */
    text-align: center;
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
  }

  .heading-line-2 {
    margin-top: 0.15rem; /* 行間をキュッと狭く調整 */
  }

  .hero-sub-text {
    font-size: 0.95rem;
    max-width: 100%;
    margin: 0 auto 2rem auto;
    text-align: center;
    line-height: 1.75;
  }

  /* スマホでのボタンサイズをコンパクトに調整 */
  .hero-cta-wrapper {
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 260px; /* ボタン領域を小ぶりに絞る */
    margin: 1.25rem auto 0 auto;
  }

  .hero-cta-wrapper .btn {
    width: 100%;
    padding: 0.65rem 1.25rem; /* 小ぶりでスッキリしたパディング */
    font-size: 0.875rem; /* 小ぶりなフォントサイズ */
    text-align: center;
  }
}

/* 改行ヘルパークラス */
.pc-only { display: inline; }
.sp-only { display: none; }

@media (max-width: 768px) {
  .pc-only { display: none; }
  .sp-only { display: inline; }
}

/* --- Strengths List --- */
.strengths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .strengths-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.strength-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}



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

@media (max-width: 480px) {
  .strength-img {
    height: 175px;
  }
}

.strength-body {
  padding: 1.65rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  .strength-body {
    padding: 1.25rem;
  }
}

.strength-number {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
}

.strength-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0.3rem 0 0.75rem 0;
  color: var(--text-primary);
}

.strength-desc {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.65;
}

/* --- Projects Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

@media (max-width: 992px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.project-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}



.project-img-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

@media (max-width: 480px) {
  .project-img-wrapper {
    height: 180px;
  }
}

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

.project-info {
  padding: 1.25rem;
}

.project-name {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.project-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* --- Profile Table --- */
.table-wrapper {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.profile-table th,
.profile-table td {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  word-break: break-word;
}

.profile-table tr:last-child th,
.profile-table tr:last-child td {
  border-bottom: none;
}

.profile-table th {
  width: 28%;
  background: rgba(11, 19, 43, 0.04);
  color: var(--text-primary);
  font-weight: 800;
  font-size: 0.925rem;
  white-space: nowrap;
}

.profile-table td {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 375px〜640px スマホ用テーブル最適化 */
@media (max-width: 640px) {
  .profile-table th,
  .profile-table td {
    display: block;
    width: 100%;
    padding: 0.75rem 1.15rem;
    white-space: normal;
  }
  .profile-table th {
    background: rgba(197, 160, 89, 0.08);
    padding-top: 1.1rem;
    color: var(--accent-gold-hover);
    font-size: 0.875rem;
  }
  .profile-table td {
    padding-bottom: 1.1rem;
    font-size: 0.925rem;
  }
}

/* --- Contact CTA Banner --- */
.contact-cta-card {
  background: var(--gradient-hero);
  color: var(--text-white);
  border-radius: var(--radius-lg);
  padding: 3.5rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) {
  .contact-cta-card {
    padding: 2.5rem 1.15rem;
  }
}

.phone-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--accent-gold);
  margin: 1.25rem 0;
  transition: transform var(--transition-fast);
  word-break: break-all;
}

@media (max-width: 480px) {
  .phone-link-btn {
    font-size: 1.6rem; /* 375pxスマホではみ出さないサイズ */
  }
}

.phone-link-btn:hover {
  transform: scale(1.04);
}

/* --- Contact Grid (Form Page) --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2.5rem;
}

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.contact-info-card {
  background: var(--gradient-hero);
  color: var(--text-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) {
  .contact-info-card {
    padding: 1.5rem 1.15rem;
  }
}

.info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-icon {
  font-size: 1.35rem;
}

.info-title {
  font-size: 0.825rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.info-detail {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.2rem;
  word-break: break-word;
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}

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

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Footer --- */
.site-footer {
  margin-top: auto;
  background-color: #070c1b;
  color: var(--text-white);
  padding: 4rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.footer-brand-title span {
  color: var(--accent-gold);
}

.footer-brand-sub {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-top: 0.35rem;
  text-transform: uppercase;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-white);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a, .footer-links span {
  color: var(--text-muted);
  font-size: 0.875rem;
  word-break: break-word;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* --- News Page Styles --- */
.news-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.news-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 480px) {
  .news-card {
    padding: 1.25rem 1.15rem;
  }
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.news-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.news-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: var(--radius-full);
}

.badge-primary {
  background: rgba(11, 19, 43, 0.08);
  color: var(--primary-navy);
}

.badge-gold {
  background: rgba(197, 160, 89, 0.15);
  color: var(--accent-gold-hover);
}

.badge-cyan {
  background: rgba(58, 134, 255, 0.12);
  color: var(--accent-cyan);
}

.badge-secondary {
  background: #e2e8f0;
  color: var(--text-secondary);
}

.news-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 0.6rem;
}

@media (max-width: 480px) {
  .news-title {
    font-size: 1.05rem;
  }
}

.news-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
