:root {
  --primary: #1a3a5c;
  --primary-dark: #0f2a44;
  --primary-light: #2a5a8c;
  --accent: #e8491d;
  --accent-hover: #d03d15;
  --dark: #1a1a2e;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --white: #fff;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
  --radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  overflow-x: hidden;
}

/* Top Bar */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 2px solid var(--accent);
}
.top-bar a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: var(--transition);
}
.top-bar a:hover {
  color: var(--white);
}

/* Header */
.main-header {
  background: var(--white);
  padding: 6px 0;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.main-header .logo img {
  height: 90px;
}
.main-header .header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.header-phone {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
.header-phone:hover {
  color: var(--accent);
}
.header-phone small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray-600);
  display: block;
}

/* Navigation */
.navbar-area {
  background: var(--primary);
  position: sticky;
  top: 96px;
  z-index: 1020;
}
.navbar-area .nav .nav-link {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  padding: 10px 20px;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  border-bottom: 3px solid transparent;
}
.navbar-area .nav .nav-link i {
  font-size: 1rem;
  opacity: 0.7;
}
.navbar-area .nav .nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}
.navbar-area .nav .nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
  border-bottom-color: rgba(255,255,255,0.4);
}
.navbar-area .navbar-toggler {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}

/* Hero Slider */
.hero-slider .carousel-item {
  height: 85vh;
  min-height: 500px;
  position: relative;
}
.hero-slider .carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26,58,92,0.85) 0%, rgba(15,42,68,0.7) 100%);
  z-index: 1;
}
.hero-slider .slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slider .carousel-caption {
  z-index: 2;
  bottom: 50%;
  transform: translateY(50%);
  left: 10%;
  right: 10%;
  text-align: left;
}
.hero-slider .carousel-caption h1 {
  font-size: 3.2rem;
  font-weight: 800;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 20px;
}
.hero-slider .carousel-caption p {
  font-size: 1.2rem;
  max-width: 550px;
  opacity: 0.95;
  margin-bottom: 30px;
}
.hero-slider .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(26,58,92,0.7);
  border-radius: 50%;
  padding: 30px;
  background-size: 50%;
}

/* Section Titles */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin-top: 10px;
}
.section-title-center::after {
  margin-left: auto;
  margin-right: auto;
}
.section-title-light {
  color: var(--white);
}
.section-subtitle {
  color: var(--gray-600);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* About Section */
.about-section {
  background: var(--white);
}
.about-stats .stat-item {
  text-align: center;
  padding: 25px 15px;
  background: var(--gray-100);
  border-radius: var(--radius);
  transition: var(--transition);
}
.about-stats .stat-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.about-stats .stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
}
.about-stats .stat-label {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-top: 5px;
}

/* Service Cards */
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.service-card .card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.service-card .card-body {
  padding: 20px 25px 30px;
}
.service-card h5 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 15px;
}
.service-card .btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  border-radius: 50px;
  padding: 6px 20px;
  font-size: 0.85rem;
}
.service-card .btn-outline-primary:hover {
  background: var(--primary);
  color: var(--white);
}

/* Advantages Bar */
.advantages-bar {
  background: var(--primary);
  color: var(--white);
  padding: 40px 0;
}
.advantage-item {
  text-align: center;
  padding: 15px;
}
.advantage-item .icon {
  font-size: 3rem;
  margin-bottom: 10px;
  color: var(--accent);
}
.advantage-item h6 {
  font-weight: 700;
  font-size: 1rem;
}
.advantage-item p {
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0;
}

/* Product Cards */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid var(--gray-200);
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}
.product-card .product-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.product-card .product-body {
  padding: 20px;
}
.product-card h5 {
  font-weight: 700;
  color: var(--primary);
}
.product-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* Work Cards */
.work-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
}
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.work-card .work-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}
.work-card .work-body {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.work-card h5 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1.1rem;
}
.work-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0;
}
@media (max-width: 767px) {
  .work-card .work-img {
    height: 200px;
  }
}

/* Works Page Rows */
.works-row {
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 40px;
}
.works-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.works-row h3 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}
.works-row p {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
}
@media (max-width: 767px) {
  .works-row {
    padding-bottom: 30px;
  }
  .works-row .img-fluid {
    margin-bottom: 20px;
  }
  .works-row h3 {
    font-size: 1.2rem;
  }
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}
.page-header h1 {
  font-weight: 800;
  font-size: 2.5rem;
}
.page-header .breadcrumb {
  background: transparent;
  justify-content: center;
  margin: 0;
}
.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.page-header .breadcrumb-item.active {
  color: var(--white);
}
.page-header .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,0.5);
}

/* Contact Section */
.contact-section {
  background: var(--gray-100);
}
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.contact-card .icon {
  margin-top: 2px;
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.contact-card .icon {
  font-size: 2rem;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-card h6 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.contact-card p {
  color: var(--gray-600);
  margin: 0;
  font-size: 0.9rem;
}
.contact-card a {
  color: var(--gray-600);
  text-decoration: none;
  transition: var(--transition);
}
.contact-card a:hover {
  color: var(--accent);
}

/* Contact Form */
.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.contact-form-wrap .form-control {
  border-radius: 8px;
  padding: 12px 15px;
  border: 1px solid var(--gray-300);
  font-size: 0.95rem;
}
.contact-form-wrap .form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.15);
}
.contact-form-wrap .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 50px;
  padding: 12px 35px;
  font-weight: 600;
}
.contact-form-wrap .btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Sidebar Card */
.sidebar-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  position: sticky;
  top: 110px;
}
.sidebar-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}
.sidebar-card ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-200);
}
.sidebar-card ul li:last-child {
  border-bottom: none;
}
.sidebar-card ul li a {
  color: var(--gray-800);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
}
.sidebar-card ul li a:hover {
  color: var(--accent);
  padding-left: 5px;
}

/* Contact Info Card */
.contact-info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.contact-info-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.contact-item:last-child {
  margin-bottom: 0;
}
.contact-item .icon {
  font-size: 1.5rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-item .fw-bold {
  font-size: 0.9rem;
  color: var(--primary);
}
.contact-item a {
  color: var(--gray-600);
  text-decoration: none;
  transition: var(--transition);
}
.contact-item a:hover {
  color: var(--accent);
}
.contact-item p, .contact-item small {
  color: var(--gray-600);
  font-size: 0.9rem;
}

/* Map */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-placeholder {
  height: 350px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.map-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.map-placeholder-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.map-placeholder-content i {
  font-size: 3rem;
  color: var(--accent);
}
.map-placeholder-content span {
  font-size: 1.2rem;
  line-height: 1.5;
}

/* Footer */
.main-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 25px 0 0;
}
.main-footer h5 {
  color: var(--white);
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}
.main-footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.main-footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition);
}
.main-footer a:hover {
  color: var(--accent);
  padding-left: 3px;
}
.main-footer ul {
  list-style: none;
  padding: 0;
}
.main-footer ul li {
  padding: 5px 0;
}
.main-footer .footer-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.main-footer .footer-links-inline a {
  white-space: nowrap;
}
.main-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  margin-top: 40px;
  text-align: center;
  font-size: 0.85rem;
}

/* Buttons */
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  border-radius: 50px;
  padding: 10px 28px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(232,73,29,0.3);
}
.btn-outline-accent {
  border-color: var(--accent);
  color: var(--accent);
  border-radius: 50px;
  padding: 10px 28px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-outline-accent:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

/* Offcanvas */
.offcanvas {
  background: var(--primary-dark);
}
.offcanvas .nav-link {
  color: rgba(255,255,255,0.85);
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 1rem;
}
.offcanvas .nav-link:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

/* Modal */
.modal-content {
  border-radius: var(--radius);
  border: none;
}
.modal-header {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
}
.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

/* Cookie Notice */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  color: rgba(255,255,255,0.9);
  padding: 10px 0;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  font-size: 0.82rem;
}
.cookie-notice a {
  color: var(--accent);
  text-decoration: underline;
}
.cookie-notice a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 1199px) {
  .navbar-area {
    position: static;
  }
  .navbar-area .nav .nav-link {
    padding: 10px 15px;
  }
  .hero-slider .carousel-item {
    height: 40vh;
    min-height: 280px;
  }
  .hero-slider .carousel-caption h1 {
    font-size: 2.2rem;
  }
  .hero-slider .carousel-caption p {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 767px) {
  .top-bar .text-end {
    text-align: start !important;
    margin-top: 5px;
  }
  .main-header .logo img {
    height: 45px;
  }
  .header-phone {
    font-size: 0.95rem;
  }
  .main-header .header-right {
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  .main-header .btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
  }
  .hero-slider .carousel-item {
    height: 35vh;
    min-height: 250px;
  }
  .hero-slider .carousel-caption h1 {
    font-size: 1.6rem;
  }
  .hero-slider .carousel-caption p {
    font-size: 0.9rem;
  }
  .hero-slider .carousel-caption {
    left: 5%;
    right: 5%;
  }
  .page-header h1 {
    font-size: 1.8rem;
  }
  .page-header {
    padding: 40px 0;
  }
  .contact-form-wrap {
    padding: 25px;
  }
  .main-footer {
    text-align: center;
  }
  .main-footer h5::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 575px) {
  .hero-slider .carousel-item {
    height: 35vh;
    min-height: 220px;
  }
  .hero-slider .carousel-caption h1 {
    font-size: 1.3rem;
  }
  .about-stats .stat-number {
    font-size: 1.6rem;
  }
  .about-stats .stat-item {
    padding: 15px 10px;
  }
}

/* Partners Section */
.partners-section {
  background: var(--gray-100);
  padding: 45px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}
.partners-section .section-title {
  font-size: 1.6rem;
  margin-bottom: 10px;
}
.partners-section .section-subtitle {
  margin-bottom: 30px;
}
.partners-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 35px 70px;
}
.partner-logo {
  height: 80px;
  width: auto;
  opacity: 0.55;
  filter: grayscale(100%);
  transition: var(--transition);
  object-fit: contain;
}
.partner-logo:hover {
  opacity: 0.95;
  filter: grayscale(0);
  transform: scale(1.05);
}
@media (max-width: 767px) {
  .partners-list {
    gap: 25px 40px;
  }
  .partner-logo {
    height: 55px;
  }
  .partners-section {
    padding: 30px 0;
  }
}
@media (max-width: 575px) {
  .partner-logo {
    height: 42px;
  }
}



/* --- Автостилизация всех таблиц --- */
table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  border: 1px solid var(--gray-300);
  vertical-align: top;
}
table th,
table td {
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
}
table thead th {
  background: var(--gray-100);
  border-bottom-width: 2px;
  font-weight: 600;
}
table tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.02);
}


/* --- Сообщение об успешной отправке формы --- */
.form-success {
  padding: 5px;
  text-align: center;
}
.form-success-icon {
  font-size: 3.5rem;
  color: #198754;
  margin-bottom: 0.75rem;
}
.form-success h4 {
  margin-bottom: 0.5rem;
}
.form-success hr {
  width: 60px;
  margin: 1rem auto;
  opacity: 0.3;
}
.form-success p {
  margin-bottom: 0.25rem;
}

/* --- Ошибки валидации формы --- */
.contact-form-wrap .form-error,
.contact-form-wrap .error {
  display: block;
  color: #dc3545;
  font-size: 0.8rem;
  margin-top: 2px;
  font-weight: normal;
}


