/*
 * upp-ese.ru — style.css v8 (20.10.2026)
 * Шпаргалка для правок:
 *  - Акцентный красный: #e70200 (ссылки-хверы, кнопки, активные пункты меню)
 *  - Фирменный синий (лого/заголовки): #1531a7
 *  - Тёмный футер/секции: #222222, текст на тёмном #ffffff
 *  - Шрифт заголовков сайта: Georgia, 'Times New Roman', serif
 *  - Основной текст: system sans (Bootstrap default)
 *  - Все размеры/отступы ниже можно править смело — уникальные классы не конфликтуют с Bootstrap.
 */

:root {
  --es-header-h: 64px;
  --es-red: #e70200;
  --es-blue: #1531a7;
  --es-dark: #222222;
  --es-gray: #f5f5f5;
}

body {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 15px;
  color: #333;
}

/* ---------------- Шапка ---------------- */
.es-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.es-header .navbar {
  padding-top: .35rem;
  padding-bottom: .35rem;
}
.es-logo-title {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--es-blue);
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1.1;
  text-decoration: none;
}
.es-logo-title:hover { color: var(--es-blue); }
.es-phone {
  font-size: 1.05rem;
  font-weight: bold;
  letter-spacing: .1em;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}
.es-phone:hover { color: var(--es-red); }

/* Меню */
.es-nav .nav-link {
  font-weight: bold;
  letter-spacing: .05em;
  color: #333;
  padding: .5rem 1rem;
}
.es-nav .nav-link:hover,
.es-nav .nav-link.active { color: var(--es-red); }

/* ---------------- Hero (главная) ---------------- */
.es-hero {
  background-image: url(/assets/images/bg-hero.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  background-attachment: fixed;
  position: relative;
  color: #fff;
  min-height: calc(100vh - var(--es-header-h, 64px));
  display: flex;
  align-items: center;
}
.es-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.3);
}
.es-hero .container { position: relative; }
.es-hero-inner { padding: 40px 0 50px; }
.es-hero-title {
  font-family: Georgia, serif;
  font-size: 3rem;
  line-height: 1.25;
  font-weight: bold;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
}
.es-hero-sub {
  font-size: 1.3rem;
  font-weight: bold;
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}

/* ---------------- Секции ---------------- */
.section-pad { padding: 50px 0; }

/* ---------------- Секция снабжения (фон reft, как на старом) ---------------- */
.es-section-reft {
  background-image: url(/assets/images/reft.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  background-attachment: fixed;
  position: relative;
  color: #fff;
}
.es-section-reft::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
}
.es-section-reft .container { position: relative; }

/* ---------------- Блоки продукции (чередование фото/текст, как на старом) ---------------- */
.es-product-row { margin-bottom: 2.5rem; }
.es-product-img {
  filter: drop-shadow(0 18px 14px rgba(0,0,0,.28));
  max-width: 100%;
  height: auto;
}
.es-product-title {
  font-family: Georgia, serif;
  font-size: 2rem;
  line-height: 1.3;
}
.es-product-sub { font-size: 1.15rem; }

.es-section-business {
  background-image: url(/assets/images/bg-business.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 0;
  color: #fff;
}
.es-section-business .container { position: relative; }

.es-h1, h1.es-h1 {
  font-family: Georgia, serif;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}
h2.es-h2 {
  font-family: Georgia, serif;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}
.lead-text { font-size: 1.05rem; line-height: 1.65; }

.es-list li { margin-bottom: .45rem; }

/* Партнёры */
.es-partner-logo {
  max-height: 90px;
  max-width: 100%;
  object-fit: contain;
  margin: 10px auto;
  display: block;
}
.es-partner-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: .25rem;
  padding: 14px 10px;
  height: 100%;
  text-align: center;
}
.es-partner-card .es-partner-name {
  font-size: .85rem;
  margin-top: 8px;
  color: #333;
  min-height: 2.6em;
}

/* Галерея */
.gal-card {
  display: block;
  text-decoration: none;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: .25rem;
  overflow: hidden;
  height: 100%;
  transition: box-shadow .25s, transform .25s;
}
.gal-card:hover {
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  transform: translateY(-2px);
}
.gal-card-title {
  font-weight: bold;
  font-size: 1.05rem;
  color: #333;
  text-align: center;
  padding: 14px 8px;
}
.gal-card:hover .gal-card-title { color: var(--es-red); }

.gal-photo {
  display: block;
  margin-bottom: 12px;
}
.gal-photo img {
  width: 100%;
  height: auto;
  border: 1px solid #ddd;
}

/* ---------------- Футер ---------------- */
.es-footer {
  background: var(--es-dark);
  color: #ddd;
  padding: 26px 0;
  font-size: .92rem;
}
.es-footer a { color: #ddd; text-decoration: none; }
.es-footer a:hover { color: #fff; }
.es-footer p { margin-bottom: .25rem; }

/* Кнопка «наверх» */
.es-scrollup {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: none;
  background: var(--es-red);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  font-size: 20px;
  z-index: 1050;
  text-decoration: none;
}
.es-scrollup:hover { color: #fff; }

/* ---------------- Мобильная версия ---------------- */
@media (max-width: 767.98px) {
  .es-hero-inner { padding: 90px 0 80px; }
  .es-hero-title { font-size: 1.5rem; }
  .es-hero-sub { font-size: 1.05rem; }
  .es-logo-title { font-size: 1rem; }
  .es-phone { font-size: .95rem; }
  .es-h1, h1.es-h1 { font-size: 1.45rem; }
  h2.es-h2 { font-size: 1.2rem; }
  .es-hero { background-attachment: scroll; }
  .es-partner-logo { max-height: 60px; }
  .es-footer { text-align: center; }
}

/* ================= ГАЛЕРЕЯ (v2, 19.10.2026) ================= */
/* Эффекты как на старом сайте: оверлей + лупа + градиентная подпись; флип-карточки категорий */
.gal-photo-wrap {
  position: relative;
  display: block;
  margin-bottom: 10px;
  overflow: hidden;
  text-decoration: none;
}
.gal-photo-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
/* оверлей затемнения */
.gal-photo-wrap::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  height: 100%; width: 100%;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: all .25s ease-in-out;
}
.gal-photo-wrap:hover::after { opacity: 1; }
/* круглая лупа */
.gal-zoom {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 2;
  height: 46px; width: 46px;
  margin-top: -23px; margin-left: -23px;
  color: #fff;
  background-color: rgba(255,255,255,0.31);
  border-radius: 50%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(20px);
  transition: all .25s ease-in-out;
  opacity: 0;
}
.gal-photo-wrap:hover .gal-zoom {
  transform: translateY(0);
  opacity: 1;
}
.gal-photo-wrap .gal-zoom:hover { background-color: rgba(255,255,255,0.6); }
.gal-zoom svg { width: 20px; height: 20px; }
/* градиентная подпись */
.gal-caption {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 1;
  width: 100%;
  height: 35%;
  padding: 10px;
  color: #fff;
  font-size: 18px;
  line-height: 21px;
  font-weight: 700;
  background: linear-gradient(rgba(0,0,0,0.017), rgba(0,0,0,0.9));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* ---------- Флип-карточки категорий (/gallery) ---------- */
.flip-card-wrap {
  height: 280px;
  perspective: 1000px;
  margin-bottom: 20px;
}
.flip-panel {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.flip-front, .flip-back {
  position: absolute;
  width: 100%; height: 100%;
  padding: 20px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: all .6s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.flip-front {
  transform: rotateX(0) rotateY(0);
  z-index: 2;
}
.flip-back {
  transform: rotateY(-178deg);
}
.flip-card-wrap:hover .flip-front { transform: rotateY(178deg); }
.flip-card-wrap:hover .flip-back { transform: none; }
.flip-front a, .flip-back a {
  font-size: 14pt;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 30% 10%;
  width: 100%;
}
.flip-front a:hover, .flip-back a:hover { color: #fff; }
@media (max-width: 767.98px) {
  .flip-card-wrap { height: 180px; }
  .flip-front a, .flip-back a { font-size: 12pt; padding: 10% 6%; }
}

/* Фоны-фото и оверлеи флип-карточек */
.flip-front, .flip-back {
  background-color: #2b2b2b;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.flip-front::before, .flip-back::before {
  content: '';
  position: absolute;
  inset: 0;
}
.flip-front::before { background: rgba(0,0,0,0.15); }
.flip-back::before { background: rgba(0,0,0,0.15); }
.flip-front a, .flip-back a {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,.65);
}
.flip-front a::after, .flip-back a::after {
  content: '';
  position: absolute;
  left: -20px;
  bottom: -8px;
  width: calc(100% + 40px);
  height: 90px;
  z-index: -1;
  background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.75));
  pointer-events: none;
}

@media (max-width: 767.98px) {
  .es-product-title { font-size: 1.35rem; }
  .es-product-sub { font-size: 1rem; }
  .es-product-row { margin-bottom: 1.75rem; }
}

/* ================= Ширины (v8, 20.10.2026): шапка/подвал fluid 15px, тело 1170px — как на старом ================= */
.es-header .container-fluid,
.es-footer .container-fluid { padding-left: 15px; padding-right: 15px; }
@media (min-width: 992px)  { .container { max-width: 970px; } }
@media (min-width: 1200px) { .container { max-width: 1170px; } }
@media (min-width: 1400px) { .container { max-width: 1170px; } }
/* Подвал: чтобы внутренние колонки не «плавали» на средних экранах */
.es-footer .col-lg-1, .es-footer .col-lg-4 { display: none; }
@media (min-width: 992px) {
  .es-footer .col-lg-1, .es-footer .col-lg-4 { display: block; }
}
