/* ========================================
   STRÁNKA ČLÁNKY - Výpis článků s filtry
   BEM metodika
   ======================================== */

/* ----------------------------------------
   HLAVNÍ KONTEJNER
   ---------------------------------------- */
.articles-page {
    min-height: 100vh;
    padding-bottom: 60px;
}

/* ----------------------------------------
   SEKCE FILTRŮ
   ---------------------------------------- */
.articles-page__filters {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px 30px;
    position: relative;
}

/* Pozadí bez vzoru */

.articles-page__filters-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.articles-page__title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.articles-page__subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.articles-page__filters-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ----------------------------------------
   ŘÁDEK FILTRŮ
   ---------------------------------------- */
.articles-page__filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

/* ----------------------------------------
   SKUPINA FILTRU
   ---------------------------------------- */
.articles-page__filter-group {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.articles-page__filter-group--search {
    flex: 1.2;
}

.articles-page__filter-group--category,
.articles-page__filter-group--breed {
    flex: 1;
}

.articles-page__filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 6px;
}

.articles-page__filter-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.articles-page__filter-icon svg {
    width: 14px;
    height: 14px;
}

/* ----------------------------------------
   INPUT WRAPPER A INPUT
   ---------------------------------------- */
.articles-page__filter-input-wrapper {
    position: relative;
}

.articles-page__filter-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.articles-page__filter-input:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.articles-page__filter-input::placeholder {
    color: #9ca3af;
}

/* Tlačítko pro vymazání inputu */
.articles-page__input-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.articles-page__input-clear:hover {
    background: #d1d5db;
}

.articles-page__input-clear svg {
    width: 12px;
    height: 12px;
    stroke: #6b7280;
}

.articles-page__filter-input:not(:placeholder-shown) + .articles-page__input-clear {
    display: flex;
}

/* ----------------------------------------
   TAGY PRO VYBRANÉ HODNOTY
   ---------------------------------------- */
.articles-page__category-tags,
.articles-page__breed-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
    min-height: 0;
}

.articles-page__category-tag,
.articles-page__breed-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #1a1a2e;
}

.articles-page__category-tag-remove,
.articles-page__breed-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.articles-page__category-tag-remove:hover,
.articles-page__breed-tag-remove:hover {
    background: #ef4444;
}

.articles-page__category-tag-remove:hover svg,
.articles-page__breed-tag-remove:hover svg {
    stroke: #fff;
}

.articles-page__category-tag-remove svg,
.articles-page__breed-tag-remove svg {
    width: 10px;
    height: 10px;
    stroke: #6b7280;
}

/* ----------------------------------------
   NAŠEPTÁVAČ
   ---------------------------------------- */
.articles-page__category-suggestions,
.articles-page__breed-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    margin-top: 4px;
}

.articles-page__category-suggestions--visible,
.articles-page__breed-suggestions--visible {
    display: block;
}

.articles-page__category-suggestion,
.articles-page__breed-suggestion {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

.articles-page__category-suggestion:last-child,
.articles-page__breed-suggestion:last-child {
    border-bottom: none;
}

.articles-page__category-suggestion:hover,
.articles-page__breed-suggestion:hover {
    background-color: #f3f4f6;
}

.articles-page__category-suggestion strong,
.articles-page__breed-suggestion strong {
    color: #667eea;
}

/* Nedostupné položky (zašedlé) */
.articles-page__category-suggestion--disabled,
.articles-page__breed-suggestion--disabled {
    color: #c0c5ce;
    cursor: not-allowed;
    background-color: #f9fafb;
}

.articles-page__category-suggestion--disabled:hover,
.articles-page__breed-suggestion--disabled:hover {
    background-color: #f9fafb;
}

.articles-page__category-suggestion--disabled strong,
.articles-page__breed-suggestion--disabled strong {
    color: #c0c5ce;
}

/* ----------------------------------------
   TLAČÍTKO ROZŠÍŘENÉ FILTRY
   ---------------------------------------- */
.articles-page__filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.articles-page__filter-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.articles-page__filter-toggle--active {
    background: rgba(255, 255, 255, 0.3);
}

.articles-page__filter-toggle svg {
    width: 18px;
    height: 18px;
}

/* ----------------------------------------
   ROZŠÍŘENÉ FILTRY
   ---------------------------------------- */
.articles-page__filters-extended {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.articles-page__filters-extended--open {
    display: flex;
}

/* Období (radio buttons) */
.articles-page__filter-date {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.articles-page__filter-date-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.articles-page__filter-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.articles-page__filter-radio input {
    display: none;
}

.articles-page__filter-radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: transparent;
    position: relative;
    transition: all 0.2s ease;
}

.articles-page__filter-radio input:checked + .articles-page__filter-radio-mark {
    border-color: #fff;
    background: #fff;
}

.articles-page__filter-radio input:checked + .articles-page__filter-radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
}

.articles-page__filter-radio-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Tlačítka akcí */
.articles-page__filter-actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.articles-page__filter-clear {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.articles-page__filter-clear:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.articles-page__filter-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #ffdc62;
    border: none;
    border-radius: 10px;
    color: #4c1d95;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.articles-page__filter-submit:hover {
    transform: translateY(-2px);
    background: #f5d24a;
    box-shadow: 0 4px 12px rgba(255, 220, 98, 0.5);
}

.articles-page__filter-submit svg {
    width: 18px;
    height: 18px;
}

/* Hlavní tlačítko Vyhledat - vždy viditelné */
.articles-page__filter-submit--main {
    display: flex;
}

/* ----------------------------------------
   SEKCE VÝSLEDKŮ
   ---------------------------------------- */
.articles-page__results {
    padding: 30px 20px;
}

.articles-page__results-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* ----------------------------------------
   INFORMAČNÍ ŘÁDEK
   ---------------------------------------- */
.articles-page__results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.articles-page__results-count {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.articles-page__results-count strong {
    color: #1a1a2e;
}

/* ----------------------------------------
   ŘAZENÍ - CHIP TLAČÍTKA
   ---------------------------------------- */
.articles-page__sort {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.articles-page__sort-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f3f4f6;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.articles-page__sort-chip:hover {
    background: #e5e7eb;
    color: #1a1a2e;
}

.articles-page__sort-chip--active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.articles-page__sort-chip--active:hover {
    background: linear-gradient(135deg, #5a71d4 0%, #6a4190 100%);
    color: #fff;
}

.articles-page__sort-chip svg {
    width: 16px;
    height: 16px;
}

.articles-page__sort-arrow {
    display: flex;
    transition: transform 0.2s ease;
}

.articles-page__sort-arrow--up {
    transform: rotate(180deg);
}

/* ----------------------------------------
   SEZNAM ČLÁNKŮ
   ---------------------------------------- */
.articles-page__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ----------------------------------------
   KARTA ČLÁNKU - HORIZONTÁLNÍ
   ---------------------------------------- */
.article-card {
    display: flex;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

/* Obrázek článku */
.article-card__image-link {
    flex-shrink: 0;
    width: 280px;
    display: block;
}

.article-card__image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.article-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Obsah článku */
.article-card__content {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}

.article-card__header {
    margin-bottom: 10px;
}

.article-card__title-link {
    text-decoration: none;
    color: inherit;
}

.article-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.article-card__title-link:hover .article-card__title {
    color: #667eea;
}

.article-card__perex {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Metadata článku */
.article-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    margin-bottom: 12px;
}

.article-card__meta-left,
.article-card__meta-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.article-card__date,
.article-card__author,
.article-card__views,
.article-card__rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #9ca3af;
}

.article-card__date svg,
.article-card__author svg,
.article-card__views svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.article-card__rating svg {
    width: 14px;
    height: 14px;
    fill: #fbbf24;
    stroke: #fbbf24;
    flex-shrink: 0;
}

.article-card__rating {
    color: #1a1a2e;
    font-weight: 600;
}

/* Tagy článku */
.article-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-card__tag {
    padding: 4px 12px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-card__tag:hover {
    background: #667eea;
    color: #fff;
}

/* ----------------------------------------
   STRÁNKOVÁNÍ
   ---------------------------------------- */
.articles-page__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.articles-page__pagination-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.articles-page__pagination-btn:hover:not(:disabled) {
    background: #e5e7eb;
}

.articles-page__pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.articles-page__pagination-btn svg {
    width: 20px;
    height: 20px;
    stroke: #6b7280;
}

.articles-page__pagination-numbers {
    display: flex;
    gap: 4px;
}

.articles-page__pagination-number {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: none;
    background: #f3f4f6;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.articles-page__pagination-number:hover {
    background: #e5e7eb;
    color: #1a1a2e;
}

.articles-page__pagination-number--active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.articles-page__pagination-number--active:hover {
    background: linear-gradient(135deg, #5a71d4 0%, #6a4190 100%);
    color: #fff;
}

.articles-page__pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: #9ca3af;
}

/* ========================================
   RESPONZIVNÍ DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 900px) {
    .article-card {
        flex-direction: column;
    }

    .article-card__image-link {
        width: 100%;
    }

    .article-card__image {
        height: 200px;
    }

    .article-card__content {
        padding: 16px 20px;
    }

    .article-card__meta-left,
    .article-card__meta-right {
        gap: 12px;
    }
}

/* Mobil */
@media (max-width: 768px) {
    .articles-page__filters {
        padding: 30px 16px 24px;
    }

    .articles-page__title {
        font-size: 1.6rem;
    }

    .articles-page__subtitle {
        font-size: 0.9rem;
    }

    .articles-page__filters-row {
        flex-direction: column;
    }

    .articles-page__filter-group {
        min-width: 100%;
    }

    .articles-page__filter-toggle {
        width: 100%;
        justify-content: center;
    }

    .articles-page__filter-submit--main {
        width: 100%;
        justify-content: center;
    }

    .articles-page__filters-extended {
        flex-direction: column;
        align-items: stretch;
    }

    .articles-page__filter-date {
        flex-wrap: wrap;
    }

    .articles-page__filter-clear {
        width: 100%;
        justify-content: center;
    }

    /* Výsledky */
    .articles-page__results {
        padding: 20px 16px;
    }

    .articles-page__results-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .articles-page__sort {
        width: 100%;
        justify-content: flex-start;
    }

    .articles-page__sort-chip {
        flex: 1;
        justify-content: center;
    }

    /* Karta článku */
    .article-card__image {
        height: 180px;
    }

    .article-card__content {
        padding: 14px 16px;
    }

    .article-card__title {
        font-size: 1.05rem;
    }

    .article-card__perex {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .article-card__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .article-card__meta-left {
        flex-wrap: wrap;
    }

    .article-card__meta-right {
        width: 100%;
        justify-content: flex-end;
    }

    /* Stránkování */
    .articles-page__pagination {
        flex-wrap: wrap;
    }

    .articles-page__pagination-number {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .articles-page__pagination-btn {
        width: 36px;
        height: 36px;
    }
}

/* Malý mobil */
@media (max-width: 400px) {
    .article-card__image {
        height: 150px;
    }

    .article-card__category {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .article-card__title {
        font-size: 1rem;
    }

    .article-card__tags {
        display: none;
    }

    .articles-page__sort-chip span:not(.articles-page__sort-arrow) {
        display: none;
    }

    .articles-page__sort-chip {
        padding: 8px 12px;
    }
}
