/* ============================================
   DONG BAC - Design & Construction Consultant
   ============================================ */

/* CSS Custom Properties */
:root {
  --primary: #1a2a3a;
  --secondary: #c9a227;
  --accent: #2d8cf0;
  --bg-light: #f5f6f8;
  --bg-dark: #0f1419;
  --text-primary: #1a2a3a;
  --text-secondary: #5a6a7a;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(26, 42, 58, 0.1);
  --shadow-lg: 0 8px 40px rgba(26, 42, 58, 0.15);
  --transition: 200ms ease;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: #b8922a;
  border-color: #b8922a;
}

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

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

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.3s ease;
}

.header.scrolled {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 12px 0;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
  transition: color var(--transition);
}

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

.logo-tagline {
  font-size: 0.7rem;
  color: var(--secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color var(--transition);
}

.header.scrolled .logo-tagline {
  color: var(--secondary);
}

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

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  transition: color var(--transition);
}

.header.scrolled .nav-link {
  color: var(--text-secondary);
}

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

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

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

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

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.lang-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px 8px;
  transition: all var(--transition);
}

.header.scrolled .lang-btn {
  color: var(--text-secondary);
}

.lang-btn.active {
  color: var(--secondary);
  font-weight: 700;
}

.lang-sep {
  color: rgba(255, 255, 255, 0.3);
}

.header.scrolled .lang-sep {
  color: var(--text-secondary);
}

/* Mobile Menu */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
}

.header.scrolled .mobile-toggle span {
  background: var(--primary);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--primary);
  padding: 80px 32px 32px;
  transition: right 0.3s ease;
  z-index: 999;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
}

.mobile-nav-link {
  display: block;
  padding: 16px 0;
  font-size: 1.1rem;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-lang-toggle {
  margin-top: 24px;
  display: flex;
  gap: 16px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--primary);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(201, 162, 39, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 39, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-pattern {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: linear-gradient(135deg, transparent 40%, rgba(201, 162, 39, 0.05) 50%, transparent 60%);
  transform: skewX(-15deg);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(201, 162, 39, 0.15);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--secondary);
  margin-bottom: 24px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
  padding: 80px 0;
}

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

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
}

.section-dark .section-header p {
  color: rgba(255, 255, 255, 0.6);
}

.section-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

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

.service-card {
  background: var(--white);
  padding: 32px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-left-color: var(--secondary);
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 162, 39, 0.1);
  border-radius: 8px;
  margin-bottom: 20px;
  color: var(--secondary);
}

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

.service-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

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

.about-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(26, 42, 58, 0.5), transparent);
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(26, 42, 58, 0.1);
}

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

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.project-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 20, 25, 0.9), transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transition: background 0.3s ease;
}

.project-card:hover .project-overlay {
  background: linear-gradient(to top, rgba(15, 20, 25, 0.95), rgba(15, 20, 25, 0.3));
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.project-card h3 {
  color: var(--white);
  margin-bottom: 4px;
}

.project-year {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.project-link {
  text-align: center;
}

.project-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
  font-weight: 500;
  transition: gap var(--transition);
}

.project-link a:hover {
  gap: 12px;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
}

.contact-info h3 {
  margin-bottom: 24px;
}

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

.contact-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 162, 39, 0.1);
  border-radius: 8px;
  color: var(--secondary);
  flex-shrink: 0;
}

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

.contact-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-group.full {
  grid-column: 1 / -1;
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid #e0e4e8;
  border-radius: 4px;
  transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 140, 240, 0.1);
}

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

.form-group.error input,
.form-group.error textarea {
  border-color: #e74c3c;
}

.form-error {
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: 6px;
  display: none;
}

.form-group.error .form-error {
  display: block;
}

.form-success {
  text-align: center;
  padding: 40px;
  color: #27ae60;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 60px 0 24px;
}

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

.footer-brand .logo-text {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  line-height: 1.7;
}

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

.footer-links a {
  display: block;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--secondary);
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--white);
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--secondary);
  color: var(--primary);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  color: var(--primary);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #b8922a;
  transform: translateY(-2px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .about-grid {
    gap: 40px;
  }

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

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

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .lang-toggle {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .mobile-menu-overlay {
    display: block;
  }

  .section {
    padding: 60px 0;
  }

  .hero-content {
    text-align: center;
    padding: 0 20px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 200px;
  }

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

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

  .about-image {
    order: -1;
  }

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

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

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

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

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

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-number {
    font-size: 2rem;
  }

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