/**
 * Aktuality widget - Styly inspirované MySchool šablonou
 *
 * @package Eobce
 */

/* ========================================
   KONTEJNER
   ======================================== */

.eobce-aktuality-wrapper {
    margin: 40px 0;
    display: grid;
    gap: 25px;
}

/* Layout - List (výchozí) */
.eobce-aktuality-wrapper.layout-list {
    grid-template-columns: 1fr;
}

/* Layout - Grid */
.eobce-aktuality-wrapper.layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Layout - Cards */
.eobce-aktuality-wrapper.layout-cards {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

/* ========================================
   PRÁZDNÝ STAV
   ======================================== */

.eobce-aktuality-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f5f5f5;
    border-radius: 12px;
    color: #999999;
}

.eobce-aktuality-empty i {
    font-size: 64px;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

.eobce-aktuality-empty p {
    margin: 0;
    font-size: 18px;
}

/* ========================================
   POLOŽKA AKTUALITY - ZÁKLADNÍ
   ======================================== */

.eobce-aktualita-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.eobce-aktualita-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ========================================
   OBRÁZEK
   ======================================== */

.aktualita-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.aktualita-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.eobce-aktualita-item:hover .aktualita-thumbnail img {
    transform: scale(1.1);
}

.aktualita-category {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    background: linear-gradient(135deg, #2c5530 0%, #177326 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(44, 85, 48, 0.4);
}

/* ========================================
   OBSAH
   ======================================== */

.aktualita-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ========================================
   META ÚDAJE
   ======================================== */

.aktualita-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5f5f5;
}

.aktualita-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666666;
    font-weight: 500;
}

.aktualita-meta .meta-item i {
    font-size: 15px;
    color: #2c5530;
}

.aktualita-meta .meta-item.date {
    color: #2c5530;
    font-weight: 600;
}

/* ========================================
   TITULEK
   ======================================== */

.aktualita-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.aktualita-title a {
    color: #2e0a13;
    text-decoration: none;
    transition: color 0.3s ease;
}

.aktualita-title a:hover {
    color: #2c5530;
}

/* ========================================
   VÝŇATEK
   ======================================== */

.aktualita-excerpt {
    margin-bottom: 15px;
    color: #666666;
    line-height: 1.7;
    font-size: 15px;
    flex: 1;
}

.aktualita-excerpt p {
    margin: 0 0 10px 0;
}

.aktualita-excerpt p:last-child {
    margin-bottom: 0;
}

/* ========================================
   TLAČÍTKO
   ======================================== */

.aktualita-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2c5530 0%, #177326 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(44, 85, 48, 0.2);
}

.aktualita-button:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.4);
    color: #ffffff;
    gap: 12px;
}

.aktualita-button i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.aktualita-button:hover i {
    transform: translateX(3px);
}

/* ========================================
   LAYOUT - LIST
   ======================================== */

.layout-list .eobce-aktualita-item {
    flex-direction: row;
    border-left: 4px solid #2c5530;
}

.layout-list .aktualita-thumbnail {
    width: 280px;
    height: auto;
    flex-shrink: 0;
}

.layout-list .aktualita-category {
    top: 10px;
    right: 10px;
}

/* ========================================
   LAYOUT - CARDS
   ======================================== */

.layout-cards .eobce-aktualita-item {
    border-top: 4px solid #2c5530;
}

.layout-cards .aktualita-thumbnail {
    height: 200px;
}

/* ========================================
   ANIMACE
   ======================================== */

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.eobce-aktualita-item {
    animation: fadeInScale 0.5s ease forwards;
}

.eobce-aktualita-item:nth-child(1) { animation-delay: 0.05s; }
.eobce-aktualita-item:nth-child(2) { animation-delay: 0.1s; }
.eobce-aktualita-item:nth-child(3) { animation-delay: 0.15s; }
.eobce-aktualita-item:nth-child(4) { animation-delay: 0.2s; }
.eobce-aktualita-item:nth-child(5) { animation-delay: 0.25s; }
.eobce-aktualita-item:nth-child(6) { animation-delay: 0.3s; }
.eobce-aktualita-item:nth-child(7) { animation-delay: 0.35s; }
.eobce-aktualita-item:nth-child(8) { animation-delay: 0.4s; }

/* ========================================
   BEZ OBRÁZKU
   ======================================== */

.eobce-aktualita-item:not(:has(.aktualita-thumbnail)) {
    border-left: 4px solid #2c5530;
}

.eobce-aktualita-item:not(:has(.aktualita-thumbnail)) .aktualita-content {
    padding: 25px 30px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .eobce-aktuality-wrapper {
        margin: 20px 0;
        gap: 20px;
    }

    .eobce-aktuality-wrapper.layout-list,
    .eobce-aktuality-wrapper.layout-grid,
    .eobce-aktuality-wrapper.layout-cards {
        grid-template-columns: 1fr;
    }

    .layout-list .eobce-aktualita-item {
        flex-direction: column;
    }

    .layout-list .aktualita-thumbnail {
        width: 100%;
        height: 200px;
    }

    .aktualita-thumbnail {
        height: 180px;
    }

    .aktualita-content {
        padding: 20px;
    }

    .aktualita-title {
        font-size: 18px;
    }

    .aktualita-meta {
        flex-direction: column;
        gap: 8px;
    }

    .aktualita-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .eobce-aktuality-wrapper {
        margin: 15px 0;
        gap: 15px;
    }

    .aktualita-thumbnail {
        height: 160px;
    }

    .aktualita-content {
        padding: 15px;
    }

    .aktualita-title {
        font-size: 17px;
    }

    .aktualita-excerpt {
        font-size: 14px;
    }

    .aktualita-category {
        font-size: 11px;
        padding: 5px 12px;
    }
}
