/* ===================================
   AZBIL MALAYSIA - Shared Stylesheet
   =================================== */

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

:root {
  --red:        #8a212b;
  --red-light:  #a63b3b;
  --red-dark:   #6b1820;
  --text:       #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --bg:         #fbfdfa;
  --bg-gray:    #f4f4f4;
  --bg-light:   #fafafa;
  --border:     #e0e0e0;
  --white:      #ffffff;
  --max-w:      1200px;
  --header-h:   110px;
  --header-top-h: 60px;
  --header-bottom-h: 50px;
}

html { scroll-behavior: smooth; }

body {
/*  font-family: 'Noto Sans JP', 'Noto Sans', 'Sarabun', sans-serif;*/
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Typography --- */
/*h1, h2, h3, h4 { font-family: 'Noto Sans JP', 'Noto Sans', sans-serif; font-weight: 700; line-height: 1.3; }*/
h1, h2, h3, h4 { font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-weight: 700; line-height: 1.3; }
h2.section-title {
  font-size: 2rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}
h2.section-title span { color: var(--red); font-weight: 700; }
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 700px;
  margin: -1.5rem auto 3rem;
  font-size: 1rem;
}

/* --- Layout --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; }
section { padding: 80px 0; }

/* --- Breadcrumb --- */
.breadcrumb {
  background: var(--bg-gray);
  padding: 12px 0;
  font-size: 1rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { margin: 0 6px; }

/* ===========================
   HEADER / NAVIGATION
   =========================== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--white);
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.header-top {
  height: var(--header-top-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.logo { display: flex; align-items: flex-end; gap: 9px; max-width: 434px; }
.logo img { height: 40px; width: auto; flex: none; }
.logo-text {
  font-family: Arial, sans-serif;
  color: #333333;
  font-size: 1.4rem;
  line-height: 1;
  white-space: nowrap;
}
.header-global {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.header-global svg { width: 16px; height: 16px; display: block; }
.header-global:hover { color: var(--red); }

header > nav {
  height: var(--header-bottom-h);
  display: flex;
  align-items: center;
}
header > nav .container {
  display: flex;
  justify-content: center;
  width: 100%;
}
nav ul {
  display: flex;
  align-items: stretch;
  height: var(--header-bottom-h);
}
nav ul li { display: flex; align-items: center; }
nav ul li a {
  display: flex;
  align-items: center;
  padding: 0 22px;
  height: 100%;
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 22px; right: 22px;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.2s;
}
nav ul li a:hover,
nav ul li a.active { color: var(--red); }
nav ul li a:hover::after,
nav ul li a.active::after { transform: scaleX(1); }


/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 10px;
  transition: background 0.2s;
}
.hamburger:hover {
  background: rgba(138, 33, 43, 0.08);
}
.hamburger span {
  display: block;
  height: 2.5px;
  background: var(--red);
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.2s ease, width 0.3s ease;
  transform-origin: center;
}
.hamburger span:nth-child(1) { width: 22px; }
.hamburger span:nth-child(2) { width: 15px; align-self: flex-start; margin-left: 11px; }
.hamburger span:nth-child(3) { width: 22px; }
.hamburger.is-open span { width: 22px; align-self: center; margin-left: 0; }
.hamburger.is-open span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* ===========================
   PAGE HERO (inner pages)
   =========================== */
.page-hero {
  height: 280px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--header-h);
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
}
.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
}
.page-hero-content h1 {
  font-size: 2.8rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}
.page-hero-content h1 span { color: var(--red); font-weight: 700; }

/* Hero crossfade slides — shared base */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
}

/* CSS crossfade animation — inner page heroes only (not index) */
.page-hero .hero-slide {
  animation: hero-fade 9s ease-in-out infinite;
}
.page-hero .hero-slide:nth-child(1) { animation-delay: -0.45s; }
.page-hero .hero-slide:nth-child(2) { animation-delay: 2.55s; }
.page-hero .hero-slide:nth-child(3) { animation-delay: 5.55s; }

@keyframes hero-fade {
  0%     { opacity: 0; }
  5%     { opacity: 1; }
  33.33% { opacity: 1; }
  40%    { opacity: 0; }
  100%   { opacity: 0; }
}

/* ===========================
   FOOTER
   =========================== */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 28px 0;
  font-size: 1rem;
}

/* ===========================
   RECRUITMENT BANNER
   (shared across pages)
   =========================== */
.recruitment-banner {
  background: var(--bg-gray);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.recruitment-banner::before {
  content: 'RECRUITMENT';
}
.recruitment-banner.contact-cta::before {
  content: 'CONTACT US';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 7rem;
  font-weight: 900;
  color: rgba(0,0,0,0.04);
  white-space: nowrap;
  letter-spacing: 0.1em;
  pointer-events: none;
}
.recruitment-banner h2 {
  font-size: 1.6rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: var(--text);
}
.recruitment-banner p {
  color: var(--text-light);
  max-width: 780px;
  margin: 0 auto 2rem;
  font-size: 1rem;
}
.btn {
  display: inline-block;
  padding: 12px 36px;
  background: var(--red);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  border-radius: 2px;
}
.btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--red);
  color: var(--red);
}
.btn-outline:hover { background: var(--red); color: var(--white); }

/* ===========================
   UTILITIES
   =========================== */
.text-red   { color: var(--red); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  nav ul li a { padding: 0 14px; }
}

@media (max-width: 768px) {
  :root { --header-h: 94px; --header-top-h: 94px; }
  header { height: var(--header-h); }
  .header-top {
    height: 100%;
    border-bottom: none;
    align-items: stretch;
  }
  .header-top .container {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 32px 1fr;
    padding: 0;
    height: 100%;
    width: 100%;
  }
  .header-global {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    height: 32px;
    padding: 0 16px;
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
    justify-content: center;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-light);
  }
  .header-global svg { width: 14px; height: 14px; }
  .logo {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    min-width: 0;
    padding-left: 16px;
  }
  .logo img { height: 32px; }
  .logo-text { font-size: 1.2rem; }
  .hamburger {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    justify-self: end;
    margin-right: 8px;
  }
  header > nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    height: auto;
    background: var(--white);
    overflow-y: auto;
  }
  header > nav.open { display: block; }
  header > nav .container { justify-content: stretch; padding: 0; }
  nav ul { flex-direction: column; padding: 0; height: auto; align-items: stretch; width: 100%; }
  nav ul li { display: block; width: 100%; }
  nav ul li a {
    display: block;
    width: 100%;
    height: auto;
    line-height: 1.5;
    padding: 18px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
  }
  nav ul li a::after { display: none; }
  h2.section-title { font-size: 1.6rem; }
  section { padding: 60px 0; }
  .page-hero { height: 200px; }
  .page-hero-content h1 { font-size: 1.8rem; }
  footer { font-size: 14px; }
}
