/* ===================================================================
   Z WIRE — Global Stylesheet
   Extracted from monolithic index.html for cacheability & performance
   =================================================================== */

/* --- Base Typography --- */
body {
  font-family: "Inter", sans-serif;
}

h1,
h2,
h3,
h4,
.font-heading {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #c5181b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a01316;
}

/* --- Navigation Active State --- */
.nav-link.active {
  color: #c5181b;
  border-bottom: 2px solid #c5181b;
}

/* --- Floating Contact Actions --- */
.contact-action-stack {
  position: fixed;
  right: 0;
  bottom: 5rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.contact-action-button {
  box-sizing: border-box;
  display: flex;
  width: 3.5rem;
  height: 3.5rem;
  align-items: center;
  justify-content: center;
  border-left: 3px solid #111111;
  border-radius: 3px 0 0 3px;
  background: #c5181b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.contact-action-button:hover {
  background: #a01316;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  transform: translateX(-2px);
}
.contact-action-icon {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
}
.contact-action-icon i {
  font-size: 1.35rem;
}
.contact-action-call .contact-action-icon {
  color: #c5181b;
}
.contact-action-whatsapp .contact-action-icon {
  color: #25d366;
}
.contact-action-copy {
  display: none;
}

/* --- Custom Select Dropdown --- */
.custom-select-wrapper {
  position: relative;
  user-select: none;
}
.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s;
}
.custom-select-trigger:hover,
.custom-select-trigger.active {
  border-color: #c5181b;
}
.custom-select-trigger.active .arrow {
  transform: rotate(180deg);
}
.custom-select-options {
  position: absolute;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  transform-origin: top;
  transform: scaleY(0.95);
}
.custom-select-options.open {
  opacity: 1;
  pointer-events: auto;
  transform: scaleY(1);
}
.custom-select-options.open-up {
  bottom: 100%;
  top: auto;
  margin-bottom: 4px;
  transform-origin: bottom;
}
.custom-select-options.open-down {
  top: 100%;
  bottom: auto;
  margin-top: 4px;
  transform-origin: top;
}
.custom-option {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #4b5563;
  cursor: pointer;
  transition: background 0.2s;
}
.custom-option:hover {
  background: #fef2f2;
  color: #c5181b;
}
.custom-optgroup {
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  background: #f9fafb;
  letter-spacing: 0.05em;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  cursor: default;
}

/* --- Chain Link Wire Loading Animation --- */
.chain-wire {
  fill: none;
  stroke: #c5181b;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.4));
  stroke-dasharray: 250;
  stroke-dashoffset: 250;
  animation: weaveChain 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes weaveChain {
  0% {
    stroke-dashoffset: 250;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

/* --- Page Transition --- */
.page-fade-in {
  animation: pageFadeIn 0.3s ease-out forwards;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Loader Session Hiding --- */
html.loader-hidden #global-loader {
  display: none !important;
}

/* Performance, accessibility and responsive hardening */
img, video { max-width: 100%; }
img { height: auto; }
html { text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; }
:focus-visible { outline: 3px solid #c5181b; outline-offset: 3px; }
@media (max-width: 767px) {
  .has-contact-actions #app-scroller {
    padding-bottom: 4.25rem;
  }
  .contact-action-stack {
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: row;
    gap: 0;
    border-top: 3px solid #111111;
    background: #c5181b;
  }
  .contact-action-button {
    width: 50%;
    height: 4rem;
    gap: 0.65rem;
    padding: 0.4rem 0.75rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .contact-action-button + .contact-action-button {
    border-left: 1px solid rgba(255, 255, 255, 0.35);
  }
  .contact-action-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    color: #fff;
    line-height: 1.2;
    text-align: left;
  }
  .contact-action-copy strong {
    font-family: "Oswald", sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
  }
  .contact-action-copy span {
    margin-top: 0.1rem;
    color: #f3f4f6;
    font-size: 0.68rem;
  }
  .contact-action-button:hover {
    transform: none;
    box-shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}