/* ═══════════════════════════════════════════════════════════════════════════════
   LAYOUT
   Utility bar, Header/Nav, Footer, Mobile sticky bar
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Site Loader ─────────────────────────────────────────────────────────── */

#site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, visibility 0.45s;
}

#site-loader.loader--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mss-red);
  position: relative;
  flex-shrink: 0;
}

/* Two expanding ripple rings staggered for continuous pulse */
.loader__dot::before,
.loader__dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--mss-red);
  animation: loader-ripple 1.8s ease-out infinite;
}

.loader__dot::after {
  animation-delay: 0.9s;
}

@keyframes loader-ripple {
  0%   { transform: scale(1);   opacity: 0.55; }
  100% { transform: scale(4.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #site-loader { display: none !important; }
}

/* ─── Utility Bar ─────────────────────────────────────────────────────────── */

.utility-bar {
  background-color: var(--mss-red);
  border-bottom: 1px solid rgba(0,0,0,0.15);
  padding-block: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
}

.utility-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.utility-bar__left,
.utility-bar__right {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.utility-bar__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.utility-bar__item:hover { color: var(--mss-white); }

.utility-bar__item svg {
  width: 14px;
  height: 14px;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.utility-bar__item--phone,
.utility-bar__item--instagram {
  color: var(--mss-white);
  font-weight: 600;
}

.utility-bar__item--phone:hover     { color: rgba(255,255,255,0.8); }
.utility-bar__item--instagram:hover { color: rgba(255,255,255,0.8); }

.utility-bar__item--social {
  color: var(--mss-white);
}
.utility-bar__item--social:hover { color: rgba(255,255,255,0.8); }
.utility-bar__item--social svg {
  width: 15px;
  height: 15px;
  color: var(--mss-white);
}


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

/* ─── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background-color: #ffffff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8e8e8;
  transition: background-color var(--dur-base), box-shadow var(--dur-base);
}

.site-header.is-scrolled {
  background-color: #ffffff;
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: var(--space-8);
}

/* Logo */
.header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header__logo img {
  height: 44px;
  width: auto;
}

.header__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header__logo-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: #121212;
  letter-spacing: 0.02em;
}

.header__logo-tagline {
  font-size: var(--text-xs);
  color: var(--mss-red);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Custom logo — constrain by height so it aligns with header__inner */
a.custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
}
a.custom-logo-link img,
img.custom-logo {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Primary Nav */
.primary-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.primary-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #444;
  text-decoration: none;
  border-radius: var(--radius);
  transition: color var(--dur-fast), background-color var(--dur-fast);
}

.primary-nav a:hover,
.primary-nav .current-menu-item a,
.primary-nav .current_page_item a {
  color: #121212;
  background-color: rgba(0,0,0,0.05);
}

.primary-nav .current-menu-item a {
  color: var(--mss-red);
  background-color: rgba(200,16,46,0.07);
}

/* Header CTA buttons */
.header__ctas {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Hamburger — minimal, no box */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:active { opacity: 0.6; }

.nav-toggle__line {
  width: 24px;
  height: 2px;
  background-color: #121212;
  border-radius: 1px;
  transform-origin: center;
  transition: transform 0.3s var(--ease-out),
              opacity 0.2s ease,
              width 0.25s ease;
}

/* Shorter third line — modern asymmetric touch */
.nav-toggle__line:nth-child(3) { width: 16px; }

/* Open state: equalise then X-morph */
/* gap=6px + height=2px → center-to-center = 8px */
.nav-toggle.is-open .nav-toggle__line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle__line:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.nav-toggle.is-open .nav-toggle__line:nth-child(3) { width: 24px; transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav — full-screen overlay, Servixa-inspired */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background-color: var(--mss-dark);
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--dur-slow) var(--ease-out),
              visibility var(--dur-slow);
}

.mobile-nav.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

/* Panel header — brand left, close right */
.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  height: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background-color: var(--mss-dark);
  position: sticky;
  top: 0;
  z-index: 1;
}

.mobile-nav__head-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

/* Custom logo inside nav panel */
.mobile-nav__head-logo-wrap {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.mobile-nav__head-logo-wrap img,
.mobile-nav__head-logo-wrap .custom-logo {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.mobile-nav__head-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--mss-white);
  letter-spacing: 0.02em;
}

.mobile-nav__head-sub {
  font-size: 0.67rem;
  color: var(--mss-red);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Close × button inside panel */
.mobile-nav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  color: var(--mss-white);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color var(--dur-fast), border-color var(--dur-fast);
}

.mobile-nav__close:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}

.mobile-nav__inner {
  padding: var(--space-4) var(--space-5) var(--space-12);
}

/* Nav links — text left, red arrow square right */
.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0;
}

.mobile-nav ul a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--mss-white);
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.mobile-nav ul a:hover { color: rgba(255,255,255,0.65); }

/* Red chevron square on every link */
.mobile-nav ul a::after {
  content: '';
  display: block;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--mss-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: background-color var(--dur-fast);
}

.mobile-nav ul a:hover::after { background-color: #a0081c; }

/* Stagger-in when panel opens */
@keyframes mss-nav-link-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

.mobile-nav.is-open li {
  animation: mss-nav-link-in 0.35s var(--ease-out) both;
}
.mobile-nav.is-open li:nth-child(1) { animation-delay: 0.08s; }
.mobile-nav.is-open li:nth-child(2) { animation-delay: 0.13s; }
.mobile-nav.is-open li:nth-child(3) { animation-delay: 0.18s; }
.mobile-nav.is-open li:nth-child(4) { animation-delay: 0.23s; }
.mobile-nav.is-open li:nth-child(5) { animation-delay: 0.28s; }
.mobile-nav.is-open li:nth-child(6) { animation-delay: 0.33s; }

/* Contact strip — red circle badge + text */
.mobile-nav__contact-strip {
  margin-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: var(--space-2);
}

.mobile-nav__ci-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast);
}

.mobile-nav__ci-row:hover { color: var(--mss-white); }

.mobile-nav__ci-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mss-red);
  color: var(--mss-white);
  flex-shrink: 0;
}

/* Social icons row */
.mobile-nav__social {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.07);
}

.mobile-nav__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  transition: color var(--dur-fast);
}

.mobile-nav__social-link:hover { color: var(--mss-white); }

/* ─── Header Responsive ───────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .primary-nav              { display: none; }
  .header__ctas             { display: none; }
  .nav-toggle               { display: flex; }
  .header__inner            { height: 60px; }
  /* Logo — smaller on mobile */
  .header__logo img         { height: 32px; }
  a.custom-logo-link img,
  img.custom-logo           { height: 36px; }
  .header__logo-name        { font-size: 1rem; }
  .header__logo-tagline     { display: none; }
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background-color: var(--mss-dark);
  border-top: 3px solid var(--mss-red);
  padding-top: var(--space-16);
}

/* Footer text must be explicitly light (body is now light-themed) */
.site-footer,
.site-footer p,
.site-footer li,
.site-footer address {
  color: rgba(255,255,255,0.55);
}

.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6 {
  color: #ffffff;
}

.site-footer a {
  color: rgba(255,255,255,0.55);
}

.site-footer a:hover {
  color: #ffffff;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--mss-border);
}

.footer__brand-name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--mss-white);
  margin-bottom: var(--space-3);
}

.footer__brand-desc {
  font-size: var(--text-sm);
  color: var(--mss-grey);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  max-width: 320px;
}

.footer__social {
  display: flex;
  gap: var(--space-3);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--mss-dark-3);
  border: 1px solid var(--mss-border);
  color: var(--mss-grey);
  text-decoration: none;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}

.footer__social-link:hover {
  background-color: var(--mss-red);
  border-color: var(--mss-red);
  color: var(--mss-white);
}

.footer__social-link svg { width: 18px; height: 18px; }

.footer__col-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--mss-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-5);
}

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

.footer__nav a,
.footer__nav span {
  font-size: var(--text-sm);
  color: var(--mss-grey);
  text-decoration: none;
  transition: color var(--dur-fast);
  position: relative;
}

.footer__nav a:hover { color: var(--mss-white); }

.footer__nav span {
  cursor: default;
}

/* Service item tooltips (on spans — no link) */
.footer__nav [data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  max-width: 260px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
}

.footer__nav [data-tip]:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.footer__contact-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-4);
}

.footer__contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--mss-red);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer__contact-item a,
.footer__contact-item p {
  font-size: var(--text-sm);
  color: var(--mss-grey);
  text-decoration: none;
  line-height: 1.5;
}

.footer__contact-item a:hover { color: var(--mss-white); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-5);
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--mss-muted);
}

.footer__bottom a {
  color: var(--mss-muted);
}

.footer__bottom a:hover { color: var(--mss-grey); }

/* Footer responsive */
@media (max-width: 960px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}

@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ─── Mobile Sticky Action Bar ───────────────────────────────────────────── */

.mobile-actions {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background-color: var(--mss-dark);
  border-top: 1px solid var(--mss-border);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(0,0,0,0.6);
  width: 100%;
  box-sizing: border-box;
}

.mobile-actions__inner {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.mobile-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
  min-height: 52px;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-action-btn:active { transform: scale(0.95); opacity: 0.88; }

.mobile-action-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* WhatsApp — PRIMARY: dominant green, takes most space */
.mobile-action-btn--whatsapp {
  flex: 2.2;
  background-color: #25D366;
  color: #ffffff;
  font-size: 12px;
}

/* Call — SECONDARY: dark, neutral, clearly secondary */
.mobile-action-btn--call {
  flex: 1.5;
  background-color: #1e1e1e;
  color: #ffffff;
  border: 1.5px solid rgba(255,255,255,0.12);
}

/* Directions — TERTIARY: subtle, icon-forward */
.mobile-action-btn--directions {
  flex: 1;
  background-color: rgba(200,16,46,0.1);
  color: var(--mss-red);
  border: 1.5px solid rgba(200,16,46,0.2);
  font-size: 10px;
}

/* Animate bar in on load — opacity only, no transform (avoids iOS Safari fixed+transform bug) */
@keyframes fade-in-bar {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (max-width: 768px) {
  .mobile-actions {
    display: block;
    animation: fade-in-bar 0.35s ease 0.5s both;
  }

  /* Push page content above sticky bar */
  body {
    padding-bottom: calc(77px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(77px + env(safe-area-inset-bottom));
  }
}

@supports (height: 100dvh) {
  @media (max-width: 768px) {
    body {
      min-height: 100dvh;
    }
  }
}
