/* ============================================================
 * F1 RACING THEME — SIMPLIFIED
 * Version: 5.0 - Minimalist Edition
 * ============================================================ */

/* ============================================================
 * 1. DESIGN TOKENS
 * ============================================================ */
:root {
  /* Colors */
  --red: #DC0000;
  --red-dark: #A00000;
  --gold: #FFD700;
  --white: #F5F5F5;
  --gray: #a08080;
  --dark: #0f0000;
  --surface: #1c0000;
  --card: rgba(20, 4, 4, 0.9);
  
  /* Typography */
  --font-head: 'Play', 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  
  /* Spacing */
  --space: 1rem;
  --space-2: 2rem;
  --space-3: 3rem;
  
  /* Layout */
  --container: 1280px;
  --header: 70px;
}

/* ============================================================
 * 2. RESET & BASE
 * ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
}

/* ============================================================
 * 3. TYPOGRAPHY
 * ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: var(--space);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
  color: #ff7777;
  text-decoration: none;
}

a:hover {
  color: var(--gold);
}

/* ============================================================
 * 4. HEADER & NAVIGATION
 * ============================================================ */
/* ============================================
   HEADER & NAVIGATION — sticky, consolidated
   (замените все старые .site-header / .header-container /
   .header-socials / .site-branding правила в style.css этим блоком)
   ============================================ */

.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    background: rgba(10,0,0,.95);
    border-bottom: 2px solid var(--red);
    z-index: 999;
}

/* Сдвигаем sticky-шапку ниже админ-бара WordPress, когда пользователь залогинен */
body.admin-bar .site-header {
  top: 32px; /* стандартная высота admin bar на десктопе */
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px; /* на мобильных/планшетах WP увеличивает высоту admin bar до 46px */
  }
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-branding .site-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}
.site-branding .site-title a {
  color: var(--text-primary);
}
.site-branding .site-title a:hover {
  color: var(--accent);
}

.custom-logo-link img {
  height: 40px;
  width: auto;
  display: block;
}

.main-navigation .nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-navigation .nav-menu a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 0;
}
.main-navigation .nav-menu a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.header-socials {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-shrink: 0;
}

.header-socials a,
.social-icon-link {
  color: #ff5a3c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: var(--bg-surface);
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}
.header-socials a:hover,
.social-icon-link:hover {
  opacity: 0.7;
  background: var(--accent);
  color: white;
}

/* Reading progress bar sticks under the header */
.reading-progress-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 998;
  height: 3px;
  background: var(--accent);
  width: 0%;
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
  }
  .menu-toggle {
    display: block;
  }
  .main-navigation .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    gap: 1rem;
    z-index: 997;
  }
  .main-navigation .nav-menu.active {
    display: flex;
  }
}
/* ============================================================
 * 5. BUTTONS & FORMS
 * ============================================================ */
button, .btn, input[type="submit"] {
  background: var(--red);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-family: var(--font-head);
  text-transform: uppercase;
  transition: all 0.2s;
}

button:hover, .btn:hover {
  background: var(--gold);
  color: var(--dark);
}

input, textarea, select {
  background: var(--surface);
  border: 1px solid var(--red);
  color: var(--white);
  padding: 8px 12px;
  width: 100%;
}

/* ============================================================
 * 6. POSTS & PAGES
 * ============================================================ */
.post, .page {
  background: var(--card);
  border: 1px solid var(--red);
  padding: var(--space-2);
  margin-bottom: var(--space-2);
}

.post-header {
  margin-bottom: var(--space-2);
}

.post-title {
  font-size: 2rem;
  margin-bottom: var(--space);
}

.post-meta {
  color: var(--gray);
  font-size: 0.875rem;
  padding: var(--space) 0;
  border-top: 1px solid rgba(220,0,0,0.2);
  border-bottom: 1px solid rgba(220,0,0,0.2);
}

.post-content {
  line-height: 1.8;
}

.post-content h2 {
  margin-top: var(--space-2);
}

.post-tags {
  margin-top: var(--space-2);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(220,0,0,0.1);
  padding: 4px 12px;
  font-size: 0.75rem;
}

/* Posts Navigation */
.post-navigation {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(220,0,0,0.2);
}

.nav-links {
  display: flex;
  justify-content: space-between;
}

/* Related Posts */
.related-posts {
  margin-top: var(--space-2);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space);
}

.related-post-card {
  background: var(--card);
  border: 1px solid var(--red);
  padding: var(--space);
}

.related-post-image img {
  width: 100%;
  height: auto;
}

/* ============================================================
 * 7. HOMEPAGE SECTIONS
 * ============================================================ */
/* Hero */
.hero-slide {
  min-height: 400px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero-content h1 {
  font-size: 3rem;
  color: var(--white);
}

/* Feature Block */
.feature-block {
  padding: var(--space-3) 0;
}

.feature-block__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  align-items: center;
}

@media (max-width: 768px) {
  .feature-block__inner {
    grid-template-columns: 1fr;
  }
}

/* News Cards */
.news-section {
  padding: var(--space-3) 0;
}

.news-section__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.news-card {
  background: var(--card);
  border: 1px solid var(--red);
  padding: var(--space);
}

.news-card img {
  width: auto;
  height: 280px;
  margin-bottom: var(--space);
  align-items: stretch;
}

/* ============================================================
 * 8. CARDS
 * ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--red);
  padding: var(--space);
}

/* ============================================================
 * 9. SIDEBAR & WIDGETS
 * ============================================================ */
.widget {
  background: var(--card);
  border: 1px solid var(--red);
  padding: var(--space);
  margin-bottom: var(--space-2);
}

.widget-title {
  font-size: 1.25rem;
  margin-bottom: var(--space);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--red);
}

/* ============================================================
 * 10. COMMENTS
 * ============================================================ */
.comments-area {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(220,0,0,0.2);
}

.comment-list {
  list-style: none;
  margin-top: var(--space);
}

.comment {
  padding: var(--space) 0;
  border-bottom: 1px solid rgba(220,0,0,0.1);
}

/* ============================================================
 * 11. FOOTER
 * ============================================================ */
.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--red);
  padding: var(--space-3) 0 var(--space-2);
  margin-top: var(--space-3);
}

.site-footer__top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(220,0,0,0.2);
}

.site-footer__menu {
  list-style: none;
}

.site-footer__menu li {
  margin-bottom: 8px;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space);
}

.site-footer__socials {
  display: flex;
  gap: var(--space);
}

@media (max-width: 768px) {
  .site-footer__top {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  
  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================================
 * 12. UTILITIES
 * ============================================================ */
.alignleft {
  float: left;
  margin-right: var(--space);
  margin-bottom: var(--space);
}

.alignright {
  float: right;
  margin-left: var(--space);
  margin-bottom: var(--space);
}

.aligncenter {
  display: block;
  margin: 0 auto var(--space);
}

.text-center { text-align: center; }
.text-red { color: var(--red); }
.mt-2 { margin-top: var(--space-2); }
.mb-2 { margin-bottom: var(--space-2); }

/* ============================================================
 * 13. RESPONSIVE
 * ============================================================ */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .hero-slide {
    min-height: 300px;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .post, .page {
    padding: var(--space);
  }
  
  .post-title {
    font-size: 1.5rem;
  }
  
  .nav-links {
    flex-direction: column;
    gap: var(--space);
  }
}

.hero-slider {
    position: relative;
    width: 100vw;
    height: 500px;
    overflow: hidden;
}




.hero-slider {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: 500px;
    overflow: hidden;
}
.hero-slider .slides {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}
.hero-slider .slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}
.hero-slider .slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.6) 40%, transparent);
}
.hero-slider .slide-content {
    position: absolute;
    bottom: 80px;
    left: 60px;
    color: #fff;
    z-index: 2;
    max-width: 450px;
}
.hero-slider .slide-content h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
}
.hero-slider .slide-content p {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.6;
}
.hero-slider .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}
.hero-slider .arrow-prev { left: 16px; }
.hero-slider .arrow-next { right: 16px; }

body, #page, .site {
  overflow: visible;
}



.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    padding: 0 30px;
}



.post-top {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.post-top .single-post-thumbnail {
    flex: 0 0 280px;
    max-width: 280px;
}

.post-top .single-post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.post-top .post-header {
    flex: 1;
    min-width: 250px;
}

.post-tags-top {
    margin: 10px 0;
}

.tag-pill {
    display: inline-block;
    padding: 4px 12px;
    margin-right: 6px;
    margin-bottom: 6px;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
}

@media (max-width: 600px) {
    .post-top {
        flex-direction: column;
    }
    .post-top .single-post-thumbnail {
        max-width: 100%;
        flex-basis: auto;
    }
}
/* ============================================
   BUILDER TEMPLATE PAGE
   ============================================ */

.builder-page__hero {
    background: #1a0d0d;
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255, 59, 59, 0.3);
}

.builder-page__title {
    color: #ff3b3b;
    font-size: 2.5rem;
    text-transform: uppercase;
    margin: 0;
}

.builder-section {
    background: #1a0d0d;
    padding: 3rem 0;
}

.builder-card {
    background: #2b0f0f;
    border: 1px solid rgba(255, 59, 59, 0.3);
    border-radius: var(--radius);
    padding: 2rem;
}

.builder-section__title {
    color: #ff3b3b;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.builder-section__text {
    color: #d9c9c9;
    line-height: 1.7;
    font-size: 1rem;
}

.builder-section__text p {
    margin-bottom: 1rem;
}

/* --- Simple text block --- */
.builder-simple-text {
    max-width: 900px;
}

/* --- Text + Media block --- */
.builder-text-media {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.builder-text-media--reverse {
    direction: rtl;
}

.builder-text-media--reverse > * {
    direction: ltr;
}

.builder-text-media__image {
    width: 100%;
    border-radius: 8px;
    display: block;
    box-shadow: var(--shadow-md);
}

/* --- Two columns block --- */
.builder-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.builder-two-columns__col .builder-section__title {
    font-size: 1.4rem;
}

/* --- Posts slider block (reuses .home-post-card styles already defined) --- */
.builder-section--posts-slider .home-posts-slider-section__top {
    margin-bottom: 2rem;
}

.builder-section--posts-slider h3 {
    color: #ff3b3b;
    text-transform: uppercase;
    font-size: 1.5rem;
}

/* Slider arrows for posts slider (shared with front page) */
.home-posts-slider__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 59, 59, 0.15);
    border: 1px solid #ff3b3b;
    color: #ff3b3b;
    cursor: pointer;
    transition: all 0.2s;
}

.home-posts-slider__arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.home-posts-slider__arrow:hover {
    background: #ff3b3b;
    color: #fff;
}

.home-posts-slider__nav {
    display: flex;
    gap: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .builder-text-media,
    .builder-text-media--reverse,
    .builder-two-columns {
        grid-template-columns: 1fr;
        direction: ltr;
    }
}



