/* ============================================
   BCCA Peoples Construction LTD - Main Stylesheet
   Clean & Modern Design
   ============================================ */

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

:root {
  --color-primary: #2d5a3d;
  --color-primary-light: #3a7d44;
  --color-primary-dark: #1e3d2a;
  --color-accent: #4a8c5c;
  --color-text: #2c2c2c;
  --color-text-light: #666666;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f5;
  --color-border: #e0e0e0;
  --color-white: #ffffff;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 1200px;
  --nav-height: 70px;
}

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

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

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

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

a:hover {
  color: var(--color-primary-light);
}

ul {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

/* --- Header & Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
}

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

.site-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.site-brand span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

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

.lang-switch {
  font-size: 0.85rem;
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text-light);
  transition: border-color 0.2s;
}

.lang-switch:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

main {
  margin-top: var(--nav-height);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 0 24px;
}

.hero h1 {
  font-size: 3rem;
  color: var(--color-white);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero .tagline {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 4px;
  transition: background 0.2s, transform 0.1s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: var(--color-primary-light);
  color: var(--color-white);
  transform: translateY(-1px);
}

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

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

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

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

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  margin: 12px auto 0;
}

/* --- Cards Grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.card {
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  margin-bottom: 8px;
}

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

/* --- Service Icons Grid (Home Page) --- */
.icon-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.icon-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: 8px;
  background: var(--color-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}

.icon-card:hover {
  transform: translateY(-2px);
}

.icon-card .icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.icon-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

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

/* --- Trust Bar --- */
.trust-bar {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 40px 0;
  text-align: center;
}

.trust-items {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

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

.trust-item .number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  display: block;
}

.trust-item .label {
  font-size: 1rem;
  opacity: 0.9;
}

/* --- Services Page --- */
.service-category {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--color-border);
}

.service-category:last-child {
  border-bottom: none;
}

.service-category:nth-child(even) {
  direction: rtl;
}

.service-category:nth-child(even) > * {
  direction: ltr;
}

.service-category img {
  border-radius: 8px;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.service-category h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--color-primary);
}

.service-category p {
  margin-bottom: 16px;
}

.service-list {
  list-style: none;
}

.service-list li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  color: var(--color-text-light);
  font-size: 1rem;
}

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

/* --- Photo Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-grid--compact {
  gap: 16px;
}

.gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-bg-alt);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 16px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--color-white);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover figcaption {
  opacity: 1;
}

/* --- About Page --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-content img {
  border-radius: 8px;
  width: 100%;
}

.why-choose {
  margin-top: 48px;
}

.why-choose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 32px;
}

.why-item {
  text-align: center;
  padding: 24px;
}

.why-item .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.contact-info-item .icon {
  font-size: 1.5rem;
  color: var(--color-primary);
  min-width: 32px;
  text-align: center;
}

.contact-info-item h4 {
  margin-bottom: 4px;
}

.contact-info-item p {
  color: var(--color-text-light);
  margin-bottom: 0;
  font-size: 1rem;
}

.wechat-qr {
  max-width: 200px;
  border-radius: 8px;
}

.map-container {
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  min-height: 400px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 400px;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: 48px 0 24px;
}

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

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.site-footer p {
  opacity: 0.8;
  font-size: 1rem;
}

.site-footer h4 {
  color: var(--color-white);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-links a {
  display: block;
  color: var(--color-white);
  opacity: 0.8;
  padding: 4px 0;
  font-size: 1rem;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.7;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 64px 24px;
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: 16px;
}

.cta-banner p {
  opacity: 0.9;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

/* --- Page Header --- */
.page-header {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 64px 24px;
}

.page-header h1 {
  color: var(--color-white);
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }

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

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .hero { height: 60vh; min-height: 400px; }
  .hero h1 { font-size: 2rem; }
  .hero .tagline { font-size: 1rem; }

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

  .icon-cards,
  .why-choose-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .icon-card {
    padding: 16px 12px;
  }

  .icon-card .icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }

  .icon-card h3 {
    font-size: 0.9rem;
  }

  .icon-card p {
    font-size: 0.8rem;
  }

  .why-item {
    padding: 12px 8px;
  }

  .why-item .icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .why-item h3 {
    font-size: 1rem;
  }

  .why-item p {
    font-size: 0.85rem;
  }

  .gallery-item figcaption {
    opacity: 1;
  }

  .service-category {
    grid-template-columns: 1fr;
  }

  .service-category:nth-child(even) {
    direction: ltr;
  }

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

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

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

  .trust-items {
    gap: 32px;
  }

  .section {
    padding: 48px 0;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .cards-grid,
  .icon-cards,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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