/* СофтЭксперт — Сайт-визитка */
/* Цвета: белый фон, синий #1e3a8a, красный #dc2626 */

:root {
  --color-white: #ffffff;
  --color-blue: #1e3a8a;
  --color-blue-light: #2563eb;
  --color-red: #dc2626;
  --color-red-hover: #b91c1c;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
  min-width: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

a {
  color: var(--color-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  min-width: 0;
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
}

/* Header */
.header {
  background: var(--color-white);
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.header__logo {
  flex-shrink: 0;
}

.header__logo:hover {
  opacity: 0.85;
}

.header__logo-img {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.header__nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.header__link {
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.2s;
}

.header__link:hover {
  color: var(--color-blue);
  text-decoration: none;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header__phone {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

.header__phone:hover {
  color: var(--color-blue);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn--primary {
  background: var(--color-red);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-red-hover);
  text-decoration: none;
  color: var(--color-white);
}

.btn--secondary {
  background: var(--color-blue);
  color: var(--color-white);
}

.btn--secondary:hover {
  background: var(--color-blue-light);
  text-decoration: none;
  color: var(--color-white);
}

/* Hero */
.hero {
  padding: 80px 0 100px;
  background: var(--color-white);
}

.hero__title {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: 16px;
  max-width: 700px;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-muted);
  margin-bottom: 32px;
  max-width: 600px;
  word-wrap: break-word;
}

.hero__buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Section title */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: 40px;
  text-align: center;
}

/* Services */
.services {
  padding: 80px 0;
  background: #f9fafb;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  min-width: 0;
}

.service-card {
  background: var(--color-white);
  padding: 28px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.2s;
  min-width: 0;
}

.service-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border-radius: 8px;
  margin-bottom: 16px;
}

.service-card__icon--blue {
  background: rgba(30, 58, 138, 0.1);
  color: var(--color-blue);
}

.service-card__icon--red {
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-red);
}

.service-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-blue);
  margin-bottom: 8px;
}

.service-card__text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Битрикс24 — блок возможностей */
.b24-detail {
  padding: 80px 0;
  background: linear-gradient(180deg, #f1f5f9 0%, #ffffff 22%, #ffffff 100%);
  border-top: 1px solid #e2e8f0;
}

.b24-detail__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.b24-detail__title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--color-blue);
  line-height: 1.25;
  margin-bottom: 12px;
}

.b24-detail__subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

.b24-detail__intro {
  max-width: 880px;
  margin: 0 auto 48px;
  padding: 28px 32px;
  background: var(--color-white);
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 24px rgba(30, 58, 138, 0.06);
}

.b24-detail__intro-text {
  margin: 0;
  color: var(--color-text);
  line-height: 1.7;
  font-size: 1.02rem;
}

.b24-detail__intro-text a {
  font-weight: 600;
  color: var(--color-blue-light);
}

.b24-detail__intro-text a:hover {
  color: var(--color-blue);
}

.b24-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-bottom: 48px;
}

.b24-feature {
  background: var(--color-white);
  border-radius: 14px;
  padding: 24px 22px;
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.b24-feature:hover {
  border-color: rgba(30, 58, 138, 0.2);
  box-shadow: 0 12px 32px rgba(30, 58, 138, 0.1);
  transform: translateY(-2px);
}

.b24-feature__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 12px;
  margin-bottom: 14px;
}

.b24-feature__icon--blue {
  background: rgba(30, 58, 138, 0.1);
}

.b24-feature__icon--red {
  background: rgba(220, 38, 38, 0.1);
}

.b24-feature__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-blue);
  margin: 0 0 10px;
  line-height: 1.35;
}

.b24-feature__text {
  margin: 0;
  font-size: 0.94rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.b24-detail__cta {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 32px 28px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.08) 0%, rgba(220, 38, 38, 0.06) 100%);
  border-radius: 16px;
  border: 1px solid rgba(30, 58, 138, 0.12);
}

.b24-detail__cta-text {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.55;
}

.b24-detail__cta-btn {
  min-width: 200px;
}

/* About */
.about {
  padding: 80px 0;
  background: var(--color-white);
}

.about__content {
  max-width: 800px;
  margin: 0 auto;
}

.about__text {
  margin-bottom: 16px;
  color: var(--color-text);
}

.about__advantages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.advantage {
  text-align: center;
  padding: 24px;
}

.advantage__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 50%;
}

.advantage__icon--blue {
  background: rgba(30, 58, 138, 0.1);
  color: var(--color-blue);
}

.advantage__icon--red {
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-red);
}

.advantage__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-blue);
  margin-bottom: 8px;
}

.advantage__text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Footer */
.footer {
  background: #1f2937;
  color: #e5e7eb;
  padding: 48px 0 24px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer__company {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 12px;
}

.footer__address {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #d1d5db;
  margin-bottom: 16px;
  max-width: 28rem;
}

.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.footer__telegram-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  background: #229ed9;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.footer__telegram-btn:hover {
  background: #1b8bc4;
  color: var(--color-white);
  text-decoration: none;
}

.footer__telegram-btn:active {
  transform: scale(0.98);
}

.footer__telegram-icon {
  flex-shrink: 0;
}

.footer__link {
  color: #e5e7eb;
}

.footer__link:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.footer__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
}

.footer__input {
  padding: 12px 16px;
  border: 1px solid #4b5563;
  border-radius: 8px;
  background: #374151;
  color: var(--color-white);
  font-size: 1rem;
}

.footer__input::placeholder {
  color: #9ca3af;
}

.footer__input:focus {
  outline: none;
  border-color: var(--color-blue-light);
}

.footer__bottom {
  border-top: 1px solid #374151;
  padding-top: 24px;
}

.footer__copyright {
  font-size: 0.875rem;
  color: #9ca3af;
}

/* Responsive — планшеты */
@media (max-width: 992px) {
  .header__container {
    gap: 12px;
  }

  .header__nav {
    gap: 16px;
  }

  .hero {
    padding: 60px 0 80px;
  }

  .services,
  .about {
    padding: 60px 0;
  }

  .section-title {
    margin-bottom: 32px;
  }
}

/* Responsive — мобильные */
@media (max-width: 768px) {
  /* Шапка прокручивается вместе со страницей — не перекрывает контент */
  .header {
    padding: 12px 0;
    position: static;
  }

  .header__container {
    flex-direction: column;
    align-items: center;
    row-gap: 12px;
    text-align: center;
  }

  .header__logo {
    display: none;
  }

  /* Телефон и кнопка скрыты на мобильных — есть в блоке Контакты */
  .header__actions {
    display: none;
  }

  .header__nav {
    order: 1;
    margin-left: 0;
    width: 100%;
    flex-basis: 100%;
    justify-content: center;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
    gap: 12px;
    flex-wrap: wrap;
  }

  .hero {
    padding: 40px 0 56px;
  }

  .hero__buttons {
    flex-direction: column;
    gap: 12px;
  }

  .hero__buttons .btn {
    width: 100%;
  }

  .services {
    padding: 48px 0;
  }

  .b24-detail {
    padding: 48px 0;
  }

  .b24-detail__intro {
    padding: 20px 18px;
    margin-bottom: 32px;
  }

  .b24-detail__grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 36px;
  }

  .b24-detail__cta {
    padding: 24px 20px;
  }

  .b24-detail__cta-btn {
    width: 100%;
  }

  .about {
    padding: 48px 0;
  }

  .about__advantages {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .footer {
    padding: 40px 0 20px;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 32px;
  }

  .footer__form {
    max-width: 100%;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive — маленькие телефоны */
@media (max-width: 480px) {
  .header {
    padding: 10px 0;
  }

  .header__link {
    font-size: 0.9rem;
    padding: 4px 6px;
  }

  .header__nav {
    gap: 8px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .service-card {
    padding: 20px;
  }

  .footer__input {
    min-height: 48px;
    font-size: 16px; /* предотвращает zoom на iOS */
  }

  .section-title {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
  }
}

/* Очень узкие экраны */
@media (max-width: 360px) {
  .container {
    padding: 0 12px;
  }

  .header__nav {
    gap: 10px;
  }

  .header__link {
    font-size: 0.85rem;
  }
}
