/* ===== CPS Profesional Team — Theme Styles ===== */
/* Bootstrap 3.3.7, Font Awesome 4.7, Swiper 3.4.1 enqueued separately */

/* ========== CSS VARIABLES ========== */
:root {
    --accent: #0066FF;
    --accent-hover: #0044CC;
    --accent-muted: #0B4C8C;
    --green-italian: #009246;
    --heading: #FFFFFF;
    --body-text: #E0E0E0;
    --text-muted: #9c9793;
    --site-bg: #111111;
    --content-bg: #1A1A1A;
    --border-color: #2A2A2A;
    --card-bg: #2A2A2A;
    --font-primary: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Ubuntu', Arial, sans-serif;
    --content-width: 1320px;
    --header-h: 100px;
    --thirdmenuchanging: 768px;
    --secondmenuchanging: 1100px;
    --firstmenuchanging: 1320px;
}

.align-items-end {
    padding-top: 40px;
}

/* ========== RESET & NEUTRALIZE ASTRA ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

#page.site, .ast-container, .ast-container-fluid,
.ast-separate-container, .ast-plain-container, .ast-narrow-container,
.ast-left-sidebar #primary, .ast-right-sidebar #primary,
.ast-separate-container.ast-two-container #primary:not(.site-main),
.ast-separate-container #primary:not(.site-main), #primary:not(.site-main),
.site-content, .ast-content-wrap, .ast-row,
.ast-article-post, .ast-article-single {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.ast-separate-container .site-main > *,
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single {
    margin: 0 !important;
    padding: 0 !important;
}

/* Fixed header offset */
#primary.site-main {
    padding-top: 70px !important;
    margin: 0 !important;
    background: var(--site-bg) !important;
}

.ast-separate-container {
    background-color: #fff !important;
}

/* ========== TYPOGRAPHY ========== */
body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--body-text);
    background: var(--site-bg) !important;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.ast-separate-container {
    background: var(--site-bg) !important;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    margin-top: 0;
}

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

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

/* ========== GRID ========== */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}
@media (min-width: 992px) {
    .container {
        max-width: var(--content-width);
    }
}

.reset-padding { padding: 0 !important; }
.reset-font { font-size: 0; }

/* ========== BUTTONS ========== */
.btn-outline {
    display: inline-block;
    padding: 14px 36px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
    font-family: var(--font-heading);
    font-style: italic;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}
.home-about .btn-outline {
    border-color: #fff;
    color: #fff;
}
.home-about .btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

/* ========== SECTION TITLES ========== */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}
.section-title {
    font-size: 31px;
    font-weight: bold;
    font-family: var(--font-heading);
    font-style: italic;
    text-transform: uppercase;
    display: inline-block;
    line-height: 95%;
    margin-bottom: 12px;
}
.section-desc {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.section-header.bg-grey {
    background-color: var(--content-bg);
    padding: 40px 0;
}
.section-header.bg-grey .section-title { color: #fff; }
.section-header.bg-grey .section-desc { color: var(--body-text); }

.section-footer-btn {
    text-align: center;
    margin-top: 40px;
}

/* ========== PAGE BANNER (Archive) ========== */
.archive-banner {
    position: relative;
    max-height: 330px;
    overflow: hidden;
}
.archive-banner::before {
    content: "";
    position: absolute;
    z-index: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.6) 25%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}
.archive-banner-content {
    height: 130px;
    background-size: cover;
    background-position: center;
    padding-top: 25px;
    padding-left: 75px;
    background-color: #1a1a1a;
    position: relative;
}
.archive-banner-title {
    font-size: 41px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-style: italic;
    color: #fff;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.archive-banner-subtitle {
    font-size: 19px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
    font-style: italic;
}

@media (max-width: 992px) {
    .archive-banner-content {
        height: 150px;
        padding-top: 50px;
        padding-left: 50px;
    }
    .archive-banner-title { font-size: 28px; }
}

/* ========== HEADER (Reference Style) ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 80px;
    background: var(--content-bg);
    transition: all 0.3s ease;
}
.site-header.scrolled {
    background: var(--content-bg);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.admin-bar .site-header {
    top: 32px;
}
.admin-bar .main-navigation {
    top: 32px;
}
@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
    .admin-bar .main-navigation {
        top: 46px;
    }
}

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

/* Logo */
.navigation-logo-container {
    flex-shrink: 0;
    margin-right: 30px;
}
.cps-logo a {
    display: block;
}
.cps-logo img {
    max-height: 82px;
    width: auto;
    margin-top: 10px;
}
.cps-logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}
.cps-logo-text .logo-main {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
}
.cps-logo-text .logo-sub {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 3px;
    color: #9c9793;
}


/* Right side container */
.navigation-menu-social-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: flex-start;
    margin-bottom: 10px;
}

/* Menu */
.navigation-menu-container {
    display: flex;
    align-items: center;
}
.site-header.scrolled .main-navigation > ul > li > a {
    color: #ccc;
}
.site-header.scrolled .main-navigation > ul > li > a:hover {
    color: #fff;
}

/* Submenu */
@media (min-width: 1100px) {
    .main-navigation ul ul {
        position: absolute;
        left: -18px;
        top: 30px;
        background-color: var(--accent);
        z-index: 20;
        height: 0;
        opacity: 0;
        overflow: hidden;
        box-shadow: 0 6px 12px rgba(0,0,0,0.175);
        min-width: 200px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .main-navigation ul li:hover > ul {
        overflow: visible;
        height: auto;
        opacity: 1;
        padding: 0 0 10px 0;
    }
    .main-navigation ul ul li {
        display: block;
        color: #fff;
        margin: 0;
        line-height: normal;
        padding: 6px 0;
        white-space: nowrap;
    }
    .main-navigation ul ul li a {
        color: #fff !important;
        padding: 6px 18px;
        font-size: 14px;
        font-style: italic;
    }
    .main-navigation ul ul li a::after { display: none; }
}

/* Social icons */
.cps-header-social {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cps-header-social a {
    color: #ccc;
    font-size: 18px;
    transition: color 0.3s;
}
.cps-header-social a:hover {
    color: var(--accent);
}
.site-header.scrolled .cps-header-social a { color: #ccc; }
.site-header.scrolled .cps-header-social a:hover { color: var(--accent); }

/* Right side (lang + shop) */
.header_right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.lang-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    text-transform: uppercase;
    list-style: none;
}
.lang-selector li {
    list-style: none;
}
.lang-selector ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
}
.lang-selector a,
.lang-selector .current-language {
    color: #ccc;
    text-decoration: none;
    font-family: var(--font-heading);
    font-style: italic;
}
.lang-selector a:hover {
    color: var(--accent);
}
.site-header.scrolled .lang-selector a,
.site-header.scrolled .lang-selector .current-language { color: #ccc; }
.site-header.scrolled .lang-selector a:hover { color: var(--accent); }

/* Shop button (placeholder) */

/* Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10000;
    color: #fff;
}
.site-header.scrolled .menu-toggle { color: #fff; }
.hamburger-box {
    display: block;
    width: 24px;
    height: 16px;
    position: relative;
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    position: absolute;
    transition: all 0.3s;
}
.hamburger-inner { top: 7px; }
.hamburger-inner::before { content: ''; top: -6px; }
.hamburger-inner::after { content: ''; top: 6px; }
.menu-toggle.open .hamburger-inner { transform: rotate(45deg); }
.menu-toggle.open .hamburger-inner::before { opacity: 0; top: 0; }
.menu-toggle.open .hamburger-inner::after { transform: rotate(-90deg); top: 0; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}


.header-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 25px 75px 0;
    position: relative;
    height: 100%;
}

/* Logo */
.site-branding {
    position: absolute;
    left: 75px;
    top: -20px;
    z-index: 12;
}
.site-logo img {
    max-height: 120px;
    width: auto;
}
.site-title {
    display: block;
    margin: 0;
}
.site-title a {
    display: block;
    width: 85px;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 85 100"><text x="5" y="70" font-family="Ubuntu" font-size="15" font-weight="bold" fill="%23fff">CPS</text><text x="5" y="88" font-family="Ubuntu" font-size="8" fill="%239c9793">TEAM</text></svg>') no-repeat center;
    background-size: contain;
    text-indent: -9999px;
}
.site-description { display: none; }

/* Navigation */
.main-navigation {
    text-align: center;
    padding: 5px 0 0 0;
}
.main-navigation > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-block;
}
.main-navigation > ul > li {
    display: inline-block;
    margin: 0 10px;
    position: relative;
    line-height: 30px;
}
.main-navigation > ul > li > a {
    font-family: var(--font-heading);
    font-style: italic;
    color: #ccc;
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 400;
    text-decoration: none;
    display: block;
    padding: 0;
    position: relative;
}
.main-navigation > ul > li > a::after {
    content: '';
    width: 0;
    opacity: 0;
    position: absolute;
    top: 30px;
    right: 50%;
    border-bottom: 3px solid var(--accent);
    transition: all 400ms;
}
.main-navigation > ul > li > a:hover::after {
    width: calc(100% + 36px);
    right: -18px;
    opacity: 1;
}
.main-navigation > ul > li > a:hover {
    color: #fff;
}
.site-header.scrolled .main-navigation > ul > li > a {
    color: #ccc;
}
.site-header.scrolled .main-navigation > ul > li > a:hover {
    color: #fff;
}

/* Mobile menu overlay */
@media (max-width: 1099px) {
    .site-header {
        height: 70px;
    }
    .header_inner {
        padding: 15px 20px 0;
    }
    .navigation-logo-container {
        margin-right: 0;
    }
    .cps-logo img {
        max-height: 50px;
    }
    .cps-logo-text .logo-main { font-size: 18px; }
    .cps-logo-text .logo-sub { font-size: 8px; }
    .navigation-menu-social-container {
        gap: 12px;
    }
    .cps-header-social { display: none; }
    .header_right { gap: 10px; }

    .menu-toggle { display: block; }

    .main-navigation {
        position: fixed;
        left: -360px;
        top: 0;
        bottom: 0;
        max-width: 320px;
        width: 320px;
        background: var(--content-bg);
        z-index: 9998;
        padding: 110px 20px 20px 20px;
        transition: left 400ms;
        box-shadow: 2px 0 25px 0 rgba(3,3,3,0.6);
        text-align: left;
        overflow-y: auto;
    }
    .main-navigation.open { left: 0; }
    .main-navigation > ul {
        display: block;
    }
    .main-navigation > ul > li {
        display: block;
        margin: 0;
        padding: 10px 0;
        border-bottom: 1px solid #444;
    }
    .main-navigation > ul > li > a {
        color: #ccc;
        font-size: 14px;
    }
    .main-navigation > ul > li > a::after { display: none; }
    .main-navigation ul ul {
        position: static;
        background: var(--site-bg);
        opacity: 1;
        height: auto;
        overflow: visible;
        padding: 0 10px;
        box-shadow: none;
        min-width: auto;
    }
    .main-navigation ul ul li a {
        color: #ccc !important;
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* ========== LOADER ========== */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: var(--site-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}
.loader-wrapper.loaded {
    opacity: 0;
    visibility: hidden;
}
.loader {
    width: 50px;
    height: 50px;
    border: 3px solid #eee;
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== HERO SLIDER ========== */
.hero-section {
    min-height: 800px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #111;
    overflow: hidden;
}
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.hero-slider .swiper-slide {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-slider .swiper-slide::after {
    display: none;
}
.hero-overlay {
    display: none;
}
.hero-video-slide {
    position: relative;
    overflow: hidden;
}
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}
.hero-pre-title {
    text-transform: uppercase;
    font-size: 19px;
    font-style: italic;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-family: var(--font-heading);
}
.hero-title {
    font-size: 58px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-style: italic;
    color: #fff;
    margin-bottom: 35px;
    margin-top: 30px;
    line-height: 1.1;
    font-weight: 700;
}
.hero-subtitle {
    font-size: 19px;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-style: italic;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-btn {
    text-transform: uppercase;
    padding: 20px 40px;
    display: inline-block;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 16px;
    transition: all 0.3s ease;
}
.hero-btn-primary {
    background-color: var(--accent);
    color: #fff;
}
.hero-btn-primary:hover {
    background-color: var(--accent-hover);
    color: #fff;
}
.hero-btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}
.hero-btn-secondary:hover {
    background: var(--accent);
    color: #fff;
}

/* Hero pagination */
.hero-pagination {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 3;
}
.hero-pagination .swiper-pagination-bullet {
    background: #fff;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    opacity: 0.5;
}
.hero-pagination .swiper-pagination-bullet-active {
    background: var(--accent);
    height: 15px;
    width: 15px;
    opacity: 1;
}

.hero-scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: #fff;
    font-size: 24px;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ========== STATS SECTION ========== */
.home-stats {
    background: var(--site-bg);
    padding: 60px 0;
    position: relative;
}
.stats-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-around;
    text-align: center;
    flex-wrap: wrap;
    gap: 30px;
}
.stat-item {
    flex: 1;
    min-width: 150px;
}
.stat-number {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: 2px;
    font-family: var(--font-heading);
    font-style: italic;
}
.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== HOME RIDERS — PORTO-STYLE HORIZONTAL SCROLLER ========== */
.home-riders {
    background: var(--site-bg);
    padding: 80px 0;
    position: relative;
}
.home-riders .section-title { color: #fff; }

.home-riders-wrapper {
    padding: 0 20px;
}
.home-riders-wrapper .section-header,
.home-riders-wrapper .section-footer-btn {
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.riders-archive {
    background: var(--site-bg);
    padding: 60px 20px 80px;
}
.team-filter-tabs {
    text-align: center;
    padding: 0 0 30px;
}
.team-filter-tab {
    display: inline-block;
    color: #666;
    background: none;
    border: none;
    font-size: 16px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-style: italic;
    cursor: pointer;
    padding: 8px 16px;
    margin: 0 5px 10px;
    transition: all 0.3s;
}
.team-filter-tab.active,
.team-filter-tab:hover {
    color: #fff;
    border-bottom: 2px solid var(--accent);
}
.riders-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}
.riders-grid .rider-card {
    flex: 0 0 170px;
}
.rider-card:hover {
    transform: translateY(-5px);
}
.rider-card a {
    display: block;
    color: inherit;
    text-decoration: none;
}
.rider-card-img {
    height: 180px;
    background: #333;
    background-size: cover;
    background-position: top center;
    overflow: hidden;
}
.rider-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 36px;
}
.rider-card-info {
    text-transform: uppercase;
    color: #fff;
    background-color: var(--card-bg);
    padding: 12px 10px;
    transition: background-color 400ms;
}
.rider-card:hover .rider-card-info {
    background-color: var(--accent);
}
.rider-card-info .name {
    font-size: 16px;
    margin-bottom: 4px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}
.rider-card-info .country {
    font-size: 14px;
    color: var(--body-text);
}
.riders-hscroller .rider-scroll-item {
    padding: 0 1px;
}
.riders-hscroller .team-members-block {
    max-width: 220px;
    overflow: hidden;
    margin: 0 auto;
    transition: all 0.3s ease;
}
.riders-hscroller .team-members-block:hover {
    transform: translateY(-5px);
}
.riders-hscroller .team-members-block-img {
    max-width: 220px;
    height: 220px;
    background: #333;
    background-size: cover;
    background-position: top center;
    overflow: hidden;
}
.riders-hscroller .team-members-block-img img {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
}
.riders-hscroller .team-members-block-info {
    text-transform: uppercase;
    color: #fff;
    background-color: var(--card-bg);
    padding: 15px 12px;
    transition: background-color 400ms;
}
.riders-hscroller .team-members-block-info .name {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}
.riders-hscroller .team-members-block-info .country {
    font-size: 16px;
    color: var(--body-text);
}
.riders-hscroller .team-members-block:hover .team-members-block-info {
    background-color: var(--accent);
}

/* HScroller navigation arrows */
.hscroller-next,
.hscroller-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    outline: none;
}
.hscroller-next:hover,
.hscroller-prev:hover {
    background: var(--accent);
    color: #fff;
}
.hscroller-next {
    right: -60px;
}
.hscroller-prev {
    left: -60px;
}
.hscroller-prev.swiper-button-disabled,
.hscroller-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
}

@media (max-width: 1300px) {
    .hscroller-next { right: 10px; }
    .hscroller-prev { left: 10px; }
}



/* ========== HOME RACES ========== */
.home-races {
    padding: 80px 20px;
    background: var(--site-bg);
}
.home-races .section-title { color: var(--heading); }
.home-races .section-desc { color: var(--text-muted); }

/* Classification table on homepage */
.hp-classifica-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
}
.hp-classifica-table thead tr {
    background: var(--accent);
    color: #fff;
}
.hp-classifica-table th {
    padding: 12px 10px;
    text-align: center;
    font-weight: 600;
}
.hp-classifica-table th:first-child { text-align: center; }
.hp-classifica-table th:nth-child(2) { text-align: left; }
.hp-classifica-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    color: var(--body-text);
}
.hp-classifica-table td:nth-child(2) { text-align: left; }
.hp-classifica-table td:nth-child(3) { color: var(--accent); font-weight: 700; }
.hp-classifica-table td a {
    color: var(--body-text);
    text-decoration: none;
    font-weight: 500;
}
.hp-classifica-table td a:hover { color: var(--accent); }
.hp-classifica-table tbody tr:hover { background: rgba(0,102,255,0.05); }

@media (max-width: 768px) {
    .hp-classifica-table thead { display: none; }
    .hp-classifica-table tbody tr {
        display: block;
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
    }
    .hp-classifica-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border: none;
        text-align: right;
    }
    .hp-classifica-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        text-align: left;
    }
    .hp-classifica-table td:nth-child(2) { text-align: right; }
    .hp-classifica-table td:nth-child(3) { text-align: right; }
}

/* Race results grid on homepage */
.hp-races-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: var(--content-width, 1200px);
    margin: 0 auto;
}
.hp-race-card {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}
.hp-race-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.hp-race-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}
.hp-race-card-icon {
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    font-size: 48px;
    color: var(--accent);
}
.hp-race-card-body { padding: 16px; }
.hp-race-card-date {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}
.hp-race-card-title {
    font-size: 16px;
    color: var(--heading);
    margin: 8px 0 4px;
    font-weight: 600;
}
.hp-race-card-location {
    font-size: 14px;
    color: var(--text-muted);
}
.hp-race-card-cat {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
}
.hp-race-card-results {
    margin-top: 8px;
    font-size: 13px;
    color: var(--body-text);
}

@media (max-width: 992px) {
    .hp-race-card {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}
@media (max-width: 576px) {
    .hp-race-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Old calendar block kept for backward compat */
.hp-calendary-block {
    overflow: hidden;
    max-width: 360px;
    background: var(--card-bg);
    flex: 0 0 360px;
    transition: transform 0.3s;
}
.hp-calendary-block:hover {
    transform: translateY(-5px);
}
.hp-calendary-block a {
    display: block;
    color: inherit;
    text-decoration: none;
}
.hp-calendary-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hp-calendary-textContainer {
    background: var(--card-bg);
    padding: 30px;
    min-height: 140px;
}
.hp-calendary-tour {
    font-size: 19px;
    color: #fff;
    margin: 0;
    font-weight: 400;
}
.hp-calendary-date {
    color: var(--accent-hover);
    font-size: 31px;
    font-family: var(--font-heading);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    font-weight: 700;
}

/* ========== HOME SPONSORS ========== */
.home-sponsors {
    padding: 40px 20px;
    background: var(--card-bg);
    text-align: center;
}
.sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 30px 20px;
}
.sponsor-item {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}
.sponsor-item:hover { opacity: 0.7; }
.sponsor-item img {
    max-width: 180px;
    height: auto;
    max-height: 70px;
    object-fit: contain;
}

/* ========== HOME NEWS ========== */
.home-news {
    background: var(--site-bg);
    padding: 80px 20px;
}
.news-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1260px;
    margin: 0 auto;
}

/* ========== NEWS TIMELINE ========== */
.news-timeline-section {
    padding: 80px 20px;
    max-width: var(--content-width);
    margin: 0 auto;
}
.news-timeline-section .section-header { margin-bottom: 50px; }
.news-timeline-section .section-title { color: var(--heading); }
.news-timeline-section .section-desc { color: var(--text-muted); }

.news-timeline {
    position: relative;
    padding: 20px 0;
}
.news-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
    z-index: 0;
}
.timeline-item {
    display: flex;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    margin-bottom: 50px;
}
.timeline-item:last-child { margin-bottom: 0; }

/* Left side */
.timeline-left {
    flex-direction: row;
    padding-right: calc(50% + 30px);
}
.timeline-left .timeline-marker {
    order: 2;
    text-align: left;
    padding-left: 20px;
    flex: 0 0 120px;
    position: relative;
}
.timeline-left .timeline-marker::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--site-bg);
    z-index: 1;
}
.timeline-left .timeline-content {
    order: 1;
    flex: 1;
}

/* Right side */
.timeline-right {
    flex-direction: row-reverse;
    padding-left: calc(50% + 30px);
}
.timeline-right .timeline-marker {
    text-align: right;
    padding-right: 20px;
    flex: 0 0 120px;
    position: relative;
}
.timeline-right .timeline-marker::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--site-bg);
    z-index: 1;
}
.timeline-right .timeline-content {
    flex: 1;
}

.timeline-date {
    font-size: 14px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-style: italic;
    white-space: nowrap;
    display: block;
    padding-top: 2px;
}
.timeline-content {
    background: var(--content-bg);
    padding: 0;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}
.timeline-right .timeline-content {
    border-left: none;
    border-right: 4px solid var(--accent);
}
.timeline-content:hover {
    background: var(--border-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.timeline-content a {
    color: inherit;
    text-decoration: none;
    display: block;
}
.timeline-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}
.timeline-body {
    padding: 22px 25px;
}
.timeline-body .text-category {
    color: var(--accent);
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    font-style: italic;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}
.timeline-body h3 {
    color: var(--heading);
    font-size: 20px;
    margin: 8px 0;
    font-family: var(--font-heading);
    font-style: italic;
}
.timeline-body p {
    color: var(--body-text);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 10px;
}
.timeline-read-more {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-style: italic;
    transition: letter-spacing 0.3s;
}
.timeline-content:hover .timeline-read-more {
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .news-timeline::before { left: 20px; }
    .timeline-item,
    .timeline-left,
    .timeline-right {
        flex-direction: column;
        padding-left: 40px;
        padding-right: 0;
        gap: 8px;
        margin-bottom: 35px;
    }
    .timeline-left .timeline-marker,
    .timeline-right .timeline-marker {
        flex: none;
        text-align: left;
        padding-left: 0;
        padding-right: 0;
    }
    .timeline-left .timeline-marker::after,
    .timeline-right .timeline-marker::after {
        left: -27px;
        right: auto;
        top: 5px;
    }
    .timeline-date { font-size: 13px; }
    .timeline-content h3 { font-size: 18px; }
    .timeline-right .timeline-content {
        border-left: 4px solid var(--accent);
        border-right: none;
    }
}
.news-timeline-section .section-header { margin-bottom: 50px; }
.news-timeline-section .section-title { color: var(--heading); }
.news-timeline-section .section-desc { color: var(--text-muted); }

.news-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}
.news-timeline::before {
    content: '';
    position: absolute;
    left: 120px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    opacity: 0.25;
}

.timeline-item {
    display: flex;
    gap: 30px;
    margin-bottom: 45px;
    position: relative;
}
.timeline-marker {
    flex: 0 0 120px;
    text-align: right;
    padding-right: 20px;
    position: relative;
}
.timeline-marker::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--site-bg);
    z-index: 1;
}
.timeline-date {
    font-size: 14px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-style: italic;
    white-space: nowrap;
}
.timeline-content {
    flex: 1;
    background: var(--content-bg);
    padding: 0;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    transition: background 0.3s;
    overflow: hidden;
}
.timeline-content:hover {
    background: var(--border-color);
}
.timeline-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}
.timeline-body {
    padding: 22px 25px;
}
.timeline-body .text-category {
    color: var(--accent);
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    font-style: italic;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}
.timeline-body h3 {
    color: var(--heading);
    font-size: 20px;
    margin: 8px 0;
    font-family: var(--font-heading);
    font-style: italic;
}
.timeline-body p {
    color: var(--body-text);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .news-timeline::before { left: 20px; }
    .timeline-item { flex-direction: column; padding-left: 40px; gap: 8px; }
    .timeline-marker { flex: none; text-align: left; padding-right: 0; }
    .timeline-marker::after { left: -27px; right: auto; top: 5px; }
    .timeline-date { font-size: 13px; }
    .timeline-content h3 { font-size: 18px; }
}

/* ========== NEWS FEATURED (UAE Team style) ========== */
.news-featured {
    background: var(--site-bg);
    padding: 0;
}
.news-featured-inner {
    max-width: var(--content-width);
    margin: 0 auto;
}
.news-featured-img {
    position: relative;
    width: 100%;
    min-height: 480px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
}
.news-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
}
.news-featured-text {
    position: relative;
    z-index: 1;
    padding: 50px 75px;
    max-width: 700px;
}
.news-featured-category {
    display: inline-block;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-heading);
    font-style: italic;
    margin-bottom: 12px;
}
.news-featured-title {
    font-size: 36px;
    font-family: var(--font-heading);
    font-style: italic;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.15;
}
.news-featured-date {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}
.news-featured-link {
    display: inline-block;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-style: italic;
    letter-spacing: 0.5px;
    transition: letter-spacing 0.3s;
    text-decoration: none;
}
.news-featured-link:hover {
    letter-spacing: 2px;
    color: var(--accent);
}

/* ========== NEWS FILTER TABS ========== */
.news-filter-tabs {
    text-align: center;
    padding: 40px 20px 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    background: var(--site-bg);
}
.news-filter-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 700;
    font-family: var(--font-heading);
    font-style: italic;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}
.news-filter-tab:hover {
    color: #fff;
}
.news-filter-tab.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

/* ========== NEWS TYPE BADGE ========== */
.news-type-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 10px;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* ========== NEWS HERO (featured) ========== */
.news-hero {
    width: 100%;
}
.news-hero-slide {
    position: relative;
    width: 100%;
    min-height: 500px;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    background-color: var(--content-bg);
}
.news-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 100%);
}
.news-hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 60px 20px;
    width: 100%;
}
.news-hero-topstory {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 700;
}
.news-hero-title {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    max-width: 700px;
    line-height: 1.15;
}
.news-hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.news-hero-date {
    font-size: 14px;
    color: #ccc;
}
.news-hero-link {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 28px;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}
.news-hero-link:hover {
    opacity: 0.85;
    color: #fff;
}

/* ========== NEWS MAIN ========== */
.news-main {
    background: var(--site-bg);
    padding: 50px 0 80px;
}
.news-main-header,
.news-filter-bar,
.news-pagination {
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}
.news-main-header {
    margin-bottom: 30px;
    text-align: center;
}
.news-main-title {
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--heading);
}
.news-filter-bar {
    margin-bottom: 40px;
}
.news-main-header {
    text-align: center;
    margin-bottom: 30px;
}
.news-main-title {
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--heading);
}

/* ========== FILTER BAR ========== */
.news-filter-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}
.news-filter-btn {
    background: none;
    border: none;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.news-filter-btn:hover {
    color: var(--heading);
}
.news-filter-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ========== NEWS GRID ========== */
.news-grid-section {
    background: var(--site-bg);
    padding: 0 0 60px;
}
.news-grid-section > .news-filter-tabs {
    margin-bottom: 0;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 20px;
}
.news-card {
    background: var(--content-bg);
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.news-card a {
    color: inherit;
    text-decoration: none;
    display: block;
}
.news-card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.news-card:hover .news-card-img img {
    transform: scale(1.05);
}
.news-card-body {
    padding: 22px 24px 28px;
}
.news-card-title {
    color: var(--heading);
    font-size: 18px;
    font-family: var(--font-heading);
    font-style: italic;
    margin: 0 0 8px;
    line-height: 1.25;
}
.news-card-date {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}
.news-card-excerpt {
    color: var(--body-text);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 14px;
}
.news-card-link {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-style: italic;
    letter-spacing: 0.5px;
    transition: letter-spacing 0.3s;
}
.news-card:hover .news-card-link {
    letter-spacing: 1.5px;
}

/* ========== NEWS PAGINATION ========== */
.news-pagination {
    text-align: center;
    margin-top: 50px;
}
.news-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    font-size: 14px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    transition: background 0.3s, color 0.3s;
}
.news-pagination .page-numbers.current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.news-pagination .page-numbers:hover {
    background: var(--card-bg);
}
.news-pagination .page-numbers.current:hover {
    background: var(--accent-hover);
}

/* ========== SINGLE NEWS ========== */
.single-news-article {
    background: var(--site-bg);
    min-height: 100vh;
}
.single-news-hero {
    position: relative;
    width: 100%;
    min-height: 420px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
.single-news-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 100%);
}
.single-news-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 50px 20px 80px;
}
.single-news-header {
    margin-bottom: 40px;
}
.single-news-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.single-news-category {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
    font-style: italic;
}
.single-news-date {
    color: var(--text-muted);
    font-size: 14px;
}
.single-news-title {
    color: #fff;
    font-size: 36px;
    font-family: var(--font-heading);
    font-style: italic;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.15;
}
.single-news-content {
    color: var(--body-text);
    font-size: 16px;
    line-height: 1.8;
}
.single-news-content p {
    margin-bottom: 20px;
}
.single-news-external {
    margin-top: 30px;
}
.single-news-back {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}
.single-news-back a {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-style: italic;
    transition: color 0.3s;
}
.single-news-back a:hover {
    color: var(--accent);
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .news-featured-img {
        min-height: 350px;
    }
    .news-featured-text {
        padding: 30px 40px;
    }
    .news-featured-title {
        font-size: 28px;
    }
    .single-news-title {
        font-size: 28px;
    }
    .single-news-hero {
        min-height: 300px;
    }
}
@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-featured-img {
        min-height: 280px;
    }
    .news-featured-text {
        padding: 20px;
    }
    .news-featured-title {
        font-size: 22px;
    }
    .news-filter-tabs {
        gap: 0;
    }
    .news-filter-tab {
        font-size: 12px;
        padding: 8px 12px;
    }
}

.race-card {
    background: var(--card-bg);
}

.home-races .btn-outline:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.home-social {
    background: var(--card-bg);
}

/* ========== SOCIAL STRIPE ========== */
.home-social-stripe {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}
.social-stripe-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}
.social-stripe-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}
.social-stripe-item:hover { color: var(--accent); }
.social-stripe-item i { font-size: 24px; }

/* ========== FOOTER ========== */
.site-footer {
    background: #111;
    color: var(--text-muted);
    padding: 0;
}
.footer-social-box {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid #222;
}
.footer-social-text { max-width: 500px; }
.footer-social-text p { margin: 0; font-size: 16px; line-height: 1.5; }
.footer-social-icons { display: flex; gap: 10px; }
.footer-social-icons a {
    color: var(--text-muted);
    font-size: 28px;
    transition: color 0.2s;
}
.footer-social-icons a:hover { color: var(--accent); }

.footer-widgets {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.footer-widget-area h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-style: italic;
}
.footer-widget-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-widget-area ul li { margin-bottom: 8px; }
.footer-widget-area ul li a {
    color: var(--text-muted);
    font-size: 14px;
}
.footer-widget-area ul li a:hover { color: #fff; }

.footer-bottom {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid #222;
}
.footer-credits { font-size: 14px; }
.footer-credits a { color: var(--body-text); }
.footer-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 16px;
}
.footer-navigation ul li a {
    color: var(--text-muted);
    font-size: 14px;
}
.footer-navigation ul li a:hover { color: #fff; }

/* Footer primary menu (duplicate, smaller) */
.footer-primary-menu ul {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.footer-primary-menu ul li a {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-primary-menu ul li a:hover { color: #fff; }

/* Footer language switcher (inside footer-primary-menu) */
.footer-primary-menu .lang-selector {
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-primary-menu .lang-selector a {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 400;
}
.footer-primary-menu .lang-selector a:hover,
.footer-primary-menu .lang-selector .current-language a { color: var(--accent); }
.footer-primary-menu .lang-selector .sep { color: #444; font-size: 10px; }

/* ========== ARCHIVE PAGES ========== */
.archive .content-area,
.archive .site-main {
    max-width: none;
    padding: 0;
}

/* Team cards (archive-riders, archive-staff) */
.staff-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 60px 20px;
    margin: 0 auto;
    gap: 0;
}
.rider-grid-item,
.staff-grid-item {
    flex: 0 0 100%;
    max-width: 100%;
}
@media (min-width: 576px) {
    .rider-grid-item,
    .staff-grid-item { flex: 0 0 calc(50% - 8px); max-width: calc(50% - 8px); }
}
@media (min-width: 768px) {
    .rider-grid-item,
    .staff-grid-item { flex: 0 0 calc(25% - 12px); max-width: calc(25% - 12px); }
}
@media (min-width: 1200px) {
    .rider-grid-item,
    .staff-grid-item { flex: 0 0 calc(20% - 14px); max-width: calc(20% - 14px); }
}

.team-members-block {
    overflow: hidden;
    margin-bottom: 40px;
}
.team-members-block-img {
    width: 100%;
    background: #333;
    background-size: contain;
    background-position: top center;
    background-repeat: no-repeat;
    overflow: hidden;
    transition: background-size 0.4s;
}
.team-members-block-img img {
    width: 100%;
    height: auto;
    display: block;
}
.team-members-block-info {
    text-transform: uppercase;
    color: #fff;
    background-color: var(--card-bg);
    padding: 18px 15px;
    transition: background-color 400ms;
    text-align: center;
}
.team-members-block-info .name {
    font-size: 18px;
    margin-bottom: 6px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}
.team-members-block-info .country {
    font-size: 14px;
    color: var(--body-text);
}
.team-members-block:hover .team-members-block-img {
    background-size: 140%;
}
.team-members-block:hover .team-members-block-info {
    background-color: var(--accent);
}

/* Staff filter tabs */
.staff-category-tabs {
    text-align: center;
    padding: 20px 0 0;
    margin-bottom: 20px;
}
.staff-category-tab {
    display: inline-block;
    color: #666;
    background: none;
    border: none;
    font-size: 16px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-style: italic;
    cursor: pointer;
    padding: 8px 16px;
    margin: 0 5px 10px;
    transition: all 0.3s;
}
.staff-category-tab.active,
.staff-category-tab:hover {
    color: #fff;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}

/* Archive gallery */
.archive-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
    max-width: 1320px;
    margin: 0 auto;
}
.archive-gallery-item {
    flex: 0 0 285px;
    max-width: 285px;
}

/* ========== SINGLE RIDER ========== */

/* Hero section */
.single-rider-hero {
    background-color: #1c1f24;
    padding: 60px 0;
}
.rider-hero-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 400px;
}
.rider-name {
    font-size: 41px;
    font-family: var(--font-heading);
    font-style: italic;
    text-transform: uppercase;
    margin-bottom: 0.6em;
    color: #fff;
}
.rider-meta p {
    margin-bottom: 4px;
    font-size: 19px;
    line-height: 27px;
    color: #fff;
}
.rider-meta .text-muted {
    color: #878694 !important;
    font-weight: 700;
    font-size: 14px;
}
.rider-bio {
    margin: 20px 0;
    font-size: 19px;
    line-height: 27px;
    color: #fff;
}
.rider-social {
    margin-top: 30px;
}
.rider-social a {
    display: inline-block;
    color: #fff;
    font-size: 28px;
    margin-right: 16px;
    transition: color 0.2s;
}
.rider-social a:hover {
    color: var(--accent);
}

/* Detail section */
.single-rider-detail {
    background-color: #1c1f24;
}
.rider-stats-col {
    padding: 60px 20px;
}
.rider-stats-table {
    width: 100%;
    border: none !important;
}
.rider-stats-table td,
.rider-stats-table th {
    border: none !important;
    font-size: 19px;
    line-height: 27px;
    vertical-align: bottom;
    padding: 2px 0;
}
.rider-stats-table td:last-child {
    text-align: right;
    padding-left: 5px;
}
.rider-stats-table .text-muted {
    color: #878694 !important;
    font-weight: 700;
}
.rider-years-col {
    background-color: #272b33;
    padding: 60px 20px;
}

/* Year accordion */
.rider-year-item {
    padding: 0 0 8px;
}
.rider-year-item + .rider-year-item {
    padding: 8px 0;
    border-top: 1px solid #535362;
}
.rider-year-item h3 {
    margin: 0;
    font-size: 18px;
}
.rider-year-item h3 a {
    color: #878694;
    text-decoration: none;
    font-weight: 700;
    padding: 8px 0;
}
.rider-year-item h3 a:hover {
    color: #878694;
}
.rider-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 11px;
    background: #535363;
    color: #fff;
    transition: all 0.3s ease-in-out;
}
.rider-year-item h3 a:not(.collapsed) .rider-toggle {
    transform: rotate(135deg);
    background: #1c1f24;
}
.rider-year-item .collapse {
    padding-top: 10px;
}
.rider-year-item .collapse p {
    margin: 0 0 4px;
    font-size: 20px;
    color: #ccc;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .single-rider-hero { padding: 30px 0; }
    .rider-hero-img { max-width: 280px; }
    .rider-stats-col { padding: 30px 15px; }
    .rider-years-col { padding: 30px 15px; }
}

/* ========== SINGLE STAFF ========== */
.single-staff-hero {
    display: flex;
    flex-wrap: wrap;
    background: var(--content-bg);
    color: #fff;
    max-width: var(--content-width);
    margin: 0 auto;
}
.single-staff-photo {
    flex: 0 0 300px;
    max-width: 300px;
}
.single-staff-photo img { width: 100%; display: block; }
.single-staff-info {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.single-staff-name {
    font-size: 41px;
    font-family: var(--font-heading);
    font-style: italic;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #fff;
}
.single-staff-meta-item { margin-bottom: 12px; }
.single-staff-meta-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.single-staff-meta-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

/* ========== SINGLE RACE ========== */
.single-race {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}
.race-title {
    font-size: 41px;
    font-family: var(--font-heading);
    font-style: italic;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.race-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}
.race-details-table th,
.race-details-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.race-details-table th {
    width: 140px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* ========== CONTENT / PAGE ========== */
.content-area {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 60px 20px;
    background: var(--site-bg);
}
.page-content,
.entry-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}
.entry-header { margin-bottom: 30px; }
.entry-title {
    font-size: 31px;
    font-family: var(--font-heading);
    font-style: italic;
    text-transform: uppercase;
    margin-bottom: 16px;
}

/* ========== 404 ========== */
.error-404 {
    text-align: center;
    padding: 100px 20px;
}
.error-404-title {
    font-size: 120px;
    color: var(--accent);
    margin-bottom: 16px;
    line-height: 1;
    font-family: var(--font-heading);
    font-style: italic;
}
.error-404-message {
    font-size: 24px;
    margin-bottom: 16px;
}
.error-404-description {
    color: var(--text-muted);
    margin-bottom: 32px;
}
.error-404-home-link {
    display: inline-block;
    padding: 15px 30px;
    background: var(--accent);
    color: #fff;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-style: italic;
    transition: background 0.3s;
}
.error-404-home-link:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* ========== PAGINATION ========== */
.pagination { margin-top: 40px; text-align: center; }
.pagination .nav-links { display: inline-flex; gap: 4px; }
.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ccc;
    font-size: 14px;
    color: #333;
}
.pagination .current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.pagination a:hover { background: #f0f0f0; }

/* ========== NO RESULTS ========== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* ========== SKIP LINK ========== */
.skip-link.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

/* ========== ANIMATIONS ========== */
.tobeanimated {
    animation-duration: 1s;
    animation-fill-mode: both;
}
.tofadein,
.tofadeinleft,
.tofadeinright,
.tofadeindown,
.tofadeinround {
    opacity: 0;
}
.tofadein.animated { animation-name: fadeIn; }
.tofadeinleft.animated { animation-name: fadeInLeft; }
.tofadeinright.animated { animation-name: fadeInRight; }
.tofadeinround.animated { animation-name: fadeInRound; }
.tofadeindown.animated { animation-name: fadeInDown; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(1500px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRound { from { opacity: 0; transform: rotate(-180deg) translateX(100px); } to { opacity: 1; transform: rotate(0) translateX(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-100px); } to { opacity: 1; transform: translateY(0); } }

/* ========== EFFECTS ========== */
.effect-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ========== CHOSEN OVERRIDES ========== */
.chosen-container .chosen-results li.highlighted {
    background-color: var(--accent) !important;
    background-image: none !important;
}
.chosen-container-single .chosen-single {
    border-radius: 0 !important;
    height: auto !important;
    padding: 8px 12px !important;
    font-family: var(--font-primary);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1320px) {
    .main-navigation > div > ul > li { margin: 0 12px; }
}
@media (max-width: 1100px) {
    .header-inner { padding: 25px 40px 0; }
    .site-branding { left: 40px; }
    .header-actions { right: 40px; }
}
@media (max-width: 992px) {
    .hero-title { font-size: 36px; }
    .hero-section { min-height: 500px; }
    .footer-widgets { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .single-rider-photo { flex: 0 0 100%; max-width: 100%; }
    .single-rider-info { padding: 30px 20px; }
    .single-rider-name { font-size: 28px; }
    .single-staff-photo { flex: 0 0 100%; max-width: 100%; }
    .single-staff-info { padding: 30px 20px; }
    .single-staff-name { font-size: 28px; }
}
@media (max-width: 600px) {
    .hero-title { font-size: 28px; }
    .hero-btn { padding: 15px 20px; font-size: 14px; }
    .stats-inner { flex-direction: column; gap: 20px; }
    .stat-number { font-size: 36px; }
    .footer-social-box { flex-direction: column; text-align: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* ========== HELPER ========== */
.home-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* ========== HOME NEWS ========== */
.home-news {
    background: var(--site-bg);
    padding: 60px 20px 70px;
}
.home-news .section-title { color: var(--heading); }
.home-news .section-desc { color: var(--text-muted); }
.home-news .news-grid {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* ========== VIDEO CARDS ========== */
.news-card-img {
    position: relative;
    overflow: hidden;
}
.news-card-img-placeholder {
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}
.news-card-placeholder-icon {
    font-size: 48px;
    color: var(--text-muted);
    opacity: 0.5;
}
.news-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    transition: background .3s;
}
.news-card:hover .news-card-play {
    background: rgba(0,0,0,0.6);
}
.news-card-play i {
    font-size: 48px;
    color: #fff;
    opacity: .9;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
    transition: transform .3s;
}
.news-card:hover .news-card-play i {
    transform: scale(1.1);
}
.single-news-video {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 20px;
}
.single-news-video iframe,
.single-news-video-below iframe {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}
.single-news-video-below {
    margin-top: 30px;
}

/* ========== CONTACTS ========== */
.contacts-page {
    padding: 40px 20px 80px;
    background: var(--site-bg);
}
.contacts-container {
    max-width: var(--content-width);
    margin: 0 auto;
}
.contacts-container .page-content {
    margin-bottom: 40px;
    color: var(--body-text);
    font-size: 15px;
    line-height: 1.7;
}
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
@media (max-width: 768px) {
    .contacts-grid {
        grid-template-columns: 1fr;
    }
}
.contacts-heading {
    color: var(--heading);
    font-size: 22px;
    font-family: var(--font-heading);
    font-style: italic;
    margin-bottom: 24px;
}
.contact-item {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    align-items: flex-start;
}
.contact-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}
.contact-text {
    color: var(--body-text);
    font-size: 14px;
    line-height: 1.6;
}
.contact-text strong {
    color: var(--heading);
}
.contact-text a {
    color: var(--accent);
    text-decoration: none;
}
.contact-text a:hover {
    text-decoration: underline;
}
.map-container {
    border-radius: 8px;
    overflow: hidden;
}

/* ========== HOME MAP ========== */
.home-map {
    position: relative;
    padding: 0;
    overflow: hidden;
}
.home-map::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(17,17,17,0.85) 0%,
        rgba(17,17,17,0.15) 30%,
        rgba(17,17,17,0.15) 70%,
        rgba(17,17,17,0.85) 100%
    );
    pointer-events: none;
    z-index: 1;
}
.home-map .map-container {
    width: 100%;
    border-radius: 0;
}
.home-map .map-container iframe {
    display: block;
    width: 100%;
    height: 480px;
    filter: grayscale(0.8);
    transition: filter 0.6s ease;
}
.home-map:hover .map-container iframe {
    filter: grayscale(0);
}
.home-map .section-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 60px 0 0 75px;
    margin: 0;
    text-align: left;
    pointer-events: none;
}
.home-map .section-header .section-title {
    color: #fff;
    position: relative;
}
.home-map .section-header .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin-top: 8px;
}
.home-map .section-header .section-desc {
    margin: 8px 0 0;
    font-size: 15px;
}
@media (max-width: 768px) {
    .home-map .section-header {
        padding: 40px 0 0 20px;
    }
    .home-map .map-container iframe {
        height: 350px;
    }
}
