/* ============================================
   MUGDHA CONSTRUCTIONS LLP — Layout System
   Grid, containers, header, footer, responsive
   ============================================ */

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* ── Section Spacing ── */
.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

.section--compact {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section--hero {
  padding-top: 0;
  padding-bottom: 0;
}

/* ── Grid System ── */
.grid {
  display: grid;
  gap: var(--space-8);
}

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

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid--4,
  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* ── Flex Utilities ── */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

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

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-3) 0;
  transition: all var(--duration-normal) var(--ease-out);
  background: rgba(248, 249, 250, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(10, 37, 64, 0.08);
  box-shadow: 0 4px 16px rgba(10, 37, 64, 0.06);
}

.site-header.scrolled {
  padding: var(--space-2) 0;
  background: rgba(248, 249, 250, 0.98);
  box-shadow: 0 6px 20px rgba(10, 37, 64, 0.10);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--charcoal);
}

.site-logo__icon {
  width: 48px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-normal) var(--ease-out);
  background: transparent;
  border: none;
  box-shadow: none;
}

.site-logo__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

/* Header logo layout */
.header-inner { gap: var(--space-4); }

@media (min-width: 900px) {
  .site-logo__name { font-size: 1.25rem; }
  .site-logo__icon { width: 52px; height: 60px; }
}

/* Optional: increase header background warmth to match logo */
.site-header, .site-header.scrolled { background: rgba(249,245,240,0.96); }

/* Anchor offset to avoid header overlapping target sections */
[id] { scroll-margin-top: 110px; }
section { scroll-margin-top: 110px; }
:target { scroll-margin-top: 110px; }


.site-logo:hover .site-logo__icon {
  transform: scale(1.05);
}

.site-logo__text {
  display: flex;
  flex-direction: column;
}

.site-logo__name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  color: #F56B00; /* Vibrant Orange matching emblem */
  line-height: 1.2;
}

.site-logo__tagline {
  font-size: var(--fs-xs);
  color: #0A2540; /* Dark Navy Blue matching emblem */
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  line-height: 1.3;
}

/* ── Navigation ── */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  position: relative;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--duration-normal) var(--ease-out),
              left var(--duration-normal) var(--ease-out);
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
  left: 20%;
}

.nav-cta {
  margin-left: var(--space-4);
}

/* ── Mobile Menu ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  z-index: var(--z-modal);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transition: all var(--duration-normal) var(--ease-out);
  border-radius: 2px;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: var(--bg-surface);
    padding: var(--space-12) var(--space-8);
    gap: var(--space-2);
    transition: right var(--duration-slow) var(--ease-out);
    border-left: var(--border-subtle);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-overlay);
  }

  .main-nav.open {
    right: 0;
  }

  .nav-link {
    font-size: var(--fs-body);
    padding: var(--space-3) 0;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: var(--space-4);
  }
}

/* ── Mobile Overlay ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: var(--z-fixed);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* ── Footer (stays dark for contrast) ── */
.site-footer {
  background: var(--bg-dark);
  border-top: none;
  position: relative;
  overflow: hidden;
  color: var(--text-on-dark);
}

.site-footer h4, .site-footer .footer-heading {
  color: var(--gold-light);
}

.site-footer p, .site-footer .footer-links a,
.site-footer .footer-contact-item {
  color: rgba(245, 245, 240, 0.65);
}

.site-footer .footer-links a:hover {
  color: var(--gold-light);
}

.site-footer .footer-bottom {
  color: rgba(245, 245, 240, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer .site-logo__name {
  color: #FF7A14; /* Bright Orange for dark background */
}

.site-footer .site-logo__tagline {
  color: #8BAECB; /* Soft Sky Blue for dark background */
}

.site-footer .footer-social a {
  border-color: rgba(201, 147, 42, 0.3);
  color: var(--gold-light);
}

.site-footer .footer-social a:hover {
  background: var(--gold);
  color: var(--charcoal);
}

.site-footer .bg-text {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: var(--fw-bold);
  color: rgba(201, 147, 42, 0.04);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: var(--ls-widest);
  user-select: none;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-8);
  padding: var(--space-16) 0 var(--space-10);
}

.footer-brand p {
  margin-top: var(--space-4);
  font-size: var(--fs-small);
  max-width: 300px;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin-bottom: var(--space-6);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  transition: color var(--duration-fast), transform var(--duration-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--gold);
  transform: translateX(4px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: var(--gold);
  margin-top: 2px;
}

.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 147, 42, 0.3);
  border-radius: var(--radius-md);
  color: var(--gold);
  transition: all var(--duration-fast) var(--ease-out);
}

.footer-social a:hover {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-map {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: var(--space-4);
  border: var(--border-subtle);
}

.footer-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.footer-bottom {
  border-top: var(--border-subtle);
  padding: var(--space-6) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }
}

/* ── Floating Mobile Bar ── */
.floating-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: rgba(248, 246, 241, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: var(--border-subtle);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  padding: var(--space-2) var(--space-4);
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
}

.floating-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--space-2);
}

.floating-bar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  font-size: 0.65rem;
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  transition: color var(--duration-fast);
  border-radius: var(--radius-sm);
}

.floating-bar__btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.floating-bar__btn:hover,
.floating-bar__btn:active {
  color: var(--gold);
}

.floating-bar__btn--primary {
  color: var(--charcoal);
  background: var(--gold);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
}

.floating-bar__btn--primary:hover,
.floating-bar__btn--primary:active {
  color: var(--charcoal);
  background: var(--gold-light);
}

@media (max-width: 768px) {
  .floating-bar {
    display: block;
  }

  body {
    padding-bottom: 80px;
  }

  .site-footer {
    padding-bottom: var(--space-16);
  }
}

/* ── WhatsApp FAB ── */
.whatsapp-fab {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  z-index: var(--z-fixed);
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast);
  animation: whatsappPulse 2.5s ease-in-out infinite;
}

.whatsapp-fab svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}

.whatsapp-fab.interacted {
  animation: none;
}

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3); }
  50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.5), 0 0 0 8px rgba(37, 211, 102, 0.1); }
}

@media (max-width: 768px) {
  .whatsapp-fab {
    display: none; /* Using floating bar instead on mobile */
  }
}

/* ── Page Hero Banners (subpages) ── */
.page-hero {
  padding: 150px 0 var(--space-12);
  text-align: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 37, 64, 0.90) 0%, rgba(10, 37, 64, 0.82) 100%);
  z-index: 0;
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

.page-hero .section-label, .page-hero__label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  color: #FF7A14;
  margin-bottom: var(--space-3);
}

.page-hero h1 {
  font-size: var(--fs-display);
  color: #FFFFFF !important;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.page-hero p, .page-hero .subtitle {
  font-size: var(--fs-body-lg);
  color: #FFFFFF !important;
  opacity: 0.95;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Page Specific Hero Background Photography */
.page-hero--construction {
  background-image: url('../assets/images/hero-construction.jpg');
}

.page-hero--hvac {
  background-image: url('../assets/images/hvac-installation.jpg');
}

.page-hero--projects {
  background-image: url('../assets/images/mugdha-serene-park.jpg');
}

.page-hero--about {
  background-image: url('../assets/images/supervision.jpg');
}

.page-hero--contact {
  background-image: url('../assets/images/renovation.jpg');
}
