/* ========================================
   Credit-On.ru — Обновлённый стиль
   Тема: Рейтинги банковских продуктов
   ======================================== */

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}
.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}
.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(52, 152, 219, 0.3);
}

/* Шапка */
.header {
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo {
    font-size: 26px;
    font-weight: 700;
    color: #1a365d;
    display: inline-block;
    margin-right: 40px;
}
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 24px;
}
.main-nav a {
    padding: 6px 0;
    font-weight: 500;
    position: relative;
    color: #2c3e50;
}
.main-nav a:hover {
    color: #3498db;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}
.main-nav a:hover::after {
    width: 100%;
}

/* Слайдер статей */
.hero-slider {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    padding: 90px 0 70px;
    text-align: center;
}
.hero-slider h1 {
    font-size: 42px;
    margin-bottom: 15px;
    color: #1a365d;
    font-weight: 700;
}
.hero-slider p {
    font-size: 20px;
    color: #555;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    height: 420px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: white;
}
.slide.active {
    opacity: 1;
}
.slide img {
    width: 100%;
    height: 70%;
    object-fit: cover;
}
.slide h3 {
    padding: 24px;
    background: white;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a365d;
    text-align: left;
}
.slide a {
    color: inherit;
    text-decoration: none;
}
.slider-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 18px;
    color: #7f8c8d;
}

/* Почему мы */
.why-us {
    padding: 90px 0;
    text-align: center;
    background-color: #fff;
}
.why-us h2 {
    font-size: 36px;
    margin-bottom: 50px;
    color: #1a365d;
    font-weight: 700;
}
.features {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}
.feature {
    flex: 0 0 calc(33.333% - 20px);
    padding: 30px 20px;
    background: #f9fbfd;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}
.feature:hover {
    transform: translateY(-8px);
}
.feature h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #2c3e50;
}
.feature p {
    color: #555;
    font-size: 16px;
}

/* Отзывы */
.testimonials {
    background-color: #f8fafc;
    padding: 90px 0;
}
.testimonials h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #1a365d;
}
.testimonial-list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}
.testimonial {
    flex: 0 0 calc(33.333% - 20px);
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}
.testimonial p {
    font-style: italic;
    margin-bottom: 15px;
    color: #444;
    font-size: 17px;
    line-height: 1.6;
}
.testimonial span {
    font-weight: 600;
    color: #3498db;
}

/* Плитка статей */
.articles-grid-section {
    padding: 90px 0;
    background-color: #fff;
}
.articles-grid-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #1a365d;
}
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 30px;
}
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}
.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
.article-image-link {
    display: block;
    height: 180px;
    overflow: hidden;
}
.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.article-card:hover .article-image {
    transform: scale(1.05);
}
.article-content {
    padding: 20px;
}
.article-title {
    font-size: 19px;
    margin: 0;
    line-height: 1.4;
}
.article-title a {
    color: #1a365d;
    font-weight: 600;
}
.article-title a:hover {
    color: #3498db;
}
.grid-loader {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-size: 18px;
}

/* FAQ */
.faq {
    padding: 90px 0;
    background-color: #f8fafc;
}
.faq h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #1a365d;
}
.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}
.faq-question {
    padding: 22px 28px;
    background: #f0f7ff;
    cursor: pointer;
    font-weight: 600;
    color: #1a365d;
    font-size: 18px;
    position: relative;
    transition: background 0.3s;
}
.faq-question:hover {
    background: #e6f2ff;
}
.faq-answer {
    padding: 0 28px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: white;
    color: #555;
    line-height: 1.7;
    font-size: 16px;
}
.faq-answer.show {
    padding: 24px 28px;
    max-height: 500px;
}

/* Форма подписки */
.newsletter {
    background: linear-gradient(135deg, #1a365d 0%, #2c3e50 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
}
.newsletter h2 {
    font-size: 34px;
    margin-bottom: 20px;
}
.newsletter p {
    font-size: 19px;
    margin-bottom: 40px;
    opacity: 0.9;
}
.subscribe-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.subscribe-form .form-group input {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
}
.subscribe-form .btn {
    background: #3498db;
    color: white;
    font-weight: 600;
    padding: 14px;
    margin-top: 10px;
}

/* Футер */
.footer {
    background-color: #1a252f;
    color: #bdc3c7;
    padding: 50px 0 30px;
    text-align: center;
}
.footer-logo {
    font-size: 26px;
    font-weight: 700;
    color: white;
    margin-bottom: 25px;
}
.footer-links {
    margin-bottom: 25px;
}
.footer-links a {
    margin: 0 15px;
    color: #bdc3c7;
    font-size: 16px;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: white;
}
.copyright {
    font-size: 14px;
    color: #7f8c8d;
}

/* Адаптивность */
@media (max-width: 992px) {
    .features, .testimonial-list {
        flex-direction: column;
    }
    .feature, .testimonial {
        flex: 0 0 100%;
    }
    .hero-slider h1 {
        font-size: 34px;
    }
    .hero-slider p {
        font-size: 18px;
    }
}
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .logo {
        margin-bottom: 15px;
    }
    .header .container {
        display: flex;
        flex-direction: column;
    }
    .slider {
        height: 360px;
    }
    .slide h3 {
        font-size: 20px;
        padding: 20px;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .faq-question {
        font-size: 17px;
        padding: 18px 22px;
    }
}

/* ==============================
   Страница списка статей — /articles/
   ============================== */

.articles-page {
    padding: 60px 0;
}

.articles-page h1 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
}

.articles-page .subtitle {
    font-size: 18px;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 40px;
}

/* Фильтры: категория и сортировка */
.articles-filter {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.filter-group select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    font-size: 15px;
    min-width: 180px;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Сетка статей */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.article-image-link {
    display: block;
    height: 180px;
    overflow: hidden;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #7f8c8d;
}

.article-title {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-title a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
}

.article-title a:hover {
    color: #3498db;
}

.article-excerpt {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
}

.read-more {
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.read-more:hover {
    text-decoration: underline;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: #f8f9fa;
    border-color: #3498db;
    color: #3498db;
}

.pagination-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: 600;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Загрузка и ошибки */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message, .no-articles {
    text-align: center;
    padding: 30px;
    color: #e74c3c;
    font-size: 18px;
    background: #fdf2f2;
    border-radius: 8px;
    margin: 0 auto;
    max-width: 600px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .articles-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: space-between;
    }

    .filter-group select {
        min-width: auto;
        width: 100%;
    }

    .pagination {
        gap: 6px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}
/* ==============================
   Страницы карт
   ============================== */
.cards-page {
    padding: 60px 0;
}
.cards-page h1 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
}
.page-intro {
    text-align: center;
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 40px;
}
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.card-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}
.bank-logo {
    text-align: center;
    margin-bottom: 15px;
}
.bank-logo img {
    max-height: 40px;
    max-width: 150px;
    object-fit: contain;
}
.card-item h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
}
.card-features {
    list-style: none;
    margin: 20px 0;
    padding: 0;
}
.card-features li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    color: #555;
    line-height: 1.5;
}
.card-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}
.card-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
}
.disclaimer {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    font-size: 14px;
    color: #7f8c8d;
    text-align: center;
}

/* ==============================
   Страница "О нас"
   ============================== */
.about-page {
    padding: 60px 0;
}
.about-page h1 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
}
.about-section {
    margin-bottom: 40px;
}
.about-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.feature-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}
.feature-box h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}
.about-list {
    padding-left: 25px;
    margin: 20px 0;
}
.about-list li {
    margin-bottom: 10px;
    color: #555;
}

/* ==============================
   Страницы политик (cookie, privacy)
   ============================== */
.article-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}
.article-header .breadcrumbs {
    margin-bottom: 20px;
}
.article-header h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #2c3e50;
}
.article-body {
    line-height: 1.7;
    font-size: 16px;
    color: #444;
}
.article-body h2 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: #2c3e50;
}
.article-body p {
    margin-bottom: 18px;
}
.article-body ul {
    padding-left: 25px;
    margin: 15px 0;
}
.article-body ul li {
    margin-bottom: 10px;
}
.article-body a {
    color: #3498db;
    text-decoration: underline;
}
.article-body a:hover {
    color: #1a5276;
}

/* Адаптивность */
@media (max-width: 768px) {
    .cards-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    .card-item {
        padding: 20px;
    }
}