/* ================================================================
   MAF Industry — Sections
   ================================================================
   Стили конкретных секций лендинга.
   Каждая секция — отдельный блок с чётким разделителем.
   ================================================================ */

/* ----------------------------------------------------------------
   1. HERO (Главный экран)
---------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 100px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-desc {
  max-width: 480px;
  margin-bottom: 25px;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Правая колонка — фрейм с изображением */
.hero-visual { position: relative; z-index: 1; }

.hero-image-frame {
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.1); /* Rim light эффект */
}

.hero-image-frame img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

/* Декоративный отставший прямоугольник (золотой бордер) */
.hero-decorative-box {
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 80%;
  height: 80%;
  border: 1px solid var(--accent);
  opacity: 0.3;
  z-index: -1;
}

/* Плавающий чип с образцом материала */
.swatch-floating {
  position: absolute;
  top: -20px;
  right: -20px;
  background: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
}

.swatch-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e6e6e6; /* Placeholder бетона */
}

.swatch-floating span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------
   PENDULUM — Анимированная метка EST. 2005
   Поворачивается на -90° при загрузке страницы.
---------------------------------------------------------------- */
.meta-pendulum-wrapper {
  position: relative;
  height: 30px;
  margin: 25px 0;
  z-index: 10;
  top: 0;
}

.meta-pendulum {
  position: absolute;
  bottom: -5px;
  left: -70px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  white-space: nowrap;
  transform-origin: left bottom;
  opacity: 0;
  animation: rotateOnly 3s cubic-bezier(0.19, 1, 0.22, 1) forwards 0.8s;
  pointer-events: none;
  width: 240px;
  will-change: transform;
}

.meta-pendulum .meta-line {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--accent);
  margin: 0 4px;
}

@keyframes rotateOnly {
  0%   { transform: rotate(0deg);    opacity: 0; }
  20%  { transform: rotate(0deg);    opacity: 1; }
  80%  { transform: rotate(-95deg);  opacity: 1; }
  100% { transform: rotate(-90deg);  opacity: 1; }
}

/* ----------------------------------------------------------------
   2. СТАТИСТИКА (4 колонки под hero)
---------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
  padding: 100px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-top: 40px;
}

/* Большой золотой курсивный числовой показатель */
.stat-val {
  font-size: 4rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 20px;
  font-weight: 400;
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.9;
}

/* ----------------------------------------------------------------
   3. HERITAGE (Наследие и масштаб)
   Двухколоночная сетка: текст слева, фото справа.
---------------------------------------------------------------- */
.heritage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* ----------------------------------------------------------------
   4. PORTFOLIO (Галерея)
---------------------------------------------------------------- */
.portfolio-header {
  text-align: left;
  margin-bottom: 80px;
  max-width: 900px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}

.portfolio-card {
  position: relative;
  transition: transform 0.4s var(--transition-smooth);
  will-change: transform;
}

.portfolio-img-wrapper {
  overflow: hidden;
  margin-bottom: 24px;
  aspect-ratio: 4/5;
  background: #fff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  position: relative;
}

/* Тёмный градиент появляется на hover */
.portfolio-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.2), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.portfolio-card:hover .portfolio-img-wrapper::after { opacity: 1; }

.portfolio-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--transition-smooth);
  filter: saturate(0.9);
}

.portfolio-card:hover .portfolio-img-wrapper img {
  transform: scale(1.08);
  filter: saturate(1.1);
}

.portfolio-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.portfolio-meta {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 12px;
}

/* ----------------------------------------------------------------
   5. CATALOG
---------------------------------------------------------------- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.catalog-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #fff;
  padding: 16px;
  border: 1px solid var(--border-subtle);
}

.catalog-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.catalog-overlay {
  position: absolute;
  inset: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  color: #fff;
  opacity: 0.9;
  transition: opacity 0.4s;
}

.catalog-item:hover img { transform: scale(1.05); }

.catalog-overlay h3 {
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 10px;
}

.catalog-overlay p {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}

/* ----------------------------------------------------------------
   6. КАРТА России (Geography section)
   SVG-карта с интерактивными пульсирующими точками.
   Tooltip управляется через JS (main.js — initMap()).
---------------------------------------------------------------- */
.map-wrapper {
  margin: 60px 0;
  position: relative;
  width: 100%;
}

.map-container {
  position: relative;
  width: 100%;
  aspect-ratio: 600/330;
  background: transparent;
  border: none;
  overflow: visible; /* Tooltip может выходить за пределы */
}

.russia-map {
  width: 100%;
  height: 100%;
  display: block;
}

/* Невидимая зона клика — расширяет hit area точки */
.point-hit {
  fill: #fff;
  opacity: 0;
  pointer-events: all;
}

.point-group { cursor: pointer; }

/* Точка проекта */
.map-point {
  fill: var(--accent);
  transition: all 0.3s var(--transition-smooth);
}

.point-group:hover .map-point {
  r: 6;
  fill: var(--text-primary);
}

/* Пульсирующие кольца вокруг точек */
@keyframes mapPulse {
  0%   { r: 4;  opacity: 1; }
  100% { r: 16; opacity: 0; }
}

.map-pulse       { fill: var(--accent); pointer-events: none; }
.pulse-1         { animation: mapPulse 2.5s infinite; }
.pulse-2         { animation: mapPulse 2.5s infinite 0.8s; }
.pulse-3         { animation: mapPulse 2.5s infinite 1.6s; }

/* Тултип при hover на точку */
.map-tooltip {
  position: absolute;
  background: var(--bg-dark);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-10px);
  transition: all 0.3s var(--transition-smooth);
  z-index: 10;
  white-space: nowrap;
}

.map-tooltip.active {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-20px);
}

.tooltip-city {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  color: var(--accent);
}

.tooltip-project {
  font-weight: 300;
  opacity: 0.8;
}

/* ----------------------------------------------------------------
   7. GEO STATS (под картой)
---------------------------------------------------------------- */
.geo-stats-grid {
  display: flex;
  gap: 80px;
  margin-top: 60px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 60px 0;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------------
   8. CTA СЕКЦИЯ (Форма заявки)
---------------------------------------------------------------- */
.cta-section {
  background: var(--bg-dark);
  color: #fff;
  text-align: center;
  padding: 120px 0;
}

.cta-section h2,
.cta-section h3,
.cta-section p {
  color: inherit;
}

.cta-section p {
  opacity: 0.7;
  max-width: 600px;
  margin: 0 auto 40px;
}

.cta-form {
  max-width: 1020px;
  margin: 0 auto;
}

.cta-form .wpcf7 {
  width: 100%;
}

.cta-form .wpcf7-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 22px 26px;
  align-items: start;
  margin: 0;
}

.cta-form .wpcf7-form p {
  display: contents;
  margin: 0;
}

.cta-form .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  min-width: 0;
}

.cta-form .wpcf7-form label {
  display: block;
  margin: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.cta-form .wpcf7-form label br {
  display: none;
}

.cta-form input,
.cta-form .wpcf7 input[type="text"],
.cta-form .wpcf7 input[type="tel"],
.cta-form .wpcf7 input[type="email"] {
  width: 100%;
  min-height: 60px;
  padding: 0 42px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  font-family: 'Inter', sans-serif;
  outline: none;
  border-radius: 4px;
  font-size: 1.08rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.cta-form .wpcf7-form-control-wrap[data-name="your-phone"] input,
.cta-form .wpcf7-form-control-wrap[data-name="your-tel"] input,
.cta-form .wpcf7-form-control-wrap[data-name="phone"] input {
  border-color: rgba(197,160,89,0.95);
}

.cta-form input::placeholder,
.cta-form .wpcf7 input::placeholder {
  color: rgba(255,255,255,0.32);
  opacity: 1;
}

.cta-form input:focus,
.cta-form .wpcf7 input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197,160,89,0.12);
}

.cta-form button,
.cta-form .wpcf7 input[type="submit"] {
  grid-column: 1 / -1;
  justify-self: center;
  background: var(--accent);
  border: none;
  color: #fff;
  width: 324px;
  min-height: 60px;
  padding: 0 40px;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s, opacity 0.3s;
  font-family: 'Inter', sans-serif;
  margin-top: 6px;
}

.cta-form button:hover,
.cta-form .wpcf7 input[type="submit"]:hover {
  background: var(--accent-dark);
  opacity: 0.96;
}

.cta-form .wpcf7-response-output {
  grid-column: 1 / -1;
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  margin: 16px 0 0;
  padding: 14px 16px;
  width: 100%;
}

.cta-form .wpcf7-not-valid-tip,
.cta-form .wpcf7 form.invalid .wpcf7-response-output,
.cta-form .wpcf7 form.unaccepted .wpcf7-response-output,
.cta-form .wpcf7 form.failed .wpcf7-response-output {
  color: #ffb4b4;
}

.cta-form .wpcf7 form.sent .wpcf7-response-output {
  color: #b7f8cb;
  border-color: rgba(183,248,203,0.45);
}

.cta-form .wpcf7-spinner {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 8px auto 0;
}

.cta-form-notice {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.85);
}
