/* layout.css — базовые стили и утилиты для всего сайта */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: 'Inter';
  src: url('/css/fonts/Inter-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/css/fonts/Inter-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-green: #81d100;
  --brand-purple: #94569f;
  --brand-yellow: #fff700;
  --text-main: #333;
  --text-muted: #555;
  --bg-main: #f5f5f5;
  --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

main {
  flex: 1;
  width: 100%;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  padding: 64px 0;
}

.section.compact {
  padding: 32px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}

.text-muted {
  color: var(--text-muted);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.25s;
}

.btn-green {
  background-color: var(--brand-green);
  color: #fff;
}

.btn-green:hover {
  background-color: #6fb203;
}

.btn-purple {
  background-color: var(--brand-purple);
  color: #fff;
}

.btn-purple:hover {
  background-color: #801294;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-main);
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.05);
}

/* Модальные окна */
.modalDialog {
  position: fixed;
  font-family: 'Inter', sans-serif;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modalDialog:target {
  opacity: 1;
  pointer-events: auto;
}

.modalDialog > div {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  position: relative;
}

.modalDialog .close {
  color: #888;
  line-height: 32px;
  position: absolute;
  right: 12px;
  top: 12px;
  text-decoration: none;
  font-size: 18px;
}

.modalDialog .close:hover {
  color: #000;
}

.modalDialog p {
  margin: 0 0 12px;
}

.modalDialog input[type="text"],
.modalDialog input[type="email"],
.modalDialog input[type="tel"] {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 6px 0 14px;
  font-size: 1rem;
}

.modalDialog label {
  font-size: 0.95rem;
  color: var(--text-main);
}

.modalDialog table {
  width: 100%;
}

.modalDialog .personal-info {
  font-size: 9px;
  color: #555;
}

.modalDialog .btn {
  width: 100%;
}

@media (max-width: 540px) {
  .modalDialog > div {
    padding: 20px;
  }
}

@media (max-width: 1024px) {
  .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }

  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}
