/* ============================================================
   DIC Namibia Sites — Shared Base CSS
   Uses CSS custom properties defined per-site in <style> blocks
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---- Root defaults (overridden per site) ---- */
:root {
  --primary: #1a1a2e;
  --secondary: #e94560;
  --accent: #f5a623;
  --text: #2c2c2c;
  --text-light: #666;
  --bg: #ffffff;
  --bg-alt: #f8f6f2;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.18);
  --transition: 0.25s ease;
  --max-w: 1140px;
  --nav-h: 72px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ---- Utility ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 88px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-dark {
  background: var(--primary);
  color: #fff;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 540px;
  margin-bottom: 48px;
}
.section-dark .section-title,
.section-dark .section-subtitle { color: rgba(255,255,255,0.92); }
.label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 10px;
}
.section-dark .label { color: var(--accent); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}
.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.20);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  transform: translateY(-2px);
}
.btn-accent {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
  font-weight: 700;
}
.btn-accent:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background 0.35s, box-shadow 0.35s;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.navbar.scrolled .nav-logo { color: var(--primary); }
.navbar.scrolled .nav-link { color: var(--text); }
.navbar.scrolled .nav-link:hover { color: var(--secondary); }
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  z-index: 2;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  transition: color var(--transition);
  letter-spacing: 0.02em;
}
.nav-link:hover { color: var(--accent); }
.nav-cta {
  background: var(--secondary);
  color: #fff !important;
  padding: 9px 22px;
  border-radius: 50px;
  font-weight: 600;
}
.nav-cta:hover { filter: brightness(1.1); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 2;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: var(--transition);
  border-radius: 2px;
}
.navbar.scrolled .hamburger span { background: var(--primary); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transition: transform 8s ease;
}
.hero:hover .hero-bg { transform: scale(1.0); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0,0,0,0.58) 0%,
    rgba(0,0,0,0.38) 50%,
    rgba(0,0,0,0.62) 100%
  );
}
.hero-overlay-color {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(var(--primary-rgb, 0,0,0), 0.55) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 20px 24px;
  max-width: 800px;
}
.hero-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  opacity: 0.95;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero h2 {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  opacity: 0.88;
  margin-bottom: 36px;
  line-height: 1.4;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: bounce 2s ease-in-out infinite;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.4);
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.about-image:hover img { transform: scale(1.04); }
.about-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}
.about-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.about-feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.about-feature-text h4 {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.about-feature-text p {
  font-size: 0.88rem;
  color: var(--text-light);
}

/* ---- Services / Cards ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  font-size: 2.2rem;
  margin-bottom: 20px;
  display: block;
}
.card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary);
}
.card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}
.card-accent {
  border-top: 3px solid var(--secondary);
}
.section-dark .card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  color: #fff;
}
.section-dark .card h3 { color: var(--accent); }
.section-dark .card p { color: rgba(255,255,255,0.72); }

/* ---- Gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 240px 200px;
  gap: 12px;
  border-radius: 16px;
  overflow: hidden;
}
.gallery-item {
  overflow: hidden;
  position: relative;
}
.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
}
.contact-item-text h4 {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  margin-bottom: 4px;
}
.contact-item-text a,
.contact-item-text p {
  font-size: 0.95rem;
  color: var(--text);
}
.contact-item-text a:hover { color: var(--secondary); }
.contact-map {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.contact-map iframe {
  width: 100%;
  height: 360px;
  border: none;
  display: block;
}
.whatsapp-cta {
  margin-top: 28px;
}

/* ---- Footer ---- */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 28px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .nav-logo {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.footer-brand p {
  font-size: 0.88rem;
  max-width: 280px;
  line-height: 1.6;
}
.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background var(--transition);
  color: rgba(255,255,255,0.8);
}
.social-link:hover { background: var(--secondary); color: #fff; }
.footer-links h4 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 14px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}
.footer-credit a {
  color: var(--accent);
  font-weight: 500;
}
.footer-credit a:hover { text-decoration: underline; }

/* ---- WhatsApp Float ---- */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}
.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}
.whatsapp-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: pulse-ring 2.4s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ---- Testimonial ---- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.testimonial {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--secondary);
}
.testimonial-text {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.7;
}
.testimonial-author {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary);
}

/* ---- Stats bar ---- */
.stats-bar {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 32px;
  padding: 48px 0;
}
.stat { text-align: center; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--secondary);
  display: block;
}
.stat-label {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--primary);
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 1;
  }
  .nav-links.open .nav-link {
    font-size: 1.5rem;
    color: #fff;
  }
  .hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid .about-image { order: -1; }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .gallery-item:first-child { grid-column: span 2; grid-row: span 1; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero h1 { font-size: 2.4rem; }
  .hero h2 { font-size: 1.1rem; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .stats-bar { gap: 24px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: span 1; }
  .cards-grid { grid-template-columns: 1fr; }
}
