/* ==========================================================================
   Global Font — DM Sans (modern, clean)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800;900&display=swap');

body,
.space-page-content,
.space-page-content p,
.space-widget,
.space-header-menu ul li a {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
.space-page-content h1,
.space-page-content h2,
.space-page-content h3,
.space-title-box-h1 h1,
.space-archive-title-box-h1 h1 {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* ==========================================================================
   LegalBY Content Elements — Light Theme with Red Palette
   Shared styles for TOC, FAQ, info-boxes, CTA, pros/cons
   ========================================================================== */

/* --- Table of Contents (TOC) --- */
.legalit-toc {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px 30px;
    margin: 25px 0 35px;
}

.legalit-toc-title {
    color: #2c3e50 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.legalit-toc ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    columns: 2;
    column-gap: 30px;
}

.legalit-toc ul li {
    padding: 5px 0 5px 0 !important;
    margin: 0 !important;
    break-inside: avoid;
}

.legalit-toc ul li::before {
    display: none !important;
}

.legalit-toc ul li a {
    color: #c0392b !important;
    text-decoration: none !important;
    font-size: 14px !important;
    line-height: 1.5;
    border-bottom: none !important;
    transition: color 0.2s;
}

.legalit-toc ul li a:hover {
    color: #e74c3c !important;
    text-decoration: underline !important;
}

@media (max-width: 600px) {
    .legalit-toc ul { columns: 1; }
}

/* --- FAQ Accordion --- */
.legalit-faq-section {
    margin: 35px 0;
}

.legalit-faq-item {
    background: #ffffff !important;
    border: 1px solid #e8ecf0 !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
    overflow: hidden !important;
    transition: border-color 0.3s, box-shadow 0.3s !important;
    padding: 0 !important;
}

.legalit-faq-item:hover {
    border-color: #d0d5da;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.legalit-faq-item.active {
    border-color: #c0392b;
    box-shadow: 0 2px 12px rgba(192,57,43,0.08);
}

.legalit-faq-question {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 24px !important;
    cursor: pointer !important;
    color: #2c3e50 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    transition: color 0.2s !important;
    user-select: none !important;
    margin: 0 !important;
}

.legalit-faq-question:hover {
    color: #c0392b !important;
}

.legalit-faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-left: 15px;
    position: relative;
}

.legalit-faq-icon::before,
.legalit-faq-icon::after {
    content: '';
    position: absolute;
    background: #c0392b;
    border-radius: 2px;
    transition: transform 0.3s;
}

.legalit-faq-icon::before {
    width: 16px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.legalit-faq-icon::after {
    width: 2px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.legalit-faq-item.active .legalit-faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.legalit-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.legalit-faq-item.active .legalit-faq-answer {
    max-height: 800px;
}

.legalit-faq-answer-inner {
    padding: 4px 24px 20px !important;
    color: #555 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

.legalit-faq-answer-inner p:last-child {
    margin-bottom: 0 !important;
}

.legalit-faq-answer-inner p {
    margin-bottom: 10px !important;
    font-size: 15px !important;
    color: #555 !important;
}

/* --- Info Box --- */
.info-box {
    background: #eef5fd;
    border-left: 4px solid #3498db;
    border-radius: 0 8px 8px 0;
    padding: 20px 25px;
    margin: 25px 0;
}

.info-box p {
    margin-bottom: 8px !important;
    color: #444 !important;
}

.info-box p:last-child {
    margin-bottom: 0 !important;
}

.info-box strong {
    color: #2c3e50 !important;
}

/* --- Warning Box --- */
.warning-box {
    background: #fef5f0;
    border-left: 4px solid #e74c3c;
    border-radius: 0 8px 8px 0;
    padding: 20px 25px;
    margin: 25px 0;
}

.warning-box p {
    color: #7f4f3a !important;
    margin-bottom: 8px !important;
}

.warning-box p:last-child {
    margin-bottom: 0 !important;
}

.warning-box strong {
    color: #c0392b !important;
}

/* --- CTA Box --- */
.cta-box {
    background: linear-gradient(135deg, #fef5f5 0%, #fff5f5 100%);
    border: 1px solid #e74c3c;
    border-radius: 12px;
    padding: 30px 35px;
    margin: 35px 0;
    text-align: center;
}

.cta-box h3,
.cta-box h4 {
    color: #2c3e50 !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.cta-box p {
    color: #555 !important;
    margin-bottom: 20px !important;
}

.cta-button,
a.cta-button {
    display: inline-block !important;
    background: #c0392b !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 14px 40px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    border: none !important;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cta-button:hover,
a.cta-button:hover {
    background: #e74c3c !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.3);
    color: #ffffff !important;
}

/* --- Pros/Cons Grid --- */
.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

.pros-box,
.cons-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px 25px;
    border-top: 3px solid;
}

.pros-box { border-top-color: #27ae60; }
.cons-box { border-top-color: #e74c3c; }

.pros-box h4 {
    color: #27ae60 !important;
    margin-top: 0 !important;
    font-size: 16px !important;
}

.cons-box h4 {
    color: #e74c3c !important;
    margin-top: 0 !important;
    font-size: 16px !important;
}

.pros-box ul li { color: #333 !important; }
.cons-box ul li { color: #333 !important; }
.pros-box ul li::before { background: #27ae60 !important; }
.cons-box ul li::before { background: #e74c3c !important; }

/* --- User Review Block --- */
.user-review {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 25px;
    margin: 15px 0;
}

.user-review .review-rating { color: #f39c12; }
.user-review .review-user strong { color: #2c3e50; }
.user-review .review-date { color: #999; font-size: 13px; }
.user-review .review-title strong { color: #2c3e50; }
.user-review .review-text { color: #555; }

/* --- Updated Badge --- */
.legalit-updated-badge {
    background: #f0f4f8 !important;
    border: 1px solid #dce3ea !important;
    border-radius: 6px !important;
    padding: 8px 14px !important;
    margin-bottom: 15px !important;
    font-size: 12px !important;
    color: #666 !important;
}

/* --- Reduce excessive spacing on bonus/page content --- */
.space-page-content-box-wrap {
    padding-top: 15px !important;
}

.space-page-content .wp-block-spacer,
.space-page-content-wrap .wp-block-spacer {
    display: none !important;
}

/* Compact title box */
.space-title-box {
    padding: 20px 0 10px !important;
    margin-bottom: 0 !important;
}

.space-title-box-h1 h1 {
    margin-bottom: 5px !important;
}

/* Remove the red separator line after title area */
.space-title-box + .space-page-content-wrap::before,
.space-archive-title-box::after {
    display: none !important;
}

/* Tighten gap between badge and hero */
.space-page-content > div[style*="background:#f0f4f8"] {
    margin-bottom: 8px !important;
}

/* Tighten gap between hero and shortcode */
.space-page-content > div[style*="linear-gradient"] {
    margin-bottom: 15px !important;
}

/* --- Light theme overrides for content area --- */
.space-page-content h2 {
    color: #2c3e50;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 12px;
    margin: 40px 0 20px;
}

/* Allow inline color override on hero blocks */
.space-page-content h2[style*="color:#fff"],
.space-page-content h2[style*="color: #fff"],
.space-page-content p[style*="rgba(255,255,255"] {
    color: inherit !important;
}

/* Hide title box on bonus taxonomy pages — hero replaces it */
.tax-bonus-category .space-title-box,
.page-template-page-without-title .space-title-box {
    display: none !important;
}

/* Remove empty space between title box and content */
.space-page-content-box-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.space-page-content h3 {
    color: #2c3e50;
}

.space-page-content h4 {
    color: #c0392b;
}

.space-page-content p {
    color: #333333;
    line-height: 1.8;
}

.space-page-content a {
    color: #c0392b;
}

.space-page-content a:hover {
    color: #e74c3c;
}

.space-page-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    overflow: hidden;
    margin: 20px 0 !important;
    border: 1px solid #e0e0e0 !important;
}

.space-page-content table thead {
    background: #c0392b !important;
}

.space-page-content table thead th {
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 16px !important;
    background: #c0392b !important;
    border: none !important;
}

.space-page-content table tbody tr {
    border-bottom: 1px solid #eee !important;
    background: #ffffff !important;
}

.space-page-content table tbody td {
    padding: 12px 16px !important;
    color: #444 !important;
    border: none !important;
    border-bottom: 1px solid #eee !important;
}

.space-page-content table tbody td strong {
    color: #2c3e50 !important;
}

.space-page-content table tbody tr:hover {
    background: #f8f9fa !important;
}

.space-page-content ul li {
    color: #333 !important;
}

.space-page-content ol li {
    color: #333 !important;
}

.space-page-content li strong {
    color: #2c3e50 !important;
}

.space-page-content blockquote {
    border-left: 4px solid #c0392b !important;
    background: #f8f9fa !important;
    padding: 15px 25px !important;
    margin: 20px 0 !important;
    color: #555 !important;
}

/* ==========================================================================
   Task 1: Breadcrumbs
   ========================================================================== */

.space-single-aces-breadcrumbs {
    margin-bottom: 15px;
}

.space-single-aces-breadcrumbs .space-breadcrumbs {
    background: #f4f6f8 !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #888 !important;
    margin-top: 8px !important;
}

.space-single-aces-breadcrumbs .space-breadcrumbs a {
    color: #c0392b !important;
    text-decoration: none !important;
    padding: 0 6px !important;
    transition: color 0.2s;
}

.space-single-aces-breadcrumbs .space-breadcrumbs > span > span > a {
    padding-left: 0 !important;
}

.space-single-aces-breadcrumbs .space-breadcrumbs a:hover {
    color: #e74c3c !important;
    text-decoration: underline !important;
}

.space-single-aces-breadcrumbs .space-breadcrumbs span.breadcrumb_last {
    color: #999 !important;
    padding-left: 6px !important;
}

/* Yoast separator arrows */
.space-single-aces-breadcrumbs .space-breadcrumbs span > span > span.breadcrumb_separator {
    color: #ccc !important;
    font-size: 11px !important;
}

/* ==========================================================================
   Task 2: Related Posts ("Последние публикации")
   ========================================================================== */

.space-news-3.read-more-block {
    margin-top: 40px !important;
    padding-top: 0 !important;
}

.space-news-3 .space-block-title {
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid #c0392b !important;
}

.space-news-3 .space-block-title span {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
}

.space-news-3-item-ins {
    background: #ffffff !important;
    border: 1px solid #e8ecf0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    transition: box-shadow 0.25s, transform 0.25s;
}

.space-news-3-item-ins:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08) !important;
    transform: translateY(-2px);
}

/* Hide the image container when there is no featured image */
.space-news-3-item-img:empty {
    display: none !important;
}

/* Image area */
.space-news-3-item-img-ins {
    border-radius: 10px 10px 0 0 !important;
    overflow: hidden !important;
}

.space-news-3-item-img-ins img {
    width: 100% !important;
    height: 180px !important;
    object-fit: cover !important;
    display: block !important;
}

/* Hide black placeholder area when no image — the img container gets no <a> child */
.space-news-3-item-img .space-news-3-item-img-ins:not(:has(a)) {
    display: none !important;
}

/* Category label */
.space-news-3-item-img-category {
    padding: 6px 12px !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em;
}

.space-news-3-item-img-category a {
    color: #c0392b !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 11px !important;
}

/* Title area */
.space-news-3-item-title-box {
    padding: 16px 18px !important;
}

.space-news-3-item-title a {
    color: #2c3e50 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.space-news-3-item-title a:hover {
    color: #c0392b !important;
}

/* Meta info */
.space-news-3-item-meta {
    font-size: 12px !important;
    color: #999 !important;
    margin-top: 10px !important;
}

.space-news-3-item-meta span {
    color: #999 !important;
    font-size: 12px !important;
}

.space-news-3-item-meta i {
    color: #bbb !important;
}

/* "Read" link — injected via CSS pseudo-element on the title link area */
.space-news-3-item-title-box::after {
    content: "Читать \2192";
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #c0392b;
    transition: color 0.2s;
}

.space-news-3-item-ins:hover .space-news-3-item-title-box::after {
    color: #e74c3c;
}

/* ==========================================================================
   Task 4: Blog Archive / Post Listing
   ========================================================================== */

.space-archive-loop-item {
    background: #ffffff !important;
    border: 1px solid #e8ecf0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    margin-bottom: 20px !important;
    transition: box-shadow 0.25s;
}

.space-archive-loop-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07) !important;
}

/* Image column */
.space-archive-loop-item-img {
    overflow: hidden;
}

.space-archive-loop-item-img-ins {
    height: 100%;
}

.space-archive-loop-item-img-link {
    height: 100%;
}

.space-archive-loop-item-img-link img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    min-height: 180px;
}

.space-archive-loop-item-img .space-overlay {
    display: none !important;
}

/* Category label on image */
.space-archive-loop-item-img-category {
    padding: 4px 10px !important;
    font-size: 11px !important;
    z-index: 2;
}

.space-archive-loop-item-img-category a {
    color: #c0392b !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
}

/* Title / content area */
.space-archive-loop-item-title-box-ins {
    padding: 18px 22px !important;
}

.space-archive-loop-item-meta {
    font-size: 12px !important;
    color: #999 !important;
    margin-bottom: 6px !important;
}

.space-archive-loop-item-meta span {
    color: #999 !important;
    font-size: 12px !important;
    margin-right: 12px;
}

.space-archive-loop-item-meta span i {
    color: #bbb !important;
    margin-right: 3px;
}

.space-archive-loop-item-title {
    margin-bottom: 8px !important;
}

.space-archive-loop-item-title a {
    color: #2c3e50 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.space-archive-loop-item-title a:hover {
    color: #c0392b !important;
}

/* Inline category when no image */
.space-archive-loop-item-title .space-archive-loop-item-img-category {
    display: inline-block !important;
    margin-bottom: 6px !important;
}

.space-archive-loop-item-excerpt {
    color: #666 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin-bottom: 12px !important;
}

/* "Read more" link */
.space-archive-loop-item-meta span.read-more a {
    display: inline-block !important;
    color: #c0392b !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.space-archive-loop-item-meta span.read-more a:hover {
    color: #e74c3c !important;
}

/* Archive page title */
.space-archive-title-box {
    padding: 20px 0 10px !important;
}

.space-archive-title-box h1 {
    color: #2c3e50 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
}

/* Pagination */
.space-archive-navigation .nav-links {
    display: flex !important;
    gap: 6px !important;
    justify-content: center !important;
    padding: 20px 0 !important;
}

.space-archive-navigation .nav-links a,
.space-archive-navigation .nav-links span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 10px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s;
}

.space-archive-navigation .nav-links a {
    background: #f4f6f8 !important;
    color: #555 !important;
    border: 1px solid #e0e0e0 !important;
}

.space-archive-navigation .nav-links a:hover {
    background: #c0392b !important;
    color: #fff !important;
    border-color: #c0392b !important;
}

.space-archive-navigation .nav-links span.current {
    background: #c0392b !important;
    color: #fff !important;
    border: 1px solid #c0392b !important;
}

/* ==========================================================================
   Task 1: Homepage Hero Section
   ========================================================================== */

/* Hero area gradient background */
.page-template-page-without-title .space-page-content,
.home .space-page-content {
    position: relative;
}

.page-template-page-without-title .space-page-content::before,
.home .space-page-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30px;
    right: -30px;
    height: 320px;
    background: linear-gradient(135deg, #fef5f5 0%, #f5f6fa 50%, #eef0f7 100%);
    border-radius: 0 0 24px 24px;
    z-index: 0;
    pointer-events: none;
}

.page-template-page-without-title .space-page-content > *,
.home .space-page-content > * {
    position: relative;
    z-index: 1;
}

/* Hero H1 */
.page-template-page-without-title .space-page-content > h1:first-of-type,
.home .space-page-content > h1:first-of-type {
    font-size: 36px !important;
    font-weight: 800 !important;
    color: #2c3e50 !important;
    text-align: center !important;
    line-height: 1.25 !important;
    margin: 30px 0 12px !important;
    padding: 0 10px !important;
    border-bottom: none !important;
    letter-spacing: -0.02em;
}

/* Subtitle (first <p> after H1) */
.page-template-page-without-title .space-page-content > h1:first-of-type + p,
.home .space-page-content > h1:first-of-type + p {
    text-align: center !important;
    font-size: 17px !important;
    color: #555 !important;
    max-width: 640px;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 8px !important;
    line-height: 1.7 !important;
}

/* Author line (second <p> after H1, or <p> with em/italic) */
.page-template-page-without-title .space-page-content > h1:first-of-type + p + p,
.home .space-page-content > h1:first-of-type + p + p {
    text-align: center !important;
    font-size: 13px !important;
    color: #999 !important;
    margin-bottom: 30px !important;
}

/* ==========================================================================
   Task 2: Homepage Methodology 3-Column Cards
   ========================================================================== */

.home .space-page-content .wp-block-columns,
.page-template-page-without-title .space-page-content .wp-block-columns {
    gap: 24px !important;
    margin: 35px 0 !important;
}

.home .space-page-content .wp-block-columns > .wp-block-column,
.page-template-page-without-title .space-page-content .wp-block-columns > .wp-block-column {
    background: #ffffff !important;
    border: 1px solid #e8ecf0 !important;
    border-top: 3px solid #c0392b !important;
    border-radius: 12px !important;
    padding: 28px 24px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home .space-page-content .wp-block-columns > .wp-block-column:hover,
.page-template-page-without-title .space-page-content .wp-block-columns > .wp-block-column:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

/* Large emoji icon in columns */
.home .space-page-content .wp-block-column > p:first-child,
.page-template-page-without-title .space-page-content .wp-block-column > p:first-child {
    font-size: 40px !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
    text-align: center !important;
}

/* Column headings */
.home .space-page-content .wp-block-column h3,
.page-template-page-without-title .space-page-content .wp-block-column h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    text-align: center !important;
    margin-bottom: 10px !important;
}

/* Column body text */
.home .space-page-content .wp-block-column > p:not(:first-child),
.page-template-page-without-title .space-page-content .wp-block-column > p:not(:first-child) {
    font-size: 14px !important;
    color: #555 !important;
    line-height: 1.7 !important;
    text-align: center !important;
}

/* ==========================================================================
   Task 3: Sidebar "Новые Казино" Block Modernization
   ========================================================================== */

/* Widget container */
.space-widget {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    border: 1px solid #e8ecf0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Widget title with red accent */
.space-widget .space-widget-title,
.space-widget .widget-title,
.space-widget h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
    border-bottom: 2px solid #c0392b !important;
    position: relative;
}

/* Casino sidebar items — clean card with hover */
body .space-widget .space-companies-sidebar-item {
    background: #f8f9fa !important;
    border: 1px solid #e8ecf0 !important;
    border-radius: 10px !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

body .space-widget .space-companies-sidebar-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    background: #ffffff !important;
}

body .space-widget .space-companies-sidebar-item:last-child {
    margin-bottom: 0 !important;
}

/* Casino name — bigger, bolder */
body .space-widget .space-companies-sidebar-item-title,
body .space-widget .space-companies-sidebar-item-title a {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
    display: block !important;
    margin-bottom: 4px !important;
    transition: color 0.2s !important;
}

body .space-widget .space-companies-sidebar-item-title a:hover {
    color: #c0392b !important;
}

/* Rating stars — smaller, more subtle */
body .space-widget .space-companies-sidebar-item-rating {
    font-size: 12px !important;
    color: #f39c12 !important;
    opacity: 0.85 !important;
    margin-bottom: 6px !important;
    letter-spacing: 1px !important;
}

/* Description text */
body .space-widget .space-companies-sidebar-item-short-desc {
    font-size: 13px !important;
    color: #666 !important;
    line-height: 1.6 !important;
    margin-bottom: 6px !important;
}

/* "Играть →" link after description */
body .space-widget .space-companies-sidebar-item-short-desc::after {
    content: "Играть \2192" !important;
    display: block !important;
    margin-top: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #c0392b !important;
    transition: color 0.2s !important;
    cursor: pointer !important;
}

body .space-widget .space-companies-sidebar-item:hover .space-companies-sidebar-item-short-desc::after {
    color: #e74c3c !important;
}

/* Bonus text — slightly larger, highlighted */
body .space-widget .space-companies-sidebar-item .space-companies-sidebar-item-bonus,
body .space-widget .space-companies-sidebar-item .bonus-text {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #c0392b !important;
    background: rgba(192, 57, 43, 0.06) !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    margin-top: 6px !important;
    display: inline-block !important;
}

/* Casino logo in sidebar */
body .space-widget .space-companies-sidebar-item img {
    border-radius: 8px !important;
}

/* ==========================================================================
   Task 4: CTA Boxes (class-based)
   ========================================================================== */

.legalby-cta-box {
    background: linear-gradient(135deg, #fef5f5 0%, #fff0f0 40%, #f5f6fa 100%) !important;
    border: 1px solid #e8d5d5 !important;
    border-radius: 16px !important;
    padding: 35px 40px !important;
    margin: 35px 0 !important;
    text-align: center !important;
    box-shadow: 0 4px 16px rgba(192, 57, 43, 0.08);
    position: relative;
    overflow: hidden;
}

.legalby-cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c0392b, #e74c3c, #c0392b);
}

.legalby-cta-box h3,
.legalby-cta-box h4 {
    color: #2c3e50 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.legalby-cta-box p {
    color: #555 !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    margin-bottom: 22px !important;
    max-width: 520px;
    margin-left: auto !important;
    margin-right: auto !important;
}

.legalby-cta-box .cta-button,
.legalby-cta-box a.cta-button {
    display: inline-block !important;
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 15px 44px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    border: none !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(192, 57, 43, 0.25);
}

.legalby-cta-box .cta-button:hover,
.legalby-cta-box a.cta-button:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(192, 57, 43, 0.35);
    color: #ffffff !important;
}

/* ==========================================================================
   Task 5: Page Title Boxes (Inner Pages)
   ========================================================================== */

.space-title-box {
    background: linear-gradient(135deg, #f5f6fa 0%, #eef0f7 50%, #fef5f5 100%) !important;
    padding: 30px 0 24px !important;
    border-bottom: 3px solid #c0392b !important;
    margin-bottom: 25px !important;
    position: relative;
}

.space-title-box::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: #e74c3c;
}

.space-title-box h1 {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #2c3e50 !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
    letter-spacing: -0.01em;
}

.space-title-box .space-breadcrumbs {
    margin-top: 12px !important;
    font-size: 13px !important;
    color: #888 !important;
}

.space-title-box .space-breadcrumbs a {
    color: #c0392b !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.space-title-box .space-breadcrumbs a:hover {
    color: #e74c3c !important;
}

/* Archive title box */
.space-archive-title-box {
    background: linear-gradient(135deg, #f5f6fa 0%, #eef0f7 50%, #fef5f5 100%) !important;
    padding: 28px 0 20px !important;
    border-bottom: 3px solid #c0392b !important;
    margin-bottom: 25px !important;
}

.space-archive-title-box h1 {
    font-size: 30px !important;
    font-weight: 800 !important;
    color: #2c3e50 !important;
    letter-spacing: -0.01em;
}

/* ==========================================================================
   Task 6: Global Modern Touches
   ========================================================================== */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Better link transitions globally */
a {
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Card hover for casino/bonus items */
.space-companies-item,
.space-bonuses-item {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 10px !important;
}

.space-companies-item:hover,
.space-bonuses-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Table styling: zebra striping */
.space-page-content table tbody tr:nth-child(even) {
    background: #f8f9fa !important;
}

.space-page-content table tbody tr:nth-child(odd) {
    background: #ffffff !important;
}

.space-page-content table tbody tr:hover {
    background: #fef5f5 !important;
}

/* .space-box containers: rounded corners and subtle shadow */
.space-box {
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Selection color */
::selection {
    background: rgba(192, 57, 43, 0.15);
    color: #2c3e50;
}

/* Focus outline for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c0392b;
    outline-offset: 2px;
}

/* Force light theme on taxonomy/archive pages */
.space-archive-section,
.tax-casino-category .space-box,
.tax-bonus-category .space-box,
.post-type-archive .space-box {
    background: #f5f6fa !important;
}

/* ==========================================================================
   Sidebar casino widget modernization
   ========================================================================== */

.space-widget.widget_mercury_casino_widget {
    background: #fff !important;
    border-radius: 12px !important;
    border: 1px solid #e8ecf0 !important;
    padding: 20px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

.space-widget.widget_mercury_casino_widget .space-widget-title span {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
}

/* Each casino item in sidebar */
body .space-widget .space-companies-sidebar-item {
    padding: 12px 0 !important;
    border-bottom: 1px solid #f0f2f5 !important;
}

body .space-widget .space-companies-sidebar-item:last-child {
    border-bottom: none !important;
}

/* Casino logo in sidebar */
body .space-widget .space-companies-sidebar-item-img {
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* Casino name - bigger, bolder */
body .space-widget .space-companies-sidebar-item-title a {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    text-decoration: none !important;
    display: block !important;
    margin-bottom: 2px !important;
}

body .space-widget .space-companies-sidebar-item-title a:hover {
    color: #c0392b !important;
}

/* Stars rating - smaller */
body .space-widget .space-companies-sidebar-item-rating .aces-rating-stars {
    font-size: 10px !important;
}

body .space-widget .space-companies-sidebar-item-rating .aces-rating-stars span {
    font-size: 10px !important;
}

/* Short description / bonus text - highlighted */
body .space-widget .space-companies-sidebar-item-short-desc {
    font-size: 13px !important;
    color: #555 !important;
    line-height: 1.4 !important;
    margin-top: 4px !important;
}

body .space-widget .space-companies-sidebar-item-short-desc strong {
    color: #c0392b !important;
    font-weight: 600 !important;
}

/* Sidebar casino button — "Играть" */
body .space-widget .space-companies-sidebar-item-button {
    display: block !important;
    margin-top: 8px !important;
    margin-left: 65px !important;
}

body .space-widget .space-companies-sidebar-item-button a {
    display: inline-block !important;
    background: #c0392b !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 5px 14px !important;
    border-radius: 5px !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    transition: all 0.2s !important;
    margin-right: 6px !important;
}

body .space-widget .space-companies-sidebar-item-button a:hover {
    background: #e74c3c !important;
    color: #ffffff !important;
}

/* ==========================================================================
   Bonus cards — equal height with buttons aligned at bottom
   ========================================================================== */

body .space-offers-archive-item-ins {
    flex-direction: column !important;
    align-items: stretch !important;
    height: 100% !important;
}

body .space-offers-archive-item {
    display: flex !important;
}

body .space-offers-archive-item-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    justify-content: space-between !important;
}

body .space-offers-archive-item-button {
    margin-top: auto !important;
    padding-top: 10px !important;
}

/* Bonus card category labels — hidden */
body .space-offers-archive-item-cat {
    display: none !important;
}

/* Bonus cards — always 3 per row when few items */
body .space-shortcode-wrap .space-offers-archive-item {
    width: 33.333% !important;
}

/* If only 2 items, make them 50% */
body .space-shortcode-wrap .space-offers-archive-item:first-child:nth-last-child(2),
body .space-shortcode-wrap .space-offers-archive-item:first-child:nth-last-child(2) ~ .space-offers-archive-item {
    width: 50% !important;
}

/* If only 1 item, full width */
body .space-shortcode-wrap .space-offers-archive-item:only-child {
    width: 100% !important;
}

/* No links inside FAQ questions */
.legalit-faq-question a,
.legalit-faq-question a:hover {
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: none !important;
    border: none !important;
}

/* Also fix the grid row to stretch items */
body .space-shortcode-wrap .space-offers-archive-item,
.space-offers-archive-items .space-offers-archive-item {
    display: flex !important;
}

/* "Обзор" link via CSS on the casino title permalink */
body .space-widget .space-companies-sidebar-item-title::after {
    content: "Читать обзор \2192" !important;
    display: block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #c0392b !important;
    margin-top: 4px !important;
    cursor: pointer !important;
}

body .space-widget .space-companies-sidebar-item:hover .space-companies-sidebar-item-title::after {
    color: #e74c3c !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   Force white text on all red background buttons
   ========================================================================== */

a[style*="background:#c0392b"],
a[style*="background: #c0392b"],
.wp-block-button__link.has-mercury-second-background-color,
.space-unit-content-button a,
.space-offers-archive-item-button a {
    color: #ffffff !important;
}

/* ==========================================================================
   Hide default title box on pages with hero content blocks
   ========================================================================== */

.page .space-title-box,
.page .space-single-aces-breadcrumbs {
    display: none !important;
}

/* But keep it on home page */
.home .space-title-box {
    display: block !important;
}

/* ==========================================================================
   Hide duplicate headings on pages with hero blocks
   ========================================================================== */

/* Hide duplicate page title when hero block is first element in content */
.page-template-page-without-title .space-page-content-box > .space-page-content > div[style*="linear-gradient"]:first-child ~ h1,
.page-template-page-without-title .space-page-content-box > .space-page-content > div[style*="linear-gradient"]:first-child ~ h2:first-of-type {
    /* Don't hide — hero IS the title */
}

/* On archive-style pages, hide the theme's title box since hero replaces it */
.page-template-page-casino-archive-style-1 .space-archive-title-box,
.page-template-page-casino-archive-style-9 .space-archive-title-box,
.page-template-page-bonus-archive-style-1 .space-archive-title-box,
.page-template-page-game-archive-style-1 .space-archive-title-box {
    display: none !important;
}

/* On taxonomy pages, hide the theme's archive title box since hero replaces it */
.tax-casino-category .space-archive-title-box,
.tax-bonus-category .space-archive-title-box {
    display: none !important;
}

/* ==========================================================================
   Footer Styling — Modern Multi-Column
   ========================================================================== */

.space-footer-top {
    background: #1a252f !important;
    padding: 40px 0 20px !important;
}

.space-footer-copy {
    background: #141c24 !important;
    padding: 15px 0 !important;
}

.space-footer-copy-left {
    color: rgba(255,255,255,0.5) !important;
    font-size: 12px !important;
}

/* Footer — full-width centered 3-row layout */
.space-footer-copy .space-footer-ins {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 25px 20px 15px !important;
}

.space-footer-copy-left {
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.space-footer-copy-menu {
    width: 100% !important;
    text-align: center !important;
}

.space-footer-copy-menu ul {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px 4px !important;
    justify-content: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.space-footer-copy-menu ul li {
    margin: 0 !important;
    padding: 0 !important;
}

.space-footer-copy-menu ul li a {
    color: rgba(255,255,255,0.55) !important;
    font-size: 12px !important;
    text-decoration: none !important;
    padding: 4px 10px !important;
    transition: all 0.2s !important;
    display: inline-block !important;
    border-radius: 4px !important;
}

.space-footer-copy-menu ul li a:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.08) !important;
}

/* Dividers between footer link groups — every 6th item */
.space-footer-copy-menu ul li:nth-child(6)::after,
.space-footer-copy-menu ul li:nth-child(12)::after {
    content: "" !important;
    display: block !important;
    width: 100% !important;
    height: 0 !important;
}

/* Main Menu dropdown styling */
.space-header-menu ul.sub-menu {
    background: #ffffff !important;
    border: 1px solid #e8ecf0 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
    padding: 8px 0 !important;
    min-width: 200px !important;
}

.space-header-menu ul.sub-menu li a {
    padding: 8px 20px !important;
    font-size: 14px !important;
    color: #2c3e50 !important;
    transition: all 0.15s !important;
}

.space-header-menu ul.sub-menu li a:hover {
    background: #fef5f5 !important;
    color: #c0392b !important;
}

/* Top level menu items */
.space-header-menu > ul > li > a {
    font-weight: 600 !important;
    font-size: 14px !important;
    letter-spacing: 0.01em !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .pros-cons-grid { grid-template-columns: 1fr; }
    .cta-box { padding: 25px 20px; }
    .legalit-faq-question { font-size: 15px; padding: 15px 18px; }

    /* Related posts: stack cards */
    .space-news-3-item {
        width: 100% !important;
        float: none !important;
        margin-bottom: 15px !important;
    }

    /* Archive: stack image and text */
    .space-archive-loop-item-img {
        width: 100% !important;
        float: none !important;
    }
    .space-archive-loop-item-title-box {
        width: 100% !important;
        float: none !important;
    }

    /* Hero section responsive */
    .page-template-page-without-title .space-page-content > h1:first-of-type,
    .home .space-page-content > h1:first-of-type {
        font-size: 26px !important;
    }

    .page-template-page-without-title .space-page-content::before,
    .home .space-page-content::before {
        left: -15px;
        right: -15px;
        height: 260px;
    }

    /* 3-column cards stack on mobile */
    .home .space-page-content .wp-block-columns,
    .page-template-page-without-title .space-page-content .wp-block-columns {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .home .space-page-content .wp-block-columns > .wp-block-column,
    .page-template-page-without-title .space-page-content .wp-block-columns > .wp-block-column {
        padding: 22px 18px !important;
    }

    /* CTA box responsive */
    .legalby-cta-box {
        padding: 25px 20px !important;
    }

    .legalby-cta-box h3,
    .legalby-cta-box h4 {
        font-size: 19px !important;
    }

    /* Title box responsive */
    .space-title-box h1 {
        font-size: 24px !important;
    }

    .space-archive-title-box h1 {
        font-size: 22px !important;
    }
}

/* ==========================================================================
   Header & Navigation — Clean Modern Style
   ========================================================================== */

.space-header {
    border-bottom: 1px solid #eee !important;
    box-shadow: none !important;
}

.space-header-ins {
    max-width: 1170px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: flex !important;
    align-items: center !important;
}

/* Logo — vertically centered */
.space-header-logo {
    display: flex !important;
    align-items: center !important;
}

/* Menu container — aligned with logo center */
.space-header-menu {
    display: flex !important;
    align-items: center !important;
}

.space-header-menu > ul {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Menu items */
.space-header-menu > ul > li > a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 10px 13px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
    white-space: nowrap !important;
    border-bottom: 2px solid transparent !important;
}

.space-header-menu > ul > li > a:hover,
.space-header-menu > ul > li.current-menu-item > a {
    color: #c0392b !important;
    border-bottom-color: #c0392b !important;
}

/* Remove ALL pseudo-elements from menu links */
.space-header-menu > ul > li > a::after,
.space-header-menu > ul > li > a::before {
    display: none !important;
    content: none !important;
}

/* Hide Mercury labels, arrows, carets */
.space-header-menu .mercury-menu-label,
.space-header-menu .space-menu-arrow,
.space-header-menu > ul > li > a > .caret {
    display: none !important;
}

/* Dropdown indicator — via border-bottom on parent items */
.space-header-menu > ul > li.menu-item-has-children > a {
    padding-right: 10px !important;
}

/* ==========================================================================
   Issue 5: Smaller casino cards on archive grids
   ========================================================================== */
body .space-companies-archive-item-ins {
    padding: 15px !important;
}

body .space-companies-archive-item-img img {
    max-width: 60px !important;
    max-height: 60px !important;
}

body .space-companies-archive-item-title a {
    font-size: 14px !important;
}

body .space-companies-archive-item-short-desc {
    font-size: 12px !important;
    line-height: 1.4 !important;
}
