/*
Theme Name: Ruspanets
Theme URI: https://ruspanets.ru
Author: Pedro de las Heras (Эрас Диджитал Студио)
Author URI: https://ruspanets.ru
Description: Тема для ruspanets.ru — PWA, ИИ-ассистенты, автоматизация. Бренд: Эрас Диджитал Студио.
Version: 1.0
License: GPL v2 or later
Text Domain: ruspanets
*/

/* ===== Navbar sticky (común para todas las páginas) ===== */
.navbar-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}
body { padding-top: 64px; }

/* ===== single.php — стиль Tilda ===== */
.tilda-post-bar {
  background: #fff;
  border-bottom: 1px solid #eaeaea;
  padding: 14px 24px;
  position: relative;
  text-align: center;
}
.tilda-post-bar .back {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: #2e6bff;
  font-size: 22px;
  text-decoration: none;
  line-height: 1;
}
.tilda-post-bar .label {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.05em;
}
.tilda-post {
  max-width: 750px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  font-family: 'Inter', sans-serif;
}
.tilda-post h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #111;
  line-height: 1.2;
  margin: 0 0 16px;
  text-align: left;
}
.tilda-post .post-date {
  font-size: 14px;
  color: #888;
  margin-bottom: 32px;
}
.tilda-post .post-thumb {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 36px;
  overflow: hidden;
}
.tilda-post .post-thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.tilda-post .post-content {
  font-size: 19px;
  line-height: 1.65;
  color: #2a2a2a;
}
.tilda-post .post-content p { margin: 0 0 18px; }
.tilda-post .post-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 36px 0 16px;
  color: #111;
}
.tilda-post .post-content h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 28px 0 14px;
  color: #111;
}
.tilda-post .post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 18px 0;
}
.tilda-post .post-content ul,
.tilda-post .post-content ol {
  padding-left: 24px;
  margin: 0 0 18px;
}
.tilda-post .post-content li { margin-bottom: 8px; }
.tilda-post .post-content a {
  color: #2e6bff;
  text-decoration: underline;
}

/* ===== home.php — лента постов ===== */
.blog-list {
  background: var(--bg-gray);
  padding: 80px 24px 100px;
}
.blog-list > h1 {
  text-align: center;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 50px;
  color: #1a1a1a;
}
.posts-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 860px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .posts-grid { grid-template-columns: 1fr; } }
.post-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.post-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.post-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.post-card h2 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 12px;
  padding: 22px 20px 0;
  color: #1a1a1a;
}
.post-card time {
  display: block;
  font-size: 12px;
  color: #999;
  padding: 0 20px 8px;
}
.post-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.55;
  padding: 0 20px 22px;
  margin: 0;
}

/* ===== Paginación ===== */
.pagination,
.nav-links {
  text-align: center;
  margin-top: 50px;
}
.pagination .page-numbers,
.nav-links .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 4px;
  border-radius: 6px;
  background: #fff;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}
.pagination .page-numbers.current,
.nav-links .page-numbers.current {
  background: #2e6bff;
  color: #fff;
}

/* ===== 404 ===== */
.error-404 {
  text-align: center;
  padding: 120px 24px;
  background: #fff;
}
.error-404 h1 {
  font-size: clamp(60px, 10vw, 120px);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
}
.error-404 p {
  font-size: 18px;
  color: #555;
  margin-bottom: 28px;
}
.error-404 a {
  display: inline-block;
  padding: 14px 32px;
  background: #2e6bff;
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

/* ===== Búsqueda ===== */
.search-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto 30px;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
}
.search-form button {
  padding: 12px 22px;
  background: #2e6bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
