/*
Theme Name: Granit Master
Theme URI: https://example.com/
Author: Vladislav Vvedensky
Author URI: https://example.com/
Description: Легкая тема WordPress для сайта-визитки гранитной мастерской.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: granit-master
*/

:root {
  /* Light premium base (can be overridden via Customizer inline vars). */
  --gm-bg: #f6f7fb;
  --gm-surface: #ffffff;
  --gm-surface-2: #eef2f7;
  --gm-text: #0b1220;
  --gm-muted: #516073;
  --gm-border: rgba(16, 24, 40, 0.12);

  --gm-primary: #1f4cff;
  --gm-primary-ink: #ffffff;
  --gm-accent: #c8a46a;
  --gm-accent-ink: #1b1b1b;

  --gm-success: #1f8a4c;
  --gm-error: #c73838;

  --gm-radius-sm: 10px;
  --gm-radius-md: 16px;
  --gm-radius-lg: 22px;

  --gm-shadow-sm: 0 6px 18px rgba(16, 24, 40, 0.08);
  --gm-shadow-md: 0 16px 40px rgba(16, 24, 40, 0.12);
  --gm-shadow-lg: 0 28px 90px rgba(16, 24, 40, 0.16);

  --gm-container: 1120px;
  --gm-gutter: 18px;
  --gm-focus: rgba(31, 76, 255, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--gm-bg);
  color: var(--gm-text);
  text-rendering: optimizeLegibility;
  /* Prevent accidental horizontal overflow on mobile. */
  overflow-x: hidden;
}

body {
  position: relative;
  padding-top: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: var(--gm-site-bg-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.02);
  transition: filter 0.22s ease, transform 0.22s ease;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(246, 247, 251, 0.84);
  transition: background 0.22s ease, backdrop-filter 0.22s ease;
}

a {
  color: var(--gm-primary);
  text-decoration: none;
}

a:hover {
  color: #1839c8;
}

.gm-container {
  width: min(var(--gm-container), calc(100% - 32px));
  margin: 0 auto;
}

/* Premium Header - Complete Overhaul */
.gm-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.gm-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px 0 0;
}

.gm-logo {
  margin-bottom: 25px;
  display: block;
  transition: transform 0.3s ease;
}

.gm-logo:hover {
  transform: scale(1.02);
}

.gm-logo-img {
  display: block;
  height: 110px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.gm-nav {
  width: 100%;
  background: #1a1a1a; /* Dark charcoal for a premium look */
  border-top: 1px solid #000;
}

.gm-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  width: 100%;
  max-width: var(--gm-container);
  margin: 0 auto;
}

.gm-nav-list > li {
  flex: 1;
  position: relative;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.gm-nav-list > li:first-child {
  border-left: 1px solid rgba(255,255,255,0.1);
}

.gm-nav a,
.gm-nav-services-btn {
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  text-decoration: none;
}

.gm-nav a:hover,
.gm-nav-services-btn:hover {
  background: #ffffff;
  color: #000000;
}

/* Elegant Dropdown */
.gm-services-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 280px; /* Fixed width for better typography */
  background: #ffffff;
  border: 1px solid #eeeeee;
  z-index: 10000;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
  display: none;
  border-radius: 0 0 8px 8px;
}

.gm-nav-services:hover .gm-services-menu,
.gm-nav-services-btn[aria-expanded="true"] + .gm-services-menu {
  display: block;
  animation: gm-fade-in 0.2s ease-out;
}

@keyframes gm-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gm-services-menu li {
  border: none;
}

.gm-services-menu a {
  color: #333333;
  text-transform: none;
  font-weight: 500;
  font-size: 14px;
  height: auto;
  padding: 12px 25px;
  justify-content: flex-start;
  text-align: left;
  letter-spacing: normal;
}

.gm-services-menu a:hover {
  background: #f8f9fa;
  color: var(--gm-primary);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .gm-nav-list {
    flex-wrap: wrap;
  }
  .gm-nav-list > li {
    flex: 1 1 33.333%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
}

@media (max-width: 600px) {
  .gm-logo-img {
    height: 70px;
  }
  .gm-nav-list > li {
    flex: 1 1 50%;
  }
  .gm-nav a, .gm-nav-services-btn {
    font-size: 11px;
    height: 54px;
    letter-spacing: 0.5px;
  }
  .gm-services-menu {
    width: 100%;
    position: fixed;
    left: 0;
    top: auto;
  }
}


/* Hero & Background */
.gm-hero {
  position: relative;
  padding: 100px 0;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.gm-hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  z-index: 0;
}

.gm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 40%, rgba(255,255,255,0) 100%);
  z-index: 1;
}

.gm-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
}


.gm-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.6px;
}

.gm-hero p {
  margin: 0 0 28px;
  color: rgba(11, 18, 32, 0.72);
  font-size: 18px;
  max-width: 720px;
}

.gm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(16, 24, 40, 0.14);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  will-change: transform;
}

.gm-btn-primary {
  background: var(--gm-primary);
  color: var(--gm-primary-ink);
  border-color: rgba(31, 76, 255, 0.24);
  position: relative;
  overflow: hidden;
}

.gm-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--gm-shadow-sm);
  background: #153be0;
  color: var(--gm-primary-ink);
}

.gm-btn-secondary {
  color: var(--gm-text);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
}

.gm-btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--gm-shadow-sm);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(16, 24, 40, 0.18);
  color: var(--gm-text);
}

/* Buttons are often links: prevent global a:hover from overriding. */
.gm-btn:hover,
.gm-btn:focus,
.gm-btn:focus-visible {
  text-decoration: none;
}

.gm-btn--shine::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -30%;
  width: 42%;
  height: 180%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  transform: rotate(18deg) translateX(-220%);
  opacity: 0.9;
}

.gm-btn--shine:hover::after {
  animation: gm-shine 1.1s ease both;
}

.gm-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.gm-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--gm-border);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
  font-size: 13px;
  color: rgba(11, 18, 32, 0.78);
  white-space: nowrap;
}

.gm-badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gm-accent);
  box-shadow: 0 0 0 4px rgba(200, 164, 106, 0.22);
}

.gm-hero-panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius-lg);
  box-shadow: var(--gm-shadow-md);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.gm-hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 280px at 30% 20%, rgba(31, 76, 255, 0.12), rgba(31, 76, 255, 0) 60%);
  pointer-events: none;
}

.gm-hero-panel h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 16px;
}

.gm-hero-panel p {
  position: relative;
  margin: 0 0 14px;
  color: rgba(11, 18, 32, 0.66);
  font-size: 14px;
}

.gm-section {
  padding: 64px 0;
}

.gm-section-title {
  margin: 0 0 28px;
  font-size: clamp(24px, 3vw, 34px);
}

.gm-section-subtitle {
  margin: -18px 0 26px;
  color: rgba(11, 18, 32, 0.64);
  max-width: 720px;
}

.gm-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gm-service-card {
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius-md);
  padding: 18px 18px 16px;
  box-shadow: var(--gm-shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.gm-service-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.gm-service-card p {
  margin: 0;
  color: rgba(11, 18, 32, 0.68);
  line-height: 1.5;
}

.gm-service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--gm-shadow-md);
  border-color: rgba(31, 76, 255, 0.20);
}

.gm-service-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(31, 76, 255, 0.16), rgba(200, 164, 106, 0.18));
  border: 1px solid rgba(16, 24, 40, 0.10);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.gm-service-icon svg {
  width: 22px;
  height: 22px;
  fill: rgba(11, 18, 32, 0.82);
}

.gm-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.gm-card {
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius-lg);
  box-shadow: var(--gm-shadow-sm);
  padding: 18px;
}

.gm-adv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gm-adv-item {
  border-radius: var(--gm-radius-md);
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(238, 242, 247, 0.62));
  border: 1px solid var(--gm-border);
  box-shadow: var(--gm-shadow-sm);
}

.gm-adv-item strong {
  display: block;
  margin-bottom: 8px;
}

.gm-steps {
  display: grid;
  gap: 12px;
}

.gm-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 14px;
  border-radius: var(--gm-radius-md);
  border: 1px solid var(--gm-border);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--gm-shadow-sm);
}

.gm-step-num {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(31, 76, 255, 0.10);
  border: 1px solid rgba(31, 76, 255, 0.16);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: rgba(11, 18, 32, 0.86);
}

.gm-step p {
  margin: 0;
  color: rgba(11, 18, 32, 0.68);
  line-height: 1.5;
}

.gm-warranty {
  border-radius: var(--gm-radius-lg);
  padding: 18px;
  background: radial-gradient(720px 320px at 20% 0%, rgba(200, 164, 106, 0.18), rgba(200, 164, 106, 0) 60%),
    radial-gradient(720px 320px at 80% 10%, rgba(31, 76, 255, 0.14), rgba(31, 76, 255, 0) 60%),
    rgba(255, 255, 255, 0.82);
  border: 1px solid var(--gm-border);
  box-shadow: var(--gm-shadow-md);
}

.gm-warranty strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}

.gm-warranty p {
  margin: 0;
  color: rgba(11, 18, 32, 0.68);
  line-height: 1.55;
}

.gm-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gm-gallery-item {
  margin: 0;
  border-radius: var(--gm-radius-lg);
  overflow: hidden;
  border: 1px solid var(--gm-border);
  background: var(--gm-surface);
  box-shadow: var(--gm-shadow-sm);
  position: relative;
}

.gm-gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.25s ease;
}

.gm-gallery-item figcaption {
  padding: 10px 12px;
  color: rgba(11, 18, 32, 0.74);
  font-size: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.94));
  border-top: 1px solid rgba(16, 24, 40, 0.08);
}

.gm-gallery-item--catalog figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gm-order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(31, 76, 255, 0.18);
  background: rgba(31, 76, 255, 0.08);
  color: rgba(11, 18, 32, 0.82);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.gm-gallery-link {
  display: block;
  color: inherit;
  position: relative;
}

.gm-gallery-link:hover img {
  transform: scale(1.04);
}

.gm-gallery-link:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--gm-focus);
  border-radius: var(--gm-radius-lg);
}

.gm-contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.gm-contact-card {
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius-lg);
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--gm-shadow-sm);
}

.gm-form {
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius-lg);
  background: rgba(255, 255, 255, 0.92);
  padding: 20px;
  box-shadow: var(--gm-shadow-md);
}

.gm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gm-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gm-form-group-full {
  grid-column: span 2;
}

.gm-form label {
  font-size: 13px;
  color: rgba(11, 18, 32, 0.72);
}

.gm-form input,
.gm-form textarea,
.gm-form select {
  width: 100%;
  border: 1px solid rgba(16, 24, 40, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--gm-text);
  padding: 10px 12px;
  font: inherit;
  transition: box-shadow 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.gm-form input:focus,
.gm-form textarea:focus,
.gm-form select:focus {
  outline: 0;
  border-color: rgba(31, 76, 255, 0.38);
  box-shadow: 0 0 0 4px var(--gm-focus);
}

.gm-form textarea {
  min-height: 120px;
  resize: vertical;
}

.gm-honeypot {
  position: absolute !important;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.gm-form-status {
  margin-top: 10px;
  font-size: 14px;
}

.gm-form-status--success {
  color: var(--gm-success);
}

.gm-form-status--error {
  color: var(--gm-error);
}

.gm-footer {
  border-top: 1px solid var(--gm-border);
  padding: 24px 0;
  color: rgba(11, 18, 32, 0.66);
  font-size: 14px;
}

.gm-footer-brand {
  margin: 0 0 12px;
}

.gm-footer-logo {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(74vw, 420px);
  object-fit: contain;
}

/* Reveal animations are enabled only when JS confirms animate mode.
   This keeps content visible if script fails for any reason. */
.gm-js.gm-animate .gm-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gm-js.gm-animate .gm-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.gm-js.gm-animate .gm-reveal--stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gm-js.gm-animate .gm-reveal--stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.gm-text-block {
  border: 1px solid var(--gm-border);
  background: var(--gm-surface);
  border-radius: var(--gm-radius-lg);
  padding: 18px;
  box-shadow: var(--gm-shadow-sm);
  color: rgba(11, 18, 32, 0.76);
  line-height: 1.65;
}

.gm-thanks-card {
  border: 1px solid var(--gm-border);
  background: var(--gm-surface);
  border-radius: var(--gm-radius-lg);
  padding: 14px;
  box-shadow: var(--gm-shadow-sm);
}

.gm-thanks-card img {
  width: 50%;
  max-width: 480px;
  margin: 0 auto;
  height: auto;
  border-radius: 12px;
  display: block;
}

.gm-thanks-card--highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 247, 0.76));
}

.gm-thanks-meta strong {
  display: block;
  margin: 0 0 6px;
  font-size: 18px;
}

.gm-thanks-meta p {
  margin: 0;
  color: rgba(11, 18, 32, 0.68);
}

/* Lightbox */
.gm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20050;
  display: none;
}

.gm-lightbox.is-open {
  display: block;
}

.gm-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.76);
  backdrop-filter: blur(7px);
}

.gm-lightbox-dialog {
  position: relative;
  width: fit-content;
  max-width: min(980px, calc(100% - 24px));
  margin: 4vh auto 0;
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--gm-radius-lg);
  box-shadow: var(--gm-shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.28);
  overflow: hidden;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.gm-lightbox.is-open .gm-lightbox-dialog {
  transform: translateY(0);
  opacity: 1;
}

.gm-lightbox-img {
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  margin: 0 auto;
  display: block;
  object-fit: contain;
  background: #0b1220;
}

.gm-lightbox-caption {
  padding: 12px 14px;
  color: rgba(11, 18, 32, 0.74);
  border-top: 1px solid rgba(16, 24, 40, 0.08);
}

.gm-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(16, 24, 40, 0.12);
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.gm-lightbox-close:hover {
  transform: translateY(-1px);
  box-shadow: var(--gm-shadow-sm);
}

.gm-lightbox-open .gm-header {
  filter: blur(3px) brightness(0.72);
}

.gm-lightbox-open body::before,
body.gm-lightbox-open::before {
  filter: blur(7px) brightness(0.58);
  transform: scale(1.06);
}

.gm-lightbox-open body::after,
body.gm-lightbox-open::after {
  background: rgba(11, 18, 32, 0.42);
  backdrop-filter: blur(3px);
}

@keyframes gm-shine {
  0% {
    transform: rotate(18deg) translateX(-220%);
  }
  100% {
    transform: rotate(18deg) translateX(420%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gm-reveal,
  .gm-reveal--stagger > *,
  .gm-btn,
  .gm-gallery-item img,
  .gm-lightbox-dialog,
  .gm-btn--shine::after {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .gm-services-grid,
  .gm-gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gm-contacts-grid {
    grid-template-columns: 1fr;
  }

  .gm-hero-inner {
    grid-template-columns: 1fr;
  }

  /* Prevent header/nav from breaking layout on tablets/mobiles. */
  .gm-header-inner {
    gap: 12px;
  }

  /* Allow flex items to shrink (prevents body horizontal scroll). */
  .gm-nav {
    min-width: 0;
    flex: 1 1 auto;
  }

  .gm-header-actions {
    flex: 0 0 auto;
  }

  .gm-nav ul {
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gm-nav ul::-webkit-scrollbar {
    display: none;
  }

  .gm-nav a {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .gm-header-inner {
    min-height: 60px;
  }

  .gm-nav ul {
    gap: 10px;
  }

  .gm-services-grid,
  .gm-gallery-grid,
  .gm-form-grid {
    grid-template-columns: 1fr;
  }

  .gm-form-group-full {
    grid-column: span 1;
  }

  .gm-header-phone {
    display: none;
  }

  /* Stack header rows on mobile to avoid overflow. */
  .gm-header-inner {
    flex-wrap: wrap;
    padding: 8px 0;
  }

  .gm-nav {
    flex: 1 1 100%;
    order: 3;
  }

  .gm-header-actions {
    order: 2;
    margin-left: auto;
  }

  .gm-nav ul {
    width: 100%;
    padding-bottom: 6px;
  }

  .gm-adv-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile polish */
  :root {
    --gm-gutter: 14px;
  }

  .gm-container {
    width: min(var(--gm-container), calc(100% - 24px));
  }

  .gm-logo {
    font-size: 16px;
    letter-spacing: -0.2px;
  }

  .gm-logo-img {
    height: 92px;
    max-width: 75vw;
  }

  .gm-header-actions .gm-btn {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 14px;
  }

  .gm-hero {
    padding: 62px 0 44px;
  }

  .gm-hero h1 {
    font-size: clamp(28px, 8vw, 40px);
  }

  .gm-hero p {
    font-size: 16px;
    margin-bottom: 18px;
  }

  .gm-hero-actions {
    gap: 10px;
  }

  .gm-hero-actions .gm-btn {
    width: 100%;
    justify-content: center;
  }

  .gm-hero-badges {
    gap: 8px;
    margin-top: 14px;
  }

  .gm-badge {
    padding: 8px 10px;
    font-size: 12px;
  }

  .gm-hero-panel {
    padding: 14px;
  }

  .gm-hero-panel .gm-btn {
    width: 100%;
  }

  .gm-section {
    padding: 52px 0;
  }

  .gm-section-title {
    margin-bottom: 18px;
  }

  .gm-section-subtitle {
    margin: -10px 0 18px;
    font-size: 14px;
  }

  .gm-service-card,
  .gm-contact-card,
  .gm-form {
    border-radius: 18px;
  }

  .gm-service-card {
    padding: 16px;
  }

  .gm-gallery-item img {
    height: 220px;
  }

  .gm-gallery-item--catalog figcaption {
    flex-wrap: wrap;
  }

  .gm-thanks-card img {
    width: 80%;
  }

  .gm-step {
    grid-template-columns: 40px 1fr;
    padding: 12px;
  }

  .gm-step-num {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .gm-form {
    padding: 16px;
  }

  .gm-form input,
  .gm-form textarea,
  .gm-form select {
    border-radius: 12px;
  }

  .gm-form button.gm-btn {
    width: 100%;
  }

  .gm-lightbox-dialog {
    margin: 10vh auto 0;
    width: min(980px, calc(100% - 16px));
  }
}

@media (max-width: 420px) {
  .gm-logo-img {
    height: 80px;
    max-width: 70vw;
  }

  .gm-footer-logo {
    height: 40px;
  }

  .gm-header-actions .gm-btn {
    padding: 8px 12px;
  }

  .gm-hero {
    padding: 56px 0 40px;
  }

  .gm-gallery-item img {
    height: 200px;
  }
}

/* Header v3: clean sticky with balanced navigation */
.gm-header {
  position: relative;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
}

.gm-header .gm-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 14px;
}

.gm-header .gm-logo {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gm-header .gm-logo-img {
  height: 108px;
  width: auto;
  max-width: min(42vw, 420px);
  object-fit: contain;
}

.gm-header .gm-nav {
  width: auto;
  max-width: 100%;
  background: transparent;
  border: 0;
}

.gm-header .gm-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  justify-content: center;
  width: min(980px, calc(100vw - 32px));
}

.gm-header .gm-nav-list > li {
  margin: 0;
  border: 0;
  position: relative;
}

.gm-header .gm-nav-list > li:first-child {
  border: 0;
}

.gm-header .gm-nav a,
.gm-header .gm-nav-services-btn {
  width: 100%;
  min-height: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease,
    box-shadow 0.16s ease;
}

.gm-header .gm-nav a:hover,
.gm-header .gm-nav-services-btn:hover,
.gm-header .gm-nav-services-btn[aria-expanded="true"] {
  color: #ffffff;
  background: #1f4cff;
  border-color: #1f4cff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(31, 76, 255, 0.24);
}

.gm-header .gm-nav a:focus-visible,
.gm-header .gm-nav-services-btn:focus-visible,
.gm-header .gm-services-menu a:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(31, 76, 255, 0.26);
}

.gm-header .gm-services-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: max(290px, 100%);
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.18);
  z-index: 10050;
}

.gm-header .gm-nav-services:hover .gm-services-menu,
.gm-header .gm-nav-services-btn[aria-expanded="true"] + .gm-services-menu {
  display: block;
}

.gm-header .gm-services-menu li {
  margin: 0;
}

.gm-header .gm-services-menu a {
  min-height: 40px;
  height: auto;
  justify-content: flex-start;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #111827;
  text-transform: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.gm-header .gm-services-menu a:hover {
  background: rgba(31, 76, 255, 0.1);
  color: #1839c8;
  transform: none;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .gm-header .gm-header-inner {
    gap: 12px;
    padding: 10px 0 12px;
  }

  .gm-header .gm-logo {
    justify-content: center;
  }

  .gm-header .gm-nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(720px, calc(100vw - 28px));
  }
}

@media (max-width: 760px) {
  .gm-header .gm-logo-img {
    height: 88px;
    max-width: 80vw;
  }

  .gm-header .gm-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(520px, calc(100vw - 24px));
  }

  .gm-header .gm-nav a,
  .gm-header .gm-nav-services-btn {
    min-height: 44px;
    height: 44px;
    font-size: 12px;
    letter-spacing: 0.25px;
  }

  .gm-header .gm-services-menu {
    width: 100%;
    left: 0;
    right: auto;
  }
}

@media (max-width: 460px) {
  .gm-header .gm-logo-img {
    height: 74px;
  }

  .gm-header .gm-nav a,
  .gm-header .gm-nav-services-btn {
    font-size: 11px;
    padding: 0 6px;
  }
}

/* Header v4 overrides: compact with logo on the left */
.gm-header .gm-header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}

.gm-header .gm-logo {
  justify-content: flex-start;
}

.gm-header .gm-logo-img {
  height: 58px;
  max-width: min(30vw, 250px);
}

.gm-header .gm-nav {
  width: 100%;
}

.gm-header .gm-nav-list {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  gap: 8px;
}

.gm-header .gm-nav a,
.gm-header .gm-nav-services-btn {
  min-height: 40px;
  height: 40px;
  font-size: 12px;
  padding: 0 8px;
}

.gm-header .gm-services-menu {
  top: 100%;
  width: 360px;
  max-width: min(92vw, 420px);
  left: 0;
}

.gm-header .gm-nav-services-btn[aria-expanded="true"] + .gm-services-menu,
.gm-header .gm-nav-dropdown:focus-within .gm-services-menu,
.gm-header .gm-nav-dropdown:hover .gm-services-menu {
  display: block;
}

.gm-section[id],
#form {
  scroll-margin-top: calc(var(--gm-header-height, 110px) + 14px);
}

.gm-scroll-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
  color: #111827;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: none;
  z-index: 20030;
}

.gm-scroll-top.is-visible {
  display: grid;
  place-items: center;
}

.gm-gallery-item--catalog {
  background: #f6f8fc;
}

.gm-gallery-item--catalog img {
  object-fit: contain;
  background: #ffffff;
  height: 300px;
  padding: 8px;
}

.gm-gallery-item--catalog figcaption {
  justify-content: space-between;
  flex-wrap: nowrap;
}

.gm-catalog-variant {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: lowercase;
}

.gm-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(16, 24, 40, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}

.gm-lightbox-nav--prev {
  left: 10px;
}

.gm-lightbox-nav--next {
  right: 10px;
}

.gm-lightbox-zoom-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  gap: 6px;
}

.gm-lightbox-zoom-btn {
  min-width: 40px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(16, 24, 40, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.gm-lightbox-zoom-reset {
  min-width: 64px;
  font-size: 12px;
}

.gm-lightbox-img {
  transform-origin: center center;
  transition: transform 0.14s ease;
  cursor: zoom-in;
}

@media (max-width: 1100px) {
  .gm-header .gm-header-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gm-header .gm-logo {
    justify-content: center;
  }

  .gm-header .gm-nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .gm-header .gm-logo-img {
    height: 48px;
    max-width: 56vw;
  }

  .gm-header .gm-nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gm-header .gm-services-menu {
    position: fixed;
    top: calc(var(--gm-header-height, 120px) + 6px);
    left: 12px;
    right: 12px;
    width: auto;
    max-height: min(72vh, 520px);
    overflow-y: auto;
    z-index: 20020;
  }

  .gm-gallery-item--catalog img {
    height: 240px;
  }
}

@media (max-width: 460px) {
  .gm-header .gm-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
