/*
 Theme Name: Racemind Custom
*/

@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@500;600;700;800&display=swap');

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

body {
  margin: 0;
  font-family: "Exo 2", sans-serif;
  background: #fff;
  color: #111;
}

/* ================= CONTAINER ================= */
.rm-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ================= HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  z-index: 50;
}

.rm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO */
.site-title {
  margin: 0;
  font-family: "Exo 2", sans-serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 20px;
}

.site-title a {
  text-decoration: none;
  color: #111;
}

/* ================= NAV (DESKTOP) ================= */
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  font-family: "Exo 2", sans-serif;
  text-decoration: none;
  color: #111;
  font-size: 14px;
  text-transform: uppercase;
}

/* HEADER RIGHT */
.rm-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ================= MAIN ================= */
.site-main {
  padding: 24px 0;
}

/* ================= GRID ================= */
.rm-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 900px) {
  .rm-post-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= POST CARD ================= */
.rm-post-card {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* IMAGE */
.rm-post-thumb-wrap {
  width: 100%;
  aspect-ratio: 1200 / 630;
}

.rm-post-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* BODY */
.rm-post-body {
  padding: 16px 18px 20px;
  text-align: center;
}

/* META (TARİX və s.) */
.rm-post-meta {
  font-size: 13px;
  color: #666;
  font-family: "Exo 2", sans-serif;
}

/* TITLE – ANA SƏHİFƏ */
.rm-post-title {
  margin: 8px 0;
  font-family: "Exo 2", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.rm-post-title a {
  color: #111;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* EXCERPT */
.rm-post-excerpt {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  font-family: "Exo 2", sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= SINGLE POST ================= */
.single .site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.rm-single-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.rm-single-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #666;
  margin: 10px 0;
  font-family: "Exo 2", sans-serif;
}

.rm-single-title {
  font-family: "Exo 2", sans-serif;
  font-size: 34px;
  font-weight: 800;
  text-align: center;
  margin: 24px 0 20px;
}

.rm-single-content,
.rm-single-content p,
.rm-single-content li,
.rm-single-content span,
.rm-single-content time {
  font-family: "Exo 2", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

/* ================= MOBILE MENU – TƏK VƏ DÜZGÜN ================= */

  .main-navigation ul {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 12px 16px;
    margin: 0;
  }

  .main-navigation a {
    display: block;
    width: 100%;
    font-size: 16px;
    text-align: left;
    padding: 4px 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
  }
}

/* ================= DESKTOPDA ☰ TAM SÖNÜK ================= */
@media (min-width: 769px) {
  .menu-toggle {
    display: none !important;
  }
}
/* ===============================
   SINGLE POST – WEB ÜÇÜN DAR EN
   ŞƏKİL + MƏTN EYNİ EN
   1200x630 NİSBƏT POZULMUR
=============================== */

@media (min-width: 1024px) {

  /* Xəbər oxunan sahə */
  body.single .site-main {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Şəkil də eyni en olsun */
  body.single .rm-single-hero,
  body.single .rm-single-hero-thumb {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
  }

  body.single .rm-single-hero img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* nisbət saxlanır */
  }
}
/* ===============================
   SINGLE (DESKTOP ONLY): LEFT + RIGHT (no other pages)
================================ */
@media (min-width: 1024px){

  /* əvvəlki single dar en qaydasını desktopda söndürürük */
  body.single .site-main{
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 16px !important;
  }

  body.single .rm-single-layout{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
  }

  body.single .rm-single-left{
    min-width: 0;
  }

  body.single .rm-single-right{
    width: 360px;
  }

  /* sağ blok (təqvim) xəbərin şəkli kimi “kartoçka” enində görünsün */
  body.single .rm-widget{
    margin: 0;
  }

  /* ============ NEXT RACE CARD ============ */
  body.single .rm-next-race-card{
    width: 100%;
    aspect-ratio: 1200 / 630;            /* şəkil nisbətinə yaxın hündürlük */
    background: #1B2152;                 /* sənin verdiyin HEX */
    border-radius: 14px;
    padding: 18px 18px 16px;
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.single .rm-nr-top{
    text-align: center;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 16px;
    margin-bottom: 10px;
  }

  body.single .rm-nr-flag-wrap{
    display: flex;
    justify-content: center;
    margin: 6px 0 10px;
  }

  body.single .rm-nr-flag{
    width: 86px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
  }

  body.single .rm-nr-gp{
    text-align: center;
    font-weight: 800;
    font-size: 22px;
    margin: 6px 0 12px;
  }

  body.single .rm-nr-countdown{
    background: #fff;               /* sən dedin: ağ olacaq */
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
    margin-bottom: 12px;
  }

  body.single .rm-nr-time{
    color: #1B2152;                 /* həm arxa fon, həm yazı rəngi */
    font-weight: 800;
    font-size: 18px;
  }

  body.single .rm-nr-table{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  body.single .rm-nr-head{
    display: grid;
    grid-template-columns: 92px 1fr 64px;
    gap: 10px;
    font-weight: 800;
    font-size: 14px;
    color: #f2c200;                 /* “Tarix/Sessiya/Saat” sarı — sonra dəyişərik */
  }

  body.single .rm-nr-row{
    display: grid;
    grid-template-columns: 92px 1fr 64px;
    gap: 10px;
    font-size: 14px;
    line-height: 1.25;
    color: #fff;
  }

  body.single .rm-nr-c3{
    text-align: right;
    font-weight: 700;
  }

  body.single .rm-nr-note{
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.3;
    opacity: 0.9;
    text-align: center;
  }
}
@media (min-width: 1024px){
  body.single .rm-next-race-card{ border-radius: 0 !important; }
  body.single .rm-nr-countdown{ border-radius: 0 !important; }
  body.single .rm-nr-flag{ border-radius: 0 !important; }
}
@media (min-width: 1024px){
  body.single .rm-next-race-card{
    height: 100%;        /* aspect-ratio ilə məhdudlaşdırma bitsin */
    aspect-ratio: auto; /* ləğv edirik */
  }
}
@media (min-width: 1024px){
  body.single .rm-nr-flag{
    border: 1px solid #fff;   /* nazik haşiyə */
    padding: 2px;             /* az boşluq */
    background: transparent;  /* ağ fon ləğv */
    width: 96px;              /* bir az böyüdürük */
    height: auto;
  }
}
@media (min-width: 1024px){
  body.single .rm-single-layout{ align-items: start !important; }
  body.single .rm-single-right{ align-self: start !important; }
  body.single .rm-widget{ height: auto !important; }
  body.single .rm-next-race-card{
    height: auto !important;
    min-height: 0 !important;
  }
}
@media (min-width: 1024px){

  /* Başlıqlar + sətirlər hamısı CENTER */
  body.single .rm-nr-head,
  body.single .rm-nr-row{
    text-align: center;
  }

  /* Saat sütununu da center edirik (əvvəl right idi) */
  body.single .rm-nr-c3{
    text-align: center !important;
  }

  /* Columnların içində də mətni ortala (dəqiq olsun) */
  body.single .rm-nr-c1,
  body.single .rm-nr-c2,
  body.single .rm-nr-c3,
  body.single .rm-nr-hd{
    justify-self: center;
  }
}
/* ONLY single + desktop: sağ kart hündürlüyü şəkilə görə olacaq */
@media (min-width: 1024px){
  body.single .rm-next-race-card{
    box-sizing: border-box;
    overflow: hidden;
  }
}
.rm-single-sidebar,
#secondary,
.widget-area {
  overflow: visible !important;
}
/* Sidebar cards: Latest + Related */
.rm-side-card{
  background:#0f1a49;
  border-radius:12px;
  padding:14px 14px 10px;
  margin-top:14px;
  color:#fff;
  font-family:"Exo 2", sans-serif;
}

.rm-side-title{
  margin:0 0 10px;
  font-size:16px;
  font-weight:800;
  letter-spacing:.3px;
  text-transform:uppercase;
}

.rm-side-list{
  list-style:none;
  padding:0;
  margin:0;
}

.rm-side-item{
  border-top:1px solid rgba(255,255,255,.12);
}

.rm-side-item:first-child{
  border-top:0;
}

.rm-side-link{
  display:block;
  padding:10px 0;
  color:#ffffff;
  text-decoration:none;
  font-size:14px;
  line-height:1.25;
  opacity:.92;
}

.rm-side-link:hover{
  opacity:1;
  text-decoration:underline;
}
/* Sidebar – Son və Oxşar xəbərlər */
.rm-latest,
.rm-related {
  background: #ffffff;        /* ağ fon */
  border-radius: 0;           /* düzbucaqlı */
  padding: 16px;
  margin-top: 20px;           /* əsas məzmundan ayrılsın */
  border: 1px solid #e5e7eb;  /* incə ayırıcı xətt */
}

/* başlıqlar */
.rm-latest h3,
.rm-related h3 {
  margin-bottom: 12px;
}

/* siyahı */
.rm-latest ul,
.rm-related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rm-latest li,
.rm-related li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.rm-latest li:last-child,
.rm-related li:last-child {
  border-bottom: none;
}
/* Sidebar xəbər linkləri – mətn rəngi */
.rm-latest a,
.rm-related a {
  color: #1B2152;        /* oxunaqlı tünd göy */
  text-decoration: none;
}

.rm-latest a:hover,
.rm-related a:hover {
  text-decoration: underline;
}

/* başlıqlar da tünd olsun */
.rm-latest h3,
.rm-related h3 {
  color: #1B2152;
}
/* NEXT RACE – mobile fix (desktop dəyişmir) */
@media (max-width: 768px) {

  .rm-next-race-card {
    padding: 16px;
    text-align: center;
  }

  .rm-nr-flag {
    max-width: 120px;
    height: auto;
    margin: 0 auto 10px;
    display: block;
  }

  .rm-nr-gp {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .rm-nr-time {
    font-size: 20px;
    font-weight: 700;
    display: block;
    margin-bottom: 14px;
  }

  .rm-nr-table {
    font-size: 14px;
  }

  .rm-nr-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 6px;
    padding: 6px 0;
  }
}
/* NEXT RACE – mobile card layout */
@media (max-width: 768px){

  .rm-nr-table{ margin-top:12px; }
  .rm-nr-head{ display:none; } /* başlıqları gizlədir */

  .rm-nr-row{
    display:block;
    border:1px solid #e6e6e6;
    border-radius:10px;
    padding:10px 12px;
    margin:8px 0;
    background:#fff;
  }

  .rm-nr-c1{ display:block; font-size:13px; opacity:.75; margin-bottom:4px; }
  .rm-nr-c2{ display:block; font-size:15px; font-weight:600; line-height:1.2; }
  .rm-nr-c3{ display:block; font-size:15px; font-weight:700; margin-top:6px; }
}
@media (max-width: 768px){
  .rm-nr-countdown{
    border:1px solid #e6e6e6;
    border-radius:10px;
    padding:10px 12px;
    background:#fff;
    margin:10px 0 12px;
  }
  .rm-nr-time{
    display:block;
    font-size:18px;
    font-weight:800;
  }
}
