* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0.25rem;
    background: #fffef5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

h1 {
    color: #0a1f44;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    font-style: normal;
}

@media (min-width: 600px) {
    h1 {
        font-size: 1.75rem;
    }
}

@media (min-width: 960px) {
    h1 {
        font-size: 2rem;
    }
}

.page-subtitle {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
    font-style: normal;
}

@media (min-width: 600px) {
    .page-subtitle {
        font-size: 0.95rem;
    }
}

@media (min-width: 960px) {
    .page-subtitle {
        font-size: 1.05rem;
    }
}

h1,
.page-subtitle {
    text-align: center;
}

.offers-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    overflow-x: auto;
}

@media (min-width: 600px) {
    .offers-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .offers-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.offer-card {
    background: white;
    padding: 0.75rem 0.75rem;
    border-radius: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    font-size: 0.95rem;
    min-width: 352px;
}

.offer-logo {
    height: 36px;
    max-height: 48px;
    max-width: 100%;
    object-fit: contain;
}

@media (min-width: 600px) {
    .offer-card {
        padding: 1.25rem;
        font-size: 1rem;
    }

    .offer-logo {
        height: 42px;
        max-height: 54px;
    }
}

@media (min-width: 960px) {
    .offer-card {
        padding: 1.5rem;
        font-size: 1.05rem;
    }

    .offer-logo {
        height: 48px;
        max-height: 60px;
    }
}

.offer-logo-block {
    flex: 1 1 50%;
    max-width: 50%;
    display: flex;
    align-items: center;
}

.offer-rate-info {
    flex: 1 1 50%;
    max-width: 50%;
    font-size: 0.85rem;
    color: #0a1f44;
    font-weight: 500;
    text-align: right;
    line-height: 1.3;
}

.rate-highlight {
    display: inline-block;
    background-color: #ffc87f; /* светло-оранжевый */
    color: #000;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    line-height: 1.2;
}

.term {
    font-size: 0.8rem;
    color: #888;
    font-weight: normal; /* убрали жирность */
}

.term strong {
    font-weight: 800; /* только число жирным */
}

.offer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.offer-col-left {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.loan-amount-label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.1rem;
    line-height: 1.1;
}

.loan-amount-value {
    font-weight: 600;
    font-size: 1rem;
    color: #0a1f44;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.offer-col-right {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
}

.offer-button {
    display: inline-block;
    padding: 0.6rem 1rem;
    background-color: #009e65;
    color: white;
    font-weight: bold;
    font-size: 1rem;

    /* 👇 Эти два добавлены для визуального сужения текста */
    letter-spacing: -0.5px;
    font-stretch: condensed;

    border-radius: 0.5rem;
    text-decoration: none;
    min-width: 160px;
    text-align: center;

    position: relative;
    overflow: hidden;
    z-index: 2;
}

.offer-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: skewX(-20deg);
    animation: shine 2.5s infinite;
    pointer-events: none;
    z-index: 1;
}

.offer-promo {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.promo-0 {
    background: #ff5722;
}

.promo-1 {
    background: #2196f3;
}

.promo-2 {
    background: #4caf50;
}

.rotating-text {
    display: inline;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.main-logo {
    height: 40px;
    object-fit: contain;
}

.offer-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.offer-logo-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offer-logo {
    height: 36px;
    object-fit: contain;
}

.badge-cbr-verified {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
}

.badge-cbr-verified svg {
    width: 16px;
    height: 16px;
}

.badge-years {
    font-size: 0.75rem;
    font-weight: 600;
    color: #444;
    background: #f0f0f0;
    padding: 0.25rem 0.5rem;
    border-radius: 0.4rem;
    white-space: nowrap;
}

.highlight-count {
    font-weight: bold;
    color: #d35400;
    border: 1px solid #d35400;
    border-radius: 0.25rem;
    padding: 0 0.4rem;
    display: inline-block;
}

.testimonials-section {
    margin: 1.25rem 0 0.5rem;
    padding: 0.5rem 0;
}

.testimonials-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0a1f44;
    margin: 0.75rem 0 0.5rem;
}

.testimonials-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    padding: 0 0.5rem;
    -webkit-overflow-scrolling: touch;
    scroll-padding: 0.5rem;
}

.testimonials-wrapper::-webkit-scrollbar {
    display: none;
}

.testimonial {
    flex: 0 0 auto;
    width: 100%;
    max-width: 352px;
    scroll-snap-align: start;
    background: #f7f7f7;
    color: #333;
    border-radius: 0.75rem;
    padding: 1rem;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.testimonial span {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.85rem;
}

.testimonials-scroll-hint {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin: 0 0 0.5rem;
}

.site-footer {
    background-color: #2f3e46; /* был фон кнопки */
    color: #e9ffe3; /* как на кнопке */
    padding: 1rem;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 2rem;
}

.site-footer a {
    color: #aaa;
    text-decoration: underline;
    margin-top: 0;
    padding-top: 0.5rem;
}

.ticker-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 0.75rem;
    line-height: 1rem;
    background: #fff4cc;
    color: #333;
    border-top: 1px solid #ddd;
    overflow: hidden;
    z-index: 9999;
    padding: 0.4rem 0;
    display: flex;
    align-items: center;
    height: 1.5rem;
}

body {
    padding-bottom: 2rem;
}

.ticker-bar span {
    display: inline-block;
    padding-left: 100%;
    white-space: nowrap;
    animation: ticker 480s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes shine {
    0% {
        left: -75%;
    }
    50% {
        left: 125%;
    }
    100% {
        left: 125%;
    }
}

.footer-contact {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #ccc;
    text-align: center;
    line-height: 1.4;
}

.fade-in {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.offers-lead-message {
    text-align: center;
    margin: 1rem 0 1rem;
    padding: 0 1rem;
}

.offers-lead-message h2 {
    font-size: 1.05rem;
    color: #0a1f44;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.offers-lead-message p {
    font-size: 0.95rem;
    color: #007e3e;
    font-weight: 600;
}

.offer-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 0.5rem 0;
}

.fixed-button-bar {
    position: fixed;
    bottom: 1.6rem; /* чуть выше бегущей строки */
    left: 0;
    width: 100%;
    background: white;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    border-top: 1px solid #ddd;
    margin-bottom: -2px;
    padding: 0.85rem 1.5rem;
    min-width: 100px;
    font-size: 1.05rem;
}

.action-button {
    background-color: #222;
    color: #e9ffe3;
    border: 2px solid #75d5a2;
    border-radius: 0.75rem;
    padding: 0.6rem 1rem;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    min-width: 3.2rem;
    box-shadow: 0 0 6px rgba(0, 128, 0, 0.2);
    transition: transform 0.1s ease;
}

.action-button:active {
    transform: scale(0.95);
}
