/* ============================================
   Azbil Malaysia - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  --primary-red: #a50000;
  --primary-red-dark: #8A212B;
  --primary-red-light: #A63B3B;
  --text-dark: #333333;
  --text-light: #666666;
  --bg-light: #FBFDFA;
  --bg-white: #ffffff;
  --brown-accent: #3B2710;
  --border-color: #e0e0e0;
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  
  --font-primary: 'Noto Sans JP', 'Segoe UI', sans-serif;
  --font-heading: 'Poppins', 'Noto Sans JP', sans-serif;
  
  --container-width: 1200px;
  --header-height: 80px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

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

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-white);
  z-index: 1000;
  box-shadow: 0 2px 10px var(--shadow-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-red);
  letter-spacing: -0.02em;
}

/* Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  padding: 5px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-red);
  transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-red);
}

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

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: var(--transition-normal);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  height: 500px;
  margin-top: var(--header-height);
  overflow: hidden;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.4) 0%, transparent 60%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 40px;
  transform: translateY(-50%);
  max-width: 320px;
  background: var(--primary-red);
  color: white;
  padding: 30px;
  border-radius: 0 0 30px 0;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.95;
}

/* Hero Indicators */
.hero-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-indicator {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition-normal);
}

.hero-indicator.active {
  background: var(--primary-red);
}

/* ============================================
   Section Styles
   ============================================ */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 500;
  color: var(--text-dark);
}

.section-title span {
  color: var(--primary-red);
}

.section-subtitle {
  margin-top: 15px;
  color: var(--text-light);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Our Message Section
   ============================================ */
.message-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.message-content p {
  color: var(--text-light);
  line-height: 1.9;
  margin-bottom: 20px;
}

/* ============================================
   Business Cards
   ============================================ */
.business-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.business-card {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.business-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-medium);
}

.business-card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.business-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.business-card:hover .business-card-image img {
  transform: scale(1.05);
}

.business-card-content {
  padding: 25px;
}

.business-card-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.business-card-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ============================================
   Recruitment Section
   ============================================ */
.recruitment-section {
  position: relative;
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/recruitment-bg.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 100px 0;
}

.recruitment-section .section-title {
  color: white;
}

.recruitment-section .section-title span {
  color: white;
}

.recruitment-content {
  max-width: 700px;
  margin: 0 auto;
}

.recruitment-content p {
  margin-bottom: 30px;
  opacity: 0.9;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 40px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all var(--transition-normal);
}

.btn-primary {
  background: var(--primary-red);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-red-dark);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: var(--primary-red);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  text-align: center;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ============================================
   About Page Styles
   ============================================ */
.page-hero {
  position: relative;
  height: 300px;
  margin-top: var(--header-height);
  overflow: hidden;
}

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

.page-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
}

/* Company Profile */
.profile-section {
  background: var(--bg-white);
}

.profile-intro {
  max-width: 900px;
  margin: 0 auto 60px;
  text-align: center;
}

.profile-intro p {
  color: var(--text-light);
  line-height: 1.9;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.profile-item {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}

.profile-label {
  width: 180px;
  font-weight: 600;
  color: var(--text-dark);
  flex-shrink: 0;
}

.profile-value {
  color: var(--text-light);
}

.profile-value a {
  color: var(--primary-red);
}

.profile-value a:hover {
  text-decoration: underline;
}

/* MD Message */
.md-message {
  background: var(--bg-light);
}

.md-message-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.md-message-text p {
  color: var(--text-light);
  line-height: 1.9;
  margin-bottom: 20px;
}

.md-message-image {
  position: relative;
}

.md-message-image img {
  border-radius: 8px;
  box-shadow: 0 10px 40px var(--shadow-medium);
}

/* History Timeline */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--border-color);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 60px;
  position: relative;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-year {
  width: 120px;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-red);
  text-align: center;
}

.timeline-content {
  width: calc(50% - 80px);
  background: var(--bg-white);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 20px var(--shadow-light);
}

.timeline-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 16px;
  height: 16px;
  background: var(--primary-red);
  border-radius: 50%;
  transform: translateX(-50%);
  border: 3px solid var(--bg-light);
}

/* Philosophy Section */
.philosophy-section {
  background: var(--primary-red);
  color: white;
  text-align: center;
}

.philosophy-section .section-title {
  color: white;
}

.philosophy-section .section-title span {
  color: white;
  border-bottom: 2px solid white;
}

.philosophy-quote {
  font-size: 1.3rem;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto 50px;
  opacity: 0.95;
}

.philosophy-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.philosophy-value {
  padding: 30px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  transition: var(--transition-normal);
}

.philosophy-value:hover {
  background: rgba(255,255,255,0.1);
}

.philosophy-value p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.9;
}

/* Global Network */
.network-section {
  text-align: center;
}

.network-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-red);
  font-weight: 500;
  margin-top: 20px;
}

.network-link:hover {
  text-decoration: underline;
}

/* ============================================
   Solution Page Styles
   ============================================ */
.solution-intro {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.solution-intro p {
  color: var(--text-light);
  line-height: 1.9;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.solution-card {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: transform var(--transition-normal);
}

.solution-card:hover {
  transform: translateY(-5px);
}

.solution-card-image {
  height: 200px;
  overflow: hidden;
}

.solution-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.solution-card-content {
  padding: 25px;
}

.solution-card-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.solution-card-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
}

.btn-link {
  color: var(--primary-red);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-link:hover {
  text-decoration: underline;
}

/* ============================================
   News Page Styles
   ============================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.news-card {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: transform var(--transition-normal);
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card-image {
  height: 180px;
  overflow: hidden;
  background: #f0f0f0;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-content {
  padding: 20px;
}

.news-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 3px;
  margin-bottom: 10px;
}

.news-tag.event {
  background: #e8f4e8;
  color: #2e7d32;
}

.news-tag.news {
  background: #e3f2fd;
  color: #1565c0;
}

.news-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.news-card-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.5;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 50px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.pagination a {
  background: var(--bg-white);
  color: var(--text-dark);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.pagination a:hover,
.pagination a.active {
  background: var(--primary-red);
  color: white;
}

/* News Detail */
.news-detail {
  max-width: 900px;
  margin: 0 auto;
}

.news-detail-header {
  margin-bottom: 40px;
}

.news-detail-header h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.news-detail-content {
  line-height: 1.9;
  color: var(--text-light);
}

.news-detail-content p {
  margin-bottom: 20px;
}

.news-detail-image {
  margin: 30px 0;
  border-radius: 8px;
  overflow: hidden;
}

/* ============================================
   Recruitment Page Styles
   ============================================ */
.job-listing {
  display: grid;
  gap: 40px;
}

.job-card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 4px 20px var(--shadow-light);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.job-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.job-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.job-meta-item strong {
  color: var(--text-dark);
}

.job-section {
  margin-bottom: 25px;
}

.job-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.job-section ul {
  list-style: disc;
  padding-left: 20px;
}

.job-section li {
  margin-bottom: 8px;
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

.job-requirements {
  background: var(--bg-light);
  padding: 25px;
  border-radius: 8px;
  margin-top: 20px;
}

.job-requirements h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.requirement-category {
  margin-bottom: 20px;
}

.requirement-category h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-red);
  margin-bottom: 10px;
}

.job-apply {
  margin-top: 30px;
  text-align: right;
}

/* ============================================
   Contact Page Styles
   ============================================ */
.offices-section {
  background: var(--bg-white);
}

.office-list {
  display: grid;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.office-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.office-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.office-info {
  border-left: 4px solid var(--primary-red);
  padding-left: 20px;
}

.office-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.office-details {
  display: grid;
  gap: 12px;
}

.office-detail {
  display: flex;
  gap: 15px;
}

.office-detail-label {
  width: 70px;
  font-size: 0.9rem;
  color: var(--text-light);
  flex-shrink: 0;
}

.office-detail-value {
  font-size: 0.9rem;
  color: var(--text-dark);
}

.office-map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-red);
  font-size: 0.9rem;
  margin-top: 15px;
}

.office-map-link:hover {
  text-decoration: underline;
}

.office-map {
  height: 200px;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
}

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

/* Contact Form */
.contact-form-section {
  background: var(--bg-light);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 15px;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-white);
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-red);
}

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

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--primary-red);
}

.form-checkbox label {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

.form-checkbox a {
  color: var(--primary-red);
}

.form-checkbox a:hover {
  text-decoration: underline;
}

.form-submit {
  text-align: center;
  margin-top: 30px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .business-grid,
  .solution-grid {
    gap: 30px;
  }
  
  .philosophy-values {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .md-message-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 30px 20px;
    gap: 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    box-shadow: 0 10px 30px var(--shadow-medium);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .hero {
    height: 400px;
  }
  
  .hero-content {
    left: 20px;
    right: 20px;
    max-width: none;
    padding: 25px;
  }
  
  .hero-content h1 {
    font-size: 1.5rem;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .business-grid,
  .solution-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }
  
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: column;
    padding-left: 50px;
  }
  
  .timeline-year {
    width: auto;
    text-align: left;
    margin-bottom: 15px;
  }
  
  .timeline-content {
    width: 100%;
  }
  
  .timeline-dot {
    left: 20px;
  }
  
  .office-card {
    grid-template-columns: 1fr;
  }
  
  .job-header {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .pagination {
    gap: 5px;
  }
  
  .pagination a,
  .pagination span {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .job-card {
    padding: 25px;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

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

/* Image Placeholder */
.img-placeholder {
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.9rem;
}
