/* ==========================================================
   MoreTech BMP360 — LAYOUT COMPONENTS
   Layer: 2 (Structural)
   Version: 2.0.0
   ──────────────────────────────────────────────────────────
   Depends on: 00-tokens.css, 01-foundation.css
   Contains:
     §1  Header System (Utility Bar + Navbar + Dropdown)
     §2  Hero System (Industrial + Context variant)
     §3  Footer System
     §4  Overlay Modal System
   ========================================================== */


/* ██████████████████████████████████████████████████████████
   §1  HEADER SYSTEM
   ██████████████████████████████████████████████████████████ */

/* ── Shell ── */
.site-header {
  position: relative;
  z-index: var(--mt-z-header);
  background: var(--mt-surface-header);
}

/* ── Fixed Header Stack ── */
.fixed-header-stack {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--mt-z-header);
  background: var(--mt-surface-header);
  box-shadow: var(--mt-shadow-sm);
}

/* Spacer: Prevents page content from hiding behind fixed header */
.header-spacer {
  height: 130px; /* utility bar (~40) + navbar (~74) + divider (4) + buffer */
}

@media (max-width: 991px) {
  .header-spacer {
    height: 110px;
  }
}

@media (max-width: 767px) {
  .header-spacer {
    height: 100px;
  }
}

/* ── Divider below header ── */
.header-divider {
  height: 4px;
  background: linear-gradient(
    90deg,
    rgba(var(--mt-brand-primary-rgb), 0.2),
    rgba(var(--mt-brand-primary-rgb), 0.75),
    rgba(var(--mt-brand-primary-rgb), 0.2)
  );
}


/* ----------------------------------------------------------
   TOP UTILITY BAR
---------------------------------------------------------- */
.top-utility-bar {
  background: var(--mt-surface-utility);
  color: var(--mt-text-inverse);
  font-size: var(--mt-text-xs);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.top-utility-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mt-space-6);
  min-height: 40px;
}

.top-links {
  font-weight: var(--mt-weight-semibold);
  letter-spacing: 0.25px;
  white-space: nowrap;
}

.top-utility-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: var(--mt-weight-medium);
  padding: 6px 10px;
  border-radius: var(--mt-radius-full);
  color: rgba(255, 255, 255, 0.9);
  transition: all var(--mt-duration-fast) ease;
}

.top-utility-bar a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.top-utility-bar i,
.top-utility-bar svg {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ── Top Bar: Actions Group ── */
.top-actions {
  display: flex;
  align-items: center;
  gap: var(--mt-space-1);
}

/* ── Top Bar: Action Links ── */
.top-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: var(--mt-text-xs);
  font-weight: var(--mt-weight-medium);
  padding: 6px 10px;
  border-radius: var(--mt-radius-full);
  color: rgba(255, 255, 255, 0.9);
  transition: all var(--mt-duration-fast) ease;
  white-space: nowrap;
}

.top-action-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* WhatsApp accent */
.top-action-link--whatsapp:hover {
  background: rgba(37, 211, 102, 0.20);
}

/* Hide text labels on small screens, keep icons */
@media (max-width: 991px) {
  .top-action-link span {
    display: none;
  }

  .top-action-link {
    padding: 6px 8px;
  }
}

/* ── Top Bar: Separator & Tagline ── */
.top-separator {
  opacity: 0.4;
  margin: 0 var(--mt-space-1);
}

.top-tagline {
  font-size: var(--mt-text-xs);
  opacity: 0.75;
}


/* ----------------------------------------------------------
   SEARCH (Utility Bar)
---------------------------------------------------------- */
.top-search {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.top-search input {
  width: 100%;
  border: none;
  border-radius: var(--mt-radius-full);
  padding: 8px 44px 8px 18px;
  font-size: 0.78rem;
  font-family: var(--mt-font-sans);
  background: var(--mt-neutral-0);
  box-shadow: var(--mt-shadow-sm);
  outline: none;
  transition: box-shadow var(--mt-duration-normal) var(--mt-ease-default);
}

.top-search input:focus {
  box-shadow:
    0 0 0 2px var(--mt-border-focus),
    var(--mt-shadow-sm);
}

.top-search button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--mt-brand-primary);
  cursor: pointer;
}


/* ----------------------------------------------------------
   NAVBAR
---------------------------------------------------------- */
.navbar {
  background: var(--mt-surface-header);
  border-bottom: 1px solid var(--mt-border-default);
  padding: 14px 0;
}

.site-logo {
  max-height: 66px;
  transition: opacity var(--mt-duration-fast) ease;
}

.site-logo:hover {
  opacity: 0.85;
}

/* Nav Links */
.navbar-nav .nav-link {
  position: relative;
  font-weight: var(--mt-weight-semibold);
  font-size: var(--mt-text-sm);
  padding: 8px 14px;
  color: var(--mt-text-heading);
  transition: color var(--mt-duration-fast) ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--mt-brand-primary);
}

/* Underline indicator */
.navbar-nav .nav-link::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--mt-brand-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--mt-duration-normal) var(--mt-ease-default);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
  transform: scaleX(1);
}


/* ----------------------------------------------------------
   DROPDOWN
---------------------------------------------------------- */
.navbar-nav .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.navbar-nav .dropdown-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition:
    transform var(--mt-duration-normal) var(--mt-ease-default),
    opacity var(--mt-duration-fast) ease;
  opacity: 0.7;
}

.navbar-nav .dropdown-toggle.show::after {
  transform: rotate(-135deg);
  opacity: 1;
}

.dropdown-menu {
  background: var(--mt-surface-dropdown);
  border-radius: var(--mt-radius-md);
  border: 1px solid var(--mt-border-default);
  padding: 8px;
  box-shadow: var(--mt-shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--mt-duration-normal) ease,
    transform var(--mt-duration-normal) var(--mt-ease-default);
}

.dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  font-size: var(--mt-text-sm);
  padding: 9px 14px;
  border-radius: 8px;
  transition: background var(--mt-duration-fast) ease;
}

.dropdown-item:hover {
  background: var(--mt-brand-primary-soft);
  color: var(--mt-brand-primary);
}

/* Navbar CTA Button */
.navbar .btn-primary {
  font-size: 0.78rem;
  padding: 9px 22px;
}


/* ----------------------------------------------------------
   MOBILE COLLAPSED MENU
---------------------------------------------------------- */
@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--mt-surface-raised);
    border-top: 1px solid var(--mt-border-default);
    margin-top: var(--mt-space-3);
    padding: var(--mt-space-4) 0;
    border-radius: 0 0 var(--mt-radius-md) var(--mt-radius-md);
  }

  .navbar-nav .nav-link {
    padding: var(--mt-space-3) var(--mt-space-4);
    border-radius: var(--mt-radius-sm);
  }

  .navbar-nav .nav-link:hover {
    background: var(--mt-brand-primary-soft);
  }

  /* Remove underline indicator on mobile — use background instead */
  .navbar-nav .nav-link::before {
    display: none;
  }

  .navbar-nav .nav-link.active {
    background: var(--mt-brand-primary-soft);
    color: var(--mt-brand-primary);
  }

  /* Dropdown in mobile */
  .dropdown-menu {
    border: none;
    box-shadow: none;
    padding-left: var(--mt-space-4);
    background: transparent;
  }

  .dropdown-item {
    padding: var(--mt-space-2) var(--mt-space-4);
  }
}


/* ----------------------------------------------------------
   HEADER RESPONSIVE
---------------------------------------------------------- */
@media (max-width: 991px) {
  .navbar {
    padding: 0.65rem 0;
  }

  .navbar .site-logo {
    max-height: 44px;
  }

  .navbar .btn {
    padding: 0.45rem 1rem;
    font-size: 0.86rem;
  }

  .top-utility-bar {
    font-size: 0.68rem;
  }

  .top-search {
    max-width: 200px;
  }

  .top-links .top-tagline {
    display: none;
  }

  .top-links .top-separator {
    display: none;
  }
}

@media (max-width: 767px) {
  .top-utility-bar .container {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--mt-space-2);
  }

  .top-search {
    max-width: 100%;
    order: 3;
    width: 100%;
  }

  .top-links {
    text-align: center;
    width: 100%;
  }

  .top-actions {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 575px) {
  /* Hide utility bar entirely on very small screens */
  .top-utility-bar {
    display: none;
  }

  .header-spacer {
    height: 74px; /* Only navbar + divider */
  }
}


/* ██████████████████████████████████████████████████████████
   §2  HERO SYSTEM
   ██████████████████████████████████████████████████████████ */

/* ----------------------------------------------------------
   HERO ROOT
---------------------------------------------------------- */
.hero-industrial {
  position: relative;
  min-height: 86vh;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
  isolation: isolate;
}

/* Dark readability overlay */
.hero-industrial::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(12, 14, 20, 0.82),
    rgba(10, 12, 18, 0.92)
  );
  z-index: 0;
}

/* Premium radial glow */
.hero-industrial::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(
    circle at 50% 35%,
    rgba(40, 120, 255, 0.20),
    transparent 60%
  );
  z-index: 1;
  pointer-events: none;
}


/* ----------------------------------------------------------
   HERO INNER
---------------------------------------------------------- */
.hero-overlay {
  position: relative;
  z-index: 2;
  min-height: 86vh;
  display: flex;
  align-items: center;
}

.hero-industrial .container {
  max-width: 920px;
  text-align: center;
}


/* ----------------------------------------------------------
   HERO TYPOGRAPHY
---------------------------------------------------------- */
.hero-micro {
  font-size: var(--mt-text-xs);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: var(--mt-weight-bold);
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 14px;
  animation: heroFadeUp 0.6s var(--mt-ease-default) both;
}

.hero-title {
  font-size: clamp(2.4rem, 4.2vw, 3.4rem);
  font-weight: 900;
  line-height: var(--mt-leading-tight);
  color: var(--mt-text-inverse);
  margin-bottom: 18px;
  animation: heroFadeUp 0.75s var(--mt-ease-default) both;
}

.hero-subtitle {
  font-size: var(--mt-text-md);
  line-height: var(--mt-leading-normal);
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 34px;
  animation: heroFadeUp 0.9s var(--mt-ease-default) both;
}


/* ----------------------------------------------------------
   HERO PROOF BADGES
---------------------------------------------------------- */
.hero-proof {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 0.78rem;
  font-weight: var(--mt-weight-semibold);
  border-radius: var(--mt-radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
}

.hero-proof span::before {
  content: "●";
  font-size: 0.6rem;
  color: var(--mt-brand-primary);
}


/* ----------------------------------------------------------
   HERO ACTIONS
---------------------------------------------------------- */
.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  animation: heroFadeUp 1.05s var(--mt-ease-default) both;
}

.hero-industrial .mt-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--mt-radius-full);
  font-weight: var(--mt-weight-bold);
  letter-spacing: 0.2px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--mt-duration-fast) var(--mt-ease-default),
    box-shadow var(--mt-duration-fast) var(--mt-ease-default),
    background var(--mt-duration-fast) ease,
    border-color var(--mt-duration-fast) ease;
}

.hero-industrial .mt-hero-btn:hover {
  transform: translateY(-2px);
}

.hero-industrial .mt-hero-btn:active {
  transform: translateY(1px);
}

.hero-industrial .mt-hero-btn-primary {
  background: var(--mt-brand-primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.hero-industrial .mt-hero-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}


/* ----------------------------------------------------------
   HERO SLIDESHOW (STRUCTURE)
---------------------------------------------------------- */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

/* Navigation dots */
.hero-nav {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-nav span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background var(--mt-duration-fast) ease;
}

.hero-nav span.is-active {
  background: var(--mt-brand-primary);
}


/* ----------------------------------------------------------
   HERO ANIMATION
---------------------------------------------------------- */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}


/* ----------------------------------------------------------
   CONTEXT HERO (Inner pages)
---------------------------------------------------------- */
.hero-industrial.context-hero {
  min-height: 360px;
}

.hero-industrial.context-hero .hero-overlay {
  min-height: 360px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero-industrial.context-hero .hero-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.hero-industrial.context-hero .hero-proof,
.hero-industrial.context-hero .hero-actions {
  display: none;
}


/* ----------------------------------------------------------
   HERO RESPONSIVE
---------------------------------------------------------- */
@media (max-width: 767px) {
  .hero-industrial,
  .hero-industrial .hero-overlay {
    min-height: 72vh;
  }

  .hero-title {
    font-size: clamp(2rem, 6vw, 2.6rem);
  }

  .hero-proof {
    gap: 10px;
    margin: 18px 0;
  }

  .hero-proof span {
    font-size: 0.72rem;
    padding: 6px 12px;
  }

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

  .hero-actions .mt-hero-btn,
  .hero-actions .btn-lg {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 575px) {
  .hero-industrial.context-hero {
    min-height: 280px;
  }

  .hero-industrial.context-hero .hero-overlay {
    min-height: 280px;
  }
}


/* ██████████████████████████████████████████████████████████
   §3  FOOTER SYSTEM
   ██████████████████████████████████████████████████████████ */

.site-footer {
  position: relative;
  background: var(--mt-gradient-dark);
  color: #cbd5f5;
  padding: 72px 0 36px;
  overflow: hidden;
}

/* Top glow line */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 140px;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    var(--mt-brand-primary),
    transparent
  );
  transform: translateX(-50%);
  opacity: 0.6;
}

/* Headings */
.site-footer h4,
.site-footer h5,
.site-footer h6 {
  color: #ffffff;
  font-weight: var(--mt-weight-bold);
  letter-spacing: var(--mt-tracking-tight);
}

/* Body text */
.site-footer p,
.site-footer span,
.site-footer li {
  color: #cbd5f5;
  font-size: 0.9rem;
  line-height: 1.65;
}

.footer-muted {
  color: var(--mt-neutral-400);
}

/* Links */
.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a,
.site-footer a {
  color: #cbd5f5;
  font-size: 0.9rem;
  text-decoration: none;
  transition:
    color var(--mt-duration-fast) ease,
    transform var(--mt-duration-fast) ease;
  display: inline-block;
}

.footer-links a:hover,
.site-footer a:hover {
  color: var(--mt-brand-primary);
  transform: translateX(2px);
}

/* Map */
.footer-map {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--mt-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* WhatsApp */
.site-footer .btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: var(--mt-radius-full);
}

.site-footer .btn-success:hover {
  opacity: 0.9;
}

/* Divider */
.footer-line {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
}

/* Bottom */
.site-footer .footer-bottom {
  font-size: 0.8rem;
  color: var(--mt-neutral-400);
}

/* Responsive */
@media (max-width: 767px) {
  .site-footer {
    padding: 56px 0 28px;
    text-align: center;
  }

  .footer-links a {
    display: block;
    margin-bottom: 8px;
  }

  .footer-map iframe {
    width: 100% !important;
    height: 180px !important;
  }
}


/* ██████████████████████████████████████████████████████████
   §4  OVERLAY MODAL SYSTEM
   ██████████████████████████████████████████████████████████ */

.mt-overlay-wrapper {
  position: fixed;
  inset: 0;
  z-index: var(--mt-z-modal);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--mt-duration-normal) ease;
}

.mt-overlay-wrapper.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Backdrop */
.mt-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(2px);
}

/* Modal */
.mt-overlay-modal {
  position: relative;
  margin-top: 12vh;
  max-width: 480px;
  width: calc(100% - 32px);
  background: var(--mt-surface-raised);
  color: var(--mt-text-heading);
  border-radius: var(--mt-radius-xl);
  padding: 30px 28px;
  box-shadow: var(--mt-shadow-xl);
  text-align: center;
  transform: translateY(20px) scale(0.98);
  transition: transform var(--mt-duration-slow) ease;
}

.mt-overlay-wrapper.is-open .mt-overlay-modal {
  transform: translateY(0) scale(1);
}

/* Close */
.mt-overlay-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--mt-text-muted);
  cursor: pointer;
  transition: color var(--mt-duration-fast) ease;
}

.mt-overlay-close:hover {
  color: var(--mt-text-heading);
}

/* Content */
.mt-overlay-content h2,
.mt-overlay-content h3 {
  margin-bottom: 12px;
  font-weight: var(--mt-weight-bold);
}

.mt-overlay-content p {
  font-size: 0.95rem;
  line-height: var(--mt-leading-normal);
  color: var(--mt-text-muted);
}

/* Actions */
.mt-overlay-actions {
  margin-top: 22px;
}

.mt-overlay-actions .btn {
  padding-left: 34px;
  padding-right: 34px;
}

/* Don't show again */
.mt-overlay-dont-show {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--mt-text-muted);
}

/* Responsive */
@media (max-width: 575px) {
  .mt-overlay-modal {
    margin-top: 16vh;
    padding: 26px 22px;
  }
}
