:root {
    --bs-body-font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
    --bs-body-font-size: 0.95rem;
    --bs-primary: #a5bf2a;
    --bs-primary-rgb: 165, 191, 42;
}

body {
    font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

.btn-primary {
    --bs-btn-color: #172000;
    --bs-btn-bg: #a5bf2a;
    --bs-btn-border-color: #a5bf2a;
    --bs-btn-hover-color: #172000;
    --bs-btn-hover-bg: #97af24;
    --bs-btn-hover-border-color: #97af24;
    --bs-btn-active-color: #172000;
    --bs-btn-active-bg: #8ea321;
    --bs-btn-active-border-color: #8ea321;
    --bs-btn-disabled-color: #172000;
    --bs-btn-focus-shadow-rgb: 165, 191, 42;
}

.btn-outline-primary {
    --bs-btn-color: #4e6200;
    --bs-btn-border-color: #4e6200;
    --bs-btn-hover-color: #172000;
    --bs-btn-hover-bg: #a5bf2a;
    --bs-btn-hover-border-color: #a5bf2a;
    --bs-btn-active-color: #172000;
    --bs-btn-active-bg: #8ea321;
    --bs-btn-active-border-color: #8ea321;
    --bs-btn-focus-shadow-rgb: 165, 191, 42;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    color: #172000;
    background-color: #97af24;
    border-color: #97af24;
}

.btn-primary:active,
.btn-primary.active,
.btn-check:checked + .btn-primary,
.show > .btn-primary.dropdown-toggle {
    color: #172000;
    background-color: #8ea321;
    border-color: #8ea321;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
    color: #172000;
    background-color: #a5bf2a;
    border-color: #a5bf2a;
}

.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-check:checked + .btn-outline-primary,
.show > .btn-outline-primary.dropdown-toggle {
    color: #172000;
    background-color: #8ea321;
    border-color: #8ea321;
}

.text-primary {
    color: #a5bf2a !important;
}

.bg-primary {
    background-color: #a5bf2a !important;
}

.new-ad-page {
    margin: 0 auto;
}

.new-ad-title {
    margin-bottom: 0.35rem;
}

.new-ad-intro,
.new-ad-section .section-guidance,
.new-ad-next-step {
    color: #5c6670;
}

.new-ad-intro {
    margin-bottom: 1.5rem;
}

.new-ad-form,
.ad-pending-card {
    padding: clamp(1rem, 3vw, 2rem);
    background: #fff;
    border: 1px solid #e3e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 1rem rgb(20 35 50 / 6%);
}

.new-ad-section {
    margin: 1.5rem 0 0;
    padding: 1.5rem 0 0;
    border: 0;
    border-top: 1px solid #e3e7eb;
}

.new-ad-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.new-ad-section legend {
    float: none;
    width: auto;
    margin-bottom: 1rem;
    font-family: "Gentium Book Plus", "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 600;
}

.new-ad-error-summary {
    border-left-width: 4px;
}

.new-ad-error-summary ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.new-ad-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.new-ad-preview {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 112px;
}

.new-ad-preview img {
    width: 112px;
    height: 84px;
    background: #f1f3f5;
    border-radius: 0.35rem;
    object-fit: cover;
}

.new-ad-preview.is-invalid img {
    outline: 2px solid #b02a37;
    outline-offset: 1px;
}

.new-ad-preview-name {
    overflow: hidden;
    color: #5c6670;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.new-ad-remove-all {
    align-self: flex-start;
}

.new-ad-submit {
    min-height: 2.75rem;
    margin-top: 1rem;
}

.new-ad-form .btn-primary {
    --bs-btn-color: #172000;
    --bs-btn-hover-color: #172000;
    --bs-btn-active-color: #172000;
    font-weight: 600;
}

.new-ad-tips ul {
    padding-left: 1.2rem;
}

.new-ad-tips li + li {
    margin-top: 0.75rem;
}

@media (max-width: 575.98px) {
    .new-ad-form,
    .ad-pending-card {
        border-radius: 0.5rem;
    }

    .new-ad-submit {
        width: 100%;
    }
}

.border-primary {
    border-color: #a5bf2a !important;
}

h1, h2, h3, h4, h5, h6, .ad-title {
    font-family: "Gentium Book Plus", "Times New Roman", serif;
    letter-spacing: -0.07em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.15rem);
}

h2 {
    font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem);
}

h3 {
    font-size: 1.15rem;
}

.logo-img {
    height: 45px;
    width: 70px;
    display: inline-block;
    vertical-align: middle;
    background: url(/static/resources/logo.png) no-repeat center center;
    background-size: contain;
}

.js-navbar-menu {
    display: none;
}

.js-navbar-menu.is-open {
    display: block;
}

@media (min-width: 992px) {
    .js-navbar-menu {
        display: flex !important;
    }
}

.slideshow-container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.preview-container {
    width: 100%;
    height: 480px;
    background: #f8f9fa;
    position: relative;
}

.preview-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.thumbnails-container {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 0;
}

.thumbnail {
    width: 88px;
    height: 66px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.thumbnail:hover {
    border-color: #0066cc;
}

.thumbnail.active {
    border-color: #0066cc;
}

.nav-button {
    background: rgba(0, 0, 0, 0.55);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.prev-button {
    left: 10px;
}

.next-button {
    right: 10px;
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.boosted-card {
    border: 1px solid rgba(165, 191, 42, 0.35);
    background: #f7fbe6;
}

.boosted-badge {
    background: #a5bf2a;
    color: #1b1b1b;
    font-weight: 600;
}

.boosted-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.boosted-carousel-card {
    min-width: 240px;
}

.banner-ad {
    overflow: hidden;
}

.advertise-page {
    max-width: 1120px;
    min-width: 0;
    margin: 0 auto;
}

.advertise-page h1,
.advertise-page h2,
.advertise-page h3,
.advertise-page h4,
.advertise-page h5,
.advertise-page h6:not(.banner-ad__headline),
.advertise-confirmation h1,
.advertise-confirmation h2,
.advertise-confirmation h3,
.advertise-confirmation h4,
.advertise-confirmation h5,
.advertise-confirmation h6 {
    letter-spacing: -0.02em;
}

.advertise-title {
    margin-bottom: 0.5rem;
}

.advertise-primary-cta {
    display: inline-flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.75rem 1.1rem;
    font-weight: 700;
    text-align: center;
    overflow-wrap: anywhere;
    white-space: normal;
    box-shadow: 0 0.2rem 0.5rem rgb(20 35 50 / 12%);
}

.advertise-primary-cta:hover,
.advertise-primary-cta:focus-visible {
    box-shadow: 0 0.3rem 0.75rem rgb(20 35 50 / 18%);
}

.advertise-lead {
    max-width: 60rem;
    color: #5c6670;
    font-size: 1.1rem;
}

.advertise-hero__offer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.advertise-price {
    display: flex;
    flex: 1 1 auto;
    flex-direction: row;
    min-width: 0;
    align-items: center;
    gap: 1.5rem;
    max-width: none;
    padding: 1.25rem 1.5rem;
    background: #f7fbe6;
    border: 1px solid rgba(165, 191, 42, 0.35) !important;
}

.advertise-price__duration-block {
    flex: 0 0 auto;
    min-width: 0;
}

.advertise-price__amount-block {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(165, 191, 42, 0.35);
}

.advertise-price__label,
.advertise-price__duration,
.advertise-price__amount {
    display: block;
}

.advertise-price__label {
    margin-bottom: 0.25rem;
    color: #5c6670;
    font-size: 0.9rem;
}

.advertise-price__duration,
.advertise-price__amount {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.advertise-includes {
    padding-left: 1.25rem;
}

.advertise-includes li + li {
    margin-top: 0.5rem;
}

.advertise-process-title {
    margin: 1.25rem 0 0.5rem;
}

.advertise-process {
    margin-bottom: 1rem;
    padding-left: 1.35rem;
}

.advertise-process li + li {
    margin-top: 0.4rem;
}

.advertise-offer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.advertise-offer-grid > .card {
    min-width: 0;
}

.advertise-section {
    margin: 1.5rem 0 0;
    padding: 1.5rem 0 0;
    border: 0;
    border-top: 1px solid #e3e7eb;
}

#advertise-editor,
.advertise-section input,
.advertise-section textarea {
    scroll-margin-top: 1rem;
}

.advertise-continue,
.advertise-submit {
    min-height: 2.75rem;
}

.advertise-creative-section {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.advertise-section legend {
    float: none;
    width: auto;
    margin-bottom: 1rem;
    font-family: "Gentium Book Plus", "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 600;
}

.advertise-counter {
    color: #5c6670;
    font-size: 0.8rem;
    text-align: right;
}

.advertise-inline-error {
    color: #b02a37;
    font-size: 0.875rem;
}

.advertise-summary {
    max-width: 32rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.advertise-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
    gap: 1.5rem;
    align-items: start;
}

.advertise-editor-controls,
.advertise-preview-panel {
    min-width: 0;
}

.advertise-editor-controls {
    grid-column: 1;
    grid-row: 1;
}

.advertise-preview-panel {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 1rem;
}

.advertise-preview-panel > h3 {
    margin-bottom: 0.35rem;
}

.advertise-preview-panel > p {
    margin-bottom: 1rem;
}

.advertise-error-summary {
    border-left-width: 4px;
}

.advertise-error-summary ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.advertise-error-summary a {
    color: inherit;
    font-weight: 600;
}

/* Benefits beside the offer details. */
.advertise-benefits-card {
    height: 100%;
}

.advertise-benefits {
    display: grid;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.advertise-benefits li {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.875rem;
    align-items: start;
}

.advertise-benefit-mark {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    color: #4e6200;
    background: #f7fbe6;
    border-radius: 50%;
    font-weight: 700;
}

.advertise-confirmation {
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.banner-ad__preview-label {
    display: block;
    padding: 0.5rem 0.75rem 0;
    color: #5c6670;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.banner-ad__inner {
    display: flex;
    min-width: 0;
    gap: 12px;
    align-items: center;
    padding: 12px;
}

.banner-ad__inner > a {
    flex-shrink: 0;
    max-width: 100%;
}

.banner-ad__image {
    width: 180px;
    max-width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.banner-ad__content {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.banner-ad__headline,
.banner-ad__body {
    overflow-wrap: anywhere;
}

.banner-ad__cta {
    --bs-btn-color: #172000;
    --bs-btn-hover-color: #172000;
    --bs-btn-active-color: #172000;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* --- banner :target persistent highlight --- */
/* Active banner cards: pulse animation + persistent outline/background */
[id^="banner-"]:target {
    animation: target-highlight 1.5s ease-out;
    outline: 2px solid rgba(165, 191, 42, 0.6);
    outline-offset: 2px;
    background-color: rgba(165, 191, 42, 0.08);
}

/* Pending banner table rows: highlight cells persistently */
tr[id^="banner-"]:target td {
    animation: target-highlight 1.5s ease-out;
    background-color: rgba(165, 191, 42, 0.08);
}

@keyframes target-highlight {
    0%   { background-color: rgba(165, 191, 42, 0.25); }
    100% { background-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
    [id^="banner-"]:target {
        animation: none;
        outline: 2px solid rgba(165, 191, 42, 0.6);
        outline-offset: 2px;
        background-color: rgba(165, 191, 42, 0.12);
    }

    tr[id^="banner-"]:target td {
        animation: none;
        background-color: rgba(165, 191, 42, 0.12);
    }
}

@media (max-width: 991.98px) {
    .advertise-offer-grid {
        grid-template-columns: 1fr;
    }

    .advertise-editor-layout {
        grid-template-columns: 1fr;
    }

    .advertise-editor-controls,
    .advertise-preview-panel {
        grid-column: 1;
        grid-row: auto;
    }

    .advertise-preview-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .advertise-hero__offer {
        flex-direction: column;
        align-items: stretch;
    }

    .advertise-price {
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        align-items: end;
        gap: 1.25rem 1rem;
        padding: 1.25rem;
    }

    .advertise-price__amount-block {
        padding-left: 1rem;
    }

    .advertise-primary-cta {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }

    .advertise-continue,
    .advertise-submit {
        width: 100%;
        text-align: center;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .banner-ad__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .banner-ad__content {
        width: 100%;
    }

    .banner-ad__image {
        width: 100%;
        height: auto;
        max-height: 220px;
    }
}
