/* ========================================
   S.P. FUME CO. Inc. — Main Stylesheet
   ======================================== */

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

:root {
  --color-primary: #1a3a5c;
  --color-primary-light: #2a5a8a;
  --color-accent: #e8a824;
  --color-accent-hover: #d49620;
  --color-dark: #111827;
  --color-text: #374151;
  --color-text-light: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f3f4f6;
  --color-bg-dark: #1f2937;
  --color-border: #e5e7eb;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --container-max: 1200px;
  --header-height: 80px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

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

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

a:hover,
a:focus-visible {
  color: var(--color-accent);
}

ul {
  list-style: none;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-align: center;
}

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

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

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-accent-hover);
  color: #fff;
}

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

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--color-primary-light);
  color: #fff;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-primary);
  height: var(--header-height);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  flex-direction: column;
  color: #fff;
  flex-shrink: 0;
}

.logo:hover,
.logo:focus-visible {
  color: #fff;
  opacity: 0.9;
}

.logo-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.logo-tagline {
  font-size: 11px;
  opacity: 0.85;
  line-height: 1.3;
}

.logo-location {
  font-size: 10px;
  opacity: 0.65;
  line-height: 1.3;
}

/* Header phone */
.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-phone:hover,
.header-phone:focus-visible {
  color: #fff;
}

.icon-phone {
  flex-shrink: 0;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Hamburger button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-shrink: 0;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: background var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform var(--transition);
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Hamburger open state */
.menu-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--header-height);
  overflow: hidden;
  background: var(--color-primary);
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

.hero-slide-bg {
  width: 100%;
  height: 100%;
}

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

.hero-subtitle {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0.8;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-description {
  font-size: 18px;
  line-height: 1.7;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* Slider dots */
.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  padding: 0;
}

.dot.active,
.dot:hover {
  background: #fff;
  border-color: #fff;
}

/* ========================================
   SECTIONS (shared)
   ======================================== */
.section {
  padding: 80px 0;
}

.section:nth-child(even) {
  background: var(--color-bg-alt);
}

.section h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 24px;
}

.section-cta {
  text-align: center;
  margin-top: 40px;
}

/* ========================================
   SERVICES
   ======================================== */
.services {
  background: var(--color-bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: #fff;
  padding: 40px 24px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.service-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--color-accent);
}

.service-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.4;
}

/* ========================================
   FACILITY
   ======================================== */
.facility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.facility-images {
  border-radius: 8px;
  overflow: hidden;
}

.image-placeholder {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  font-size: 18px;
  border-radius: 8px;
}

.facility-content p {
  margin-bottom: 24px;
  line-height: 1.8;
}

/* ========================================
   TECHNICAL
   ======================================== */
.technical {
  background: var(--color-bg-alt);
}

.technical p {
  max-width: 800px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.technical p a {
  color: var(--color-accent);
  font-weight: 600;
}

/* ========================================
   FAQ
   ======================================== */
.faq-list {
  max-width: 800px;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 24px 0;
}

.faq-item:first-child {
  padding-top: 0;
}

.faq-item dt {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.faq-item dd {
  line-height: 1.7;
}

.faq-item dd a {
  color: var(--color-accent);
  font-weight: 500;
}

/* ========================================
   BMSB
   ======================================== */
.bmsb {
  background: var(--color-bg-alt);
}

.bmsb p {
  max-width: 700px;
  margin-bottom: 24px;
  line-height: 1.7;
}

/* ========================================
   BLOG
   ======================================== */
.blog p {
  max-width: 700px;
  line-height: 1.7;
}

/* ========================================
   CONTACT
   ======================================== */
.contact {
  background: var(--color-bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info address {
  font-style: normal;
  line-height: 1.8;
}

.contact-info address p {
  margin-bottom: 4px;
}

.contact-info a {
  color: var(--color-accent);
  font-weight: 600;
}

.contact-form {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

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

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--color-dark);
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(42, 90, 138, 0.1);
}

.form-group textarea {
  resize: vertical;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer-brand strong {
  color: #fff;
  font-size: 16px;
  display: block;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.5;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

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

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.footer-contact a {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 14px;
}

.footer-copy {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   RESPONSIVE — Tablet (<=1024px)
   ======================================== */
@media (max-width: 1024px) {
  :root {
    --header-height: 70px;
  }

  .nav-link {
    padding: 8px 8px;
    font-size: 13px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-contact {
    text-align: left;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }
}

/* ========================================
   RESPONSIVE — Mobile (<=768px)
   ======================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .section {
    padding: 56px 0;
  }

  .section h2 {
    font-size: 26px;
  }

  /* Header mobile */
  .menu-toggle {
    display: block;
  }

  .header-phone {
    font-size: 14px;
  }

  .logo-tagline,
  .logo-location {
    display: none;
  }

  .logo-name {
    font-size: 16px;
  }

  /* Mobile nav overlay */
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-primary);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-link {
    font-size: 18px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Hero mobile */
  .hero {
    min-height: 420px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero-description {
    font-size: 15px;
  }

  .hero-subtitle {
    font-size: 13px;
    letter-spacing: 2px;
  }

  /* Grids mobile */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .facility-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Footer mobile */
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-nav ul {
    justify-content: center;
  }

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

  /* FAQ mobile */
  .faq-item dt {
    font-size: 16px;
  }
}

/* ========================================
   RESPONSIVE — Small Mobile (<=480px)
   ======================================== */
@media (max-width: 480px) {
  .hero {
    min-height: 360px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero-content {
    padding: 40px 16px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
  }

  .contact-form {
    padding: 24px 20px;
  }

  .service-card {
    padding: 28px 20px;
  }
}

/* ========================================
   Overlay for mobile nav (body scroll lock)
   ======================================== */
body.nav-open {
  overflow: hidden;
}

/* ========================================
   HERO SLIDE IMAGES
   ======================================== */
.hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   SUBPAGE STYLES
   ======================================== */

/* Page hero banner */
.page-hero {
  background: var(--color-primary);
  color: #fff;
  padding: 48px 0 40px;
  margin-top: var(--header-height);
}

.page-hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a:hover {
  color: #fff;
}

/* Content page layout */
.content-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.content-page--narrow {
  display: block;
  max-width: 800px;
}

.content-text p {
  margin-bottom: 20px;
  line-height: 1.8;
}

.content-text p:last-child {
  margin-bottom: 0;
}

.content-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-sidebar img {
  border-radius: 8px;
  width: 100%;
  height: auto;
}

/* Lead paragraph */
.lead {
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-text);
}

/* Tag list (services items) */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

.tag-list li {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-primary);
}

.tag-list--wide {
  flex: 1;
}

/* Services content grid */
.services-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 20px;
}

.services-image img {
  border-radius: 8px;
  width: 100%;
  height: auto;
}

/* Highlight note */
.highlight-note {
  margin-top: 32px;
  padding: 16px 24px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
}

/* Feature list (facility) */
.feature-list {
  list-style: none;
  max-width: 600px;
}

.feature-list li {
  padding: 12px 0 12px 32px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  line-height: 1.6;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-text-light);
  background: #fff;
}

/* BMSB goods list */
.bmsb-goods-list {
  list-style: none;
  columns: 2;
  column-gap: 40px;
}

.bmsb-goods-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  line-height: 1.5;
  break-inside: avoid;
}

.bmsb-goods-list li strong {
  color: var(--color-primary);
  font-weight: 700;
}

/* BMSB rules list */
.bmsb-rules-list {
  list-style: none;
  margin: 20px 0;
}

.bmsb-rules-list li {
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  line-height: 1.7;
}

.bmsb-rules-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20px;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* BMSB doc list */
.bmsb-doc-list {
  list-style: none;
  margin: 16px 0;
}

.bmsb-doc-list li {
  padding: 6px 0 6px 24px;
  position: relative;
  font-weight: 500;
}

.bmsb-doc-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* Legal section */
.legal-section {
  background: var(--color-bg-alt);
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.legal-card {
  background: #fff;
  padding: 28px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.legal-card h3 {
  font-size: 18px;
  color: var(--color-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-accent);
}

.legal-list {
  font-size: 14px;
}

.legal-list dt {
  font-weight: 600;
  color: var(--color-text-light);
  margin-top: 10px;
}

.legal-list dd {
  color: var(--color-dark);
  line-height: 1.5;
}

.legal-list a {
  color: var(--color-accent);
  font-weight: 600;
}

/* Facility images on index */
.facility-images img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.facility-images img + img {
  margin-top: 16px;
}

/* ========================================
   SUBPAGE RESPONSIVE — Tablet
   ======================================== */
@media (max-width: 1024px) {
  .legal-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bmsb-goods-list {
    columns: 1;
  }
}

/* ========================================
   SUBPAGE RESPONSIVE — Mobile
   ======================================== */
@media (max-width: 768px) {
  .page-hero {
    padding: 32px 0 28px;
  }

  .page-hero h1 {
    font-size: 28px;
  }

  .content-page {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .services-content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .legal-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 200px;
  }
}
