/* ============================================================
   RoadSafe Europe — custom theme overrides
   Load AFTER style.css and responsive.css.
   Palette per competitor-analysis recommendation:
   - Deep navy for authority
   - Existing RoadSafe red used selectively for actions
   - Warm neutral background instead of pure white
   ============================================================ */

:root {
    --rs-navy: #16233c;
    --rs-navy-light: #1f3358;
    --rs-navy-lighter: #2c4570;
    --rs-red: #9B2700;
    --rs-red-hover: #7a1f00;
    --rs-warm-bg: #f7f4ee;
    --rs-warm-bg-alt: #efe9df;
    --rs-text: #1c1c1c;
    --rs-muted: #5a5f6b;
    --rs-border: #e2ded3;
}

body { color: var(--rs-text); }

/* ---- Buttons ---- */
.btn, .btn-primary {
    background-color: var(--rs-red);
    border-color: var(--rs-red);
    border-radius: 3px;
}
.btn:hover, .btn:focus, .btn-primary:hover, .btn-primary:focus {
    background-color: var(--rs-red-hover);
    border-color: var(--rs-red-hover);
}
.btn-secondary, .btn-secondary:focus {
    background-color: var(--rs-navy);
    border-color: var(--rs-navy);
    border-radius: 3px;
}
.btn-secondary:hover {
    background-color: var(--rs-navy-light);
    border-color: var(--rs-navy-light);
}
.btn-outline-secondary, .btn-outline-secondary:focus {
    color: var(--rs-navy);
    background-color: transparent;
    border-color: var(--rs-navy);
    border-radius: 3px;
}
.btn-outline-secondary:hover {
    background-color: var(--rs-navy);
    border-color: var(--rs-navy);
    color: #fff;
}
.btn-outline-light { border-radius: 3px; }
#site-scroll { background: var(--rs-red) !important; }
#site-scroll:hover { background: var(--rs-red-hover) !important; }

/* Theme reserves 47px under the footer on mobile for a bottom tab bar (.menubar-mobile)
   that this build doesn't use — cancel it to remove the dead gap below the copyright. */
@media only screen and (max-width: 992px) {
    .index-demo1 .footer { padding-bottom: 0 !important; }
}

/* ---- Top info bar: single serious message, not repeated x3 ---- */
.top-header { background-color: var(--rs-navy); }
.top-header .top-info-bar { background-color: transparent !important; }
.top-info-bar .flex-item a span,
.top-info-bar .flex-item a { color: #fff; }
/* Fix theme bug: -webkit-animation duration (40s) didn't match animation duration (30s), causing items to drift out of sync */
.marquee-text .top-info-bar .flex-item {
    animation: ticker 30s infinite linear;
    -webkit-animation: ticker 30s infinite linear;
    flex-shrink: 0;
}

/* ---- Header (fully custom layout — no dependency on theme grid/nav CSS) ---- */
.header { background-color: #ffffff; border-bottom: 1px solid var(--rs-border); position: relative; z-index: 20; }
.rs-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 24px;
    padding: 14px 0;
}
.rs-header-logo { flex: 0 0 auto; }
.rs-header-logo img { display: block; max-height: 55px; width: auto; }

.rs-header-nav { flex: 1 1 0%; min-width: 0; }
.rs-nav-list { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.rs-nav-list > li { position: relative; }
.rs-nav-list > li > a.menuheaders {
    display: block;
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--rs-navy);
    text-decoration: none;
}
.rs-nav-list > li > a.menuheaders:hover { color: var(--rs-red); }

.rs-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: #fff;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    box-shadow: 0 10px 24px rgba(22,35,60,0.15);
    z-index: 30;
}
.rs-has-dropdown:hover .rs-dropdown-menu { display: block; }
.rs-dropdown-menu li a {
    display: block;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 400;
    color: var(--rs-text);
    text-decoration: none;
    white-space: normal;
}
.rs-dropdown-menu li a:hover { color: var(--rs-red); background: var(--rs-warm-bg); }

.rs-header-cta { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; }
.rs-desktop-only { display: inline-flex; }
.rs-mobile-only { display: none; }
@media (max-width: 991px) {
    .rs-header-nav { display: none; }
    .rs-desktop-only { display: none; }
    .rs-mobile-only { display: inline-flex; align-items: center; justify-content: center; }
}

.header .btn-header-enquire {
    background-color: var(--rs-red);
    color: #fff;
    padding: 10px 22px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}
.header .btn-header-enquire:hover { background-color: var(--rs-red-hover); color: #fff; }

/* ---- Hero ---- */
.rs-hero {
    background-color: var(--rs-navy);
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 90px 0;
}
.rs-hero::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(22,35,60,0.92) 0%, rgba(22,35,60,0.6) 55%, rgba(22,35,60,0.35) 100%);
}
.rs-hero-content { position: relative; z-index: 2; max-width: 640px; }
.rs-hero-content h1 {
    color: #fff;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
}
.rs-hero-content p {
    color: #dfe4ee;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}
.rs-hero-btns { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.rs-hero-secondary-link {
    color: #cfd8e8;
    text-decoration: underline;
    font-size: 14px;
    margin-top: 16px;
    display: inline-block;
}
.rs-hero-secondary-link:hover { color: #fff; }

/* ---- Trust strip ---- */
.rs-trust-strip {
    background-color: var(--rs-warm-bg-alt);
    border-top: 1px solid var(--rs-border);
    border-bottom: 1px solid var(--rs-border);
    padding: 22px 0;
}
.rs-trust-strip ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px;
}
.rs-trust-strip li {
    color: var(--rs-navy);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rs-trust-strip li i { color: var(--rs-red); }

/* ---- Section shell ---- */
.rs-section { padding: 64px 0; }
.rs-section.bg-warm { background-color: var(--rs-warm-bg); }
.rs-section-header { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.rs-section-header .eyebrow {
    color: var(--rs-red);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 8px;
}
.rs-section-header h2 {
    color: var(--rs-navy);
    font-weight: 800;
    font-size: 30px;
    margin-bottom: 12px;
}
.rs-section-header p { color: var(--rs-muted); font-size: 16px; line-height: 1.6; }

/* ---- Two journeys ---- */
.rs-journeys { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.rs-journey-card {
    background: #fff;
    border: 1px solid var(--rs-border);
    border-radius: 6px;
    padding: 36px 34px;
}
.rs-journey-card.navy { background: var(--rs-navy); border-color: var(--rs-navy); }
.rs-journey-card h3 { color: var(--rs-navy); font-weight: 700; font-size: 22px; margin-bottom: 6px; }
.rs-journey-card.navy h3 { color: #fff; }
.rs-journey-card .rs-journey-sub { color: var(--rs-muted); font-size: 14px; margin-bottom: 20px; }
.rs-journey-card.navy .rs-journey-sub { color: #b9c3d6; }
.rs-journey-card ul { list-style: none; margin: 0 0 26px; padding: 0; }
.rs-journey-card ul li {
    padding: 10px 0 10px 26px;
    border-bottom: 1px solid var(--rs-border);
    position: relative;
    font-size: 15px;
    color: var(--rs-text);
}
.rs-journey-card.navy ul li { border-bottom-color: rgba(255,255,255,0.12); color: #e6e9f0; }
.rs-journey-card ul li:before {
    content: "\2192";
    position: absolute; left: 0; color: var(--rs-red); font-weight: 700;
}
.rs-journey-card ul li:last-child { border-bottom: none; }

/* ---- Card grids: transport modes / commodities ---- */
.rs-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rs-card-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
.rs-mode-card, .rs-commodity-card {
    background: #fff;
    border: 1px solid var(--rs-border);
    border-radius: 6px;
    padding: 26px 20px;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: all 0.25s ease-in-out;
}
.rs-mode-card:hover, .rs-commodity-card:hover {
    border-color: var(--rs-navy);
    box-shadow: 0 8px 20px rgba(22,35,60,0.12);
    transform: translateY(-2px);
}
.rs-mode-card .rs-icon, .rs-commodity-card .rs-icon {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--rs-warm-bg-alt);
    display: flex; align-items: center; justify-content: center;
    color: var(--rs-navy);
    font-size: 24px;
}
.rs-mode-card h4, .rs-commodity-card h4 { color: var(--rs-navy); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.rs-mode-card span.reg, .rs-commodity-card span.reg { color: var(--rs-muted); font-size: 13px; }
.rs-commodity-card { text-align: left; display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.rs-commodity-card .rs-icon { margin: 0; flex-shrink: 0; width: 44px; height: 44px; font-size: 18px; }
.rs-commodity-card h4 { margin: 0; font-size: 15px; }

/* ---- Featured course cards ---- */
.rs-course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rs-course-card {
    background: #fff;
    border: 1px solid var(--rs-border);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.rs-course-card .rs-course-tag {
    background: var(--rs-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 18px;
}
.rs-course-card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.rs-course-card h4 { color: var(--rs-navy); font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.rs-course-meta { list-style: none; margin: 0 0 18px; padding: 0; }
.rs-course-meta li {
    font-size: 13.5px; color: var(--rs-muted);
    display: flex; align-items: center; gap: 8px;
    padding: 4px 0;
}
.rs-course-meta li i { color: var(--rs-red); width: 16px; }
.rs-course-price { font-weight: 700; color: var(--rs-navy); font-size: 15px; margin-bottom: 16px; }
.rs-course-btns { margin-top: auto; display: flex; gap: 10px; }
.rs-course-btns .btn { flex: 1; padding: 9px 10px; font-size: 12.5px; }

/* ---- DGSA checker ---- */
.rs-checker {
    background: var(--rs-navy);
    border-radius: 8px;
    padding: 44px;
    color: #fff;
}
.rs-checker h3 { font-size: 24px; font-weight: 800; margin-bottom: 10px; color: #ffffff !important; }
.rs-checker p.rs-checker-intro { color: #c4cce0 !important; margin-bottom: 26px; font-size: 15px; }
.rs-checker-step { display: none; }
.rs-checker-step.active { display: block; }
.rs-checker-question { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: #ffffff !important; }
.rs-checker-options { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rs-checker-options button {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.28);
    color: #fff;
    padding: 10px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}
.rs-checker-options button:hover { background: var(--rs-red); border-color: var(--rs-red); }
.rs-checker-progress { font-size: 12px; color: #97a3bc; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.05em; }
.rs-checker-result { display: none; }
.rs-checker-result.active { display: block; }
.rs-checker-result h4 { font-size: 20px; margin-bottom: 10px; color: #ffffff !important; }
.rs-checker-result p { color: #dbe0ec !important; font-size: 14.5px; line-height: 1.6; margin-bottom: 20px; }
.rs-checker-disclaimer {
    font-size: 12.5px; color: #93a0ba; border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 16px; margin-top: 20px;
}
.rs-checker-restart { background: none; border: none; color: #cfd8e8; text-decoration: underline; font-size: 13px; cursor: pointer; padding: 0; margin-top: 14px; }

/* ---- Evidence / testimonials ---- */
.rs-testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rs-testimonial-card {
    background: #fff; border: 1px solid var(--rs-border); border-radius: 6px; padding: 26px;
}
.rs-testimonial-card .quote { font-size: 14.5px; line-height: 1.6; color: var(--rs-text); margin-bottom: 16px; }
.rs-testimonial-card .quote:before { content: "\201C"; color: var(--rs-red); font-size: 28px; line-height: 0; display: block; margin-bottom: 6px; }
.rs-testimonial-card .name { font-weight: 700; color: var(--rs-navy); font-size: 14px; }
.rs-testimonial-card .org { color: var(--rs-muted); font-size: 12.5px; }
.rs-stat-row { display: flex; justify-content: center; gap: 60px; margin: 40px 0 10px; flex-wrap: wrap; text-align: center; }
.rs-stat-row .stat-num { font-size: 34px; font-weight: 800; color: var(--rs-navy); }
.rs-stat-row .stat-label { font-size: 13px; color: var(--rs-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Knowledge centre ---- */
.rs-kc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.rs-kc-card {
    background: #fff; border: 1px solid var(--rs-border); border-radius: 6px;
    padding: 20px; text-decoration: none; display: block;
}
.rs-kc-card:hover { border-color: var(--rs-red); }
.rs-kc-card .tag { color: var(--rs-red); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.rs-kc-card h4 { color: var(--rs-navy); font-size: 15px; font-weight: 700; margin: 8px 0 0; line-height: 1.4; }

/* ---- About section ---- */
.rs-about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.rs-about-points { list-style: none; margin: 22px 0 0; padding: 0; }
.rs-about-points li {
    padding: 8px 0 8px 28px; position: relative; font-size: 14.5px; color: var(--rs-text);
}
.rs-about-points li:before { content: "\2713"; position: absolute; left: 0; color: var(--rs-red); font-weight: 700; }

/* ---- Footer ---- */
.footer { background-color: var(--rs-navy) !important; }
.footer .footer-top { background-color: var(--rs-navy) !important; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer h4.h4 { color: #fff !important; }
.footer .footerstyle1 { color: #c4cce0 !important; }
.footer .footerstyle1:hover { color: #fff !important; }
.footer-bottom.clearfix { background-color: #0e1729 !important; }
.footer a { text-decoration: none; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .rs-journeys, .rs-about { grid-template-columns: 1fr; }
    .rs-card-grid, .rs-card-grid.cols-6, .rs-course-grid, .rs-testimonial-grid { grid-template-columns: repeat(2, 1fr); }
    .rs-kc-grid { grid-template-columns: repeat(2, 1fr); }
    .rs-hero-content h1 { font-size: 30px; }
}
@media (max-width: 575px) {
    .rs-card-grid, .rs-card-grid.cols-6, .rs-course-grid, .rs-testimonial-grid, .rs-kc-grid { grid-template-columns: 1fr; }
    .rs-checker { padding: 26px; }
    .rs-stat-row { gap: 30px; }
}
