/* 
 * Shef Stroy - Premium Authentic Dark Navy Theme Stylesheet
 * 24/7 Professional Engineering, Repair & Restoration Services in Tashkent
 * Reference: https://masterprof.uz/ | Production: https://www.shef-stroy.uz/
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-main: #0B132B;
  --bg-secondary: #0F172A;
  --bg-card: #162238;
  --bg-card-hover: #1E2D4A;
  --border-subtle: #243552;
  --border-focus: #10B981;
  --emerald-primary: #10B981;
  --emerald-hover: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.35);
  --gold-secondary: #F59E0B;
  --gold-hover: #D97706;
  --gold-glow: rgba(245, 158, 11, 0.35);
  --text-white: #FFFFFF;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
}

* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-white);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #080D1F;
}
::-webkit-scrollbar-thumb {
  background: #243552;
  border-radius: 9999px;
  border: 2px solid #080D1F;
}
::-webkit-scrollbar-thumb:hover {
  background: #10B981;
}

/* Rich Navy Background Radial Glows */
.bg-glow-radial {
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.12) 0%, rgba(11, 19, 43, 0) 65%),
              radial-gradient(circle at 100% 40%, rgba(245, 158, 11, 0.08) 0%, rgba(11, 19, 43, 0) 55%),
              #0B132B;
}

.bg-pattern-grid {
  background-image: radial-gradient(rgba(36, 53, 82, 0.45) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Elevated Dark Navy Cards & Glassmorphism */
.glass-panel {
  background: rgba(22, 34, 56, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(36, 53, 82, 0.9);
}

.glass-nav {
  background: rgba(11, 19, 43, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(36, 53, 82, 0.75);
}

/* HERO SECTION FULL-WIDTH PHOTOGRAPHIC BACKGROUND & OVERLAYS */
.hero-wrapper {
  position: relative;
  background-color: #0B132B;
  background-image: 
    linear-gradient(180deg, rgba(11, 19, 43, 0.82) 0%, rgba(11, 19, 43, 0.89) 65%, #0B132B 100%),
    linear-gradient(90deg, rgba(11, 19, 43, 0.94) 0%, rgba(11, 19, 43, 0.82) 50%, rgba(11, 19, 43, 0.68) 100%),
    url('../images/hero/hero-background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .hero-wrapper {
    background-position: 70% center;
    background-image: 
      linear-gradient(180deg, rgba(11, 19, 43, 0.86) 0%, rgba(11, 19, 43, 0.94) 75%, #0B132B 100%),
      url('../images/hero/hero-background.jpg');
  }
}

/* Fallback gradient if hero background file is pending user upload */
.hero-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.18) 0%, transparent 60%),
              radial-gradient(circle at 75% 60%, rgba(245, 158, 11, 0.14) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
}

/* SERVICES SECTION WIDE PHOTOGRAPHIC BACKGROUND & OVERLAY */
.services-section-bg {
  position: relative;
  background-color: #0B132B;
  background-image: 
    linear-gradient(180deg, #0B132B 0%, rgba(11, 19, 43, 0.93) 15%, rgba(11, 19, 43, 0.95) 85%, #0B132B 100%),
    url('../images/services/services-background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* CONTACT SECTION WIDE PHOTOGRAPHIC BACKGROUND & OVERLAY */
.contact-section-bg {
  position: relative;
  background-color: #0B132B;
  background-image: 
    linear-gradient(180deg, #0B132B 0%, rgba(11, 19, 43, 0.91) 15%, rgba(11, 19, 43, 0.94) 85%, #080D1A 100%),
    url('../images/contact/contact-background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Buttons */
.btn-emerald {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.btn-emerald:hover {
  background: linear-gradient(135deg, #34D399 0%, #059669 100%);
  box-shadow: 0 6px 26px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}
.btn-emerald:active {
  transform: translateY(0);
}

.btn-gold {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #0B132B;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.btn-gold:hover {
  background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%);
  box-shadow: 0 6px 26px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}
.btn-gold:active {
  transform: translateY(0);
}

.btn-dark-outline {
  background: rgba(22, 34, 56, 0.7);
  border: 1px solid #243552;
  color: #F8FAFC;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-dark-outline:hover {
  border-color: #10B981;
  background: rgba(22, 34, 56, 0.95);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.18);
}

/* Multi-language Switcher */
.lang-switcher-wrap {
  display: inline-flex;
  align-items: center;
  background: #0B132B;
  border: 1px solid #334155;
  padding: 3px;
  border-radius: 12px;
  gap: 3px;
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
}

.lang-btn {
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(71, 85, 105, 0.5);
  outline: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 5px 9px;
  min-width: 34px;
  height: 30px;
  border-radius: 8px;
  color: #E2E8F0; /* High-contrast readable text in all states */
  background: rgba(30, 41, 59, 0.75); /* Distinct visible pill for inactive buttons */
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.lang-btn:hover {
  color: #FFFFFF;
  background: #1E293B;
  border-color: #64748B;
}
.lang-btn:active {
  transform: scale(0.96);
}
.lang-btn.active {
  background: linear-gradient(135deg, #10B981, #059669) !important;
  color: #FFFFFF !important;
  font-weight: 900 !important;
  border: 1px solid #34D399 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.45) !important;
}

/* Service Card Hover States */
.service-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(36, 53, 82, 0.85);
  background: rgba(22, 34, 56, 0.75);
}
.service-card:hover {
  border-color: rgba(16, 185, 129, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(16, 185, 129, 0.18), 0 0 0 1px rgba(16, 185, 129, 0.18);
  background-color: #1a2842;
}

/* Service Card Image & Hover Zoom Effect */
.service-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #0b132b;
}

.service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  will-change: transform;
}

.service-card:hover .service-img {
  transform: scale(1.08);
}

.service-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 19, 43, 0.1) 0%, rgba(22, 34, 56, 0.5) 65%, rgba(22, 34, 56, 1) 100%);
  pointer-events: none;
}

/* Clean Professional Fallback Placeholder */
.service-img-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #0e172a 0%, #152238 100%);
  border-bottom: 1px solid rgba(36, 53, 82, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
}

/* Category & Info Pills */
.info-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(36, 53, 82, 0.8);
  color: #38BDF8;
}

/* Pulse Beacon */
@keyframes beacon-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.beacon-emerald {
  animation: beacon-pulse 2s infinite;
}

/* Floating Action Button (FAB) */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.fab-btn {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  text-decoration: none;
}
.fab-btn:hover {
  transform: scale(1.08) translateY(-3px);
}

.fab-telegram {
  background: linear-gradient(135deg, #229ED9 0%, #1579b3 100%);
  color: white;
  box-shadow: 0 8px 22px rgba(34, 158, 217, 0.4);
}
.fab-telegram:hover {
  box-shadow: 0 10px 28px rgba(34, 158, 217, 0.6);
}

.fab-phone {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.4);
}
.fab-phone:hover {
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.65);
}

.fab-phone::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  border: 2px solid #10B981;
  opacity: 0.8;
  animation: fab-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes fab-ping {
  75%, 100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.fab-tooltip {
  position: absolute;
  right: 68px;
  background: #162238;
  color: #F8FAFC;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #243552;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.fab-btn:hover .fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* 4 Category Service Tab Buttons & Horizontal Touch Scroll */
.services-tabs-wrapper {
  position: relative;
  width: 100%;
}

.services-tabs-scroll {
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch; /* Momentum scrolling on iOS */
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
  padding-top: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
}
.services-tabs-scroll::-webkit-scrollbar {
  display: none;
}

@media (max-width: 640px) {
  .services-tabs-scroll {
    /* Bleed to screen edges with padding for natural touch swiping */
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    scroll-padding-left: 1rem;
    scroll-padding-right: 1rem;
  }
}

.services-tabs-list {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: max-content;
  background: rgba(11, 19, 43, 0.95);
  border: 1px solid rgba(51, 65, 85, 0.85);
  padding: 6px;
  border-radius: 18px;
  gap: 8px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.tab-btn {
  position: relative;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #E2E8F0;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 14px;
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0; /* CRITICAL: prevents button squishing/wrapping on mobile */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}
.tab-btn .tab-icon {
  color: #94A3B8;
  transition: color 0.25s ease;
  flex-shrink: 0;
}
.tab-btn:hover {
  color: #FFFFFF;
  background: rgba(36, 53, 82, 0.9);
  border-color: #64748B;
}
.tab-btn:hover .tab-icon {
  color: #FFFFFF;
}
.tab-btn:active {
  transform: scale(0.97);
}

.tab-btn.active {
  color: #FFFFFF;
  background: #162238;
  font-weight: 800;
}

/* Category specific active borders, icons, and glows */
.tab-btn.active[data-category="plumbing"] {
  border-color: #10B981;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.28);
}
.tab-btn.active[data-category="plumbing"] .tab-icon {
  color: #10B981;
}

.tab-btn.active[data-category="electrical"] {
  border-color: #F59E0B;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.28);
}
.tab-btn.active[data-category="electrical"] .tab-icon {
  color: #F59E0B;
}

.tab-btn.active[data-category="welding"] {
  border-color: #F97316;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.28);
}
.tab-btn.active[data-category="welding"] .tab-icon {
  color: #F97316;
}

.tab-btn.active[data-category="furniture"] {
  border-color: #06B6D4;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.28);
}
.tab-btn.active[data-category="furniture"] .tab-icon {
  color: #06B6D4;
}

/* Bottom glow underline per category */
.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  border-radius: 9999px;
}
.tab-btn.active[data-category="plumbing"]::after {
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
}
.tab-btn.active[data-category="electrical"]::after {
  background: #F59E0B;
  box-shadow: 0 0 10px #F59E0B;
}
.tab-btn.active[data-category="welding"]::after {
  background: #F97316;
  box-shadow: 0 0 10px #F97316;
}
.tab-btn.active[data-category="furniture"]::after {
  background: #06B6D4;
  box-shadow: 0 0 10px #06B6D4;
}

/* 20% DISCOUNT PROMOTIONAL BADGE & SECTION */
.promo-badge-glow {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
  border: 1px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.25), inset 0 0 12px rgba(245, 158, 11, 0.15);
}

.promo-giant-number {
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 45%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 16px rgba(245, 158, 11, 0.3));
}


/* Modal styles */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  transform: scale(0.95) translateY(15px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.active .modal-box {
  transform: scale(1) translateY(0);
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  transform: translateY(-30px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Accordion */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1);
}
.accordion-item.active .accordion-content {
  max-height: 350px;
  transition: max-height 0.4s ease-in-out;
}
.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  color: #10B981;
}

/* Form inputs */
.input-premium {
  background-color: #0F172A;
  border: 1px solid #243552;
  color: #FFFFFF;
  transition: all 0.2s ease;
}
.input-premium:focus {
  outline: none;
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Price Highlight */
.price-tag {
  color: #10B981;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

/* Mobile Nav Drawer */
.mobile-drawer {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 55;
}
.mobile-drawer.open {
  transform: translateX(0);
}

/* Mobile Utility & Touch Ergonomics */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & MEDIA QUERIES (CRITICAL FIXES)
   ========================================================================== */

/* Universal text wrapping & container constraint */
h1, h2, h3, h4, h5, h6, p, span, a, label, div, button {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  html, body {
    max-width: 100vw;
    width: 100%;
    overflow-x: hidden !important;
    position: relative;
  }

  .lang-switcher-wrap {
    padding: 2px;
    gap: 2px;
    border-radius: 10px;
  }

  .lang-btn {
    min-height: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 7px;
  }

  .tab-btn {
    padding: 9px 14px;
    font-size: 12px;
    min-height: 42px;
    gap: 6px;
  }

  /* Hero Section Mobile Adjustments */
  .hero-wrapper {
    padding-top: 2rem !important;
    padding-bottom: 3.5rem !important;
  }

  .hero-wrapper h1 {
    font-size: clamp(1.75rem, 7.5vw, 2.75rem) !important;
    line-height: 1.15 !important;
  }

  /* Hero form container mobile fit */
  .lead-capture-form input,
  .lead-capture-form select {
    font-size: 14px !important;
  }

  /* "Почему нам доверяют" advantages cards on mobile */
  #benefits .glass-panel {
    padding: 1.25rem 1.25rem !important;
  }
}

@media (max-width: 480px) {
  /* Smaller screens (iPhone SE, compact Androids) */
  .hero-wrapper h1 {
    font-size: 1.55rem !important;
    line-height: 1.15 !important;
  }

  .hero-wrapper .promo-badge-glow {
    font-size: 11px !important;
    padding: 0.35rem 0.75rem !important;
  }

  /* Form padding on small mobile */
  .glass-panel {
    border-radius: 1.25rem !important;
  }

  /* Floating mobile contact bar safety */
  .mobile-bottom-bar {
    padding: 8px 12px !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* MOBILE FIXED BOTTOM CONTACT BAR (md:hidden) */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: rgba(11, 19, 43, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(36, 53, 82, 0.9);
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
  .mobile-bottom-bar {
    display: none !important;
  }
}
