/* DBM Services Inc. - Global Styles
   Branding: Uses colors from the DBM logo - check with Nick on whether they have hex codes for the scheme
*/

/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  /* Brand palette (override these with exact logo hex codes if provided, for now an estimate based on the logos provided) */
  --brand-primary: #C28B3A;   
  --brand-primary-600: #a17430;
  --brand-primary-700: #7e5a26;
  --brand-on-primary: #ffffff;

  /* Back-compat variables mapped to brand */
  --main: var(--brand-primary);
  --main-600: var(--brand-primary-600);
  --main-700: var(--brand-primary-700);
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #eef2f7;
  --gray-300: #cbd5e1;
  --gray-600: #64748b;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);

  /* Custom variables */
  --primary-font: 'Prompt', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--primary-font);
  color: var(--main);
  background: var(--white);
  line-height: 1.6;
}

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

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

header, nav, main, footer { display: block; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gray-100);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--main); text-decoration: none; font-weight: 700; }
/* Image-based logo support */
.logo .logo-img { display: block; height: 80px; width: auto; object-fit: contain; }
.logo .logo-text { letter-spacing: 0.5px; font-weight: 700; font-size: 28px; }
.logo.compact .logo-text { display: none; }

.primary-nav ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; align-items: center; }
.primary-nav a:not(.btn) { color: var(--main); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 600; }
.primary-nav a:not(.btn):hover { background: var(--gray-100); }
.primary-nav a.active { color: var(--main-700); }

.nav-toggle { display: none; border: none; background: transparent; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: var(--main); margin: 5px 0; border-radius: 2px; }

/* Buttons */
.btn { background: var(--white); color: var(--main); border: 2px solid var(--main); padding: 10px 18px; border-radius: 10px; text-decoration: none; display: inline-block; font-weight: 700; transition: all 0.2s ease; }
.btn:hover { background: var(--main); color: var(--white); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-outline { background: transparent; color: var(--main); border-color: var(--main); }
.btn-outline:hover { background: var(--main); color: var(--white); }
.btn-inverse { background: var(--white); color: var(--main); border-color: var(--white); }
.btn-inverse:hover { background: var(--gray-100); border-color: var(--gray-100); }
.btn-small { padding: 8px 12px; font-size: 0.95rem; }

/* Hero */
.hero { padding: 42px 0 24px; background: linear-gradient(180deg, #fff, #f7faff); }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 2.8vw + 1rem, 3rem); line-height: 1.2; margin: 0 0 12px; }
.hero p { color: var(--gray-600); margin: 0 0 18px; }
.hero-media img { border-radius: 16px; box-shadow: var(--shadow); }
.hero-actions { display: flex; gap: 12px; }

/* Page hero */
.page-hero { padding: 56px 0 26px; border-bottom: 1px solid var(--gray-100); background: linear-gradient(180deg, #fff, #f9fbff); }
.page-hero h1 { margin: 0 0 6px; }
.page-hero p { margin: 0; color: var(--gray-600); }

/* Sections */
.section { padding: 46px 0; }
.section-alt { background: var(--gray-50); }
.section-header { text-align: center; margin-bottom: 26px; }

/* Stats */
.stats { padding: 22px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--white); border: 1px solid var(--gray-100); border-radius: 14px; padding: 18px; text-align: center; box-shadow: var(--shadow); }
.stat-number { font-size: 1.6rem; font-weight: 800; }
.stat-label { color: var(--gray-600); font-weight: 600; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--white); border-radius: 14px; overflow: hidden; border: 1px solid var(--gray-100); box-shadow: var(--shadow); }
.card img { height: 180px; width: 100%; object-fit: cover; }
.card-body { padding: 16px; }
.card p { color: #64748b;}

/* Two column layout */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.rounded { border-radius: 14px; box-shadow: var(--shadow); }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--white); border: 1px solid var(--gray-100); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }

/* Services */
.service-list { display: grid; gap: 28px; }
.service { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 24px; align-items: center; }
.service-media img { border-radius: 12px; box-shadow: var(--shadow); }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--gray-100); }
.gallery-item img { width: 100%; height: 220px; object-fit: cover; transition: transform .3s ease; display: block; }
.gallery-item:hover img { transform: scale(1.06); }
.lightbox { position: fixed; inset: 0; background: rgba(10, 35, 66, 0.85); display: none; align-items: center; justify-content: center; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox-image { max-width: min(1000px, 90vw); max-height: 85vh; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox-close { position: absolute; top: 18px; right: 18px; background: transparent; color: #fff; border: 2px solid #fff; border-radius: 8px; font-size: 28px; width: 42px; height: 42px; line-height: 36px; text-align: center; cursor: pointer; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; }
.contact-form .form-row { margin-bottom: 14px; }
.contact-form label { display: block; font-weight: 700; margin-bottom: 6px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--gray-300); font: inherit; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--main-700); border-color: var(--main-700); }
.form-actions { margin-top: 10px; }
.error { color: #b00020; font-size: 0.9rem; min-height: 1.2em; }
.form-status { margin-top: 10px; color: var(--main-700); font-weight: 600; }

/* CTA */
.cta { background: var(--main); color: var(--white); padding: 36px 0; margin-top: 10px; }
.cta-inner { text-align: center; }
.btn.btn-inverse { color: var(--main); }

/* Footer */
.site-footer { border-top: 1px solid var(--gray-100); background: #fbfdff; margin-top: 10px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 10px 0; }
.footer-links a { color: var(--main); text-decoration: none; margin-right: 12px; }
.footer-links a:hover { text-decoration: underline; }
.footer-meta { color: var(--gray-600); }

.center { text-align: center; }
.mt-lg { margin-top: 16px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .service { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .primary-nav { position: absolute; left: 0; right: 0; top: 60px; background: #fff; border-bottom: 1px solid var(--gray-100); display: none; }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: 10px 16px 16px; }
  .primary-nav a:not(.btn) { display: block; padding: 12px 10px; }
  .nav-toggle { display: inline-block; }
  .cards { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer { 
  background: var(--gray-50);
  padding: 10px 0 10px;
  border-top: 1px solid var(--gray-100);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  min-height: 200px;
  gap: 40px;
}

.footer-brand {
  flex: 0 0 250px;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer-brand .logo {
  margin-bottom: 10px;
}

.footer-logo {
  max-height: 200px;
  width: auto;
  object-fit: contain;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Social links */
.social-links {
  display: flex;
  gap: 12px;
  margin-top: 15px;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--gray-100);
  color: var(--gray-700);
  transition: all 0.3s ease;
}

.social:hover {
  background-color: var(--brand-primary);
  color: white;
  transform: translateY(-2px);
}

.social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-meta {
  text-align: center;
  color: var(--gray-600);
  font-size: 0.75rem;
  border-top: 1px solid var(--gray-200);
  grid-column: 1 / -1;
}

.footer-licensed {
  margin-top: 5px;
  font-weight: 500;
}

/* Footer about DBM section */
.footer-about {
  color: var(--gray-600);
  font-size: 1em;
  line-height: 1.5;
  flex: 1;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 0;
}
.footer-about p { margin: 6px 0; }
.footer-about strong { color: var(--main-700); }

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  justify-content: flex-end;
}
.social-links .social {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  color: var(--main);
  text-decoration: none;
  background: #fff;
  transition: all 0.2s ease;
}
.social-links .social:hover {
  background: var(--gray-100);
  border-color: var(--main);
  transform: translateY(-1px);
}
.social-links svg { width: 16px; height: 16px; fill: currentColor; }

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  
  .footer-meta {
    text-align: center;
    order: 3;
  }
  
  .footer-links {
    order: 2;
    justify-content: center;
  }
  
  .footer-brand {
    order: 1;
    align-items: center;
  }
  
  .social-links { justify-content: center; }
}


/* Sub-footer */
.sub-footer {
  background: var(--gray-100); /* darker than main footer */
  border-top: 1px solid var(--gray-300);
  padding: 8px 0;
}

.sub-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sub-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

.sub-footer-links a {
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 600;
}

.sub-footer-links a:hover {
  color: var(--brand-primary);
}

.sub-footer .social-links {
  margin-top: 0; /* override default top margin */
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .sub-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .sub-footer .social-links { justify-content: center; }
}
