/* styles.css */
:root{
  --bg-dark: #0e0e10;
  --text: #ffffff;
  --muted: #b9bdc7;
  --brand: #2aa8ff;
  --accent1: #4aa8ff;
  --accent2: #5f7cf1;
  --card-bg: #ffffff;
  --chip-bg: rgba(255,255,255,.08);
  --blur: saturate(1.1) blur(6px);
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-1: 0 10px 30px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html,body{
  height:100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:#fff;
  line-height:1.35;
  overflow-x: hidden;
  width: 100%;
  transition: margin-right 0.3s ease;
}

body.menu-open {
  margin-right: 280px;
}

/* Header */
.site-header{
  position:absolute;
  top:16px;
  left:50%;
  transform:translateX(-50%);
  width:min(1280px, calc(100% - 32px));
  z-index:20;

  display:flex;
  align-items:center;
  gap:18px;

  background:rgb(255 255 255 / 55%);
  backdrop-filter: var(--blur);
  border:1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding:10px 14px;
  box-shadow: var(--shadow-1);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.site-header.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-20px);
}



.logo img{
  height:34px; 
  width:auto;
  display:block;
  
}
.nav{
  display:flex;
  gap:18px; 
  margin-left:80px;
  flex-wrap: wrap;
}
.nav a{
  color:#03163d; 
  text-decoration:none; 
  font-weight:600; 
  opacity:.9
}
.spacer{
  flex:1
}

.mobile-center {
  display: none;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.burger-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 25;
}

.burger-menu span {
  width: 25px;
  height: 3px;
  background: #03163d;
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

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

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

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -20px;
  width: 280px;
  height: 100vh;
  background: rgb(255 255 255 / 98%);
  backdrop-filter: var(--blur);
  padding: 80px 30px 30px;
  flex-direction: column;
  gap: 20px;
  z-index: 22;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -5px 0 20px rgba(0,0,0,.2);
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav a {
  color: #03163d;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.1);
}

.social{
  display:flex; 
  gap:8px;
}

.chip{
  display:inline-flex; 
  align-items:center; 
  gap:8px; 
  color:#03163d; 
  padding:8px 12px; 
  border-radius:999px;
  
  border: 2px solid #03163d; 
  background:var(--chip-bg); 
  font-size:14px
}

.dot{
  width:7px; 
  height:7px; 
  border-radius:50%; 
  background:#f3662e; 
  display:inline-block; 
  box-shadow:0 0 0 3px rgba(57,211,83,.18);
}

.phone{
  display:flex; 
  align-items:center; 
  gap:10px;
}

.phone .tel{
  color:#0f7957; 
  font-weight:800; 
  text-decoration:none;
}

.btn{display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:12px 18px; font-weight:800; border-radius:999px; text-decoration:none; color:#fff; white-space:nowrap}
.btn-gradient{ background: linear-gradient(90deg, var(--accent1), var(--accent2)); box-shadow: 0 10px 24px rgba(94,131,250,.4);}
.btn-gradient:hover{filter:brightness(1.06)}

.icon-btn{height:36px; width:36px; display:grid; place-items:center; border-radius:999px; background:var(--chip-bg); border:1px solid rgba(255,255,255,.08)}
.icon{width:18px; height:18px; display:inline-block}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
}

.hero-media{
  position:absolute;
  inset:0;
  background: url("image-n/BG.jpg") center center / cover no-repeat;
  z-index:0;
  width: 100%;
  min-width: 100%;
}

.hero-media video, .hero-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  filter: brightness(.55);
}

.hero-overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 700px at 20% 35%, rgba(0,0,0,.0), rgba(0,0,0,.55)),
    linear-gradient( to bottom, rgba(7,8,10,.15) 0%, rgba(7,8,10,.6) 70% );
  z-index:1;
}

.hero{
  display:flex;
  align-items:flex-end;
  padding-top: 120px;
}

.hero .container{
  position:relative;
  z-index:2;
  padding-bottom:80px;
}

.container {
  max-width: 1280px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.lead{
  max-width: 100%
}

.lead h1{
  font-size: clamp(28px, 6vw, 90px); 
  margin:0 0 18px; font-weight:900; 
  letter-spacing:.2px;
  color: #f8ff92ea;
  
}

.lead .sub{display:flex; align-items:center; gap:10px; color:#e5e8ee; font-weight:600; margin-top:14px}
.lead .sub svg{opacity:.9}

.features{
  margin-top: 28px;
  background: rgba(255,255,255, .92);
  color:#1e2025;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  display:grid; grid-template-columns: repeat(4, 1fr);
  padding: 22px 24px;
  gap: 12px;
  max-width: 820px;
}

.f-item{
  display:flex; 
  gap:12px; 
  align-items:center
}
.f-ico{
  width:38px; 
  height:38px; 
  border-radius:12px; 
  display:grid; 
  place-items:center; 
  background:#eef3ff
}

.hero-text{
  max-width: 657px;       /* ровно как у .features */
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.5;
  color: #e6e8ec;
  margin-top: 12px;
}

.hero-note{
  margin-top: 10px;
  font-size: clamp(12px, 2vw, 14px);
  color: rgba(255,255,255,.75);
}


.f-title{
  font-weight:800; 
  font-size: clamp(12px, 2vw, 15px);
}

.f-sub{
  font-size:13px; 
  color:#5b6270
}

.cta-wrap{
  display:flex; 
  align-items:center; 
  justify-content:flex-end
}

.cta{
  display:inline-flex; 
  align-items:center; 
  gap:12px; 
  padding:16px 22px; 
  border-radius:999px; 
  font-weight:900; 
  background: linear-gradient(90deg, var(--accent1), var(--accent2)); 
  color:#fff; 
  text-decoration:none; 
  box-shadow:0 14px 30px rgba(95,124,241,.45);
}
.f-ico .ico{
  width: 20px;
  height: 20px;
  color: #058b75;
}

.hero-bottom{
  display:flex;
  align-items:center;      /* выравниваем по вертикали */
  justify-content:flex-start;
  gap:24px;
}

.cta-wrap{
  display:flex;
  align-items:center;
}


/* Responsive */
/* Исправление для диапазона 1024px - 1500px */
@media (min-width: 1024px) and (max-width: 1500px) {
  html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .hero {
    width: 100%;
    max-width: 100vw;
  }
  
  .hero-media {
    width: 100%;
    min-width: 100%;
  }
  
  .test_cards,
  .news-magazine,
  .footer {
    width: 100%;
    max-width: 100vw;
  }
}

@media (max-width:1024px){
  .features{
    grid-template-columns:1fr 1fr;
    max-width: 466px;
  }
  .features-cta{
    max-width: 466px;
  }
  .hero-bottom{flex-direction:column; align-items:stretch}
  .cta-wrap{justify-content:flex-start}
  .site-header{
    gap: 12px;
    padding: 8px 12px;
  }
  .nav{
    margin-left: 12px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .nav a{
    font-size: 13px;
    white-space: nowrap;
  }
  .chip{
    font-size: 12px;
    padding: 6px 10px;
    white-space: nowrap;
  }
  .phone .tel{
    font-size: 13px;
    white-space: nowrap;
  }
  .logo img{
    height: 30px;
  }
  .container{
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width:768px){
  .site-header{
    padding: 8px 12px;
    gap: 12px;
    justify-content: space-between;
  }
  .logo img{
    height: 28px;
  }
  .nav{
    display: none;
  }
  .spacer{
    display: none;
  }
  .chip:not(.mobile-chip){
    display: none;
  }
  .phone:not(.mobile-phone){
    display: none;
  }
  .mobile-center {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: 10px;
  }
  .mobile-center .chip {
    font-size: 11px;
    padding: 5px 8px;
    white-space: nowrap;
  }
  .mobile-center .phone .tel {
    font-size: 12px;
    white-space: nowrap;
  }
  .burger-menu {
    display: flex;
  }
  .mobile-nav {
    display: flex;
  }
  .hero{
    padding-top: 100px;
  }
  .hero .container{
    padding-bottom: 60px;
  }
  .features{
    padding: 18px 20px;
    gap: 10px;
  }
  .f-item{
    gap: 8px;
  }
  .f-ico{
    width: 32px;
    height: 32px;
  }
  .features-cta{
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .features-text{
    text-align: center;
  }
}

@media (max-width:640px){
  .site-header{
    top:10px;
    left:10px;
    right:10px;
    width:auto;
    transform:none;
  }
  .site-header.hidden {
    transform: translateY(-20px);
  }
  .nav{display:none}
  .chip{display:none}
  
  .lead h1{
    font-size: clamp(26px, 8vw, 46px)
  }

  .features{grid-template-columns:1fr}
  
  .hero-text{
    font-size: clamp(14px, 4vw, 18px);
  }
  
  .test_cards{
    min-height: auto;
    padding-bottom: 20px;
  }
  
  .cards-container{
    padding: 20px 12px;
  }
  
  .news-magazine{
    padding: 30px 10px;
  }
  
  .news-grid{
    padding: 0 10px;
    gap: 15px;
  }
  
  .footer-container{
    padding: 0 16px;
    gap: 30px;
  }
}

.hero-bottom{
  display:flex;
  align-items:stretch;   /* ← вот это ключ */
  gap:24px;
}

.features-cta{
  display:flex;
  align-items:center;
  gap:16px;
  margin-top: 28px;

  padding:16px 20px;
  border-radius:24px;
  max-width: 466px;
  flex-wrap: wrap;

  background: rgb(199, 247, 236);   /* можно заменить на другой цвет */
  backdrop-filter: blur(6px) saturate(1.1);
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}


.features-text{
  font-size: clamp(12px, 2vw, 14px);
  font-weight:600;
  color:#3a3f4a;
}

.features-btn{
  padding:10px 16px;
  border-radius:999px;
  background:#5c9281;              /* можно другой цвет */
  color:#fff;
  font-weight:700;
  font-size: clamp(12px, 2vw, 14px);
  text-decoration:none;
  box-shadow:0 6px 16px rgba(14,108,255,.35);
  white-space: nowrap;
}
/* =========================================================
   NEW HOMEPAGE ONLY (вынесено из style2.css)
   Карточки + Новости + Новый футер
   ========================================================= */

/* Глобально фиксируем расчёт размеров, чтобы не прыгала сетка */
*, *::before, *::after {
  box-sizing: border-box;
}

.test_cards {
  background-color: #ffffff;
  min-height: 800px;
  padding-bottom: 40px;
  width: 100%;
  max-width: 100vw;
}

/* ===== Сетка карточек (адаптив) ===== */
.cards-container {
  display: grid;
  gap: 12px 15px;
  justify-content: center;
  padding: 40px 12px;
  perspective: 1000px;
  align-items: stretch;

  max-width: 1300px;
  margin: 0 auto;
}

/* Телефон: 1 колонка */
@media (max-width: 599px) {
  .cards-container {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

/* Планшет: 2 колонки */
@media (min-width: 600px) and (max-width: 1023px) {
  .cards-container {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    justify-items: center;
    max-width: 700px;
  }
  .card {
    max-width: 100%;
  }
}

/* Ноутбуки: 3 колонки */
@media (min-width: 1024px) and (max-width: 1399px) {
  .cards-container {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    justify-items: center;
  }
}

/* Широкие экраны: 4 колонки */
@media (min-width: 1400px) {
  .cards-container {
    grid-template-columns: repeat(4, minmax(280px, 1fr));
    justify-items: center;
  }
}

/* ===== Анимации ===== */
@keyframes fadeInUp {
  0%   { opacity: 0; transform: translateY(30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Карточка ===== */
.card {
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: fadeInUp 0.7s ease forwards;
  display: flex;
  flex-direction: column;
}

/* Появление по очереди */
.card:nth-child(1) { animation-delay: 0.10s; }
.card:nth-child(2) { animation-delay: 0.25s; }
.card:nth-child(3) { animation-delay: 0.40s; }
.card:nth-child(4) { animation-delay: 0.55s; }

/* Hover на desktop */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.2);
    border-color: #e87722;
  }
}

/* Тап на мобильных */
.card.touch-active {
  transform: scale(1.03);
  box-shadow: 0 12px 26px rgba(0,0,0,0.22);
}

/* Если нет hover — отключаем эффекты наведения */
@media (hover: none) {
  .card:hover { transform: none; }
}

/* ===== Содержимое карточки ===== */
.card-header {
  background-color: #e87722;
  color: #fff;
  text-align: center;
  padding: 10px;
  font-weight: bold;
  font-size: clamp(18px, 3vw, 28px);
}

.card img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.18);
  }
}

.card-content {
  padding: 15px;
  flex: 1;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover .card-content {
    transform: translateY(-5px);
    opacity: 0.97;
  }
}

.card-content h3 {
  color: #e87722;
  font-size: clamp(18px, 2.5vw, 22px);
  margin: 0 0 10px 0;
}

.card-content p {
  color: #333;
  font-size: clamp(14px, 2vw, 20px);
  line-height: 1.4;
  margin: 0;
}

/* ===== Футер карточки + кнопка ===== */
.card-footer {
  background: linear-gradient(135deg, #7bb042 0%, #3a9da1 50%, #e87722 100%);
  background-size: 200% 200%;
  text-align: center;
  padding: 12px;
  transition: background-position 0.6s ease, filter 0.3s ease;

  position: relative;
  overflow: hidden;
}

.card-footer a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: clamp(14px, 2vw, 20px);
  display: block;
}

/* Блик поверх градиента */
.card-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-120%);
  pointer-events: none;
  transition: transform 0.8s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card-footer:hover {
    background-position: 100% 0;
    filter: saturate(1.05) brightness(1.02);
  }
  .card-footer:hover::after {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-footer::after { transition: none; }
}

/* Доступность */
.card.focus-ring {
  outline: 2px solid #e87722;
  outline-offset: 2px;
}

/* Уменьшение анимаций для prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .card,
  .card-footer {
    transition: none !important;
    animation: none !important;
  }
}

/* =========================================================
   Новости на главной
   ========================================================= */

.news-magazine {
  background: #fff;
  padding: 50px 20px;
  text-align: center;
  width: 100%;
  max-width: 100vw;
}

.news-header {
  text-align: center;
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 auto 50px;
  color: #222;
  font-weight: 800;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.news-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 4px;
  background: linear-gradient(90deg, #e87722, #7bb042);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.news-header:hover::after {
  width: 100%;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
}

.news-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.news-card img {
  width: 100%;
  height: clamp(200px, 40vw, 280px);
  object-fit: cover;
  transition: transform 0.4s ease;
  filter: brightness(0.6);
}

.news-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(15px, 3vw, 20px);
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.3) 50%, transparent);
  color: white;
}

.news-date {
  font-size: clamp(12px, 2vw, 14px);
  background: #e87722;
  padding: 3px 8px;
  border-radius: 4px;
}

.news-title {
  font-size: clamp(16px, 2.5vw, 20px);
  margin: 10px 0;
  color: #49ebba;
}

.news-link {
  font-size: clamp(12px, 2vw, 14px);
  color: #fff;
  text-decoration: underline;
}

.news-text {
  font-size: clamp(13px, 2vw, 15px);
  color: #fff;
  line-height: 1.5;
  margin: 10px 0 15px;
}

.news-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #e87722;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: clamp(13px, 2vw, 15px);
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.news-btn:hover {
  background: #d66a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,.3);
}

.news-card:hover img {
  transform: scale(1.05);
}

@media (max-width: 1024px) {
  .news-card {
    display: grid;
  }

  .news-card img,
  .news-overlay {
    grid-area: 1 / 1;
  }

  .news-card img {
    height: 100%;
    min-height: clamp(200px, 40vw, 280px);
  }

  .news-overlay {
    position: relative;
    align-self: end;
    width: 100%;
  }
}

/* =========================================================
   Новый футер
   ========================================================= */

.footer {
  background-color: #1f1f1f;
  color: #ccc;
  padding: 50px 20px;
  font-family: Arial, sans-serif;
  font-size: clamp(14px, 2vw, 20px);
  width: 100%;
  max-width: 100vw;
}

/* База: мобильные/планшеты */
.footer-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 2fr 2fr; /* Можно настроить: 1-я колонка, 2-я колонка, 3-я, 4-я */
  gap: 20px;
  padding: 0 20px;
}

.footer-col {
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
}

.footer-logo img {
  width: 100%;
  margin-bottom: 15px;
}

.footer-desc {
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-col p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-col h4 {
  color: #8ec0b1;
  margin: 0 0 12px;
  font-size: clamp(18px, 2.5vw, 25px);
}

.footer-col ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  display: inline-block;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-col a:hover {
  color: #e87722;
}

.social-icons {
  margin-top: 8px;
}

.social-icons a {
  display: inline-block;
  margin-right: 10px;
  width: 38px;
  height: 38px;
  background: #333;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  text-align: center;
  line-height: 38px;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: #fff;
  color: #e87722;
}

.footer-bottom {
  margin-top: 30px;
  border-top: 1px solid #333;
  text-align: center;
  padding: 15px 0;
  color: #777;
  font-size: 14px;
}


/* Планшеты: 2 колонки */
@media (max-width: 1024px) and (min-width: 769px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col ul {
    text-align: center;
    display: inline-block;
  }
}

/* Мобильная адаптация футера */
@media (max-width: 768px) {
  .footer {
    padding: 30px 10px;
  }
  .footer-container {
    grid-template-columns: 1fr; /* Одна колонка на мобильных */
    padding: 0 10px;
    gap: 15px;
    text-align: center;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col ul {
    text-align: center;
    display: inline-block;
  }
  .social-icons a {
    margin-right: 8px;
    width: 32px;
    height: 32px;
    font-size: 16px;
    line-height: 32px;
  }
  .footer-logo img {
    width: 120px;
  }
}

