/* ─── RESET & VARIABLES ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #1a4b8c;
  --blue-dark: #0f3366;
  --blue-light: #2260b0;
  --orange: #e87722;
  --orange-hover: #cf641a;
  --gray-bg: #f5f5f5;
  --gray-border: #ddd;
  --text: #333;
  --text-light: #666;
  --white: #fff;
  --header-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── HEADER ──────────────────────────────────────── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: var(--white);
  border-bottom: 3px solid var(--blue);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 6px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 18px;
  text-decoration: none;
}
.logo-icon { height: calc(var(--header-h) - 12px); width: auto; object-fit: contain; flex-shrink: 0; }

/* Desktop nav */
.desktop-nav { flex: 1; min-width: 0; }
.nav-list {
  display: flex;
  align-items: stretch;
  height: var(--header-h);
}
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 13px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-list > li > a:hover,
.nav-list > li:hover > a { color: var(--blue); background: var(--gray-bg); }
.nav-list > li > a.active { color: var(--blue); border-bottom: 3px solid var(--orange); }

/* Dropdown */
.nav-list > li:hover .dropdown { display: block; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-top: 3px solid var(--orange);
  min-width: 250px;
  box-shadow: 0 6px 16px rgba(0,0,0,.14);
  z-index: 600;
}
.dropdown li a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid #f0f0f0;
  transition: background .15s, color .15s;
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: var(--gray-bg); color: var(--blue); }

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-left: auto;
}
.header-phone { font-size: 14px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.header-phone:hover { color: var(--orange); }
.header-btn {
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.header-btn:hover { background: var(--orange-hover); }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  flex-shrink: 0;
}
.burger span {
  display: block; width: 24px; height: 2px;
  background: var(--blue); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── MOBILE DRAWER ───────────────────────────────── */
.drawer-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 700;
}
.drawer-overlay.open { display: block; }

.mobile-drawer {
  position: fixed; top: 0; left: -100%;
  width: 82%; max-width: 320px; height: 100%;
  background: var(--white); z-index: 800;
  overflow-y: auto;
  transition: left .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-drawer.open { left: 0; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 2px solid var(--blue);
  background: var(--blue);
}
.drawer-head span { color: var(--white); font-weight: 700; font-size: 15px; }
.drawer-close {
  background: none; border: none; color: var(--white);
  font-size: 22px; cursor: pointer; line-height: 1;
}

.mobile-nav { flex: 1; padding: 8px 0; }
.mobile-nav-item { border-bottom: 1px solid #eee; }
.mobile-nav-row { display: flex; align-items: center; justify-content: space-between; }
.mobile-nav-row > a {
  flex: 1; display: block; padding: 13px 18px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.mobile-nav-row > a:hover { color: var(--blue); }
.sub-toggle {
  background: none; border: none; padding: 13px 16px;
  cursor: pointer; font-size: 16px; color: var(--text-light);
  transition: transform .2s;
}
.sub-toggle.open { transform: rotate(180deg); }
.mobile-sub { display: none; background: var(--gray-bg); padding: 4px 0; }
.mobile-sub.open { display: block; }
.mobile-sub a {
  display: block; padding: 10px 28px; font-size: 13px;
  color: var(--text-light); border-bottom: 1px solid #e8e8e8;
}
.mobile-sub a:last-child { border-bottom: none; }
.mobile-sub a:hover { color: var(--blue); background: #ececec; }

.drawer-contacts {
  padding: 18px; border-top: 1px solid var(--gray-border); background: var(--gray-bg);
}
.drawer-contacts a { display: block; font-size: 14px; font-weight: 700; color: var(--blue); margin-bottom: 6px; }
.drawer-contacts small { font-size: 11px; color: var(--text-light); }
.drawer-contacts .header-btn { display: block; width: 100%; text-align: center; margin-top: 12px; }

/* ─── PAGE HERO (inner pages) ─────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, #2e6fc9 100%);
  color: var(--white);
  padding: 40px 0 36px;
}
.page-hero h1 { font-size: 28px; font-weight: 700; }
.breadcrumbs { margin-top: 10px; font-size: 13px; opacity: .7; }
.breadcrumbs a { color: var(--white); border-bottom: 1px solid rgba(255,255,255,.3); }
.breadcrumbs a:hover { opacity: 1; border-color: var(--white); }

/* ─── SECTION COMMONS ─────────────────────────────── */
section { padding: 56px 0; }
.section-title { font-size: 26px; font-weight: 700; color: var(--blue-dark); margin-bottom: 8px; }
.section-title-center { text-align: center; }
.divider { width: 60px; height: 3px; background: var(--orange); margin: 12px 0 32px; }
.divider-center { margin-left: auto; margin-right: auto; }

/* ─── FORMS ───────────────────────────────────────── */
.form-group { margin-bottom: 12px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--gray-border); border-radius: 4px;
  font-size: 13px; font-family: inherit; color: var(--text);
  transition: border-color .2s;
  -webkit-appearance: none; appearance: none;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--blue); }
.form-group textarea { resize: vertical; height: 70px; }
.form-group label.file-label {
  display: flex; align-items: center; gap: 8px;
  border: 1px dashed var(--gray-border); border-radius: 4px;
  padding: 9px 12px; font-size: 12px; color: var(--text-light); cursor: pointer;
}
.form-group label.file-label:hover { border-color: var(--blue); color: var(--blue); }
.form-group input[type="file"] { display: none; }
.form-submit {
  width: 100%; background: var(--orange); color: var(--white);
  border: none; padding: 12px; border-radius: 4px;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s;
}
.form-submit:hover { background: var(--orange-hover); }
.form-privacy { font-size: 11px; color: var(--text-light); text-align: center; margin-top: 8px; }

/* ─── CATALOG GRID ────────────────────────────────── */
.catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.catalog-card {
  border: 1px solid var(--gray-border); border-radius: 8px; overflow: hidden;
  transition: box-shadow .2s, border-color .2s; cursor: pointer;
}
.catalog-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); border-color: var(--blue); }
.catalog-img {
  background: var(--gray-bg); height: 150px;
  display: flex; align-items: center; justify-content: center; font-size: 48px;
}
.catalog-body { padding: 14px 16px; }
.catalog-body h3 { font-size: 13px; font-weight: 700; color: var(--blue-dark); margin-bottom: 6px; line-height: 1.4; }
.catalog-body p { font-size: 12px; color: var(--text-light); }
.catalog-link { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--orange); }
.catalog-link:hover { text-decoration: underline; }

/* ─── CONTACT ─────────────────────────────────────── */
.contact-section { background: var(--white); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info h2 { font-size: 24px; color: var(--blue-dark); margin-bottom: 10px; }
.contact-info .divider { margin-bottom: 24px; }
.contact-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.contact-icon { font-size: 22px; }
.contact-row h4 { font-size: 13px; font-weight: 700; color: var(--blue-dark); }
.contact-row p, .contact-row a { font-size: 13px; color: var(--text-light); }
.contact-row a:hover { color: var(--blue); }
.map-placeholder {
  background: var(--gray-bg); border-radius: 8px; height: 280px;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--text-light);
  border: 1px solid var(--gray-border); margin-top: 20px;
  flex-direction: column; gap: 8px;
}
.map-placeholder p { font-size: 13px; color: var(--text-light); }
.contact-form-wrap { background: var(--gray-bg); border-radius: 8px; padding: 28px; }
.contact-form-wrap h3 { font-size: 18px; color: var(--blue-dark); margin-bottom: 18px; }

/* ─── PARTNERS ────────────────────────────────────── */
.partners { background: var(--gray-bg); }
.partners-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; align-items: center; }
.partner-logo {
  background: var(--white); border: 1px solid var(--gray-border); border-radius: 6px;
  padding: 14px 10px; text-align: center; font-size: 13px; font-weight: 700;
  color: var(--text-light); height: 70px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s;
}
.partner-logo:hover { border-color: var(--blue); color: var(--blue); }

/* ─── CERTS ───────────────────────────────────────── */
.certs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cert-card {
  border: 1px solid var(--gray-border); border-radius: 6px; text-align: center;
  padding: 20px; background: var(--gray-bg); transition: box-shadow .2s;
}
.cert-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.cert-icon { font-size: 52px; margin-bottom: 10px; }
.cert-card p { font-size: 12px; color: var(--text-light); }

/* ─── FOOTER ──────────────────────────────────────── */
footer {
  background: #1a1a1a; color: #aaa; padding: 48px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer-logo strong { color: var(--white); font-size: 15px; display: block; margin-bottom: 10px; }
.footer-logo p { font-size: 12px; line-height: 1.7; }
.footer-col h4 { color: var(--white); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 12px; color: #aaa; transition: color .15s; }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #2a2a2a; padding: 16px 0; text-align: center; font-size: 11px; }

/* ─── MODAL ───────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 1000;
  align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: 10px; padding: 36px;
  max-width: 440px; width: 100%; position: relative;
}
.modal h3 { font-size: 20px; color: var(--blue-dark); margin-bottom: 18px; }
.modal-close {
  position: absolute; top: 14px; right: 18px;
  font-size: 22px; cursor: pointer; color: var(--text-light);
  background: none; border: none;
}
.modal-close:hover { color: var(--text); }

/* ─── ABOUT PAGE ──────────────────────────────────── */
.about-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.about-intro p { font-size: 14px; line-height: 1.8; margin-bottom: 14px; color: var(--text-light); }
.about-sidebar {
  background: var(--gray-bg); border-radius: 8px; padding: 28px;
  border-left: 4px solid var(--orange);
}
.about-sidebar h3 { font-size: 16px; color: var(--blue-dark); margin-bottom: 16px; }
.about-sidebar li {
  padding: 8px 0; border-bottom: 1px solid var(--gray-border);
  font-size: 13px; color: var(--text-light);
}
.about-sidebar li:last-child { border-bottom: none; }
.about-sidebar li strong { color: var(--text); display: block; margin-bottom: 2px; }

.offices-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 10px; }
.office-card {
  background: var(--white); border: 1px solid var(--gray-border); border-radius: 8px;
  padding: 24px; border-top: 4px solid var(--blue);
}
.office-card h3 { font-size: 16px; color: var(--blue-dark); margin-bottom: 14px; }
.office-card .contact-row { margin-bottom: 10px; }

/* ─── CATALOG PAGE ────────────────────────────────── */
.product-table {
  width: 100%; border-collapse: collapse; margin-top: 10px;
}
.product-table th {
  background: var(--blue); color: var(--white);
  padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600;
}
.product-table td {
  padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--gray-border);
  color: var(--text);
}
.product-table tr:hover td { background: var(--gray-bg); }
.product-table a { color: var(--blue); font-weight: 600; }
.product-table a:hover { color: var(--orange); }

/* ─── REVIEWS PAGE ────────────────────────────────── */
.reviews-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.review-card {
  border: 1px solid var(--gray-border); border-radius: 8px; text-align: center;
  padding: 24px 16px; background: var(--white); transition: box-shadow .2s;
}
.review-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.review-icon { font-size: 48px; margin-bottom: 12px; }
.review-card h4 { font-size: 13px; font-weight: 700; color: var(--blue-dark); margin-bottom: 4px; }
.review-card p { font-size: 12px; color: var(--text-light); }

.review-form-section { background: var(--gray-bg); }
.review-form-wrap {
  max-width: 600px; margin: 0 auto;
  background: var(--white); border-radius: 8px; padding: 32px;
}

/* ─── RESPONSIVE ──────────────────────────────────── */

@media (max-width: 1280px) {
  .nav-list > li > a { padding: 0 10px; font-size: 12px; }
}

@media (max-width: 1024px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .partners-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .about-intro { grid-template-columns: 1fr; }
  .offices-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .header-phone { display: none; }
  .nav-list > li > a { padding: 0 8px; font-size: 11.5px; }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .desktop-nav { display: none; }
  .burger { display: flex; }
  .logo-icon { width: 36px; height: 36px; }
  .header-btn { font-size: 12px; padding: 7px 14px; }

  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-inner { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .offices-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }

  section { padding: 40px 0; }
  .section-title { font-size: 22px; }
  .page-hero { padding: 30px 0 24px; }
  .page-hero h1 { font-size: 22px; }

  .product-table { font-size: 12px; }
  .product-table th, .product-table td { padding: 8px 10px; }
}

@media (max-width: 480px) {
  :root { --header-h: 52px; }
  .header-btn { display: none; }
  .catalog-grid { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .modal { padding: 24px 20px; }
}
