/* Custom Styles - Professional Construction Theme */
:root {
  --brand-dark: #0b1220;
  --brand-dark-2: #0f172a;
  --brand-accent: #d6a455;
  --brand-accent-2: #b8893d;
  --brand-light: #f6f8fb;
  --brand-text: #0f172a;
  --brand-muted: #64748b;
  --brand-border: rgba(148, 163, 184, 0.25);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 18px 40px rgba(15, 23, 42, 0.2);
  --shadow-glow: 0 0 0 2px rgba(214, 164, 85, 0.25), 0 16px 40px rgba(214, 164, 85, 0.25);
}

* {
  box-sizing: border-box;
}

html.lang-preload body {
  visibility: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--brand-light);
  color: var(--brand-text);
  padding-top: 76px;
  line-height: 1.7;
}

body[data-page="index"] {
  padding-top: 0;
}

html[lang^="zh"] body {
  font-family: 'Noto Sans SC', 'Poppins', sans-serif;
  letter-spacing: 0.2px;
  line-height: 1.8;
}

html[lang^="zh"] p,
html[lang^="zh"] li,
html[lang^="zh"] .card-text,
html[lang^="zh"] .lead {
  line-height: 1.85;
  word-break: break-word;
  letter-spacing: 0.25px;
}

html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang^="zh"] h3,
html[lang^="zh"] h4 {
  letter-spacing: 0.35px;
}

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

a:hover {
  color: var(--brand-accent);
  text-decoration: none;
}

.navbar {
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(8px);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: 0;
}

.navbar-brand img {
  width: auto;
  height: auto;
  max-height: 50px;
  max-width: 50px;
  object-fit: contain;
}

.navbar-brand .brand-text {
  color: var(--brand-dark-2);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  text-transform: none;
}

.navbar-brand .brand-text small {
  display: block;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--brand-muted);
}

@media (max-width: 575.98px) {
  .navbar .container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .navbar-brand {
    order: 1;
    min-width: 0;
    gap: 0.35rem;
    padding-right: 0.15rem;
    overflow: hidden;
    flex: 1 1 0%;
  }

  .navbar-brand img {
    max-height: 34px;
    max-width: 34px;
  }

  .navbar-brand .brand-text {
    font-size: 0.62rem;
    line-height: 1.1;
    word-break: normal;
    max-width: 180px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .navbar-brand .brand-text small {
    font-size: 0.58rem;
  }

  .navbar-toggler {
    order: 3;
    flex: 0 0 auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    margin-left: 0.15rem;
    margin-top: 0;
  }

  .navbar-collapse {
    order: 4;
    width: 100%;
  }

   /* nav links stack and wrap naturally */
  .navbar-nav .nav-link {
    white-space: normal;
    padding: 0.5rem 0;
  }

  .lang-toggle {
    order: 2;
    flex: 0 0 auto;
    margin-left: 3rem;
    margin-right: 0;
    padding: 0.18rem 0.58rem;
    font-size: 0.76rem;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .lang-toggle {
    padding: 0.18rem 0.55rem;
    font-size: 0.74rem;
    margin-right: 0;
  }

  .navbar-brand {
    max-width: 100%;
    gap: 0.26rem;
    order: 1;
  }

  .navbar-brand img {
    max-height: 30px;
    max-width: 30px;
  }

  .navbar-brand .brand-text {
    font-size: 0.64rem;
  }

  .navbar-brand .brand-text small {
    font-size: 0.56rem;
  }
}

.services-section .col-md-4 {
  margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
  .services-section .col-md-4 {
    margin-bottom: 0;
  }
}

.intro-bullets {
  max-width: 100%;
  width: 100%;
  padding: 0 1.5rem;
  margin: 0 auto;
}

.intro-bullets li {
  display: block;
  margin: 0 auto 0.45rem;
  max-width: 1100px;
}

/* Unified page title style */
.page-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--brand-dark-2);
  text-align: center;
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.page-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 90px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-accent), var(--brand-accent-2));
  border-radius: 999px;
}

.page-title + hr {
  display: none;
}

.hero-section .page-title {
  color: #fff;
}

.navbar-nav .nav-link {
  color: #e2e8f0;
  margin-left: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-accent), var(--brand-accent-2));
  transition: width 0.25s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #fff;
}

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

.lang-toggle {
  margin-left: 0.5rem;
  margin-right: 0.75rem;
  padding: 0.32rem 0.95rem;
  border: none;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-2));
  color: #0b1220;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(214, 164, 85, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

/* Prevent lang toggle and hamburger overlap on tablets/phones */
@media (max-width: 991.98px) {
  .navbar .container {
    flex-wrap: wrap;
  }
  .lang-toggle {
    order: 2;
    padding: 0.26rem 0.8rem;
    margin-right: 0.5rem;
  }
  .navbar-toggler {
    order: 3;
    margin-left: 0.35rem;
  }
}

/* Center the three key bullet lines on index about section */
.about-section .list-unstyled li {
  text-align: center;
}

/* Center mission/team bullets on about page */
body[data-page="about"] .card-text li {
  text-align: center;
}

.lang-toggle:hover,
.lang-toggle:focus {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(214, 164, 85, 0.35);
  outline: none;
}

.lang-toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(214, 164, 85, 0.55);
}

.hero-section {
  background-image: linear-gradient(135deg, rgba(11, 18, 32, 0.92), rgba(11, 18, 32, 0.6)), url('../images/projects/sri-petaling-banglo-renovation-01.jpg');
  background-size: cover;
  background-position: center;
  min-height: 85vh;
  position: relative;
  display: flex;
  align-items: center;
  padding-top: 140px; /* keep content clear of fixed navbar */
  padding-bottom: 100px;
}

.hero-section .display-4 {
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hero-section .lead {
  color: rgba(255, 255, 255, 0.85);
}

.section-title {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
  color: var(--brand-dark-2);
}

.section-subtitle {
  color: var(--brand-muted);
  font-size: 1rem;
}

.card,
.service-card,
.project-item {
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
}

.card:hover,
.service-card:hover,
.project-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.card img,
.service-card img {
  transition: transform 0.4s ease;
}

.card:hover img,
.service-card:hover img {
  transform: scale(1.03);
}

.project-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
}

.project-highlights {
  padding-left: 0;
  margin-bottom: 0;
}

.project-highlights li {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  color: var(--brand-text);
  line-height: 1.5;
}

.project-highlights li::before {
  content: '';
  flex-shrink: 0;
  margin-top: 0.35rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-2));
}

.project-highlights li:last-child {
  margin-bottom: 0;
}

.project-highlights[class*="icon-"] li::before {
  width: auto;
  height: auto;
  margin-top: 0.05rem;
  background: none;
  border-radius: 0;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.85rem;
}

.project-highlights.icon-check li::before { content: "\f00c"; color: #1ea35a; }
.project-highlights.icon-star li::before { content: "\f005"; color: #d6a455; }
.project-highlights.icon-bolt li::before { content: "\f0e7"; color: #f59e0b; }
.project-highlights.icon-leaf li::before { content: "\f06c"; color: #22c55e; }
.project-highlights.icon-home li::before { content: "\f015"; color: #3b82f6; }
.project-highlights.icon-gem li::before  { content: "\f3a5"; color: #8b5cf6; }
.project-highlights.icon-fire li::before { content: "\f06d"; color: #ef4444; }
.project-highlights.icon-utensils li::before { content: "\f2e7"; color: #10b981; }

.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-2));
  border: none;
  color: #0b1220;
  box-shadow: 0 12px 25px rgba(214, 164, 85, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(214, 164, 85, 0.35);
  color: #0b1220;
}

.btn-outline-primary {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-brand-outline {
  border: 1px solid var(--brand-accent);
  color: var(--brand-dark-2);
  background: transparent;
}

.btn-brand-outline:hover {
  background: rgba(214, 164, 85, 0.1);
  box-shadow: 0 10px 30px rgba(214, 164, 85, 0.25);
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.btn-social:hover,
.btn-social:focus,
.btn-social:active {
  text-decoration: none !important;
}

.btn-whatsapp {
  color: #1ea35a;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  color: #1ea35a;
  box-shadow: 0 0 24px rgba(37, 211, 102, 0.45);
  background: rgba(37, 211, 102, 0.18);
  text-decoration: none;
}

.btn-facebook {
  color: #1877f2;
  background: rgba(24, 119, 242, 0.12);
  border: 1px solid rgba(24, 119, 242, 0.35);
}

.btn-facebook:hover {
  color: #1877f2;
  box-shadow: 0 0 24px rgba(24, 119, 242, 0.45);
  background: rgba(24, 119, 242, 0.18);
  text-decoration: none;
}

.btn-success {
  background: #25d366;
  border: none;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.35);
}

.contact-cta-section,
.cta-section {
  background: linear-gradient(135deg, rgba(214, 164, 85, 0.08), rgba(15, 23, 42, 0.05));
}

footer.bg-dark {
  background: linear-gradient(135deg, #0b1220, #111a2c);
}

footer.bg-dark .contact-info a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, font-weight 0.2s ease;
}

footer.bg-dark .contact-info a:hover {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.contact-info p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

@media (min-width: 768px) {
  .contact-info {
    align-items: flex-start;
    text-align: left;
  }

  .contact-info p {
    justify-content: flex-start;
  }

  .footer-socials {
    justify-content: flex-start;
  }
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 2000;
}

.lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  width: min(92vw, 1100px);
  max-height: 86vh;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 0.75rem;
  place-items: center;
}

.lightbox-image {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  text-align: center;
}

/* Floating contact buttons */
.floating-contact {
  position: fixed;
  right: 18px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1500;
}

.floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.floating-btn,
.floating-btn:visited {
  color: #fff;
}

.floating-btn:hover,
.floating-btn:focus,
.floating-btn:active {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
  outline: none;
}

.floating-btn.whatsapp {
  background: #25d366;
}

.floating-btn.whatsapp:hover,
.floating-btn.whatsapp:focus-visible {
  box-shadow: 0 0 18px rgba(37, 211, 102, 0.65), 0 16px 32px rgba(0, 0, 0, 0.25);
}

.floating-btn.facebook {
  background: #1877f2;
}

.floating-btn.facebook:hover,
.floating-btn.facebook:focus-visible {
  box-shadow: 0 0 18px rgba(24, 119, 242, 0.65), 0 16px 32px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  .floating-contact {
    right: 14px;
    bottom: 16px;
    gap: 10px;
  }

  .floating-btn {
    width: 48px;
    height: 48px;
  }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.lightbox-close {
  top: 18px;
  right: 18px;
  transform: none;
  font-size: 1.2rem;
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(214, 164, 85, 0.35);
  box-shadow: 0 0 20px rgba(214, 164, 85, 0.45);
}

@media (max-width: 768px) {
  .lightbox-content {
    padding: 1rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 38px;
    height: 38px;
  }
}

.carousel-indicators li {
  background-color: rgba(255, 255, 255, 0.5);
}

.carousel-indicators .active {
  background-color: var(--brand-accent);
}

.card-text,
.project-description {
  text-align: justify;
  font-size: 0.95rem;
  line-height: 1.6;
  word-spacing: normal;
  letter-spacing: -0.01em;
}

/* Center service page lead paragraph */
body[data-page="services"] [data-i18n="hero.body"] {
  text-align: center !important;
}

@media (max-width: 991px) {
  .navbar-nav .nav-link {
    margin-left: 0;
    padding: 0.5rem 0;
  }

  .about-page .row.mt-5 .col-md-6 {
    margin-bottom: 1.25rem;
  }

  .about-page .row.mt-5 .col-md-6:last-child {
    margin-bottom: 0;
  }

  .about-page .row.mt-5 .col-md-6 + .col-md-6 {
    margin-top: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 70vh;
    text-align: center;
  }

  .section-title {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    transition: none !important;
  }
}
