﻿/* ============================================================
   1. ПЕРЕМЕННЫЕ И СБРОС
   ============================================================ */
:root {
  --navy: #1c2b39;
  --ink: #3a4a58;
  --line: #e7ebef;
  --bg-soft: #f6f8fa;
  --white: #ffffff;

  /* Тема: зелёная (Спецхимпродукт) */
  --green: #4ba82e;
  --green-d: #3d8f26;
  --green-tint: #f2f9ef;
  --green-chip: #e9f5e4;

  /* Тема: синяя (Спецавиа) */
  --blue: #1f5fa8;
  --blue-d: #184a80;
  --blue-tint: #eef4fb;
  --blue-chip: #dde9f6;

  /* Тема: красная (Спецпродукт) */
  --red: #d81f26;
  --red-d: #b3171d;
  --red-tint: #fdeeee;
  --red-chip: #f9dede;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}


/* ============================================================
   2. ОБЩИЕ КОМПОНЕНТЫ
   ============================================================ */

/* ----- Шапка (общая для всех страниц) ----- */
.sp-header,
.ag-top {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.sp-header img,
.ag-top img {
  height: 58px;
  width: auto;
  display: block;
}

/* ----- Кнопка "назад" (общая) ----- */
.ag-back {
  margin-top: 22px;
}
.ag-back a {
  color: #8a97a3;
  font-size: 14px;
  text-decoration: none;
}
.ag-back a:hover {
  color: var(--navy);
}

/* ----- Основная кнопка с иконкой (общая) ----- */
.ag-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 16px 34px;
  border-radius: 12px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.ag-btn:hover {
  transform: translateY(-2px);
}
.ag-btn svg {
  transition: transform 0.2s ease;
}
.ag-btn:hover svg {
  transform: translateX(4px);
}


/* ============================================================
   3. ГЛАВНАЯ СТРАНИЦА (Группа компаний)
   ============================================================ */

.sp-root {
  background: var(--white);
}

/* ----- Три компании (сетка) ----- */
.sp-companies {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.sp-card {
  position: relative;
  display: block;
  overflow: hidden;
  line-height: 0;
  height: clamp(210px, 17vw, 280px);
  background: #eef1f3;
}

.sp-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.4);
  transform-origin: center;
  transition: transform 0.5s ease, filter 0.5s ease;
}

/* Затемнение по краям */
.sp-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(135% 130% at 50% 45%,
    rgba(255,255,255,0) 48%, rgba(18,32,46,0.20) 100%);
  box-shadow: inset 0 0 0 1px rgba(18,32,46,0.06);
  transition: background 0.5s ease;
}

.sp-card:hover img {
  transform: scale(1.48);
  filter: brightness(1.05);
}
.sp-card:hover::after {
  background: radial-gradient(135% 130% at 50% 45%,
    rgba(255,255,255,0) 55%, rgba(18,32,46,0.12) 100%);
}

/* ----- Секция "О компании" ----- */
.sp-about {
  background: var(--bg-soft);
  padding: 40px 24px 84px;
}

.sp-about__wrap {
  max-width: 1160px;
  margin: 0 auto;
}

.sp-about__title {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--navy);
  margin: 0 0 10px;
}

.sp-about__title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  border-radius: 2px;
  margin: 16px auto 0;
  background: var(--navy);
}

.sp-about__lead {
  max-width: 900px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
}

.sp-about__lead p {
  margin: 0 0 16px;
}

.sp-about__sub {
  max-width: 900px;
  margin: 30px auto 26px;
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
}

/* ----- Карточки направлений ----- */
.sp-units {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.sp-unit {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid #ccc;
  border-radius: 12px;
  padding: 28px 26px;
  box-shadow: 0 10px 26px rgba(20,35,50,0.05);
  display: flex;
  flex-direction: column;
}

/* Цветные верхние границы карточек */
.sp-unit--green { border-top-color: var(--green); }
.sp-unit--blue  { border-top-color: var(--blue); }
.sp-unit--red   { border-top-color: var(--red); }

.sp-unit__tag {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.sp-unit--green .sp-unit__tag { color: var(--green); }
.sp-unit--blue  .sp-unit__tag { color: var(--blue); }
.sp-unit--red   .sp-unit__tag { color: var(--red); }

.sp-unit__name {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 12px;
  line-height: 1.3;
}

.sp-unit__text {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
}

.sp-about__foot {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  text-align: center;
}


/* ============================================================
   4. СТРАНИЦЫ КОМПАНИЙ (общий шаблон с темами)
   ============================================================ */

/* ----- Hero-блок (зависит от темы) ----- */
.ag-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 24px 22px;
}

/* ----- Логотип компании в hero ----- */
.ag-logo {
  height: 76px;
  width: auto;
  margin-bottom: 18px;
}

/* ----- Тег-метка (чип) ----- */
.ag-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 8px 18px;
}

/* ----- Контентная область ----- */
.ag-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 24px 8px;
}

.ag-sub {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 14px 0 10px;
}

.ag-lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 22px;
}

.ag-listcap {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 14px;
}

.ag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.ag-list li {
  position: relative;
  padding-left: 38px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}

.ag-list li svg {
  position: absolute;
  left: 0;
  top: 2px;
}

/* ----- Фотографии (сетка) ----- */
.ag-photos {
  display: grid;
  gap: 14px;
  max-width: 1240px;
  width: 100%;
  margin: 30px auto 0;
  padding: 0 24px;
}

.ag-photos img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  box-shadow: 0 10px 24px rgba(20,35,50,0.12);
}

/* ----- Нижний блок с кнопкой ----- */
.ag-cta {
  text-align: center;
  padding: 34px 24px 60px;
}


/* ============================================================
   5. ТЕМЫ (зелёная, синяя, красная)
   ============================================================ */

/* ----- Тема: зелёная (Спецхимпродукт) ----- */
.theme-green .ag-hero {
  background: radial-gradient(120% 70% at 50% 0%, var(--green-tint) 0%, #ffffff 60%);
}
.theme-green .ag-tag {
  color: var(--green-d);
  background: var(--green-chip);
}
.theme-green .ag-sub {
  color: var(--green-d);
}
.theme-green .ag-btn {
  background: var(--green);
  box-shadow: 0 12px 26px rgba(75,168,46,0.32);
}
.theme-green .ag-btn:hover {
  background: var(--green-d);
  box-shadow: 0 16px 32px rgba(75,168,46,0.4);
}
/* факты (если используются) */
.theme-green .ag-fact b {
  color: var(--green-d);
}

/* ----- Тема: синяя (Спецавиа) ----- */
.theme-blue .ag-hero {
  background: radial-gradient(120% 60% at 50% 0%, var(--blue-tint) 0%, #ffffff 62%);
}
.theme-blue .ag-tag {
  color: var(--blue-d);
  background: var(--blue-chip);
}
.theme-blue .ag-sub {
  color: var(--blue-d);
}
.theme-blue .ag-btn {
  background: var(--blue);
  box-shadow: 0 12px 26px rgba(31,95,168,0.32);
}
.theme-blue .ag-btn:hover {
  background: var(--blue-d);
}

/* ----- Тема: красная (Спецпродукт) ----- */
.theme-red .ag-hero {
  background: radial-gradient(120% 60% at 50% 0%, var(--red-tint) 0%, #ffffff 62%);
}
.theme-red .ag-tag {
  color: var(--red-d);
  background: var(--red-chip);
}
.theme-red .ag-sub {
  color: var(--red-d);
}
.theme-red .ag-btn {
  background: var(--red);
  box-shadow: 0 12px 26px rgba(216,31,38,0.30);
}
.theme-red .ag-btn:hover {
  background: var(--red-d);
}


/* ============================================================
   6. АДАПТИВНОСТЬ
   ============================================================ */

/* Шапка */
@media (max-width: 1100px) {
  .sp-header img,
  .ag-top img {
    height: 72px;
  }
  .sp-header,
  .ag-top {
    padding: 18px 24px;
  }
}

/* Главная */
@media (max-width: 900px) {
  .sp-companies {
    grid-template-columns: 1fr;
  }
  .sp-units {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .sp-about {
    padding: 30px 20px 64px;
  }
  .sp-about__title {
    font-size: 28px;
  }
}

@media (max-width: 560px) {
  .sp-header img,
  .ag-top img {
    height: 58px;
  }
  .sp-about__lead {
    font-size: 16px;
  }
}

/* Страницы компаний — фотосетка */
@media (max-width: 1080px) {
  .ag-photos {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .ag-photos {
    grid-template-columns: 1fr 1fr;
  }
  .ag-photos img {
    height: 200px;
  }
}

@media (max-width: 640px) {
  .ag-logo {
    height: 60px;
  }
  .ag-h1 {
    font-size: 29px;
  }
  .ag-text,
  .ag-lead {
    font-size: 16px;
  }
}

@media (max-width: 460px) {
  .ag-photos {
    grid-template-columns: 1fr;
  }
  .ag-photos img {
    height: 210px;
  }
}
/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #f8fafc;
  color: #1a2a3a;
  line-height: 1.5;
  padding: 20px;
}

/* ===== HEADER ===== */
.ag-top {
  max-width: 940px;
  margin: 0 auto 20px;
  padding: 8px 0 12px;
  border-bottom: 1px solid #e2e8f0;
}

.ag-top img {
  height: 48px;
  width: auto;
  display: block;
}

/* ===== MAIN HERO ===== */
.ag-hero {
  max-width: 940px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 40px 36px 48px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* ===== LOGO & TAG ===== */
.ag-logo {
  display: block;
  height: 60px;
  width: auto;
  margin: 0 auto 10px;
}

.ag-tag {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: #6b7a8a;
  margin-bottom: 32px;
}

/* ===== EYEBROW & TEXT ===== */
.ag-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #4ba82e;
  margin-bottom: 8px;
}

.ag-text {
  font-size: 16px;
  color: #2d3f4f;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* ===== PHOTO GRID ===== */
.ag-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.ag-photos img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 14px;
  background: #eef2f6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s;
}

.ag-photos img:hover {
  transform: scale(1.02);
}

/* ===== FACTS ===== */
.ag-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  justify-content: center;
  padding: 24px 0 20px;
  border-top: 1px solid #e7ebef;
  margin-bottom: 28px;
}

.ag-fact {
  text-align: center;
}

.ag-fact b {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #1a2a3a;
  line-height: 1.2;
}

.ag-fact span {
  display: block;
  font-size: 14px;
  color: #6b7a8a;
  font-weight: 450;
}

/* ===== CONTACT BLOCK ===== */
.ag-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  padding: 20px 0 12px;
  border-top: 1px solid #e7ebef;
  margin-bottom: 28px;
}

.ag-contact-item {
  text-align: center;
  min-width: 160px;
}

.ag-contact-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #4ba82e;
  margin-bottom: 4px;
}

.ag-contact-value {
  font-size: 15px;
  color: #2d3f4f;
  line-height: 1.5;
}

.ag-contact-value a {
  color: #2d3f4f;
  text-decoration: none;
}

.ag-contact-value a[href^="mailto"] {
  color: #4ba82e;
}

.ag-contact-value a:hover {
  text-decoration: underline;
}

/* ===== BUTTON ===== */
.ag-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: #4ba82e;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 40px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  margin: 0 auto 20px;
  width: fit-content;
}

.ag-btn:hover {
  background: #3d8f25;
  transform: translateY(-1px);
}

.ag-btn svg {
  flex-shrink: 0;
}

/* ===== BACK LINK ===== */
.ag-back {
  text-align: center;
  margin-top: 12px;
}

.ag-back a {
  color: #6b7a8a;
  text-decoration: none;
  font-size: 15px;
  font-weight: 450;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.ag-back a:hover {
  border-bottom-color: #6b7a8a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  .ag-hero {
    padding: 24px 18px 32px;
    border-radius: 18px;
  }

  .ag-logo {
    height: 44px;
  }

  .ag-photos {
    grid-template-columns: 1fr 1fr;
  }

  .ag-photos img {
    height: 130px;
  }

  .ag-facts {
    gap: 12px 20px;
  }

  .ag-fact b {
    font-size: 22px;
  }

  .ag-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }

  .ag-contact {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
}

@media (max-width: 420px) {
  .ag-photos {
    grid-template-columns: 1fr;
  }

  .ag-photos img {
    height: 180px;
  }
}