/* ============================================================
   Shared site styles — NW Granite & Marble
   Centralised here so updates apply everywhere at once.
   ============================================================ */

/* Navigation hover effect (desktop dropdown wrapper) */
.nav-hover-wrapper:hover { background-color: white; }
.nav-hover-wrapper:hover a { color: #2c3c51; }
.nav-hover-wrapper a:hover { color: #000000 !important; }

/* Font smoothing & image rendering */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Logo enhancements */
#menu-logo {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.2s ease, filter 0.2s ease;
}
#menu-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Touch tap highlight */
button, a, [role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Shared animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---- Mobile / responsive global fixes ---- */

/* Prevent any element from causing horizontal page overflow */
html, body { overflow-x: hidden; }

/* reCAPTCHA widget is 304px wide by default — scale it down on very narrow screens */
@media (max-width: 360px) {
  .g-recaptcha {
    transform: scale(0.82);
    transform-origin: left center;
  }
}

/* Keep iframes and embeds within their containers */
iframe { max-width: 100%; }
