/* ========================================
   Reset & Base Styles
   ======================================== */
@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 300 800;
    font-stretch: 100%;
    font-display: swap;
    src: url('fonts/nunito-sans-cyrillic-variable.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 300 800;
    font-stretch: 100%;
    font-display: swap;
    src: url('fonts/nunito-sans-latin-variable.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 300;
    color: #1F2937;
    background-color: #F9FAFB;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 450px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========================================
   Header
   ======================================== */
.header {
    background-color: #f6f7f8;
    border-bottom: 1px solid #E5E7EB;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-image {
    height: 32px;
    width: auto;
    display: block;
}

.logo-text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #1F2937;

}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: 20px 0 0;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
}

.hero-subtitle {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: #6B7280;
    text-align: center;
    margin: 0 auto 24px;
    max-width: 500px;
    font-weight: bold;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.hero-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #1F2937;
    text-align: left;
    margin: 0;
    flex: 1;
    padding-bottom: 20px;
}

.hero-title .accent {
    color: #fd9148;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    height: 140px;
    width: auto;
    display: block;
    margin-bottom: 0;
}

/* ========================================
   Offers Section
   ======================================== */
.offers {
    padding: 40px 0;
    background-image: url('img/offers_back.webp');
    background-repeat: repeat;
    background-size: 20%;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ========================================
   Offer Card
   ======================================== */
.offer-card {
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Image */
.offer-image-link {
    display: block;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.offer-image-link:hover {
    opacity: 0.9;
}

.offer-image-link:active {
    opacity: 0.8;
}

.offer-image {
    width: 100%;
    aspect-ratio: 2 / 1;
    background-color: #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-image svg {
    width: 100%;
    height: 100%;
}

.offer-badge {
    position: absolute;
    top: 14px;
    left: -34px;
    z-index: 2;
    min-width: 150px;
    padding: 7px 34px;
    background: linear-gradient(135deg, #ffd3ad 0%, #ffab70 52%, #fd9148 100%);
    color: #fffaf5;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 10px 18px rgba(15, 118, 110, 0.28);
    transform: rotate(-33deg);
    pointer-events: none;
}

/* Title */
.offer-title-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.offer-title-link:hover {
    color: #fd9148;
}

.offer-title-link:active {
    color: #e88437;
}

.offer-title-link:focus {
    outline: 2px solid #fd9148;
    outline-offset: 2px;
    border-radius: 4px;
}

.offer-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #1F2937;
    text-align: center;
}

.offer-ticker {
    width: calc(100% + 32px);
    margin: 0 0 12px -16px;
    padding: 5px 0;
    border-radius: 0;
    background: linear-gradient(90deg, rgba(253, 145, 72, 0.12) 0%, rgba(20, 184, 166, 0.12) 100%);
    border: 1px solid rgba(253, 145, 72, 0.18);
    border-left: 0;
    border-right: 0;
    overflow: hidden;
}

.offer-ticker-track {
    display: inline-flex;
    align-items: center;
    min-width: max-content;
    white-space: nowrap;
    animation: offer-ticker-marquee 12s linear infinite;
    will-change: transform;
}

.offer-ticker-text {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    color: #d67526;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.offer-ticker-separator {
    display: inline-flex;
    margin: 0 14px;
    color: #14b8a6;
    font-size: 12px;
    font-weight: 800;
}

@keyframes offer-ticker-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .offer-ticker-track {
        animation: none;
        min-width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        white-space: normal;
    }

    .offer-ticker-separator:last-child {
        display: none;
    }
}

.offer-social-proof {
    margin-bottom: 12px;
    padding: 2px 0 10px;
    text-align: center;
}

.offer-social-proof-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4px;
}

.offer-social-proof-stars {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: 104px;
    height: 18px;
    font-size: 18px;
    line-height: 18px;
    letter-spacing: 0.1em;
    vertical-align: top;
}

.offer-social-proof-stars-base {
    display: block;
    color: #D1D5DB;
    pointer-events: none;
}

.offer-social-proof-stars-fill {
    position: absolute;
    inset: 0 auto 0 0;
    overflow: hidden;
    color: #F59E0B;
    white-space: nowrap;
    pointer-events: none;
}

.offer-social-proof-stars-user {
    position: absolute;
    inset: 0 auto 0 0;
    overflow: hidden;
    color: #F97316;
    white-space: nowrap;
    width: 0;
    opacity: 0;
    pointer-events: none;
    transition: width 0.22s ease, opacity 0.22s ease;
}

.offer-social-proof-stars-user.is-visible {
    opacity: 1;
}

.offer-social-proof-star-hit {
    position: absolute;
    top: 0;
    z-index: 2;
    width: 20%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    appearance: none;
    cursor: pointer;
    touch-action: manipulation;
}

.offer-social-proof-star-hit:focus {
    outline: none;
}

.offer-social-proof-star-hit:nth-of-type(1) {
    left: 0;
}

.offer-social-proof-star-hit:nth-of-type(2) {
    left: 20%;
}

.offer-social-proof-star-hit:nth-of-type(3) {
    left: 40%;
}

.offer-social-proof-star-hit:nth-of-type(4) {
    left: 60%;
}

.offer-social-proof-star-hit:nth-of-type(5) {
    left: 80%;
}

.offer-social-proof-stars.is-animating .offer-social-proof-stars-user {
    animation: social-proof-stars-bounce 0.42s ease;
}

@keyframes social-proof-stars-bounce {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.16);
    }

    100% {
        transform: scale(1);
    }
}

.social-proof-firework {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    pointer-events: none;
    z-index: 1250;
    opacity: 0;
    transform: translate(-50%, -50%);
    animation: social-proof-firework-burst 0.7s ease-out forwards;
}

@keyframes social-proof-firework-burst {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) translate(0, 0) scale(0.6);
    }

    100% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            translate(var(--firework-x, 0), var(--firework-y, 0))
            scale(1.35);
    }
}

.offer-social-proof-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 6px;
}

.offer-social-proof-rating {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
}

.offer-social-proof-meta-text {
    color: #6B7280;
}

.offer-social-proof-reviews {
    font-weight: 700;
    color: #1F2937;
}

.social-proof-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1200;
    max-width: calc(100vw - 32px);
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.96);
    color: #FFFFFF;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
    transform: translate(-50%, 16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.social-proof-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Parameters */
.offer-params {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.param-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.param-label {
    color: #6B7280;
    font-weight: 500;
}

.param-value {
    color: #1F2937;
    font-weight: 700;
    text-align: right;
}

/* Offer Footer - прижимает кнопку и ссылку к низу */
.offer-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
}

/* Characteristics Link */
.characteristics-link {
    color: #fd9148;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 12px;
    display: block;
    text-align: center;
    transition: color 0.2s ease;
}

.characteristics-link:hover {
    color: #e88437;
    text-decoration: underline;
}

.characteristics-link:active {
    color: #d67526;
}

.characteristics-link:focus {
    outline: 2px solid #fd9148;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Button */
.btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background-color: #fd9148;
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #e88437;
}

.btn-primary:active {
    background-color: #d67526;
    transform: translateY(1px);
}

.btn-primary:focus {
    outline: 2px solid #fd9148;
    outline-offset: 2px;
}

.btn-secondary {
    background-color: transparent;
    color: #1F2937;
    border: 1px solid #E5E7EB;
}

.btn-secondary:hover {
    background-color: #F9FAFB;
    border-color: #D1D5DB;
}

.btn-secondary:active {
    background-color: #F3F4F6;
}

.btn-secondary:focus {
    outline: 2px solid #6B7280;
    outline-offset: 2px;
}

/* ========================================
   Info Sections
   ======================================== */
.info-section {
    padding: 40px 0;
    background-color: #FFFFFF;
    border-top: 1px solid #E5E7EB;
}

.info-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #1F2937;
}

.info-content {
    font-size: 14px;
    line-height: 1.7;
    color: #1F2937;
}

.info-content p {
    margin-bottom: 16px;
}

.info-content p:last-child {
    margin-bottom: 0;
}

.info-subtitle {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #1F2937;
}

.info-subtitle:first-child {
    margin-top: 0;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: #1F2937;
    padding: 32px 0;
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: #E5E7EB;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.footer-link:active {
    color: #F9FAFB;
}

.footer-link:focus {
    outline: 2px solid #E5E7EB;
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-disclaimer {
    margin-top: 24px;
    font-size: 12px;
    line-height: 1.6;
    color: #9CA3AF;
    text-align: center;
}

/* ========================================
   Copyright Block
   ======================================== */
.copyright-block {
    background-color: #111827;
    padding: 20px 0;
}

.copyright-text {
    font-size: 14px;
    color: #9CA3AF;
    text-align: center;
    margin: 0;
}

/* ========================================
   Modal
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background-color: #FFFFFF;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 24px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6B7280;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #1F2937;
}

.modal-close:active {
    color: #000000;
}

.modal-close:focus {
    outline: 2px solid #6B7280;
    outline-offset: 2px;
    border-radius: 4px;
}

.modal-body {
    font-size: 16px;
    line-height: 1.7;
    color: #1F2937;
    margin-bottom: 24px;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-body .param-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #E5E7EB;
}

.modal-body .param-row:last-child {
    border-bottom: none;
}

.modal-body .param-label {
    font-weight: 500;
    color: #6B7280;
}

.modal-body .param-label.capitalize {
    text-transform: capitalize;
}

.modal-body .param-value {
    font-weight: 700;
    color: #1F2937;
    text-align: right;
}

.modal-body .link_flex {
    color: #fd9148;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    width: 100%;
    text-align: center;
    transition: color 0.2s ease;
}

.modal-body .link_flex:hover {
    color: #e88437;
    text-decoration: underline;
}

#modalGoToSite {
    margin-top: 24px;
}

.modal-ok {
    margin-top: 12px;
}

/* Hidden element for characteristics */
.characteristics-text {
    display: none;
}

/* ========================================
   Media Queries
   ======================================== */
@media (max-width: 400px) {
    .offer-social-proof-stars {
        width: 96px;
        font-size: 17px;
    }

    /* Offer card parameters */
    .param-row {
        font-size: 12px;
    }

    .param-label,
    .param-value {
        font-size: 12px;
    }

    /* Characteristics link */
    .characteristics-link {
        font-size: 12px;
    }

    /* Info section */
    .info-content {
        font-size: 12px;
    }
}
