/*
Theme Name: Scoreline Sénégal
Theme URI: https://webdesignbg.eu/
Author: WebDesignBG
Author URI: https://webdesignbg.eu/
Description: Premium one-page футболен theme в стила на BeSoccer — тъмен hero, плаваща live-score карта, feature grid, зелен header (#3B811F) и тъмен footer. Elementor-ready. При активация автоматично създава началната страница „BeSoccer Sénégal : match du jour" с цялото съдържание (работи и без Elementor).
Version: 2.3.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scoreline
Tags: green, one-column, custom-logo, custom-menu, translation-ready
*/

/* ============================================================
   1) Токени + базова типография
   ============================================================ */
:root {
  --sl-green: #3b811f;        /* BeSoccer brand green (meta theme-color) */
  --sl-green-dark: #2f6819;
  --sl-green-deep: #245213;
  --sl-green-tint: #ecf4e7;
  --sl-ink: #0e1f38;
  --sl-text: #24344d;
  --sl-muted: #5b6b82;
  --sl-bg: #ffffff;
  --sl-bg-soft: #f4f6f8;
  --sl-border: #e4e9f0;
  --sl-radius: 14px;
  --sl-shadow: 0 1px 2px rgba(14, 31, 56, 0.05);
  --sl-shadow-lift: 0 8px 24px rgba(14, 31, 56, 0.08);
  --sl-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --sl-font-head: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--sl-font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--sl-text);
  background: var(--sl-bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--sl-green-dark); }
a:hover { color: var(--sl-green); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sl-font-head);
  color: var(--sl-ink);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 1.4em 0 0.5em;
}

.sl-container {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Достъпност */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--sl-green-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--sl-green);
  outline-offset: 2px;
}

/* ============================================================
   2) Header — зелен бар в стил BeSoccer
   ============================================================ */
.sl-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--sl-green);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
body.admin-bar .sl-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .sl-header { top: 46px; }
}

.sl-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 58px;
}

.sl-brand { display: flex; align-items: center; min-width: 0; }
.sl-brand .custom-logo { display: block; max-height: 40px; width: auto; }

.sl-brand__name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--sl-font-head);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.sl-brand__name:hover { color: #fff; }
.sl-brand__ball { width: 26px; height: 26px; flex: none; }

/* Навигация */
.sl-nav { margin-left: auto; }
.sl-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sl-nav__list a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.sl-nav__list a:hover,
.sl-nav__list .current-menu-item > a,
.sl-nav__list .current_page_item > a {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}
.sl-nav__list .sub-menu { display: none; } /* дълбочина 1 в header-а */

.sl-nav-toggle {
  display: none;
  margin-left: auto;
  appearance: none;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #fff;
  width: 42px;
  height: 38px;
  cursor: pointer;
}
.sl-nav-toggle__bars,
.sl-nav-toggle__bars::before,
.sl-nav-toggle__bars::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  margin: 0 auto;
  position: relative;
  transition: transform 0.15s ease;
}
.sl-nav-toggle__bars::before { position: absolute; top: -6px; left: 0; }
.sl-nav-toggle__bars::after { position: absolute; top: 6px; left: 0; }

@media (max-width: 900px) {
  .sl-nav-toggle { display: block; }
  .sl-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--sl-green-dark);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    padding: 10px 16px 14px;
    box-shadow: var(--sl-shadow-lift);
  }
  body.sl-nav-open .sl-nav { display: block; }
  .sl-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .sl-nav__list a { padding: 11px 12px; font-size: 16px; }
}

/* ============================================================
   3) Subnav — хоризонтална лента (като date-tabs на BeSoccer)
   ============================================================ */
.sl-subnav {
  background: #fff;
  border-bottom: 1px solid var(--sl-border);
}
.sl-subnav__inner {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sl-subnav__inner::-webkit-scrollbar { display: none; }

.sl-subnav .sl-subnav__list {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  white-space: nowrap;
}
.sl-subnav .sl-subnav__list a {
  display: block;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--sl-muted);
}
.sl-subnav .sl-subnav__list a:hover {
  color: var(--sl-green-dark);
  background: var(--sl-green-tint);
}
.sl-subnav .sl-subnav__list .current-menu-item > a,
.sl-subnav .sl-subnav__list .current_page_item > a {
  color: #fff;
  background: var(--sl-green);
}

/* ============================================================
   4) Основно съдържание
   ============================================================ */
.sl-main {
  display: block;
  min-height: 60vh;
  background: var(--sl-bg);
}

/* Стандартни страници / публикации (извън Elementor) */
.sl-article {
  max-width: 840px;
  margin-inline: auto;
  padding: 40px 24px 72px;
}
.sl-article__title {
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  padding-bottom: 14px;
  position: relative;
}
.sl-article__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--sl-green);
}
.sl-article__meta {
  font-size: 14px;
  color: var(--sl-muted);
  margin-bottom: 26px;
}
.sl-entry > p { margin: 0 0 18px; }
.sl-entry h2 { font-size: 28px; }
.sl-entry h3 { font-size: 21px; }
.sl-entry img { border-radius: var(--sl-radius); }
.sl-entry blockquote {
  margin: 0 0 18px;
  padding: 14px 20px;
  background: var(--sl-bg-soft);
  border-left: 4px solid var(--sl-green);
  border-radius: 10px;
}

/* Блог списък */
.sl-archive { padding: 40px 0 72px; }
.sl-archive__title {
  font-size: 32px;
  margin: 0 0 24px;
}
.sl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.sl-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius);
  box-shadow: var(--sl-shadow);
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.sl-card:hover {
  box-shadow: var(--sl-shadow-lift);
  transform: translateY(-2px);
}
.sl-card__thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.sl-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sl-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.sl-card__title { font-size: 19px; margin: 0; }
.sl-card__title a { color: var(--sl-ink); text-decoration: none; }
.sl-card__title a:hover { color: var(--sl-green-dark); }
.sl-card__meta { font-size: 13px; color: var(--sl-muted); }
.sl-card__excerpt { font-size: 15px; color: var(--sl-text); margin: 0; }
.sl-card__more {
  margin-top: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--sl-green-dark);
  text-decoration: none;
}

/* Пагинация */
.sl-pagination { margin-top: 34px; display: flex; gap: 6px; flex-wrap: wrap; }
.sl-pagination .page-numbers {
  display: inline-block;
  min-width: 38px;
  padding: 8px 12px;
  text-align: center;
  border: 1px solid var(--sl-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--sl-text);
  font-weight: 600;
  font-size: 15px;
  background: #fff;
}
.sl-pagination .page-numbers.current {
  background: var(--sl-green);
  border-color: var(--sl-green);
  color: #fff;
}
.sl-pagination a.page-numbers:hover {
  border-color: var(--sl-green);
  color: var(--sl-green-dark);
}

/* Бутони */
.sl-btn,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-block;
  background: var(--sl-green);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-family: var(--sl-font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.sl-btn:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--sl-green-dark);
  color: #fff;
}

/* 404 */
.sl-404 {
  max-width: 640px;
  margin-inline: auto;
  padding: 90px 24px 110px;
  text-align: center;
}
.sl-404 h1 { font-size: 40px; margin: 0 0 12px; }
.sl-404 p { color: var(--sl-muted); margin: 0 0 24px; }

/* ============================================================
   5) Footer — тъмен, в стил BeSoccer
   ============================================================ */
.sl-footer {
  background: #12240b;
  border-top: 3px solid var(--sl-green);
  color: #c9d7c2;
  margin-top: 0;
}
.sl-footer__inner {
  padding-top: 34px;
  padding-bottom: 34px;
  text-align: center;
}
.sl-footer__menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 22px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.sl-footer__menu a {
  color: #e8f0e3;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.sl-footer__menu a:hover { color: #fff; text-decoration: underline; }
.sl-footer__copy { margin: 0 0 6px; font-size: 14px; }
.sl-footer__note { margin: 0; font-size: 12.5px; color: #8fa87c; }
.sl-footer__note { color: #8aa17c; }

/* ============================================================
   6) Responsive дребни
   ============================================================ */
@media (max-width: 767px) {
  .sl-container { padding-inline: 16px; }
  .sl-article { padding: 28px 16px 56px; }
  .sl-article__title { font-size: 30px; }
  .sl-archive { padding: 28px 0 56px; }
}

/* ============================================================
   v2 добавки
   ============================================================ */
body { overflow-x: clip; }

.sl-header { transition: box-shadow 0.2s ease; }
.sl-header.is-scrolled { box-shadow: 0 6px 20px -8px rgba(10, 26, 12, 0.45); }

.sl-subnav .sl-subnav__list a.is-active {
  color: #fff;
  background: var(--sl-green);
}

/* Fallback режимът на началната страница е full-width */
.sl-fallback-page { max-width: none; }
.sl-fallback-page .sl-entry { max-width: none; }
