/* Face Promotion — news portal theme (facepromotion.com mockup) */

:root {
  --fp-blue: #2563eb;
  --fp-blue-dark: #1d4ed8;
  --fp-blue-soft: #eff6ff;
  --red: var(--fp-blue);
  --red-h: var(--fp-blue-dark);
  --cta: var(--fp-blue);
  --cta-h: var(--fp-blue-dark);
  --r: 10px;
  --r2: 12px;
  --border: #e5e7eb;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8fafc;
  color: #111827;
}

.container { max-width: 1180px; }

/* ── Header ── */
.site-header.fp-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.fp-header .header-utility,
.fp-header .header-brand-row,
.fp-header .header-categories { display: none !important; }

.fp-header-main {
  border-bottom: 1px solid var(--border);
}
.fp-header-main-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 62px;
}

.fp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: #111827;
}
.fp-logo-icon { flex-shrink: 0; display: block; }
.fp-logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #0f172a;
}

.fp-nav {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fp-nav::-webkit-scrollbar { display: none; }
.fp-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.fp-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.fp-nav a:hover,
.fp-nav a.is-active { color: var(--fp-blue); background: var(--fp-blue-soft); }

.fp-header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.fp-header-tools .btn-subscribe {
  border-radius: 8px;
  background: var(--fp-blue);
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 8px 14px;
}
.fp-header-tools .btn-subscribe:hover { background: var(--fp-blue-dark); }
.fp-header-tools .btn-login {
  border-radius: 8px;
  font-size: 13px;
}
.fp-header-sub {
  background: #fff;
  padding: 14px 0 18px;
}
.fp-header-sub-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.fp-header-sub-inner--search-only {
  justify-content: flex-end;
}
.fp-header-sub-inner--search-only .fp-search-form {
  max-width: 480px;
}
.fp-page-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0;
}

.fp-search-form {
  display: flex;
  align-items: stretch;
  flex: 1;
  max-width: 420px;
  min-width: 200px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.fp-search-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px 16px 11px 18px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}
.fp-search-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  border: none;
  background: var(--fp-blue);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.fp-search-form button:hover { background: var(--fp-blue-dark); }

.fp-search-toggle { display: none; }
.fp-mobile-search { display: none; }
.fp-header .btn-menu-toggle { display: none; }
.fp-header .mobile-menu {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 12px 0 16px;
}
.fp-header .mobile-menu a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
}

/* ── Category tags ── */
.category-tag.cat-label,
.fp-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fp-blue) !important;
  background: var(--fp-blue-soft);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* ── Home layout ── */
.fp-home { padding: 24px 0 48px; }
.fp-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.fp-feature {
  background: #fff;
  border-radius: var(--r2);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.fp-feature-img-wrap {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e5e7eb;
}
.fp-feature-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fp-feature-body { padding: 20px 22px 22px; }
.fp-feature h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.fp-feature h2 a:hover { color: var(--fp-blue); }
.fp-feature-dek {
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 12px;
}
.fp-feature .article-meta { font-size: 13px; color: #9ca3af; }

.fp-three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}
.fp-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  transition: box-shadow .2s;
}
.fp-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.fp-card-img {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #e5e7eb;
}
.fp-card-img img { width: 100%; height: 100%; object-fit: cover; }
.fp-card-body { padding: 14px 16px 16px; }
.fp-card-body h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.fp-card-body h3 a:hover { color: var(--fp-blue); }

.fp-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #111827;
}
.fp-section-head h2 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.fp-feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.fp-sidebar { display: flex; flex-direction: column; gap: 22px; }
.fp-widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 16px 16px 8px;
}
.fp-widget h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #111827;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.fp-most-read li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  align-items: center;
}
.fp-most-read li:last-child { border-bottom: none; }
.fp-most-read-thumb {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #e5e7eb;
}
.fp-most-read-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fp-most-read a {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #111827;
}
.fp-most-read a:hover { color: var(--fp-blue); }

.fp-opinion li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  align-items: start;
}
.fp-opinion li:last-child { border-bottom: none; }
.fp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fp-blue-soft);
  color: var(--fp-blue);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fp-opinion-meta { font-size: 11px; color: #9ca3af; margin-top: 4px; }

.fp-video-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #111;
  display: block;
}
.fp-video-card img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.fp-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.fp-play span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--fp-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 99, 235, .45);
}
.fp-video-title {
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  line-height: 1.35;
}

/* Mobile list (feed) */
.fp-mobile-list { display: none; }

/* Bottom nav */
.fp-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.fp-bottom-nav a,
.fp-bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  background: none;
  border: none;
  padding: 6px 8px;
  min-width: 56px;
  font-family: inherit;
}
.fp-bottom-nav a.is-active,
.fp-bottom-nav a:hover,
.fp-bottom-nav button:hover { color: var(--fp-blue); }
.fp-bottom-nav svg { display: block; }

/* Footer logo */
.site-footer .fp-footer-logo text { font-family: Inter, sans-serif; }

/* Auth / buttons accent */
.btn-primary { background: var(--fp-blue) !important; }
.btn-primary:hover { background: var(--fp-blue-dark) !important; }
.auth-modal-logo rect { fill: var(--fp-blue) !important; }

.top-news-time { color: var(--fp-blue) !important; }
.top-news-panel { border-top-color: var(--fp-blue) !important; }

@media (max-width: 960px) {
  .fp-home-grid { grid-template-columns: 1fr; }
  .fp-sidebar { order: 2; }
  .fp-three-col { grid-template-columns: 1fr; }
  .fp-feed-grid { grid-template-columns: 1fr; }
  .fp-nav { display: none; }

  /* Сброс старых mobile-правил .site-header (ломали сетку) */
  .site-header.fp-header {
    display: block !important;
    flex-wrap: nowrap !important;
  }
  .fp-header-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 56px;
    padding: 8px 0;
  }
  .fp-logo {
    flex: 1;
    min-width: 0;
  }
  .fp-logo-text {
    font-size: clamp(14px, 4.2vw, 17px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fp-header-tools {
    flex-shrink: 0;
    align-items: center;
    gap: 4px;
  }
  .fp-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: #374151;
    border-radius: 10px;
  }
  .fp-search-toggle:hover { color: var(--fp-blue); background: var(--fp-blue-soft); }
  .fp-header .btn-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    gap: 4px;
  }
  .fp-header .btn-menu-toggle span { width: 18px; }

  .fp-header-sub .fp-search-form { display: none !important; }
  .fp-header-sub-inner--search-only { display: none; }
  .fp-header-sub-inner { flex-direction: row; align-items: center; }
  .fp-header-sub { padding: 10px 0 14px; }

  .fp-mobile-search:not([hidden]) {
    display: block;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--border);
    background: #fff;
  }
  .fp-mobile-search .fp-search-form { max-width: none; width: 100%; }
}

@media (max-width: 768px) {
  body { padding-bottom: 72px; }
  .fp-bottom-nav { display: flex; }
  .fp-header-tools .btn-subscribe,
  .fp-header-tools .btn-login { display: none; }
  .fp-feature h2 { font-size: 20px; }
  .fp-three-col { display: none; }
  .fp-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r2);
    overflow: hidden;
  }
  .fp-mobile-list-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
  }
  .fp-mobile-list-item:last-child { border-bottom: none; }
  .fp-mobile-list-thumb {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
  }
  .fp-mobile-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .articles-grid-home { display: none; }
}
