:root {
  --primary-color: #00274A;
  --secondary-color: #0D53B3;
  --accent-color: #5597E1;
  --accent-light: #e8f1fb;
  --bg-color: #F8F9FA;
  --white: #FFFFFF;
  --text-color: #333333;
  --gradient-start: #00274A;
  --gradient-end: #0D53B3;
  --cta-color: #F2994A;
  --cta-hover: #E08936;
  
  /* Modern Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-hover: 0 25px 50px -12px rgb(0 39 74 / 0.25);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}


body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  letter-spacing: -0.02em;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ==================== Header ==================== */
.header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 150;
  transition: box-shadow var(--transition-smooth), background-color var(--transition-smooth);
}
.header.shrunk {
  box-shadow: var(--shadow-md);
  background-color: rgba(255, 255, 255, 0.98);
}
.header.shrunk .header-top {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
}

.header-top {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px 0;
  font-size: 14px;
  max-height: 200px;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.header-top a {
  color: var(--white);
  text-decoration: none;
  word-break: break-word;
  transition: opacity 0.3s;
}

.header-top a[href^="tel:"] {
  white-space: nowrap;
}

.header-top a:hover {
  opacity: 0.8;
}

.header-main {
  padding: 15px 0;
  transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.header.shrunk .header-main {
  padding: 5px 0;
}

.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--secondary-color);
  text-decoration: none;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.logo span {
  color: var(--accent-color);
}

.logo img {
  height: 50px;
  width: auto;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  mix-blend-mode: multiply;
}
.header.shrunk .logo img {
  height: 40px;
}

/* ==================== Navigation ==================== */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 5px;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  transition: color 0.3s;
  padding: 8px 12px;
  border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent-color);
  background-color: var(--accent-light);
}

/* Dropdown Menu Desktop */
.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: -20px;
  background-color: var(--white);
  min-width: 250px;
  box-shadow: 0 15px 35px rgba(0,39,74,0.1);
  border-radius: 12px;
  z-index: 1000;
  padding: 10px 0;
  border: 1px solid rgba(0,0,0,0.05);
}

.dropdown-content::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 10px;
  background: transparent;
}

.dropdown-content.mega-menu {
  min-width: 650px;
  padding: 20px;
  left: -250px; /* Centers the 650px menu under the button */
}
.mega-menu-column {
  flex: 1;
}
@media (min-width: 769px) {
  .dropdown:hover .mega-menu {
    display: flex;
    gap: 20px;
  }
}

.dropdown-content a {
  color: var(--primary-color);
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  font-weight: 500;
  border-radius: 0;
  font-size: 14px;
  border-bottom: 1px solid #f5f5f5;
  transition: background-color 0.2s, color 0.2s;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background-color: var(--accent-light);
  color: var(--accent-color);
}

@media (hover: hover) {
  .dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease;
  }
  .dropdown:hover .dropdown-content.mega-menu {
    display: flex;
  }
}

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

/* Mobile Dropdown Adjustments */
@media (max-width: 768px) {
  .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding: 0;
    margin-top: 10px;
    background-color: #f9f9f9;
  }

  .dropdown-content.mega-menu {
    min-width: 100%;
    padding: 0;
    flex-direction: column;
  }

  .dropdown.mobile-expanded .dropdown-content {
    display: block;
  }

  .dropdown.mobile-expanded .dropdown-content.mega-menu {
    display: flex;
  }

  .mega-menu-column {
    width: 100%;
  }

  .dropdown-content a {
    padding: 14px 10px 14px 20px;
    word-break: break-word;
    white-space: normal;
  }
}

.nav-menu a.active {
  color: var(--white);
  background-color: var(--secondary-color);
}

/* ==================== Burger Menu ==================== */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 10px;
  border: none;
  background: var(--white);
  border-radius: 50%;
  z-index: 200;
  transition: box-shadow 0.3s;
}

.burger.active {
  position: fixed;
  top: 20px;
  right: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.burger span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ==================== Hero Section ==================== */
.hero {
  background: linear-gradient(135deg, rgba(0,39,74,0.92) 0%, rgba(13,83,179,0.85) 100%), url('../img/kievnoch.webp') center/cover no-repeat;
  color: var(--white);
  padding: 120px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--bg-color), transparent);
  z-index: 1;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}



.hero h1 {
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  position: relative;
}

.hero p {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 35px;
  opacity: 0.9;
  line-height: 1.7;
  position: relative;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  position: relative;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}
.hero-badge:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 15px rgba(85, 151, 225, 0.4);
}

.hero-badge svg {
  flex-shrink: 0;
  color: var(--white);
}


.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 45px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--cta-color);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(242, 153, 74, 0.4);
}

.btn-primary:hover {
  background-color: #f3a864;
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(242, 153, 74, 0.6);
}

.btn-outline {
  background-color: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
  padding: 14px 43px;
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--secondary-color);
  border-color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.3);
}

/* ==================== Main Content Area ==================== */
.main-content {
  flex: 1;
  background-color: var(--white);
  margin: 30px auto;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  max-width: 1200px;
  width: calc(100% - 30px);
}

.page-title {
  color: var(--secondary-color);
  font-size: 36px;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  word-break: break-word;
}

.page-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
}

/* ==================== Services Grid ==================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.service-card {
  background: var(--white);
  border: none;
  border-radius: 16px;
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  text-align: center;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  position: relative;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.service-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 16px 16px 0 0;
  border: none;
  box-shadow: none;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.service-title {
  padding: 20px 15px;
  font-size: 17px;
  font-weight: 600;
  color: var(--secondary-color);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 90px;
  background: var(--white);
  position: relative;
  z-index: 2;
  transition: color var(--transition-smooth);
}

.service-card:hover .service-title {
  color: var(--accent-color);
}

.service-card a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
}

/* ==================== Content Typography ==================== */
.content-text {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  overflow-wrap: break-word;
}

.content-text h1, .content-text h2, .content-text h3 {
  color: var(--secondary-color);
  margin: 30px 0 15px;
  word-break: break-word;
}

.content-text p {
  margin-bottom: 20px;
}

.content-text ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.content-text li {
  margin-bottom: 10px;
}

/* Fix images from old HTML */
.content-text img {
  max-width: 100%;
  height: auto;
}

/* ==================== Contact Page ==================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

.contact-info-card {
  background: var(--accent-light);
  border-radius: 12px;
  padding: 30px;
}

.contact-info-card h2 {
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-size: 22px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 15px;
}

.contact-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-color);
}

.contact-item a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-item a:hover {
  color: var(--accent-color);
}

.contact-map {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  min-height: 400px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: 0;
  display: block;
}

/* ==================== Footer ==================== */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 50px 0 20px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--accent-color);
}

.footer-col p {
  margin-bottom: 10px;
  font-size: 15px;
  color: #D4D9DE;
  word-break: break-word;
}

.footer-col a {
  color: #D4D9DE;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  color: #B0B5B9;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  /* Burger visible */
  .burger {
    display: flex;
  }

  /* Mobile nav */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 80px 15px 30px;
    gap: 5px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 150;
    overflow-y: auto;
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-menu a {
    font-size: 16px;
    padding: 12px 10px;
    display: block;
    word-break: break-word;
    white-space: normal;
  }

  /* Overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 140;
  }

  .nav-overlay.open {
    display: block;
  }

  /* Header adjustments */
  .header-main .container {
    flex-wrap: nowrap;
  }

  .header-top {
    padding: 8px 0;
  }

  .header-top .container {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  /* Hide address/email line on mobile */
  .header-top .container > div:first-child {
    display: none;
  }

  /* Phone + language block */
  .header-top .container > div:nth-child(2) {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0; /* hide "Тел:" labels */
  }

  /* Phone numbers column */
  .header-top .container > div:nth-child(2) > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3 !important;
  }

  /* Hide the invisible "Тел:" spacer on mobile */
  .tel-label-spacer {
    display: none !important;
  }

  /* Hide "Тел:" text labels on mobile — only show phone numbers */
  .header-phones > div {
    font-size: 0 !important;
  }

  .header-top a[href^="tel:"] {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    display: block;
    white-space: nowrap;
    letter-spacing: 0.3px;
  }

  .lang-switcher {
    margin-top: 0;
    flex-shrink: 0;
  }

  .logo {
    font-size: 22px;
  }

  .logo img {
    height: 40px;
  }

  /* Main content */
  .main-content {
    padding: 20px 15px;
    width: calc(100% - 20px);
    margin: 15px auto;
  }

  .page-title {
    font-size: 28px;
  }

  /* Grid */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero {
    padding: 40px 0 50px;
  }

  .hero h1 {
    font-size: 32px;
    padding: 0 10px;
    overflow-wrap: break-word;
  }

  .hero p {
    font-size: 16px;
    padding: 0 15px;
  }

  .hero-badges {
    gap: 15px;
    padding: 0 15px;
  }

  .hero-badge {
    font-size: 13px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  /* Contact page */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Override old inline paddings and floats */
  .content-text > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .content-text img {
    float: none !important;
    display: block;
    margin: 20px auto;
  }
}

@media (max-width: 480px) {
  .hero-badges {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}
/* ==================== Internal Page Content ==================== */
.service-description {
  text-align: justify;
  margin-bottom: 20px;
}

.service-list {
  color: var(--secondary-color);
  margin-left: 20px;
  margin-top: 15px;
  line-height: 1.8;
}

/* ==================== Table Styles ==================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 30px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-radius: 8px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  background: var(--white);
}

.price-table th {
  background-color: var(--primary-color);
  color: var(--white);
  text-align: left;
  padding: 15px;
  font-weight: 600;
  font-size: 15px;
}

.price-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.price-table tbody tr:hover {
  background-color: var(--accent-light);
}

.price-table .category-row td {
  background-color: #f8f9fa;
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  padding: 15px;
  border-bottom: 2px solid #ddd;
}

.price-table .col-num {
  width: 50px;
  text-align: center;
  font-weight: 600;
}

.price-table .col-unit {
  width: 120px;
  text-align: center;
  color: #666;
}

.price-table .col-price {
  width: 150px;
  text-align: right;
  font-weight: 600;
  color: var(--secondary-color);
}
@media (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}

/* ==================== Animations ==================== */
.fade-in-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== Mobile Optimization Enhancements ==================== */
@media (max-width: 768px) {
  /* General Typography & Layout */
  .content-text {
    font-size: 15px;
    line-height: 1.6;
  }
  
  .service-description {
    text-align: left; /* Убираем выравнивание по ширине (justify), которое создает дыры в тексте на узких экранах */
  }

  .page-title {
    font-size: 26px;
    margin-bottom: 20px;
  }
  
  .page-title::after {
    margin-top: 10px;
    height: 2px;
    width: 50px;
  }

  /* Main Container */
  .main-content {
    padding: 20px 15px;
    width: calc(100% - 20px);
    margin: 10px auto;
    border-radius: 12px;
  }

  /* Images in content */
  .content-text img {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin: 15px auto 25px auto;
    width: 100%;
  }

  /* Lists */
  .service-list {
    margin-left: 5px;
    font-size: 14.5px;
  }

  /* Table styles for price.html */
  .price-table {
    min-width: 450px; /* Позволяем таблице сжиматься сильнее */
  }
  .price-table th, .price-table .category-row td {
    padding: 10px;
    font-size: 14px;
  }
  .price-table td {
    padding: 8px 10px;
    font-size: 13px;
  }
  .table-responsive {
    margin: 15px 0;
    border-radius: 8px;
  }

  /* Contact Page */
  .contact-info-card {
    padding: 20px;
  }
  .contact-item {
    font-size: 14px;
    margin-bottom: 12px;
  }
  .contact-map, .contact-map iframe {
    min-height: 300px;
  }

  /* Footer */
  .footer {
    padding: 35px 0 20px;
  }
  .footer-grid {
    gap: 25px;
    text-align: center; /* Центрируем подвал на мобильных */
  }
  .footer-col h3 {
    margin-bottom: 12px;
    font-size: 18px;
  }
}

/* Very small devices (phones in portrait) */
@media (max-width: 480px) {
  .page-title {
    font-size: 22px;
  }
  .content-text {
    font-size: 14px;
  }
  .price-table td {
    padding: 8px 6px;
    font-size: 12px;
  }
  .hero h1 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  /* Failsafe for hardcoded inline margins on mobile */
  .content-text h1, .content-text h2, .content-text h3, .content-text [style] {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ==================== Mobile Optimization Overhaul ==================== */
/* Header Scroll Behavior */
.header-top {
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  max-height: 200px;
  overflow: hidden;
}

/* FAB Button */
.fab-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  background-color: var(--secondary-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(13, 83, 179, 0.4);
  z-index: 9999;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}
.fab-button.fab-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.9);
}
.fab-button:hover, .fab-button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(13, 83, 179, 0.4);
}
.fab-button svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
}
.fab-button::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--secondary-color);
  border-radius: 50%;
  z-index: -1;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

@media (min-width: 769px) {
  .mobile-fab {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .pc-fab {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .header.shrunk .header-top {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
  }
  /* Services Grid - Option B (2 columns) */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .service-card {
    min-height: 120px;
  }
  .service-img {
    height: 100px;
    margin: 8px auto 0;
    width: calc(100% - 16px);
  }
  .service-title {
    font-size: 13px;
    padding: 8px;
    min-height: 50px;
  }
  .service-card:active {
    transform: scale(0.96);
  }

  /* Nav Menu Improvements */
  .nav-menu a {
    padding: 15px 20px;
    font-size: 18px;
  }
  
  /* Hero Badges */
  .hero-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .hero-badge {
    justify-content: center;
    font-size: 12px;
    text-align: center;
  }
  .hero-badge svg {
    width: 18px;
    height: 18px;
  }

  /* Price Table Card Layout */
  .price-table {
    display: block;
    width: 100%;
  }
  .price-table tbody, .price-table tr, .price-table td {
    display: block;
    width: 100%;
  }
  .price-table tr {
    margin-bottom: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid #eaeaea;
    position: relative;
    padding: 5px 0;
  }
  .price-table td {
    position: relative;
    padding: 10px 15px;
    border-bottom: none;
    text-align: left;
  }
  .price-table td:nth-child(1) { /* Number Badge */
    position: absolute;
    top: 12px;
    right: 15px;
    background: var(--accent-light);
    color: var(--accent-color);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    width: auto;
  }
  .price-table td:nth-child(2) { /* Name */
    font-weight: 600;
    color: var(--primary-color);
    font-size: 15px;
    padding-right: 50px; /* Space for the number badge */
  }
  .price-table td:nth-child(3) { /* Unit */
    font-style: italic;
    color: #666;
    padding-top: 0;
    font-size: 13px;
  }
  .price-table td:nth-child(3)::before {
    content: "Ед. измер.: ";
    font-style: normal;
    color: #999;
  }
  .price-table .category-row td {
    text-align: center !important;
    font-weight: 700;
    background: #f8f9fa;
    padding: 12px 15px !important;
    color: var(--secondary-color) !important;
  }
  .price-table .category-row td::before {
    display: none;
  }
  .price-table tr:first-child td {
    display: none; /* Hide original header row */
  }
}

@media (max-width: 480px) {
  /* Full width buttons */
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==================== Language Switcher ==================== */
.lang-switcher {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 3px;
  margin-left: 20px;
  font-weight: 600;
  align-items: center;
}
.lang-switcher a {
  color: var(--white);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  transition: all 0.3s ease;
  line-height: 1;
  display: inline-block;
}
.lang-switcher a.active {
  background-color: var(--white);
  color: var(--primary-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.lang-switcher a:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.1);
}
@media (max-width: 768px) {
  .lang-switcher {
      margin-left: 0;
      margin-top: 0;
      background: rgba(255, 255, 255, 0.15);
      border-radius: 25px;
      padding: 4px;
      display: inline-flex;
      gap: 0;
      justify-content: center;
  }
  .lang-switcher a {
      font-size: 13px;
      padding: 5px 14px;
      border-radius: 20px;
      background-color: transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
  }
}

/* ==================== Home Content Layout ==================== */
.home-content {
  width: 100%;
  background-color: var(--white);
}

.services-section {
  padding: 80px 0;
  background-color: var(--bg-color);
}



/* ==================== Service Inner Hero & Layout ==================== */
.inner-hero {
  background: linear-gradient(135deg, rgba(0,39,74,0.92) 0%, rgba(13,83,179,0.85) 100%), url('../img/elektromontaj_hero_bg.jpg') center/cover no-repeat;
  color: var(--white);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.inner-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--bg-color), transparent);
  z-index: 1;
  pointer-events: none;
}

.inner-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0z' fill='none'/%3E%3Cpath d='M0 0h1v20H0zM0 0h20v1H0z' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.inner-hero .container {
  position: relative;
  z-index: 2;
}

.inner-hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  color: #fff;
}

.inner-hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto 30px;
  position: relative;
  color: #fff;
}

.inner-hero-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  position: relative;
}

.inner-hero-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.inner-hero-badge:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 15px rgba(85, 151, 225, 0.4);
}

.inner-hero-badge svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--white);
}

.inner-hero .btn {
  position: relative;
}

.service-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 0 0 30px;
}

.service-gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  margin: 0;
}

.service-gallery img:hover {
  transform: translateY(-5px);
}

.styled-service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 25px 0 40px;
}

.styled-service-list .list-item {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.05);
  font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.styled-service-list .list-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.styled-service-list .list-item svg {
  width: 24px;
  height: 24px;
  color: var(--secondary-color);
  margin-right: 15px;
  flex-shrink: 0;
}

.service-bottom-cta {
  text-align: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

@media (max-width: 768px) {
  .inner-hero { padding: 40px 0; margin-bottom: 20px; }
  .inner-hero h1 { font-size: 26px; padding: 0 10px; overflow-wrap: break-word; }
  .inner-hero p { font-size: 15px; padding: 0 15px; }
  .inner-hero-badges { gap: 10px; padding: 0 10px; display: grid; grid-template-columns: 1fr; }
  .inner-hero-badge { justify-content: center; }
  
  .service-gallery { 
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px; 
  }
  .service-gallery img {
    height: 100px;
  }

  .styled-service-list .list-item { font-size: 14px; padding: 12px 15px; }
}

/* ==================== Bento Grid Redesign ==================== */
.services-grid.bento-layout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 25px;
  margin-top: 40px;
}

.bento-layout .service-card {
  height: 100%;
  min-height: auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: 1px solid rgba(255,255,255,0.4);
}

.bento-layout .service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(13, 83, 179, 0.2);
  border-color: rgba(85, 151, 225, 0.5);
}

.bento-layout .service-img {
  height: 100%;
  width: 100%;
  margin: 0;
  border-radius: 16px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-layout .service-card:hover .service-img {
  transform: scale(1.05);
}

.bento-layout .service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 39, 74, 0.95), transparent);
  z-index: 2;
  border-radius: 0 0 16px 16px;
  transition: height 0.4s ease, background 0.4s ease;
  pointer-events: none;
}

.bento-layout .service-card a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 4;
}

.bento-layout .service-card:hover::after {
  height: 90%;
  background: linear-gradient(to top, rgba(13, 83, 179, 0.9), rgba(0, 39, 74, 0.5), transparent);
}

.bento-layout .service-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: transparent;
  color: var(--white);
  z-index: 3;
  min-height: auto;
  padding: 25px 20px;
  font-size: 18px;
  justify-content: flex-start;
  align-items: flex-end;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  text-align: left;
  transition: transform 0.4s ease;
}

.bento-layout .service-card:hover .service-title {
  transform: translateY(-5px);
  color: var(--white);
}

.bento-large {
  grid-column: span 2;
  grid-row: span 2;
}
.bento-large .service-title { font-size: 26px; padding: 35px 30px; }

.bento-wide {
  grid-column: span 2;
  grid-row: span 1;
}

.bento-tall {
  grid-column: span 1;
  grid-row: span 2;
}

@media (max-width: 992px) {
  .services-grid.bento-layout {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  .bento-large { grid-column: span 2; grid-row: span 2; }
  .bento-wide { grid-column: span 2; grid-row: span 1; }
  .bento-tall { grid-column: span 1; grid-row: span 2; }
}

@media (max-width: 576px) {
  .services-grid.bento-layout {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  .bento-large, .bento-wide, .bento-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  .bento-large .service-title { font-size: 20px; }
}

/* ==================== Animated Hero Background ==================== */
.hero {
  position: relative;
  z-index: 1;
}
.hero-bg-animated {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(circle at 15% 50%, rgba(85, 151, 225, 0.6), transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(242, 153, 74, 0.25), transparent 50%);
  background-size: 200% 200%;
  animation: bgMesh 12s ease infinite;
  z-index: -1;
}

@keyframes bgMesh {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==================== View Transitions ==================== */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.4s;
  animation-timing-function: var(--transition-smooth);
}

/* ==================== Better Touch Targets & Feedback ==================== */
@media (max-width: 768px) {
  .hero-badges {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px;
    scrollbar-width: none;
  }
  .hero-badges::-webkit-scrollbar {
    display: none;
  }
  .hero-badge {
    flex: 0 0 auto;
    scroll-snap-align: center;
    white-space: nowrap;
  }
}

/* ==================== Pro Service Pages ==================== */
:root {
        --glass-bg: rgba(255, 255, 255, 0.85);
        --glass-border: rgba(255, 255, 255, 0.5);
        --glass-shadow: 0 8px 32px 0 rgba(13, 83, 179, 0.05);
        --neon-glow: 0 0 15px rgba(85, 151, 225, 0.4);
        --page-primary: #00274A;
        --page-secondary: #0D53B3;
        --page-accent: #5597E1;
    }
    
    .page-hero {
        background-color: var(--page-primary);
        padding: 120px 0 100px;
        color: white;
        text-align: center;
        position: relative;
        overflow: hidden;
    }
    
    .page-hero::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100px;
        background: linear-gradient(to top, var(--bg-color), transparent);
        z-index: 1;
    }
    
    .page-hero .container {
        position: relative;
        z-index: 2;
    }
    
    .page-hero h1 {
        font-size: 3.5rem;
        font-weight: 800;
        margin-bottom: 25px;
        text-shadow: 0 4px 15px rgba(0,0,0,0.4);
        animation: fadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .page-hero p {
        font-size: 1.25rem;
        max-width: 800px;
        margin: 0 auto 40px;
        opacity: 0;
        line-height: 1.6;
        animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
    }
    
    .hero-badges {
        display: flex;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
        margin-bottom: 45px;
        opacity: 0;
        animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.4s;
    }
    

    .hero-buttons {
        opacity: 0;
        animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.6s;
    }
    
    /* Modern Gallery */
    .pro-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        margin-top: -60px;
        position: relative;
        z-index: 10;
        padding: 0 15px;
        margin-bottom: 70px;
    }
    
    .pro-gallery img {
        width: 100%;
        height: 280px;
        object-fit: cover;
        border-radius: 20px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.15);
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
        border: 5px solid white;
    }
    
    .pro-gallery img:hover {
        transform: scale(1.03) translateY(-10px);
        box-shadow: 0 25px 50px rgba(13, 83, 179, 0.25);
    }
    
    /* Service Description Glassmorphism */
    .pro-content {
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 24px;
        padding: 50px;
        box-shadow: var(--glass-shadow);
        margin-bottom: 60px;
    }
    
    .pro-title {
        color: var(--page-primary);
        font-size: 2.4rem;
        margin-bottom: 30px;
        text-align: center;
        font-weight: 700;
        background: linear-gradient(135deg, var(--page-primary), var(--page-secondary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    .pro-highlight {
        background: rgba(13, 83, 179, 0.05);
        border-left: 6px solid var(--page-accent);
        padding: 30px 40px;
        border-radius: 16px;
        margin-bottom: 50px;
        font-size: 1.15rem;
        color: #333;
        box-shadow: 0 4px 20px rgba(0,0,0,0.03);
        position: relative;
        overflow: hidden;
    }
    
    .pro-highlight::after {
        content: '"';
        position: absolute;
        top: -10px;
        right: 20px;
        font-size: 120px;
        color: rgba(85, 151, 225, 0.1);
        font-family: serif;
        line-height: 1;
    }
    
    /* Grid List for Services */
    .pro-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 25px;
        margin-top: 30px;
    }
    
    .pro-card {
        background: white;
        border-radius: 16px;
        padding: 25px;
        display: flex;
        align-items: flex-start;
        gap: 20px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.02);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border: 1px solid rgba(0,0,0,0.04);
        position: relative;
        overflow: hidden;
    }
    
    .pro-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--page-secondary);
        transform: scaleY(0);
        transition: transform 0.4s ease;
        transform-origin: bottom;
    }
    
    .pro-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    }
    
    .pro-card:hover::before {
        transform: scaleY(1);
    }
    
    .pro-icon {
        background: rgba(232, 241, 251, 0.8);
        color: var(--page-secondary);
        width: 54px;
        height: 54px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: all 0.4s ease;
    }
    
    .pro-card:hover .pro-icon {
        background: var(--page-secondary);
        color: white;
        transform: scale(1.1);
    }
    
    .pro-text {
        font-size: 15px;
        font-weight: 500;
        color: #444;
        line-height: 1.5;
        margin-top: 4px;
    }
    
    .pro-paragraph {
        font-size: 1.05rem;
        line-height: 1.7;
        color: #555;
        margin-bottom: 20px;
    }
    
    .cta-banner {
        text-align: center;
        margin-top: 60px;
        padding: 50px 30px;
        background: linear-gradient(135deg, rgba(0, 39, 74, 0.85), rgba(13, 83, 179, 0.85)), url('../img/call_bg.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 24px;
        color: white;
        box-shadow: 0 20px 40px rgba(0,39,74,0.2);
        position: relative;
        overflow: hidden;
    }
    
    .cta-banner h3 {
        font-size: 2rem;
        margin-bottom: 15px;
        position: relative;
        z-index: 2;
        color: white;
        overflow-wrap: break-word;
    }

    .cta-banner p {
        font-size: 1.1rem;
        margin-bottom: 30px;
        opacity: 0.9;
        position: relative;
        z-index: 2;
    }
    

    @keyframes fadeDown {
        from { opacity: 0; transform: translateY(-30px); }
        to { opacity: 1; transform: translateY(0); }
    }
    @keyframes fadeUp {
        from { opacity: 0; transform: translateY(30px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    @media (max-width: 992px) {
        .page-hero h1 { font-size: 2.8rem; }
        .pro-content { padding: 40px 25px; }
    }
    
    @media (max-width: 768px) {
        .page-hero { padding: 100px 0 80px; }
        .page-hero h1 {
            font-size: 2rem;
            padding: 0 10px;
            overflow-wrap: break-word;
            word-break: break-word;
            hyphens: auto;
        }
        .page-hero p {
            font-size: 1.05rem;
            padding: 0 10px;
        }
        .pro-gallery { margin-top: -30px; }
        .pro-title { font-size: 1.8rem; }
        .pro-content { padding: 30px 20px; border-radius: 16px; }
        .pro-highlight { padding: 20px; font-size: 1.05rem; }
        .cta-banner { padding: 40px 20px; }
        .cta-banner h3 { font-size: 1.6rem; }
    }

    @media (max-width: 400px) {
        .page-hero h1 {
            font-size: 1.7rem;
        }
    }
/* ==================== Price Tabs ==================== */
/* ── Tab Navigation ── */
.work-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    border-bottom: 2px solid #e8eaf0;
    padding-bottom: 0;
}

.work-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.97em;
    font-weight: 500;
    color: var(--secondary-color, #666);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 6px 6px 0 0;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
}

.work-tab:hover {
    color: var(--primary-color, #1a56db);
    background: rgba(26, 86, 219, 0.04);
}

.work-tab.active {
    color: var(--primary-color, #1a56db);
    border-bottom-color: var(--primary-color, #1a56db);
    background: rgba(26, 86, 219, 0.06);
}

.work-tab svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.work-tab.active svg {
    opacity: 1;
}

/* ── Tab Content ── */
.work-tab-content {
    display: none;
    animation: fadeTabIn 0.25s ease;
}

.work-tab-content.active {
    display: block;
}

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

/* ── Mobile ── */
@media (max-width: 600px) {
    .work-tabs {
        gap: 4px;
    }
    .work-tab {
        padding: 10px 14px;
        font-size: 0.88em;
    }
}

/* ==================== Why Us Section ==================== */
.why-us-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.why-us-section .page-title {
    text-align: center;
    margin-bottom: 50px;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.why-us-card {
    background: var(--white);
    border-radius: 16px;
    padding: 35px 25px;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 39, 74, 0.04);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(13, 83, 179, 0.05);
    position: relative;
    overflow: hidden;
}

.why-us-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
    transform: scaleY(0);
    transition: transform 0.4s ease;
    transform-origin: bottom;
}

.why-us-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 39, 74, 0.08);
}

.why-us-card:hover::before {
    transform: scaleY(1);
}

.why-us-icon {
    width: 64px;
    height: 64px;
    background: rgba(232, 241, 251, 0.8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    margin-bottom: 25px;
    transition: all 0.4s ease;
}

.why-us-card:hover .why-us-icon {
    background: var(--secondary-color);
    color: var(--white);
    transform: scale(1.1);
}

.why-us-card h3 {
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.why-us-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 1200px) {
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .why-us-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .services-section, 
    .why-us-section {
        padding: 40px 0;
    }
    .why-us-section .page-title {
        margin-bottom: 30px;
    }
    .content-text p {
        text-align: left !important;
        line-height: 1.5;
    }
    h1, h2, h3 {
        line-height: 1.3;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    .pro-gallery, .service-gallery {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x proximity !important;
        scroll-behavior: smooth;
        gap: 15px !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        margin-bottom: 10px !important;
        padding-left: 10vw !important;
        padding-right: 10vw !important;
        padding-bottom: 10px !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }
    .pro-gallery::-webkit-scrollbar, .service-gallery::-webkit-scrollbar {
        display: none;
    }
    .pro-gallery img, .service-gallery img {
        flex: 0 0 80vw !important;
        scroll-snap-align: center !important;
        height: 220px !important;
        border-width: 2px !important;
        margin: 0 !important;
    }
    
    .gallery-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-bottom: 30px;
    }
    .gallery-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: #d1d5db;
        transition: background-color 0.3s, transform 0.3s;
    }
    .gallery-dot.active {
        background-color: var(--primary-color);
        transform: scale(1.2);
    }
}
.gallery-dots {
    display: none; /* hidden on desktop */
}

/* Two columns for pro-grid on mobile */
@media (max-width: 768px) {
    .pro-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .pro-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px 10px !important;
        gap: 12px !important;
    }
    .pro-icon {
        width: 44px !important;
        height: 44px !important;
    }
    .pro-icon svg {
        width: 22px;
        height: 22px;
    }
    .pro-text {
        font-size: 13px !important;
    }
    
    /* Fix generator image cropping on mobile */
    .bento-layout .service-card a[href*="generatori"] .service-img {
        object-position: center 75% !important;
    }
}

