/*
Theme Name:  MediaScan Landing
Theme URI:   https://www.mediascan.com.ua/
Author:      MediaScan
Author URI:  https://www.mediascan.com.ua/
Description: Односторінковий лендінг для застосунку MediaScan.
Version:     1.0.0
License:     Private
Text Domain: mediascan
*/

/* ═══════════════════════════════════════════════════════════════════
   MEDIASCAN LANDING — Main Stylesheet
   Підключається через functions.php → wp_enqueue_style()
═══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #E8192C;
  --red-deep:   #B5111E;
  --red-light:  #FF3347;
  --red-glow:   rgba(232,25,44,0.18);
  --red-subtle: rgba(232,25,44,0.07);
  --bg:         #FAFAFA;
  --white:      #FFFFFF;
  --ink:        #0D0D0D;
  --text:       #111111;
  --text-2:     #444444;
  --text-3:     #888888;
  --line:       rgba(0,0,0,0.07);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── AMBIENT ─── */
#ms-ambient {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.ms-amb-orb {
  position: absolute; border-radius: 50%; filter: blur(100px); will-change: transform;
}
.ms-amb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(232,25,44,0.13) 0%, transparent 65%);
  top: -200px; right: -100px;
  animation: ms-amb-drift-1 12s ease-in-out infinite;
}
.ms-amb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232,25,44,0.08) 0%, transparent 65%);
  bottom: 5%; left: -80px;
  animation: ms-amb-drift-2 16s ease-in-out infinite;
}
.ms-amb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(232,25,44,0.06) 0%, transparent 65%);
  top: 45%; left: 40%;
  animation: ms-amb-drift-3 10s ease-in-out infinite;
}
@keyframes ms-amb-drift-1 {
  0%,100% { transform: translate(0,0); }
  40%     { transform: translate(-40px, 50px); }
  70%     { transform: translate(30px,-30px); }
}
@keyframes ms-amb-drift-2 {
  0%,100% { transform: translate(0,0); }
  50%     { transform: translate(60px,-40px); }
}
@keyframes ms-amb-drift-3 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-20px,30px) scale(1.15); }
}
.ms-amb-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 20%, transparent 100%);
}

/* ─── LAYOUT ─── */
.ms-wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* ─── NAV ─── */
.ms-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.ms-nav.scrolled {
  background: rgba(250,250,250,0.88);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 40px rgba(0,0,0,0.04);
}
.ms-nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 28px;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.ms-logo {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--text);
}
.ms-logo img { height: 34px; width: auto; object-fit: contain; border-radius: 7px; }
.ms-logo-text { font-size: 18px; font-weight: 800; letter-spacing: -0.6px; }
.ms-logo-text em { font-style: normal; color: var(--red); }

.ms-nav-links { display: flex; align-items: center; gap: 36px; }
.ms-nav-links a {
  font-size: 13.5px; font-weight: 500; color: var(--text-2);
  text-decoration: none; letter-spacing: 0.1px;
  transition: color 0.2s; position: relative;
}
.ms-nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0; right: 0; height: 1px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.ms-nav-links a:hover { color: var(--text); }
.ms-nav-links a:hover::after { transform: scaleX(1); }

.ms-btn-nav {
  background: var(--red); color: #fff; border: none; border-radius: 9px;
  padding: 9px 22px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; letter-spacing: 0.1px;
  transition: background 0.2s, box-shadow 0.3s, transform 0.2s;
}
.ms-btn-nav:hover {
  background: var(--red-light); color: #fff; text-decoration: none;
  box-shadow: 0 0 28px rgba(232,25,44,0.4); transform: translateY(-1px);
}

/* ─── BUTTONS ─── */
button.ms-btn-primary { cursor: pointer; border: none; font-family: inherit; }
.ms-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff;
  border-radius: 12px; padding: 15px 34px;
  font-size: 15px; font-weight: 700; letter-spacing: -0.2px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(232,25,44,0.25);
  transition: background 0.25s, box-shadow 0.3s, transform 0.2s;
  position: relative; overflow: hidden;
}
.ms-btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.ms-btn-primary:hover {
  background: var(--red-light); color: #fff; text-decoration: none;
  box-shadow: 0 0 40px rgba(232,25,44,0.5), 0 8px 32px rgba(232,25,44,0.2);
  transform: translateY(-2px);
}
.ms-btn-primary:hover::before { opacity: 1; }

.ms-btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 15px 34px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.2px;
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.3s, transform 0.2s, background 0.25s;
}
.ms-btn-ghost:hover {
  border-color: rgba(232,25,44,0.4);
  box-shadow: 0 0 20px rgba(232,25,44,0.08);
  background: rgba(232,25,44,0.03);
  transform: translateY(-1px);
  color: var(--text); text-decoration: none;
}
.ms-btn-arrow { display: inline-block; transition: transform 0.2s; }
.ms-btn-primary:hover .ms-btn-arrow,
.ms-btn-ghost:hover .ms-btn-arrow { transform: translateX(4px); }

/* ─── HERO ─── */
.ms-hero { padding: 156px 0 100px; text-align: center; position: relative; z-index: 1; }

.ms-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 36px;
  opacity: 0; animation: ms-fade-up 0.7s 0.1s cubic-bezier(.22,.68,0,1.2) forwards;
}
.ms-eyebrow-line { width: 32px; height: 1px; background: linear-gradient(90deg, transparent, var(--red)); }
.ms-eyebrow-line.right { background: linear-gradient(90deg, var(--red), transparent); }
.ms-eyebrow-text { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--red); }

.ms-hero-h1 {
  font-size: clamp(44px, 7.5vw, 88px);
  font-weight: 900; letter-spacing: -4px; line-height: 1.0;
  margin-bottom: 28px; color: var(--text);
  opacity: 0; animation: ms-fade-up 0.8s 0.2s cubic-bezier(.22,.68,0,1.2) forwards;
}
.ms-hero-h1 .ms-accent { color: var(--red); position: relative; display: inline-block; }
.ms-hero-h1 .ms-accent::after {
  content: ''; position: absolute; bottom: 4px; left: 0; right: 0; height: 3px;
  background: var(--red); border-radius: 2px;
  box-shadow: 0 0 16px rgba(232,25,44,0.7), 0 0 40px rgba(232,25,44,0.3);
  animation: ms-underline-draw 0.7s 0.9s cubic-bezier(.22,.68,0,1.2) both;
  transform-origin: left;
}
@keyframes ms-underline-draw {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

.ms-hero-sub {
  font-size: 18px; font-weight: 400; color: var(--text-2);
  max-width: 500px; margin: 0 auto 48px; line-height: 1.72;
  opacity: 0; animation: ms-fade-up 0.8s 0.35s cubic-bezier(.22,.68,0,1.2) forwards;
}
.ms-hero-cta {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  opacity: 0; animation: ms-fade-up 0.8s 0.48s cubic-bezier(.22,.68,0,1.2) forwards;
}
.ms-hero-phone {
  margin-top: 64px;
  opacity: 0; animation: ms-fade-up 0.9s 0.6s cubic-bezier(.22,.68,0,1.2) forwards;
  display: flex; justify-content: center;
}
.ms-hero-phone img {
  max-width: 320px; width: 100%;
  filter: drop-shadow(0 32px 80px rgba(0,0,0,0.18)) drop-shadow(0 0 40px rgba(232,25,44,0.15));
  border-radius: 40px;
}

/* ─── TICKER ─── */
.ms-ticker-section { position: relative; z-index: 1; padding: 0 0 96px; opacity: 0; animation: ms-fade-in 0.8s 0.7s ease forwards; }
.ms-ticker-track {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 0; overflow: hidden; position: relative;
  background: rgba(255,255,255,0.6); backdrop-filter: blur(10px);
}
.ms-ticker-track::before, .ms-ticker-track::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2;
}
.ms-ticker-track::before { left: 0; background: linear-gradient(90deg, var(--bg) 30%, transparent); }
.ms-ticker-track::after  { right: 0; background: linear-gradient(-90deg, var(--bg) 30%, transparent); }
.ms-ticker-belt { display: flex; width: max-content; animation: ms-belt-scroll 30s linear infinite; }
.ms-ticker-belt:hover { animation-play-state: paused; }
@keyframes ms-belt-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ms-ticker-item { display: flex; align-items: center; gap: 10px; padding: 0 36px; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--text-2); }
.ms-ticker-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(232,25,44,0.7); flex-shrink: 0; }

/* ─── STATS ─── */
.ms-stats-section { position: relative; z-index: 1; padding: 0 0 100px; }
.ms-stats-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: var(--white); box-shadow: 0 2px 40px rgba(0,0,0,0.04);
}
.ms-stat-item { padding: 48px 40px; text-align: center; transition: background 0.3s; }
.ms-stat-item + .ms-stat-item { border-left: 1px solid var(--line); }
.ms-stat-item:hover { background: rgba(232,25,44,0.025); }
.ms-stat-num {
  font-size: 56px; font-weight: 900; letter-spacing: -3px; line-height: 1;
  color: var(--red); margin-bottom: 10px;
  text-shadow: 0 0 40px rgba(232,25,44,0.25); display: inline-block;
}
.ms-stat-num::after { content: attr(data-suffix); font-size: 28px; letter-spacing: -1px; vertical-align: super; margin-left: 2px; }
.ms-stat-label { font-size: 13.5px; color: var(--text-3); font-weight: 500; }

/* ─── FEATURES ─── */
.ms-section { padding: 80px 0; position: relative; z-index: 1; }
.ms-section-head { display: block; gap: 80px;  margin-bottom: 60px; }
.ms-section-head .ms-left { flex: 1; }
.ms-left {diaplay: flex;}
.ms-section-tag { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--red); margin-bottom: 16px; display: block; }
.ms-section-h2 { font-size: clamp(28px, 3.8vw, 42px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.12; color: var(--text); }
.ms-section-desc { font-size: 15.5px; color: var(--text-2); line-height: 1.72; max-width: 340px; flex-shrink: 0; }

.ms-features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border-radius: 20px; overflow: hidden; }
.ms-feat-card { background: var(--white); padding: 36px 32px; transition: background 0.3s; position: relative; overflow: hidden; }
.ms-feat-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--red); box-shadow: 0 0 16px rgba(232,25,44,0.6);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s cubic-bezier(.22,.68,0,1.2);
}
.ms-feat-card:hover { background: rgba(232,25,44,0.018); }
.ms-feat-card:hover::after { transform: scaleX(1); }
.ms-feat-icon {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--red-subtle); border: 1px solid rgba(232,25,44,0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px; transition: box-shadow 0.3s;
}
.ms-feat-card:hover .ms-feat-icon { box-shadow: 0 0 24px rgba(232,25,44,0.25); }
.ms-feat-icon svg { width: 20px; height: 20px; }
.ms-feat-h { font-size: 15.5px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 10px; color: var(--text); }
.ms-feat-p { font-size: 13.5px; color: var(--text-2); line-height: 1.65; }

/* ─── SHOWCASE ─── */
.ms-showcase-section { padding: 60px 0 100px; position: relative; z-index: 1; }
.ms-showcase-section.ms-no-top { padding-top: 0; }
.ms-showcase-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.ms-showcase-inner.ms-flip { direction: rtl; }
.ms-showcase-inner.ms-flip > * { direction: ltr; }
.ms-showcase-img img { width: 100%; border-radius: 24px; box-shadow: 0 24px 80px rgba(0,0,0,0.12); object-fit: cover; }
.ms-showcase-img img.ms-no-shadow { box-shadow: none; border-radius: 24px; object-fit: cover;}
.ms-showcase-copy .ms-section-tag { margin-bottom: 18px; }
.ms-showcase-copy h2 { font-size: clamp(28px, 3.5vw, 40px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 22px; }
.ms-showcase-copy p { font-size: 15.5px; color: var(--text-2); line-height: 1.72; margin-bottom: 32px; }

/* ─── CHECK LIST ─── */
.ms-check-list { display: flex; flex-direction: column; gap: 14px; }
.ms-check-row { display: flex; align-items: flex-start; gap: 14px; }
.ms-check-mark {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px rgba(232,25,44,0.4); margin-top: 2px;
}
.ms-check-mark svg { width: 10px; height: 10px; }
.ms-check-copy { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.ms-check-copy strong { color: var(--text); font-weight: 700; }

/* ─── EDITORIAL PHOTOS ─── */
.ms-photos-section { padding: 40px 0 80px; position: relative; z-index: 1; }
.ms-photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ms-photo-item { border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; box-shadow: 0 4px 24px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; }
.ms-photo-item:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.14); }
.ms-photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.ms-photo-item:hover img { transform: scale(1.04); }

/* ─── LIVE FEED ─── */
.ms-feed-section { padding: 80px 0 100px; position: relative; z-index: 1; }
.ms-feed-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.ms-feed-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 4px 60px rgba(0,0,0,0.06); position: relative;
}
.ms-feed-card::before {
  content: ''; position: absolute; top: 0; left: -60%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(232,25,44,0.04), transparent);
  animation: ms-sweep 4s cubic-bezier(.4,0,.6,1) infinite;
  pointer-events: none; z-index: 0;
}
@keyframes ms-sweep { 0% { left: -60%; } 100% { left: 100%; } }
.ms-feed-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--line); position: relative; z-index: 1; }
.ms-feed-brand { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-3); }
.ms-live-pill { display: flex; align-items: center; gap: 6px; background: rgba(232,25,44,0.08); border: 1px solid rgba(232,25,44,0.2); border-radius: 100px; padding: 4px 12px; font-size: 11px; font-weight: 700; color: var(--red); }
.ms-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 6px rgba(232,25,44,0.8); animation: ms-blink 1.2s ease-in-out infinite; }
@keyframes ms-blink { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.ms-feed-list { padding: 8px 0; position: relative; z-index: 1; }
.ms-feed-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 24px; cursor: pointer; transition: background 0.2s; }
.ms-feed-row:hover { background: rgba(232,25,44,0.025); }
.ms-feed-new { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(232,25,44,0.7); flex-shrink: 0; margin-top: 7px; animation: ms-blink 1.4s ease-in-out infinite; }
.ms-feed-new.off { background: transparent; box-shadow: none; animation: none; }
.ms-feed-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 3px 8px; border-radius: 4px; flex-shrink: 0; margin-top: 2px; }
.ms-cat-r { background: rgba(232,25,44,0.1); color: var(--red); }
.ms-cat-g { background: rgba(22,163,74,0.1); color: #16A34A; }
.ms-cat-b { background: rgba(37,99,235,0.1); color: #2563EB; }
.ms-cat-a { background: rgba(124,58,237,0.1); color: #7C3AED; }
.ms-cat-o { background: rgba(234,88,12,0.1); color: #EA580C; }
.ms-feed-info { flex: 1; min-width: 0; }
.ms-feed-headline { font-size: 13px; font-weight: 600; line-height: 1.45; margin-bottom: 5px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.ms-feed-meta { font-size: 11px; color: var(--text-3); }
.ms-feed-copy .ms-section-tag { margin-bottom: 18px; display: block; }
.ms-feed-copy h2 { font-size: clamp(28px, 3.5vw, 40px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 22px; }
.ms-feed-copy p { font-size: 15.5px; color: var(--text-2); line-height: 1.72; margin-bottom: 32px; }

/* ─── PRIVACY ─── */
.ms-privacy-section { padding: 0 0 100px; position: relative; z-index: 1; }
.ms-privacy-box {
  background: var(--white); border: 1px solid rgba(232,25,44,0.12); border-radius: 24px;
  padding: 72px 80px; text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 0 80px rgba(232,25,44,0.06);
}
.ms-privacy-box::before {
  content: ''; position: absolute; bottom: -60%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(232,25,44,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.ms-privacy-box > * { position: relative; z-index: 1; }
.ms-privacy-monogram { width: 64px; height: 64px; border-radius: 16px; background: rgba(232,25,44,0.08); border: 1px solid rgba(232,25,44,0.18); display: flex; align-items: center; justify-content: center; margin: 0 auto 28px; box-shadow: 0 0 30px rgba(232,25,44,0.12); }
.ms-privacy-monogram svg { width: 28px; height: 28px; }
.ms-privacy-box h2 { font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; letter-spacing: -1.2px; margin-bottom: 16px; }
.ms-privacy-box p { font-size: 16px; color: var(--text-2); max-width: 480px; margin: 0 auto 36px; line-height: 1.72; }
.ms-privacy-tags { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.ms-ptag { background: rgba(232,25,44,0.06); border: 1px solid rgba(232,25,44,0.14); border-radius: 100px; padding: 8px 18px; font-size: 13px; font-weight: 600; color: var(--text-2); }

/* ─── DOWNLOAD ─── */
.ms-download-section { padding: 80px 0 120px; text-align: center; position: relative; z-index: 1; }
.ms-download-h { font-size: clamp(30px, 4vw, 48px); font-weight: 800; letter-spacing: -2px; margin-bottom: 16px; }
.ms-download-sub { font-size: 16px; color: var(--text-2); max-width: 380px; margin: 0 auto 48px; line-height: 1.65; }
.ms-store-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.ms-store-card { display: flex; align-items: center; gap: 18px; background: var(--ink); color: #fff; text-decoration: none; border-radius: 16px; padding: 18px 30px; min-width: 210px; transition: transform 0.25s, box-shadow 0.3s, background 0.25s; border: 1px solid rgba(255,255,255,0.06); }
.ms-store-card:hover { background: var(--red); color: #fff; text-decoration: none; transform: translateY(-3px); box-shadow: 0 0 40px rgba(232,25,44,0.35), 0 16px 48px rgba(0,0,0,0.12); }
.ms-store-icon-wrap { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ms-store-icon-wrap svg { width: 28px; height: 28px; fill: #fff; }
.ms-store-label-sub { font-size: 11px; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.6px; }
.ms-store-label-name { font-size: 17px; font-weight: 700; letter-spacing: -0.4px; }

/* ─── FOOTER ─── */
.ms-footer { border-top: 1px solid var(--line); padding: 36px 0; position: relative; z-index: 1; background: rgba(250,250,250,0.8); }
.ms-footer-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.ms-footer-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.ms-footer-logo img { height: 28px; width: auto; object-fit: contain; border-radius: 6px; }
.ms-footer-logo span { font-size: 15px; font-weight: 700; }
.ms-footer-logo em { font-style: normal; color: var(--red); }
.ms-footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.ms-footer-links a { font-size: 13px; color: var(--text-3); text-decoration: none; transition: color 0.2s; }
.ms-footer-links a:hover { color: var(--red); }

/* ─── ANIMATIONS ─── */
@keyframes ms-fade-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ms-fade-in  { from { opacity: 0; } to { opacity: 1; } }

.ms-reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.7s cubic-bezier(.22,.68,0,1.2), transform 0.7s cubic-bezier(.22,.68,0,1.2); }
.ms-reveal.ms-visible { opacity: 1; transform: translateY(0); }
.ms-stagger > * { transition-delay: calc(var(--i, 0) * 80ms); }


/* ─── MODAL ANIMATION ─── */
@keyframes ms-modal-in          { from { opacity: 0; }                              to { opacity: 1; } }
@keyframes ms-modal-out         { from { opacity: 1; }                              to { opacity: 0; } }
@keyframes ms-modal-content-in  { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ms-modal-content-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(24px) scale(0.97); } }

.ms-modal-overlay                        { animation: ms-modal-in  0.25s ease forwards; }
.ms-modal-overlay.ms-closing             { animation: ms-modal-out 0.22s ease forwards; }
.ms-modal-overlay .ms-modal-content      { animation: ms-modal-content-in  0.3s cubic-bezier(.22,.68,0,1.2) forwards; }
.ms-modal-overlay.ms-closing .ms-modal-content { animation: ms-modal-content-out 0.22s ease forwards; }

/* Фонова підкладка модального вікна */
.ms-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Напівпрозорий чорний фон */
  z-index: 9999; /* Щоб вікно було поверх усіх елементів */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Контейнер вмісту */
.ms-modal-content {
  position: relative;
  background: #ffffff; /* Якщо у вашій секції немає власного фону, задайте потрібний тут */
  border-radius: 16px; /* Закруглення кутів вікна */
  max-width: 600px;    /* Максимальна ширина вікна */
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* Клас для хрестика закриття */
.ms-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #333333; /* Колір хрестика (змініть на білий, якщо фон секції темний) */
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease, color 0.2s ease;
}

.ms-modal-close:hover {
  transform: scale(1.1);
  color: var(--red); /* При наведенні підсвічується вашим фірмовим червоним */
}

/* Блокування прокрутки сайту при відкритому модальному вікні */
body.modal-open {
  overflow: hidden;
  padding-right: var(--scrollbar-w, 0px);
}
body.modal-open .ms-nav {
  padding-right: var(--scrollbar-w, 0px);
}

/* ─── PRIVACY PAGE ADDITIONAL STYLES ─── */
.ms-privacy-page {
  padding: 140px 0 100px;
}
.ms-privacy-article {
  max-width: 800px;
}
.ms-privacy-title {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 16px;
}
.ms-privacy-block {
  margin-bottom: 48px;
}
.ms-privacy-block h2 {
  font-size: 22px;
  margin-bottom: 18px;
}
.ms-privacy-block p, 
.ms-privacy-article > p {
  margin-bottom: 16px;
}
.ms-privacy-link-highlight {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
}
.ms-privacy-link-highlight:hover {
  text-decoration: underline;
}


/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .ms-section-head { flex-direction: column; gap: 16px; }
  .ms-section-desc { max-width: 100%; }
  .ms-features-grid { grid-template-columns: repeat(2,1fr); }
  .ms-feed-layout,
  .ms-showcase-inner,
  .ms-showcase-inner.ms-flip { grid-template-columns: 1fr; direction: ltr; gap: 40px; }
  .ms-stats-grid { grid-template-columns: 1fr; }
  .ms-stat-item + .ms-stat-item { border-left: none; border-top: 1px solid var(--line); }
  .ms-privacy-box { padding: 48px 32px; }
  .ms-nav-links { display: none; }
  .ms-photos-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .ms-features-grid { grid-template-columns: 1fr; }
  .ms-hero-h1 { letter-spacing: -2.5px; }
  .ms-footer-row { flex-direction: column; align-items: flex-start; }
  .ms-photos-grid { grid-template-columns: 1fr; }
  .ms-hero-phone img { max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ms-reveal { opacity: 1 !important; transform: none !important; }
}


/* ═══════════════════════════════════════════════
   LIVE FEED — skeleton loader
   ═══════════════════════════════════════════════ */
.ms-feed-skeleton { pointer-events: none; }

.ms-skel-cat {
  width: 90px;
  height: 20px;
  border-radius: 4px;
  background: var(--line);
  animation: ms-skel-pulse 1.4s ease-in-out infinite;
}
.ms-skel-line {
  height: 11px;
  border-radius: 4px;
  background: var(--line);
  margin-bottom: 6px;
  animation: ms-skel-pulse 1.4s ease-in-out infinite;
}
.ms-skel-wide   { width: 90%; }
.ms-skel-narrow { width: 52%; }

@keyframes ms-skel-pulse {
  0%, 100% { opacity: .45; }
  50%       { opacity: .9;  }
}

/* ── Feed row ── */
.ms-feed-list .ms-feed-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.ms-feed-list .ms-feed-row[data-category]:hover { background: rgba(232,25,44,0.04); }

/* ── Бейдж ── */
.ms-feed-list .ms-feed-cat {
  flex-shrink: 0;
  width: 110px;
  max-width: 110px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  margin-top: 1px;
}

/* ── Точка нової новини ── */
.ms-feed-list .ms-feed-new {
  flex-shrink: 0;
  margin-top: 3px;
}

/* ── Обгортка info + стрілка ── */
.ms-feed-list .ms-feed-right {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 4px;
}

/* ── Текстовий блок ── */
.ms-feed-list .ms-feed-info {
  flex: 1;
  min-width: 0;
}

/* ── Стрілка ── */
.ms-feed-arrow {
  color: var(--text-3);
  opacity: .4;
  font-size: 14px;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════
   CATEGORY NEWS MODAL
   ═══════════════════════════════════════════════ */
.ms-cat-modal-content {
  max-width: 680px;
  width: 94%;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 18px;
}
.ms-cat-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.ms-cat-modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 8px 0 0;
  line-height: 1.2;
}
.ms-cat-modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 8px 0 16px;
}

/* ── Елемент новини ── */
.ms-cat-news-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.18s;
  cursor: pointer;
}
.ms-cat-news-item:last-child { border-bottom: none; }
.ms-cat-news-item:hover { background: rgba(0,0,0,0.02); }

.ms-cat-news-thumb {
  width: 80px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--line);
}
.ms-cat-news-thumb-placeholder {
  width: 80px;
  height: 56px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--line);
}
.ms-cat-news-body {
  flex: 1;
  min-width: 0;
}
.ms-cat-news-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.ms-cat-news-meta { font-size: 11px; color: var(--text-3); }
.ms-cat-news-arrow {
  color: var(--text-3);
  flex-shrink: 0;
  font-size: 16px;
  opacity: 0.5;
  align-self: center;
}

/* ── Стани завантаження / помилки ── */
.ms-cat-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  gap: 10px;
  color: var(--text-3);
  font-size: 13px;
}
.ms-cat-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: ms-spin 0.7s linear infinite;
}
@keyframes ms-spin { to { transform: rotate(360deg); } }

.ms-cat-error {
  text-align: center;
  padding: 60px 32px;
  color: var(--text-3);
  font-size: 13px;
}

/* ── Мобільна адаптація ── */
@media (max-width: 600px) {
  .ms-cat-modal-content { max-height: 95vh; border-radius: 14px; }
  .ms-cat-modal-header  { padding: 20px; }
  .ms-cat-news-item     { padding: 14px 16px; }
  .ms-cat-news-thumb,
  .ms-cat-news-thumb-placeholder { width: 64px; height: 48px; }

  .ms-feed-list .ms-feed-row {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  /* Крапка + бейдж — перший рядок, залишаються поряд */
  .ms-feed-list .ms-feed-new,
  .ms-feed-list .ms-feed-cat {
    flex-shrink: 0;
    margin-top: 0;
  }

  /* ms-feed-right — другий рядок на всю ширину */
  .ms-feed-list .ms-feed-right {
    flex-basis: 100%;
    min-width: 0;
  }
}