/* ============================================
   360promo — Маркетинговое агентство
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #F90427;
  --red-hover: #E00423;
  --red-active: #CA0320;
  --red-transparent: rgba(249, 4, 39, 0.6);
  --dark: #2A313A;
  --text: #333;
  --text-light: #626262;
  --white: #fff;
  --border: rgba(0,0,0,0.1);
  --radius: 5px;
  --radius-lg: 8px;
  --shadow: 0 3px 9px rgba(0,0,0,0.5);
  --font-main: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-heading: 'Montserrat', 'TTNorms Bold', sans-serif;
  --font-heading-medium: 'Montserrat', 'TTNorms Medium', sans-serif;
  --section-pad: 50px;
  --container: 1140px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: rgb(25, 100, 230); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.1; color: var(--text); }
h1 { font-size: 47px; }
h2 { font-size: 64px; font-weight: 600; }
h3 { font-size: 48px; font-weight: 600; }
h4 { font-size: 47px; font-weight: 700; color: var(--dark); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  text-align: center;
  cursor: pointer;
  border: none;
  font-family: var(--font-main);
  font-weight: 600;
  transition: background-color 0.3s, border-color 0.3s;
  text-decoration: none;
  border-radius: var(--radius);
}

.btn-sm {
  background-color: var(--red-transparent);
  color: var(--white) !important;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: var(--radius);
}
.btn-sm:hover { background-color: var(--red-hover); }
.btn-sm:active { background-color: var(--red-active); }
.btn-sm .fas { font-size: 18px; margin-right: 7px; vertical-align: middle; }

.btn-primary {
  background-color: var(--red);
  color: var(--white) !important;
  padding: 17px 34px;
  font-size: 14px;
  font-weight: 700;
}
.btn-primary:hover { background-color: var(--red-hover); }
.btn-primary:active { background-color: var(--red-active); }
.btn-primary .fas { font-size: 18px; margin-right: 7px; vertical-align: middle; }

.btn-submit {
  background-color: var(--red);
  color: var(--white) !important;
  padding: 14px 34px;
  font-size: 16px;
  font-weight: 400;
  width: 100%;
  cursor: pointer;
}
.btn-submit:hover { background-color: var(--red-hover); }
.btn-submit:active { background-color: var(--red-active); }
.btn-submit .fas { font-size: 18px; margin-right: 7px; }

/* --- Header --- */
.header {
  background: var(--white);
  padding: 20px 0;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-logo img { width: 131px; height: 131px; }
.header-tagline { font-size: 16px; font-weight: 700; color: var(--text); }
.header-nav { display: flex; align-items: center; gap: 5px; }
.header-nav .btn { 
  margin: 0; 
  border: 1px solid rgba(249, 4, 39, 0.3);
}
.header-nav .btn.btn-sm:hover {
  border-color: var(--red);
}

/* --- Sections --- */
.section { padding: var(--section-pad) 0; }
.section-white { background: var(--white); }
.section-hero { padding: 50px 0; }

/* Grid */
.grid-row {
  display: flex;
  align-items: center;
  gap: 30px;
}
.grid-row-top { align-items: flex-start; }
.col-text { flex: 1; }
.col-img { flex: 0 0 auto; max-width: 50%; }
.col-img img { max-height: 500px; border-radius: 0; }

/* Hero */
.hero-content { max-width: 640px; }
.hero-content h1 { font-size: 47px; font-family: var(--font-heading); margin-bottom: 0; }
.hero-content .hero-subtitle {
  font-family: var(--font-heading-medium);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.71;
  margin: 5px 0 46px;
}
.hero-image img { max-height: 500px; width: auto; }

/* Advantages */
.advantages .section-title {
  text-align: center;
  font-family: var(--font-heading-medium);
  font-size: 64px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 30px;
}
.adv-item {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 20px;
}
.adv-item-img { flex: 0 0 170px; }
.adv-item-img img { width: 100%; border-radius: 0; }
.adv-item-text h3 { font-size: 64px; font-weight: 300; line-height: 1.2; margin-bottom: 6px; font-family: var(--font-heading-medium); }
.adv-item-text p { font-size: 16px; line-height: 1.6; }

/* Cases Slider */
.cases .section-title {
  text-align: center;
  font-family: var(--font-heading-medium);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 48px;
}
.slider {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 900px;
  margin: 0 auto 30px;
}
.slider-container { flex: 1; overflow: hidden; margin: 0 20px; }
.slider-track { display: flex; transition: transform 0.5s ease; }
.slider-slide { min-width: 100%; padding: 0 15px; text-align: center; }
.slider-slide p {
  font-size: 20px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 20px;
}
.slider-slide img { max-height: 235px; margin: 0 auto; }
.slider-btn {
  flex: 0 0 60px;
  height: 60px;
  border: 3px solid rgba(51,51,51,0.2);
  border-radius: 50%;
  background: none;
  color: rgb(22,102,241);
  font-size: 20px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider-btn:hover { opacity: 1; }
.slider-dots { text-align: center; margin-top: 20px; }
.slider-dot {
  display: inline-block;
  width: 40px; height: 40px;
  background: rgba(51,51,51,0.2);
  border-radius: 50%;
  margin: 0 7px;
  cursor: pointer;
  transition: background 0.3s, width 0.3s, height 0.3s;
}
.slider-dot.active { background: rgb(22,102,241); width: 60px; height: 60px; }

/* Form Section */
.section-cta {
  position: relative;
  padding: 112px 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.section-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.4);
}
.section-cta .container { position: relative; z-index: 1; }

.cta-card {
  background: var(--white);
  border: 2px solid rgb(243,243,243);
  border-radius: var(--radius-lg);
  padding: 63px 7px;
  max-width: 900px;
  margin: 0 auto;
}
.cta-card h4 { font-size: 37px; margin-bottom: 25px; }
.cta-card ul { list-style: none; padding: 0; }
.cta-card ul li {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-light);
  padding: 5px 0;
  padding-left: 20px;
  position: relative;
}
.cta-card ul li::before { content: '✓'; position: absolute; left: 0; color: var(--red); font-weight: bold; }
.cta-form { margin-top: 34px; }
.form-row { display: flex; gap: 15px; align-items: flex-end; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 200px; }
.form-group label {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 6.5px;
}
.form-group input {
  width: 100%;
  padding: 12px 10px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--white);
  color: rgba(0,0,0,0.5);
  font-family: var(--font-main);
}
.form-group input:focus {
  outline: none;
  border-color: rgb(22,102,241);
  background: rgb(252,252,252);
}
.form-submit { flex: 0 0 auto; }

/* Footer */
.footer {
  background: var(--white);
  padding: 20px 0;
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo img { width: 131px; height: 131px; }
.footer-tagline { font-size: 16px; font-weight: 700; }
.footer-nav { display: flex; align-items: center; gap: 5px; }
.footer-legal {
  text-align: center;
  font-size: 13px;
  padding: 10px 0;
  color: var(--text);
  opacity: 0.8;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-box {
  background: var(--white);
  border-radius: 6px;
  width: 400px;
  max-width: 90vw;
  position: relative;
  box-shadow: var(--shadow);
  transform: scale(1.1);
  transition: transform 0.3s;
}
.modal-overlay.active .modal-box { transform: scale(1); }
.modal-header {
  padding: 15px;
  background: rgb(173,177,184);
  border-radius: 6px 6px 0 0;
}
.modal-header h5 {
  color: var(--white);
  font-size: 23px;
  font-family: var(--font-heading-medium);
  text-align: center;
  line-height: 1.1;
}
.modal-body { padding: 15px; }
.modal-body p {
  text-align: center;
  font-size: 16px;
  opacity: 0.65;
  line-height: 1.4;
}
.modal-form .form-group { margin-bottom: 14px; }
.modal-close {
  position: absolute;
  top: -10px; right: -10px;
  width: 30px; height: 30px;
  background: var(--white);
  border: 2px solid black;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.modal-close:hover { transform: scale(1.1); }
.modal-close::before, .modal-close::after {
  content: '';
  position: absolute;
  width: 16px; height: 2px;
  background: black;
}
.modal-close::before { transform: rotate(45deg); }
.modal-close::after { transform: rotate(-45deg); }

/* --- Blog Page --- */
.blog-page {
  background: var(--white);
  padding: 40px 0;
}
.blog-content {
  max-width: 800px;
  margin: 0 auto;
}
.blog-content h1 { font-size: 36px; margin-bottom: 20px; line-height: 1.3; }
.blog-content h2 { font-size: 28px; margin: 30px 0 15px; }
.blog-content h3 { font-size: 22px; margin: 25px 0 10px; }
.blog-content p {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.8;
}
.blog-content ul, .blog-content ol {
  margin-bottom: 20px;
  padding-left: 25px;
}
.blog-content ul li, .blog-content ol li {
  margin-bottom: 8px;
  line-height: 1.6;
}
.blog-content strong { color: var(--dark); }

/* --- Success message --- */
.success-msg {
  display: none;
  text-align: center;
  padding: 30px;
  color: #2e7d32;
  font-size: 18px;
  font-weight: 600;
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }

/* --- Responsive --- */
@media (max-width: 992px) {
  h1 { font-size: 42px; }
  h2 { font-size: 48px; }
  h3 { font-size: 36px; }
  h4 { font-size: 36px; }
  
  .header .container { flex-wrap: wrap; justify-content: center; text-align: center; }
  .header-nav { flex-wrap: wrap; justify-content: center; margin-top: 10px; }
  
  .grid-row { flex-direction: column; text-align: left; }
  .col-img { max-width: 100%; order: -1; }
  .hero-image { text-align: center; }
  .hero-content h1 { font-size: 36px; }
  
  .adv-item { flex-direction: column; gap: 10px; }
  .adv-item-img { flex: 0 0 auto; max-width: 100px; }
  .adv-item-text h3 { font-size: 40px; }
  
  .section-cta { padding: 60px 0; }
  .cta-card { padding: 40px 15px; }
  
  .form-row { flex-direction: column; }
  .form-submit { width: 100%; }
  
  .footer .container { flex-direction: column; text-align: center; }
  .footer-logo { flex-direction: column; }
}

@media (max-width: 767px) {
  h1 { font-size: 28px; }
  h2 { font-size: 32px; }
  h3 { font-size: 26px; }
  h4 { font-size: 26px; }
  
  .hero-content h1 { font-size: 28px; }
  .hero-content .hero-subtitle { font-size: 18px; }
  
  .advantages .section-title { font-size: 32px; }
  .adv-item-text h3 { font-size: 28px; }
  
  .cases .section-title { font-size: 28px; }
  
  .slider-btn { display: none; }
  .slider-container { margin: 0; }
  
  .cta-card h4 { font-size: 24px; }

  .modal-box { width: 95vw; }
}