/* ================================
   БАЗОВЫЕ СТИЛИ СТРАНИЦЫ
   ================================ */

body {
    background: #fcf9f6; /* теплый, менее насыщенный */
    color: #1a1a1a; /* контрастный текст */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3 {
    color: #6a3f22; /* насыщенный теплый коричневый */
    font-weight: 800;
}

/* HERO */
.hero {
    background: #fefbf8; /* очень светлый теплый фон */
    padding: 80px 20px;
    border-bottom: 1px solid #e8dcd2;
}

/* ================================
   CTA-КНОПКА (черный текст)
   ================================ */

.cta-btn {
    background: #e6a24a; /* теплый карамельный */
    color: #000000;
    padding: 20px 48px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 1.35rem;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 0 #b97f38;
    transition: 0.2s ease;
}

.cta-btn:hover {
    background: #d88c4a;
    box-shadow: 0 3px 0 #a06a2f;
    transform: translateY(1px);
    color: #000000;
}

/* Анимации CTA */
@keyframes ctaPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(230,162,74,0); }
    50% { transform: scale(1.06); box-shadow: 0 0 18px rgba(230,162,74,0.45); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(230,162,74,0); }
}

.cta-pulse { animation: ctaPulse 6s ease-in-out infinite; }

@keyframes ctaShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    75% { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

.cta-btn-hover:hover { animation: ctaShake 0.25s ease; }

.cta-animated {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.cta-animated.show {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   STICKY CTA (тёплая тема)
   ================================ */

.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    background: #fcf9f6; /* теплый фон */
    backdrop-filter: blur(6px);

    border-top: 1px solid #e8dcd2;

    padding: 16px 20px;
    z-index: 9999;

    box-shadow: 0 -4px 14px rgba(106, 63, 34, 0.12); /* теплая тень */

    display: flex;
    justify-content: center;
    align-items: center;

    transition: opacity 0.35s ease, transform 0.35s ease;
}

.sticky-cta.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

@media (max-width: 420px) {
    .sticky-cta { padding: 12px; }
    .sticky-cta .cta-btn {
        padding: 16px 28px;
        font-size: 1.1rem;
    }
}

/* ================================
   КАРТОЧКИ
   ================================ */

.card {
    border: 1px solid #e8dcd2;
    border-radius: 12px;
    background: #ffffff;
}

.equal-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ================================
   TOC
   ================================ */

#toc a {
    text-decoration: none;
    color: #c97a36;
    font-weight: 600;
}

#toc a:hover {
    text-decoration: underline;
}

/* ================================
   ТАБЛИЦЫ (сортировка)
   ================================ */

.sort-indicator {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-left: 4px;
}

th.asc .sort-indicator,
th.desc .sort-indicator {
    opacity: 1;
}

th.active-sort,
td.active-sort {
    background: #f5e8dc !important;
    transition: background 0.25s ease;
}

/* ================================
   SVG-ИКОНКИ
   ================================ */

.benefit-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    fill: #6a3f22;
    opacity: 0.95;
}

/* ================================
   RELATED LINKS
   ================================ */

#related-links .tile {
    background: #ffffff;
    border: 1px solid #e8dcd2;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

#related-links .tile h5 {
    color: #6a3f22;
    font-weight: 800;
    margin-bottom: 8px;
}

#related-links .tile p {
    color: #4a382d;
    margin: 0;
}

#related-links .tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(106, 63, 34, 0.18);
    border-color: #d88c4a;
}

#related-links .tile-link {
    text-decoration: none;
    color: inherit;
}

/* ================================
   BOOTSTRAP ACCORDION (теплая тема)
   ================================ */

.accordion-item {
    border: 1px solid #e8dcd2 !important;
    border-radius: 12px !important;
    background: #fffdfb;
    margin-bottom: 14px;
}

.accordion-button {
    background: #fcf9f6 !important;
    color: #6a3f22 !important;
    font-weight: 800;
    padding: 18px 20px;
    border-radius: 12px !important;
    box-shadow: none !important;
    transition: background 0.25s ease, color 0.25s ease;
}

.accordion-button:hover {
    background: #f5ece4 !important;
    color: #5a331c !important;
}

.accordion-button:not(.collapsed) {
    background: #ead7c8 !important;
    color: #4a2a17 !important;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.05) !important;
}

.accordion-button::after {
    filter: invert(35%) sepia(30%) saturate(900%) hue-rotate(350deg) brightness(85%) contrast(90%);
}

.accordion-body {
    background: #fffdfb;
    color: #4a382d;
    padding: 20px 24px;
    border-top: 1px solid #e8dcd2;
    border-radius: 0 0 12px 12px;
}

/* Desktop: картинка справа */
.overview-img, .brands-img, .vidalista-img, .tadacip-img, .megalis-img, .tadora-img, .tadalis-sx-img, .apcalis-img, .tazzle-img, .forms-img, .vs-img, .onset-duration-img, .side-effects-img {
    max-width: 360px;
}

/* Mobile: картинка сверху, строго по центру, ровно шириной текста */
@media (max-width: 768px) {
    .overview-img, .brands-img, .vidalista-img, .tadacip-img, .megalis-img, .tadora-img, .tadalis-sx-img, .apcalis-img, .tazzle-img, .forms-img, .vs-img, .onset-duration-img, .side-effects-img {
        float: none !important;        /* отключаем float */
        display: block !important;     /* блочный элемент */
        margin: 0 auto 24px auto !important; /* центрирование */
        width: 100% !important;        /* ширина = ширина текста */
        max-width: 100% !important;    /* не выходит за пределы */
    }
}