/* =============================================
   NOVINKY - MODERNÍ TIMELINE DESIGN
   Mobile First + BEM
   ============================================= */

/* =============================================
   HERO SEKCE
   ============================================= */
.novinky-hero {
    position: relative;
    margin: 0.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    min-height: 260px;
}

.novinky-hero__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
}

.novinky-hero__badge-new {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.novinky-hero__image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.novinky-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.novinky-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(30, 27, 75, 0.95) 0%, rgba(30, 27, 75, 0.6) 50%, transparent 100%);
}

.novinky-hero__content {
    position: relative;
    z-index: 5;
    padding: 3.5rem 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 260px;
}

.novinky-hero__category {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.novinky-hero__category--vrh {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.novinky-hero__category-icon {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.novinky-hero__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.novinky-hero__text {
    font-size: 0.938rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.novinky-hero__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.novinky-hero__date {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.813rem;
    color: rgba(255, 255, 255, 0.6);
}

.novinky-hero__meta-icon {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.novinky-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e1b4b;
    background: linear-gradient(135deg, #fff 0%, #f3f4f6 100%);
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.novinky-hero__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.novinky-hero__btn-icon {
    width: 1.125rem;
    height: 1.125rem;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.novinky-hero__btn:hover .novinky-hero__btn-icon {
    transform: translateX(4px);
}

/* =============================================
   FILTRY
   ============================================= */
.novinky-filtry {
    padding: 1rem 0.5rem;
}

.novinky-filtry__wrapper {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.novinky-filtry__wrapper::-webkit-scrollbar {
    display: none;
}

.novinky-filtry__btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.novinky-filtry__btn:hover {
    border-color: #a78bfa;
    color: #7c3aed;
}

.novinky-filtry__btn--active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.novinky-filtry__btn--active:hover {
    color: #fff;
}

.novinky-filtry__btn-icon {
    width: 1.125rem;
    height: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.novinky-filtry__btn-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.novinky-filtry__btn-icon--vrh { color: #f59e0b; }
.novinky-filtry__btn-icon--vystava { color: #3b82f6; }
.novinky-filtry__btn-icon--zdravi { color: #10b981; }
.novinky-filtry__btn-icon--jine { color: #6b7280; }

.novinky-filtry__btn--active .novinky-filtry__btn-icon,
.novinky-filtry__btn--active .novinky-filtry__btn-icon--vrh,
.novinky-filtry__btn--active .novinky-filtry__btn-icon--vystava,
.novinky-filtry__btn--active .novinky-filtry__btn-icon--zdravi,
.novinky-filtry__btn--active .novinky-filtry__btn-icon--jine {
    color: #fff;
}

/* =============================================
   TIMELINE
   ============================================= */
.novinky-timeline {
    position: relative;
    padding: 0 0.5rem 1.5rem;
}

/* =============================================
   TIMELINE KARTA
   ============================================= */
.novinka-card {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.novinka-card--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline indikátor */
.novinka-card__timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20px;
    flex-shrink: 0;
}

.novinka-card__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.novinka-card__dot--vrh { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.novinka-card__dot--vystava { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.novinka-card__dot--zdravi { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.novinka-card__dot--jine { background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%); }

.novinka-card__line {
    width: 2px;
    flex: 1;
    min-height: 20px;
    background: linear-gradient(to bottom, #e5e7eb, #f3f4f6);
    margin-top: 0.5rem;
}

/* Wrapper karty */
.novinka-card__wrapper {
    flex: 1;
    min-width: 0;
}

/* Datum tag */
.novinka-card__date-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.novinka-card__date-icon {
    width: 0.875rem;
    height: 0.875rem;
    fill: currentColor;
    opacity: 0.7;
}

/* Hlavní část karty */
.novinka-card__main {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.novinka-card__main:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Media (obrázek) */
.novinka-card__media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.novinka-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.novinka-card__main:hover .novinka-card__img {
    transform: scale(1.05);
}

/* Video wrapper */
.novinka-card__media--video {
    background: #000;
}

.novinka-card__video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.novinka-card__video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.novinka-card__video-native {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Badge u videa - horní roh, aby nepřekrýval ovládání */
.novinka-card__media--video .novinka-card__badge {
    bottom: auto;
    top: 0.75rem;
}

/* Badge na obrázku */
.novinka-card__badge {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.5rem;
    backdrop-filter: blur(8px);
}

.novinka-card__badge svg {
    width: 0.875rem;
    height: 0.875rem;
    fill: currentColor;
}

.novinka-card__badge--vrh {
    background: rgba(245, 158, 11, 0.9);
    color: #fff;
}

.novinka-card__badge--vystava {
    background: rgba(59, 130, 246, 0.9);
    color: #fff;
}

.novinka-card__badge--zdravi {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
}

.novinka-card__badge--jine {
    background: rgba(107, 114, 128, 0.9);
    color: #fff;
}

.novinka-card__badge--inline {
    position: relative;
    bottom: auto;
    left: auto;
    margin-bottom: 0.75rem;
    width: fit-content;
}

/* Obsah karty */
.novinka-card__content {
    padding: 1.25rem;
}

.novinka-card__main--no-media .novinka-card__content {
    padding: 1.25rem;
}

.novinka-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.75rem;
}

.novinka-card__link {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
}

.novinka-card__link:hover {
    color: #7c3aed;
}

/* === ROZBALOVACÍ FUNKCIONALITA === */
.novinka-card__expand-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    color: #7c3aed;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s ease;
}

.novinka-card__expand-btn:hover {
    color: #5b21b6;
}

/* Indikátor rozbalení - wrapper */
.novinka-card__expand-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #7c3aed;
    background: #f3e8ff;
    border-radius: 1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.novinka-card__expand-btn:hover .novinka-card__expand-indicator {
    background: #ede9fe;
    color: #5b21b6;
}

.novinka-card--expanded .novinka-card__expand-indicator {
    background: #ede9fe;
}

/* Text v indikátoru */
.novinka-card__expand-text {
    display: none;
}

@media (min-width: 400px) {
    .novinka-card__expand-text {
        display: inline;
    }
}

.novinka-card__expand-icon {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.novinka-card--expanded .novinka-card__expand-icon {
    transform: rotate(180deg);
}

/* Text wrapper */
.novinka-card__text-wrapper {
    position: relative;
}

.novinka-card__text--preview {
    display: block;
}

.novinka-card__text-full {
    display: none;
}

/* Rozbalený stav */
.novinka-card--expanded .novinka-card__text--preview {
    display: none;
}

.novinka-card--expanded .novinka-card__text-full {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Indikátor rozbalovací karty */
.novinka-card--expandable .novinka-card__main {
    cursor: pointer;
}

.novinka-card--expandable:not(.novinka-card--expanded) .novinka-card__text-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2rem;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
}

.novinka-card__text {
    font-size: 0.938rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 1rem;
}

.novinka-card__text strong {
    color: #111827;
    font-weight: 600;
}

/* Highlight box (pro zdravotní testy) */
.novinka-card__highlight {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.novinka-card__highlight-item {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.875rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.novinka-card__highlight-label {
    font-size: 0.688rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.novinka-card__highlight-value {
    font-size: 0.938rem;
    font-weight: 700;
}

.novinka-card__highlight-value--success {
    color: #059669;
}

/* Stats (pro vrhy) */
.novinka-card__stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.novinka-card__stat {
    display: flex;
    flex-direction: column;
}

.novinka-card__stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #7c3aed;
    line-height: 1;
}

.novinka-card__stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Akce */
.novinka-card__actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.novinka-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-radius: 0.625rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.novinka-card__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.novinka-card__btn svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.novinka-card__btn:hover svg {
    transform: translateX(2px);
}

.novinka-card__btn--secondary {
    background: #f3f4f6;
    color: #374151;
    box-shadow: none;
}

.novinka-card__btn--secondary:hover {
    background: #e5e7eb;
    box-shadow: none;
}

/* =============================================
   KONEC TIMELINE
   ============================================= */
.novinky-timeline__end {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    margin-left: 12px;
}

.novinky-timeline__end-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    margin-bottom: 0.75rem;
}

.novinky-timeline__end-text {
    font-size: 0.813rem;
    color: #9ca3af;
    font-style: italic;
}

/* =============================================
   STRÁNKOVÁNÍ
   ============================================= */
.novinky-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
}

.novinky-pagination__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    background: #fff;
    color: #374151;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.novinky-pagination__link:hover:not(.novinky-pagination__link--disabled) {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    border-color: transparent;
}

.novinky-pagination__link--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.novinky-pagination__icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.novinky-pagination__pages {
    display: flex;
    gap: 0.25rem;
}

.novinky-pagination__page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.novinky-pagination__page:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.novinky-pagination__page--active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.novinky-pagination__page--active:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
}

/* =============================================
   PRÁZDNÝ STAV
   ============================================= */
.novinky-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    text-align: center;
}

.novinky-no-results__icon {
    width: 3rem;
    height: 3rem;
    fill: #d1d5db;
    margin-bottom: 1rem;
}

.novinky-no-results p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* =============================================
   TABLET (600px+)
   ============================================= */
@media (min-width: 600px) {
    .novinky-hero {
        margin: 1rem;
        min-height: 300px;
        border-radius: 1rem;
    }

    .novinky-hero__content {
        padding: 4rem 1.5rem 1.5rem;
        min-height: 300px;
    }

    .novinky-hero__title {
        font-size: 1.75rem;
    }

    .novinky-filtry {
        padding: 1rem;
    }

    .novinky-filtry__wrapper {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .novinky-timeline {
        padding: 0 1rem 1.5rem;
    }

    .novinka-card {
        gap: 1rem;
    }

    .novinka-card__timeline {
        width: 24px;
    }

    .novinka-card__dot {
        width: 14px;
        height: 14px;
    }

    .novinka-card__main {
        flex-direction: row;
    }

    .novinka-card__media {
        width: 200px;
        min-width: 200px;
        aspect-ratio: auto;
    }

    .novinka-card__content {
        padding: 1.25rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .novinka-card__title {
        font-size: 1.125rem;
    }
}

/* =============================================
   DESKTOP (900px+)
   ============================================= */
@media (min-width: 900px) {
    .novinky-hero {
        margin: 1.5rem;
        min-height: 340px;
    }

    .novinky-hero__content {
        padding: 5rem 2rem 2rem;
        min-height: 340px;
    }

    .novinky-hero__title {
        font-size: 2rem;
    }

    .novinky-hero__text {
        font-size: 1rem;
        max-width: 500px;
    }

    .novinky-filtry {
        padding: 1.5rem;
    }

    .novinky-filtry__btn {
        padding: 0.75rem 1.25rem;
    }

    .novinky-timeline {
        padding: 0 1.5rem 2rem;
    }

    .novinka-card__timeline {
        width: 32px;
    }

    .novinka-card__dot {
        width: 16px;
        height: 16px;
    }

    .novinka-card__media {
        width: 280px;
        min-width: 280px;
    }

    .novinka-card__content {
        padding: 1.75rem;
    }
}

/* =============================================
   VELKÝ DESKTOP (1200px+)
   ============================================= */
@media (min-width: 1200px) {
    .novinky-hero {
        margin: 2rem;
    }

    .novinky-hero__content {
        padding: 5rem 2.5rem 2.5rem;
    }

    .novinky-filtry {
        padding: 1.5rem 2rem;
    }

    .novinky-timeline {
        padding: 0 2rem 2rem;
    }

    .novinka-card__media {
        width: 300px;
        min-width: 300px;
    }

    .novinka-card__content {
        padding: 1.75rem;
    }
}
