/* ==========================================================================
   Shonan Oil Service - Main Stylesheet
   Design Theme: "Trusted Dynamism" (Modern Industrial)
   ========================================================================== */

/* --- Font Definitions --- */
@font-face {
  font-family: 'LINESeedJP';
  src: url('../assets/fonts/LINESeedJP_OTF_Rg.woff2') format('woff2'),
    url('../assets/fonts/LINESeedJP_OTF_Rg.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LINESeedJP';
  src: url('../assets/fonts/LINESeedJP_OTF_Bd.woff2') format('woff2'),
    url('../assets/fonts/LINESeedJP_OTF_Bd.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- 1. Variables & Base --- */
:root {
  /* Colors */
  --color-brand: #00AEEF;
  --color-brand-dark: #008CBF;
  --color-accent: #7FB03E;

  /* New Eco Colors */
  --color-green-deep: #006837;
  --color-green-light: #009E60;

  --color-text: #333333;
  --color-text-light: #333333;
  --color-text-inverse: #ffffff;

  --color-bg-body: #ffffff;
  --color-bg-light: #f8f9fa;
  --color-bg-dark: #1a1a1a;

  /* Gradients & Shadows */
  --gradient-brand: linear-gradient(135deg, #00E0FF 0%, #0066FF 100%);
  --gradient-eco: linear-gradient(135deg, #00AEEF 0%, #009E60 100%);
  /* Blue to Green */

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 40px rgba(0, 174, 239, 0.15);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-blur: blur(12px);

  /* Typography */
  --font-main: "LINESeedJP", "Helvetica Neue", "Arial", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --font-en: "Oswald", sans-serif;

  /* Clean, condensed industrial feel */

  /* Layout */
  --max-width: 1600px;
  --header-height: 80px;
  --angle: -4deg;
  --spacing-section: 120px;

  /* Z-Index */
  --z-header: 1000;
  --z-overlay: 100;
  --z-fab: 2000;
}

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes kenBurns {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.1);
  }
}

/* --- 5. Hero Section (Redesign: Eco-Dynamic) --- */
.hero {
  height: 100vh;
  min-height: 700px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Background handled by .hero-bg */
}

/* Dynamic Background Layer */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/hero_bg.png') no-repeat center/cover;
  z-index: 0;
  animation: kenBurns 20s ease-out infinite alternate;
}

/* Gradient Overlay Layer */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.3) 0%, rgba(0, 104, 55, 0.4) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 60px;
}

/* Glass Card Container */
.hero-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 60px;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.6);
  max-width: 800px;
  /* Animation Entry */
  opacity: 0;
  animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gradient-eco);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 50px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(0, 158, 96, 0.2);
}

.hero-service-name {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-brand);
  margin-bottom: 5px;
  letter-spacing: 0.05em;
  /* Optional: add animation delay */
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.2s forwards;
}

.hero-copy {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 25px;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-top: 0px;
  /* Gradient Text for part of title? User asked for Green usage */
}

.hero-copy .highlight {
  background: var(--gradient-eco);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-sub {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: 40px;
}

/* Hero Responsive Adjustment */
@media (max-width: 1000px) {
  .hero-card {
    padding: 40px;
    margin: 0 20px;
    backdrop-filter: blur(15px);
    /* Reduce blur cost on mobile */
  }

  .hero-copy {
    font-size: 2.5rem;
  }
}

.hero-card {
  padding: 30px 20px;
  margin: 0 15px;
  text-align: left;
}

.hero-copy {
  font-size: 2rem;
}

.hero-tags {
  justify-content: flex-start;
}

/* Clean, condensed industrial feel */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  color: var(--color-text);
  line-height: 1.8;
  /* Increased for readability */
  background-color: var(--color-bg-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Crisp text */
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

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

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* --- 2. Typography & Utilities --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.05em;
  /* Professional tracking */
}

.text-brand {
  color: var(--color-brand);
}

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

.text-white {
  color: #fff;
}

/* Diagonal Bottom Edge - Mobile Only */
.diagonal-bottom {
  position: relative;
}

.diagonal-bottom::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: var(--color-bg-light);
  clip-path: polygon(0 0, 100% 80px, 100% 100%, 0 100%);
  z-index: 1;
  display: none;
}

/* Enable diagonal only on tablet and mobile */
@media (max-width: 900px) {
  .diagonal-bottom {
    padding-bottom: 80px;
    margin-bottom: 0;
  }

  .diagonal-bottom::after {
    display: block;
  }
}


.section-title {
  font-size: 2.2rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) skewX(-20deg);
  width: 60px;
  height: 4px;
  background: var(--gradient-brand);
  /* Gradient accent */
}

/* Center-aligned section titles */
.text-center .section-title,
.section-title.text-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* English Title - Base Decorative Style */
.en-title {
  font-family: 'LINESeedJP', sans-serif;
  font-size: 8rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.04);
  position: absolute;
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.05em;
  user-select: none;
  z-index: 0;
}

/* Variation 1: Behind heading (top center, subtle) */
.en-title-heading .en-title {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7rem;
  opacity: 0.3;
}

/* Variation 2: Rotated at edge (right side, 90deg) */
.en-title-rotated .en-title {
  top: 50%;
  right: -50px;
  transform: translateY(-50%) rotate(90deg);
  font-size: 6rem;
  opacity: 0.4;
  transform-origin: center;
}

/* Variation 3: Behind cards (offset, 60% visible) */
.en-title-cards .en-title {
  top: 40%;
  left: 10%;
  transform: translateY(-50%);
  font-size: 9rem;
  opacity: 0.25;
  z-index: 1;
}

/* Variation 4: Center background (default fallback) */
.en-title-center .en-title {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10rem;
  opacity: 0.2;
}

/* Dark background adjustments */
.bg-dark .en-title,
.section-cta .en-title,
#advantage .en-title {
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.1);
}

/* Ensure section has relative positioning for en-title */
.section {
  position: relative;
  overflow: hidden;
}

/* Ensure content is above en-title */
.section .container {
  position: relative;
  z-index: 2;
}


/* Texture Pattern */
/* Texture Pattern - Fixed Visibility */
.bg-pattern {
  background-image: radial-gradient(rgba(0, 0, 0, 0.08) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  /* opacity: 0.05; REMOVED to prevent fading content */
}

/* Animation Utilities */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 3. Header (Glassmorphism) --- */
.header {
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  /* Frosted glass effect */
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

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

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}

.nav-pc {
  display: flex;
  align-items: center;
  gap: 25px;
  /* Slightly tighter gap */
  white-space: nowrap;
  /* Prevent wrapping */
}

.nav-pc a:not(.btn) {
  font-weight: bold;
  font-size: 0.95rem;
  position: relative;
}

.nav-pc a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-brand);
  transition: 0.3s;
}

.nav-pc a:not(.btn):hover::after {
  width: 100%;
}

/* --- 4. Buttons (Modern Polish - UPDATED) --- */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 30px;
  background: var(--gradient-brand);
  /* Gradient */
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  /* Small rounded corners */
  transform: skewX(-10deg);
  /* Diagonal shape */
  position: relative;
  overflow: hidden;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(0, 174, 239, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
  /* Prevent wrapping */
}

/* Counter-skew for text */
.btn>span {
  transform: skewX(10deg);
  display: inline-block;
}

.btn:hover {
  transform: skewX(-10deg) translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 174, 239, 0.4);
}

.btn-lg {
  padding: 18px 60px;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .btn-lg {
    padding: 15px 30px;
    /* Smaller padding on mobile */
    font-size: 1rem;
    width: 100%;
    /* Full width on mobile for better touch targets */
  }

  .hero-cta-area .btn {
    width: 100%;
    margin-bottom: 10px;
  }

  /* Add horizontal padding to prevent cards from touching screen edges */
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .card-grid {
    padding-left: 0;
    padding-right: 0;
  }
}

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

.btn-outline:hover {
  background: var(--color-brand);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 174, 239, 0.2);
}

.btn-line {
  background: linear-gradient(135deg, #06c755 0%, #05b34c 100%);
  box-shadow: 0 4px 15px rgba(6, 199, 85, 0.3);
}

/* --- 5. Hero Section (Visual Depth) --- */
/* --- 5. Hero Section (Visual Depth) --- */
.hero {
  height: 100vh;
  min-height: 700px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Removed direct background */
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/hero_bg2.jpg') no-repeat right center/cover;
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 65%;
  /* Extended overlay */
  height: 100%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.8) 100%);
  transform: skewX(-10deg) translateX(-15%);
  z-index: 1;
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 60px;
}

.hero-copy {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 30px;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

/* Hero Responsive Adjustment */
@media (max-width: 1250px) {
  .hero::before {
    width: 75%;
    transform: skewX(-10deg) translateX(-10%);
  }

  .hero-copy {
    font-size: 3rem;
  }
}

@media (max-width: 1050px) {
  .hero::before {
    width: 90%;
    /* Almost full width to ensure text safety */
    transform: skewX(-5deg) translateX(-5%);
    /* Less skew to save space */
  }

  .hero-copy {
    font-size: 2.6rem;
    margin-bottom: 20px;
  }
}

/* Mobile Hero Restructure */
@media (max-width: 900px) {
  .hero {
    height: auto;
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding-top: var(--header-height);
    /* Ensure header doesn't cover */
  }

  .hero-bg {
    position: relative;
    height: 320px;
    /* Increase height for diagonal slant */
    width: 100%;
    background-position: center bottom;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    /* Diagonal bottom */
  }

  .hero::before {
    display: none;
    /* Hide desktop overlay */
  }

  .hero-content {
    padding-top: 0;
    margin-top: -80px;
    /* Increased Overlap */
    z-index: 10;
  }

  .hero-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    margin-top: -50px;
    margin-left: 8px;
    margin-right: 8px;
    margin-bottom: 40px;
    padding: 25px 15px;
  }

  .nav-pc {
    display: none;
  }

  /* Rest of mobile styles... */
  .sp-header-btn {
    display: inline-flex;
  }
}

/* --- 6. Cards & Layout --- */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section {
  padding: var(--spacing-section) 0;
  position: relative;
}

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

.bg-dark {
  background-color: var(--color-bg-dark);
  color: #fff;
}

.diagonal-top {
  position: relative;
  z-index: 1;
}

/* --- 7. Problems Section (Specific Card Design) --- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 15px;
  position: relative;
  z-index: 2;
  margin: 0 10px;
  /* Window Edge Spacing */
}

/* Mobile 2-column Override */
@media (max-width: 768px) {
  .problem-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  .problem-card {
    padding: 15px 10px;
  }

  .problem-card .card-icon {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    margin-bottom: 8px;
  }

  .problem-card h3 {
    font-size: 0.85rem;
  }
}

.problem-card {
  background: white;
  padding: 20px 15px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  height: 100%;
  /* Equal height */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.problem-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-brand), var(--color-accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.problem-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.problem-card:hover::before {
  opacity: 1;
}

.problem-card .card-icon {
  font-size: 1.8rem;
  /* Compact icon */
  color: var(--color-brand);
  margin-bottom: 10px;
  background: var(--bg-light);
  /* Circle BG */
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.problem-card:hover .card-icon {
  background: var(--color-brand);
  color: white;
  transform: rotateY(180deg);
}

.problem-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.6;
  color: #333;
  width: 100%;
  margin-bottom: 0;
}


.diagonal-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: inherit;
  transform-origin: top left;
  transform: skewY(var(--angle));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
  /* Shadow for depth */
  z-index: -1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.card {
  background: #fff;
  color: var(--color-text);
  padding: 50px 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  font-size: 3.5rem;
  color: var(--color-brand);
  margin-bottom: 25px;
  display: inline-block;
}

/* Flow Section - Connectors */
.flow-step {
  position: relative;
}

/* --- 7. Footer CTA --- */
.section-cta {
  background: linear-gradient(135deg, #00C0FF 0%, #0050D0 100%);

  color: #fff;
  text-align: center;
  padding-top: 80px;
  padding-bottom: 80px;
}

/* --- Mobile Components --- */
.fab-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  /* FORCE ROW */
  flex-wrap: nowrap;
  /* NO WRAP */
  z-index: var(--z-fab);
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
  padding-bottom: env(safe-area-inset-bottom);
  /* iOS Safe Area */
  background: #fff;
  /* Ensure background is solid */
}

.fab-item {
  flex: 1;
  padding: 12px 5px;
  /* More compact */
  text-align: center;
  color: #fff;
  font-weight: bold;
  font-size: 0.9rem;
  /* Smaller text */
  display: flex;
  flex-direction: row;
  /* Horizontal layout for icons+text */
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
}

.fab-item i {
  font-size: 1.2rem;
}

.fab-tel {
  background: #333;
}

.fab-line {
  background: #06c755;
}

/* Utilities */
.pc-only {
  display: block;
}

.sp-only {
  display: none;
}

.nav-pc {
  white-space: nowrap;
}

/* Header Response */
.logo {
  flex-shrink: 0;
  /* Prevent logo crushing */
  margin-right: auto;
  /* Push nav to right */
}

.logo img {
  height: auto;
  max-height: 50px;
  /* Default height */
  transition: all 0.3s ease;
}

/* SP Header Button */
.sp-header-btn {
  display: none;
  /* Default hidden */
  font-size: 0.85rem;
  padding: 8px 15px;
  height: 40px;
}

/* --- Responsive Header (Fluid Stepped Approach) --- */

/* Step 1: 1400px (Soft Squeeze) - Reduce luxurious spacing */
@media (max-width: 1440px) {
  .container {
    width: 96%;
    max-width: none;
  }

  .nav-pc {
    gap: 15px;
    /* 25px -> 15px */
  }

  .header .btn-lg {
    padding: 12px 25px;
    /* 18px -> 12px */
  }
}

/* Step 2: 1150px (Medium Squeeze) - Moderate reduction */
@media (max-width: 1150px) {
  .logo img {
    max-height: 42px;
    /* 50px -> 42px */
  }

  .nav-pc a:not(.btn) {
    font-size: 0.9rem;
    /* 0.95rem -> 0.9rem */
  }

  .header .btn {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .header .btn-lg {
    padding: 10px 20px;
    font-size: 1rem;
  }
}

/* Step 3: 1000px (Hard Squeeze) - Compact before mobile break */
@media (max-width: 1000px) {
  .header .container {
    width: 98%;
    padding-left: 5px;
    padding-right: 5px;
  }

  .logo img {
    max-height: 36px;
    /* 42px -> 36px */
  }

  .nav-pc {
    gap: 8px;
    /* 15px -> 8px */
  }

  .nav-pc a:not(.btn) {
    font-size: 0.85rem;
  }

  .header .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    height: 36px;
  }

  .header .btn span {
    font-size: 0.8rem;
  }
}

@media (max-width: 1100px) {
  /* Intermediate state: Hide text links, keep buttons? Or strict switch? */
  /* Let's keep it simple as per request: Tablet/Mobile switch */
}

@media (max-width: 900px) {
  .header {
    height: 64px;
    /* Default Mobile Height */
    transition: height 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  }

  .header.shrink {
    height: 52px;
    /* Shrink Height */
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }

  .header.shrink .logo img {
    max-height: 30px;
  }

  .nav-pc {
    display: none;
  }

  /* Show Mobile Header Button */
  .sp-header-btn {
    display: inline-flex;
  }

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

  .hero-copy {
    font-size: 2rem;
    text-align: left;
  }

  .hero-sub {
    font-size: 0.9rem;
    text-align: left;
  }

  .hero-service-name {
    text-align: left;
  }

  .hero::before {
    transform: skewX(0);
    width: 100%;
    background: var(--glass-bg);
  }

  .pc-only {
    display: none;
  }

  .sp-only {
    display: block;
  }

  .fab-wrapper.sp-only {
    display: flex;
  }

  /* Prevent horizontal overflow */
  body,
  html {
    overflow-x: hidden;
    width: 100%;
  }
}

/* --- 8. Merit Section (Compact & 4-Col) --- */
#advantage {
  background: linear-gradient(135deg, #003319 0%, #00552b 100%) !important;
  background-color: #003319 !important;
  position: relative;
}


#advantage .en-title {
  opacity: 0.1;
  color: white;
}

/* Override Section Title for Merits */
#advantage .section-title {
  color: white;
}

#advantage .section-title::after {
  background: #D4AF37 !important;
  /* Gold Accent */
  width: 60px;
}

/* Override dot pattern for Merits section */
#advantage.bg-pattern {
  background-image: radial-gradient(rgba(0, 107, 62, 0.15) 1.5px, transparent 1.5px);
}

/* Override diagonal section background for Merits */
#advantage.diagonal-top::before {
  background: linear-gradient(135deg, #003319 0%, #00552b 100%);
}

.merit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 15px;
  position: relative;
  z-index: 2;
  margin: 0 10px;
  justify-content: center;
}

@media (max-width: 900px) {
  .merit-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .merit-card {
    padding: 15px 10px !important;
  }
}

.merit-card {
  background: white;
  padding: 25px 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
  height: 100%;
  min-width: 0;
  /* Allow shrinking below content size */
}

.merit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.merit-badge {
  background: linear-gradient(135deg, #004d26 0%, #006b3e 100%);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 15px;
  font-family: var(--font-en);
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(0, 77, 38, 0.2);
}

.merit-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--color-text);
  line-height: 1.4;
}

.merit-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 0;
  text-align: left;
}

/* ===========================
   Social Contribution Section - Parallax Background
   =========================== */
#social-contribution {
  position: relative;
  background-image: url('../assets/kankyo_bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* Parallax effect */
  padding: 100px 0;
}

#social-contribution::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  /* Dark overlay for text readability */
  z-index: 1;
}

#social-contribution .container {
  position: relative;
  z-index: 2;
}

#social-contribution .section-title {
  color: white;
}

/* Mobile: disable parallax for better performance */
@media (max-width: 768px) {
  #social-contribution {
    background-attachment: scroll;
  }
}

/* ===========================
   Soap Loop Section
   =========================== */
.soap-loop {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.soap-loop-visual {
  border-radius: 8px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

/* Circular Recycling Diagram */
.recycle-circle {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0 auto;
}

.recycle-step {
  position: absolute;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.step-icon {
  font-size: 2rem;
  color: var(--color-brand);
  margin-bottom: 4px;
}

.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: -15px;
}

/* Position each step evenly around the circle (72° apart) */
/* Circle radius: 140px (280px diameter / 2) */
/* Step size: 100px, so center is at 50px from edge */
.step-1 {
  /* 0° - top center */
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.step-2 {
  /* 72° - upper right */
  top: 100px;
  right: 20px;
}

.step-3 {
  /* 144° - lower right */
  bottom: 52px;
  right: 52px;
}

.step-4 {
  /* 216° - lower left */
  bottom: 52px;
  left: 52px;
}

.step-5 {
  /* 288° - upper left */
  top: 100px;
  left: 20px;
}

/* Center recycle icon */
.recycle-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-green-deep), var(--color-green-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  animation: rotate-center 10s linear infinite;
  box-shadow: 0 4px 15px rgba(0, 104, 55, 0.3);
}

@keyframes rotate-center {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Connecting arrows using pseudo-elements */
.recycle-circle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  border: 3px dashed var(--color-brand);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
  animation: rotate-border 20s linear infinite;
}

@keyframes rotate-border {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.soap-loop-info {
  text-align: left;
}

.soap-loop-info h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--color-text);
}

.soap-loop-info p {
  line-height: 1.8;
  color: #333;
  margin-bottom: 20px;
}

/* Mobile: stack vertically */
@media (max-width: 900px) {
  .soap-loop {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .recycle-circle {
    width: 320px;
    height: 320px;
  }

  .recycle-step {
    width: 80px;
    height: 80px;
  }

  .step-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }

  .step-label {
    font-size: 0.7rem;
  }

  .recycle-center {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }

  .recycle-circle::before {
    width: 220px;
    height: 220px;
  }

  .soap-loop-info {
    text-align: center;
  }
}


/* ===========================
   Accordion / FAQ Section
   =========================== */
.accordion-item {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.accordion-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.accordion-header {
  padding: 20px 25px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--color-text);
  background: #fff;
  transition: all 0.3s ease;
  user-select: none;
}

.accordion-header:hover {
  background: #f8f8f8;
}

.accordion-header i {
  font-size: 1.2rem;
  color: var(--color-brand);
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header i {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 25px;
  background: #fafafa;
}

.accordion-item.active .accordion-content {
  max-height: 500px;
  padding: 20px 25px;
}

.accordion-content p {
  margin: 0;
  line-height: 1.8;
  color: #333;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .accordion-header {
    padding: 15px 20px;
    font-size: 0.95rem;
  }

  .accordion-content {
    padding: 0 20px;
  }

  .accordion-item.active .accordion-content {
    padding: 15px 20px;
  }
}

/* --- 10. Contact Form --- */
.privacy-notice {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px 15px;
  margin-bottom: 18px;
}

.privacy-notice p {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.privacy-notice i {
  color: var(--color-brand);
  margin-right: 4px;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  font-size: 0.95rem;
}

.required-badge {
  display: inline-block;
  background: #dc3545;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.15);
}

/* Validation States */
.form-group input.is-invalid,
.form-group textarea.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.form-group input.is-valid,
.form-group textarea.is-valid {
  border-color: #28a745;
}

.error-msg {
  display: block;
  color: #dc3545;
  font-size: 0.8rem;
  margin-top: 4px;
  min-height: 1.2em;
}

/* --- 11. Modals --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #fff;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  z-index: 2001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0;
}

.modal-window.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-content {
  padding: 30px;
}

.modal-content h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--color-text);
  text-align: center;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 15px;
}

.modal-body {
  margin-bottom: 30px;
}

.confirm-list dt {
  font-weight: bold;
  margin-top: 15px;
  color: var(--color-brand-dark);
}

.confirm-list dd {
  margin: 5px 0 0 0;
  padding-bottom: 10px;
  border-bottom: 1px dotted #ccc;
  word-break: break-all;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.modal-footer.justify-center {
  justify-content: center;
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.modal-content .text-success {
  color: #28a745;
}

.modal-content .text-error {
  color: #dc3545;
}

/* Mobile adjustments for Modal */
@media (max-width: 600px) {
  .modal-window {
    width: 95%;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
  }
}