/* S.E.M. Dynamic Engineers - Company Website Stylesheet */

:root {
  --primary-color: #1a365d;
  --secondary-color: #2c5282;
  --accent-color: #ed8936;
  --light-bg: #f7fafc;
  --dark-bg: #1a202c;
  --text-color: #2d3748;
  --text-light: #718096;
  --white: #ffffff;
  --border-color: #e2e8f0;
  --success-color: #38a169;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
}

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

/* Header & Navigation */
header {
  background: var(--primary-color);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

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

.logo-img {
  height: 45px;
  width: auto;
}

.logo h1 {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
}

.logo span {
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-color);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 150px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 50px;
}

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

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-color);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: #dd6b20;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

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

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

/* Section Styling */
section {
  padding: 80px 0;
}

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

.section-header h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.section-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.section-header .underline {
  width: 80px;
  height: 4px;
  background: var(--accent-color);
  margin: 20px auto 0;
  border-radius: 2px;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  text-align: center;
  padding: 40px 30px;
}

.service-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 25px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-card h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Features Section */
.features {
  background: var(--light-bg);
}

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

.feature-item {
  text-align: center;
  padding: 30px 20px;
}

.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-item h4 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.feature-item p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Clients Section */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  align-items: center;
}

.client-logo {
  background: var(--light-bg);
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  color: var(--text-light);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
}

.client-logo img {
  width: 100%;
  max-width: 150px;
  height: 60px;
  object-fit: contain;
  display: block;
  opacity: 0.95;
  filter: grayscale(100%);
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.client-logo .client-name {
  font-size: 0.85rem;
  letter-spacing: 0.4px;
}

.client-logo:hover {
  background: var(--primary-color);
  color: var(--white);
}

.client-logo:hover img {
  filter: brightness(0) invert(1);
  opacity: 1;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.project-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 54, 93, 0.15), rgba(26, 54, 93, 0.55));
  pointer-events: none;
}

.project-image > * {
  position: relative;
  z-index: 1;
}

.project-info {
  padding: 25px;
}

.project-info h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.project-info p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.project-client {
  color: var(--text-light);
}

.project-value {
  color: var(--accent-color);
  font-weight: 600;
}

/* Team Section */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.team-card {
  text-align: center;
  padding: 40px 30px;
}

.team-avatar {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

.team-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hide initials when an image is present; shows automatically if the image is missing/removed */
.team-avatar img + .team-initials {
  opacity: 0;
}

.team-initials {
  position: relative;
  z-index: 1;
}

.team-card h3 {
  color: var(--primary-color);
  margin-bottom: 5px;
}

.team-card .position {
  color: var(--accent-color);
  font-weight: 500;
  margin-bottom: 15px;
}

.team-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--accent-color);
}

.cert-icon {
  width: 50px;
  height: 50px;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
  padding: 6px;
}

.cert-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cert-info h4 {
  color: var(--primary-color);
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.cert-info p {
  color: var(--text-light);
  font-size: 0.8rem;
}

/* Registration Badges */
.registration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.reg-badge {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.reg-badge:hover {
  transform: translateY(-3px);
}

.reg-badge h5 {
  color: var(--primary-color);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.reg-badge p {
  color: var(--text-light);
  font-size: 0.75rem;
}

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

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  padding: 40px;
  background: var(--primary-color);
  border-radius: 10px;
  color: var(--white);
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.contact-item-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.contact-item p {
  opacity: 0.8;
  font-size: 0.9rem;
}

.contact-form {
  padding: 40px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

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

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

/* Footer */
footer {
  background: var(--dark-bg);
  color: var(--white);
  padding: 60px 0 20px;
}

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

.footer-about p {
  opacity: 0.7;
  margin: 20px 0;
  font-size: 0.9rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--accent-color);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-col ul li a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  opacity: 0.6;
  font-size: 0.85rem;
}

/* Values Section */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.value-card {
  text-align: center;
  padding: 40px 25px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.value-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.value-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.value-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.value-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* About Page */
.page-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 120px 0 60px;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.page-hero p {
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 2rem;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 15px;
}

.about-image {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 4rem;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Vision Mission */
.vision-mission {
  background: var(--light-bg);
}

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

.vm-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.vm-card h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.vm-card p {
  color: var(--text-light);
  line-height: 1.8;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

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

.timeline-item {
  padding: 20px 0;
  position: relative;
}

.timeline-content {
  width: 45%;
  padding: 25px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-year {
  display: inline-block;
  background: var(--accent-color);
  color: var(--white);
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.timeline-content h4 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

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

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.data-table th,
.data-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--primary-color);
  color: var(--white);
  font-weight: 600;
}

.data-table tr:hover {
  background: var(--light-bg);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* Filter Sidebar Layout */
.projects-section {
  padding: 60px 0;
}

.projects-layout {
  display: flex;
  gap: 40px;
}

.filter-sidebar {
  flex: 0 0 220px;
  position: sticky;
  top: 100px;
  height: fit-content;
  background: var(--white);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.filter-sidebar h4 {
  font-size: 1rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

.filter-sidebar .filter-tab {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  padding: 12px 18px;
  border-radius: 8px;
}

.projects-content {
  flex: 1;
}

.project-category {
  margin-bottom: 50px;
}

.project-category .section-header {
  margin-bottom: 30px;
}

@media (max-width: 900px) {
  .projects-layout {
    flex-direction: column;
  }
  
  .filter-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
  }
  
  .filter-sidebar h4 {
    width: 100%;
    margin-bottom: 15px;
  }
  
  .filter-sidebar .filter-tab {
    width: auto;
    flex: 1;
    min-width: 100px;
    text-align: center;
  }
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 10px 25px;
  background: var(--light-bg);
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--primary-color);
  color: var(--white);
}

/* Organization Chart */
.org-chart {
  text-align: center;
}

.org-level {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.org-card {
  background: var(--white);
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  min-width: 200px;
}

.org-card.director {
  background: var(--primary-color);
  color: var(--white);
}

.org-card.director h4 {
  color: var(--white);
}

.org-card h4 {
  color: var(--primary-color);
  margin-bottom: 5px;
}

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

.org-card.director p {
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-color);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
  }

  .nav-links.active {
    display: flex;
  }

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

  .hero-stats {
    flex-direction: column;
    gap: 30px;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .features-grid,
  .values-grid,
  .vm-grid {
    grid-template-columns: 1fr;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-content {
    width: calc(100% - 50px);
    margin-left: 50px !important;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 120px 0 60px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  section {
    padding: 50px 0;
  }

  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

.mb-0 {
  margin-bottom: 0;
}

.mt-30 {
  margin-top: 30px;
}

.mb-30 {
  margin-bottom: 30px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.active {
  background: rgba(56, 161, 105, 0.1);
  color: var(--success-color);
}

.status-badge.bumiputera {
  background: rgba(237, 137, 54, 0.1);
  color: var(--accent-color);
}
