/*
Theme Name: Mine Cars (Krokov Style)
Theme URI: https://diana.tagtest.ee/
Author: Diana Hrustaljova
Description: Clean, modern car‑theme based on krokov.tagtest.ee – light background, soft shadows, responsive.
Version: 2.0
License: GPL v2 or later
Text Domain: tagtest
*/

/* ============================================
   1. DESIGN TOKENS (light, modern)
   ============================================ */
:root {
  --bg-body: #ffffff;
  --bg-surface: #5c0606;
  --bg-card: #200202;
  --text-primary: #dc2626;
  --text-secondary: #ffffff;
  --text-muted: #64748b;
  --accent: #dc2626;       /* Racing red */
  --accent-hover: #b91c1c;
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 1rem;
  --container: 1280px;
  --header-height: 72px;
}

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

body {
  background: var(--bg-body);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  scroll-behavior: smooth;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent-hover); }

/* ============================================
   2. HEADER & NAVIGATION (light)
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  height: var(--header-height);
}


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

.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);
}

.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);
}

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

/* Header social icons */
.header-socials {
  display: flex;
  gap: 1rem;
}
.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all 0.2s;
}
.social-icon-link:hover {
  background: var(--accent);
  color: white;
}

/* ============================================
   3. BUTTONS & FORMS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn--primary {
  background: var(--accent);
  color: white;
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}
.btn--secondary:hover {
  background: var(--border-light);
}

input, textarea, select {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.75rem;
  width: 100%;
  font-family: inherit;
}

/* ============================================
   4. HERO SECTION (front-page)
   ============================================ */
.front-hero {
  padding: 4rem 0;
}
.front-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.front-hero__title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}
.front-hero__text {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}
.front-hero__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   5. CARDS & SLIDERS
   ============================================ */
.news-section {
  padding: 4rem 0;
}
.news-section__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.news-controls {
  display: flex;
  gap: 0.5rem;
}
.news-controls button {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}
.news-controls button:hover {
  background: var(--accent);
  color: white;
}

/* Feature block (car slider) */
.feature-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.feature-block__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
}
.feature-block__media img {
  width: 100%;
  border-radius: var(--radius);
}
.feature-block__title {
  font-size: 1.8rem;
}

/* Post cards (races) */
.home-post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.home-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.home-post-card__image {
  overflow: hidden;
  width: min(440px, 100%);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

.home-post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.home-post-card:hover .home-post-card__image img {
  transform: scale(1.05);
}

.home-post-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.home-post-card__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.home-post-card__excerpt {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.home-post-card__button {
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}

/* Force equal-height slides in a row */
.home-posts-slider .swiper-wrapper {
  align-items: stretch;
}
.home-posts-slider .swiper-slide {
  height: auto;
  display: flex;
}

/* Swiper customisation */
.swiper-pagination-bullet-active {
  background: var(--accent) !important;
}

/* ============================================
   6. SINGLE POST PAGE
   ============================================ */
.single-post-container {
  max-width: var(--container);
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.post {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}
.post-title {
  font-size: 2.5rem;
}
.post-meta {
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
  margin: 1rem 0;
}
.post-content {
  font-size: 1.125rem;
  line-height: 1.7;
}
.post-navigation {
  margin-top: 2rem;
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* ============================================
   7. FOOTER (light)
   ============================================ */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}
.site-footer__top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}
.site-footer__site-name a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}
.site-footer__contact p {
  margin-bottom: 0.5rem;
}
.site-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__menu li {
  margin-bottom: 0.5rem;
}
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer__socials {
  display: flex;
  gap: 1rem;
}

/* ============================================
   8. RESPONSIVE
   ============================================ */
@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;
  }
  .main-navigation .nav-menu.active {
    display: flex;
  }
  .front-hero__inner,
  .feature-block__inner {
    grid-template-columns: 1fr;
  }
  .site-footer__top {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
  }
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.8rem; }
}
.hero-slider {
    position: relative;
    width: 100%;
    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.65) 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%);
    z-index: 10;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
}
.hero-slider .arrow-prev { left: 16px; }
.hero-slider .arrow-next { right: 16px; }



/* ── Posts grid on content pages ── */
.page-posts-grid {
    margin-top: 3rem;
}

.page-posts-grid__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.page-posts-grid {
    margin: 30px 0;
}

.page-posts-grid__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ff3b3b;
}

.page-posts-grid__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.page-posts-grid__card {
    background: #2b0f0f;
    border: 1px solid #ff3b3b;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}

.page-posts-grid__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255, 59, 59, 0.25);
}

.page-posts-grid__image-link {
    display: block;
}

.page-posts-grid__image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.page-posts-grid__body {
    padding: 20px;
}

.page-posts-grid__date {
    font-size: 13px;
    color: #b89a9a;
    margin-bottom: 10px;
}

.page-posts-grid__card-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: left;
}

.page-posts-grid__card-title a {
    color: #ff3b3b;
    text-decoration: none;
}

.page-posts-grid__card-title a:hover {
    text-decoration: underline;
}

.page-posts-grid__excerpt {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #d9c9c9;
}

/* Responsive */

@media (max-width: 768px) {s
    .page-posts-grid__grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .page-posts-grid__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ── Contact form ── */
.contact-wrap {
    max-width: 780px;
    margin: 2rem auto;
    padding: 2rem;
}

.contact-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.contact-form__row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.contact-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.contact-form__field label {
    font-size: 0.9rem;
    color: #ff0000;
}

.contact-form__field input,
.contact-form__field textarea {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.contact-form__field textarea {
    resize: vertical;
}

.contact-form__submit {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.75rem 1.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 3px;
}

.contact-form__submit:hover {
    background: #2b0f0f;
}

.contact-success {
    color: green;
    font-weight: 600;
}

.contact-error {
    color: red;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .contact-form__row {
        grid-template-columns: 1fr;
    }
}




/* ── Footer ── */
.site-footer {
    background: #111;
    color: #fff;
    padding: 3rem 0 1.5rem;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
    opacity: 1;
}

/* Top row */
.site-footer__top {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2.5rem;
}

.site-footer__site-name a,
.site-footer__logo {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.site-footer__phrase {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 0.5rem;
}

.site-footer__contact {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.site-footer__socials {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: flex-end;
}

/* Columns */
.site-footer__columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.site-footer__column-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: #fff;
}

.site-footer__column-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.site-footer__column-links a {
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.site-footer__column-links a:hover {
    opacity: 1;
    text-decoration: none;
}

/* Bottom */
.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer__copy {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* -----------------------------
   Sidebar / Widgets styling
   ----------------------------- */
.single-post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

.single-post-main {
  min-width: 0;
}

.sidebar {
  position: relative;
}

.widget--card {
  background: #ffffff;
  color: #111;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(16,24,40,0.08);
  margin-bottom: 1.25rem;
}

.widget-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.widget-title::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: #1d7be0; /* blue underline like screenshot */
  margin-top: 0.5rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.search-field {
  flex: 1 1 auto;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #e6e9ef;
}

.tag-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag-pill {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 8px;
  font-size: 0.85rem;
  text-decoration: none;
}

@media (max-width: 768px) {
  .single-post-layout {
    grid-template-columns: 1fr;
  }
  .widget-title::after { width: 60%; }
}

/* Responsive */
@media (max-width: 768px) {
    .site-footer__top,
    .site-footer__columns {
        grid-template-columns: 1fr;
    }

    .site-footer__socials {
        justify-content: flex-start;
    }
}


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

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


.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.header-socials a {
    color: #ff5a3c;
    transition: opacity 0.2s;
    display: flex;
}

.header-socials a:hover {
    opacity: 0.7;
}



.swiper-pagination-bullets.swiper-pagination-horizontal {
    bottom: var(--swiper-pagination-bottom, 8px);
    top: auto;
    left: 0;
    width: 100%;
}




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


.breadcrumbs {
    font-size: 14px;
    margin-bottom: 20px;
    color: #999;
}
.breadcrumbs a {
    color: #ff3b3b;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs .breadcrumb-current {
    color: #ccc;
}





.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.post-card {
    background: #2b0f0f;
    border: 1px solid #ff3b3b;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255, 59, 59, 0.25);
}

.post-card-image {
    display: block;
}

.post-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.post-card-body {
    padding: 20px;
}

.post-card-date {
    font-size: 13px;
    color: #b89a9a;
    margin-bottom: 10px;
}

.post-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    text-align: left;
    text-transform: uppercase;
}

.post-card-title a {
    color: #ff3b3b;
    text-decoration: none;
}

.post-card-title a:hover {
    text-decoration: underline;
}

.post-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #d9c9c9;
}
body.archive-page {
    background-color: #1a0d0d;
    color: #f5e6e6;
}

body.archive-page .site-main,
body.archive-page #primary {
    background-color: #1a0d0d;
}

body.archive-page .page-title {
    color: #ff3b3b;
}


/* Move pagination dots below the Races slider */
.home-posts-slider {
    padding-bottom: 50px;
}

.home-posts-slider .swiper-pagination-bullets.swiper-pagination-horizontal,
.home-posts-slider .swiper-pagination {
    position: static;
    bottom: auto;
    margin-top: 24px;
    display: flex;
    justify-content: center;
}


