/* ═══════════════════════════════════════════════════════════════
   Herodotus — Frontend Styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── Layout Container ───────────────────────────────────────── */
.herodotus-container {
    margin: 2em 0;
    text-align: left !important;
}

.herodotus-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-bottom: none;
    padding-bottom: 0;
    text-align: left !important;
}

/* ─── Date Separator ───────────────────────────────────────── */
.herodotus-date-separator {
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    color: #0073aa;
    margin: 0.5em 0 -15px;
    padding-bottom: 2px;
    text-align: left !important;
}

.herodotus-layout-compact .herodotus-date-separator {
    font-size: 0.8rem;
    margin: 12px 0 0;
    padding-bottom: 0px;
    border-bottom: none;
}

.herodotus-layout-compact .herodotus-date-separator:first-child {
    margin-top: 0;
}

/* ─── Grid ──────────────────────────────────────────────────── */
.herodotus-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.herodotus-layout-compact .herodotus-grid {
    gap: 5px;
}

/* ─── Card ──────────────────────────────────────────────────── */
.herodotus-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #eaeaea;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left !important;
    position: relative;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.herodotus-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #dcdcdc;
}

.herodotus-layout-compact .herodotus-card {
    margin-top: 4px;
    box-shadow: none;
}

.herodotus-layout-compact .herodotus-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: #dcdcdc;
}

/* ─── Image Wrap ────────────────────────────────────────────── */
.herodotus-card__image-link {
    flex-shrink: 0;
}

.herodotus-card__image-wrap {
    width: 120px !important;
    height: 150px !important;
    overflow: hidden !important;
    background: #f0f0f0;
    position: relative;
}

.herodotus-layout-list .herodotus-card__image-wrap {
    width: 120px !important;
    height: 150px !important;
}

.herodotus-layout-compact .herodotus-card__image-link {
    flex-shrink: 0;
    width: 50px !important;
    height: 65px !important;
}

.herodotus-layout-compact .herodotus-card__image-wrap {
    width: 50px !important;
    height: 65px !important;
    min-width: 50px !important;
    min-height: 65px !important;
    max-height: 65px !important;
    flex-shrink: 0 !important;
}

.herodotus-card__image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

/* ─── Body ──────────────────────────────────────────────────── */
.herodotus-card__body {
    padding: 12px 18px;
    flex: 1;
    text-align: left !important;
}

.herodotus-layout-compact .herodotus-card__body {
    padding: 5px 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 65px;
}

/* ─── Title ─────────────────────────────────────────────────── */
.herodotus-card__title {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.3;
    text-align: left !important;
}

.herodotus-card__title a {
    color: #333;
    text-decoration: none;
	font-weight: bold;
}

.herodotus-card__title a:hover {
    text-decoration: underline;
	color: #888;
}

.herodotus-layout-compact .herodotus-card__title {
	font-size: 0.78rem;
    margin-bottom: 4px;
}

.herodotus-layout-compact .herodotus-card__title a {
	color: #333 !important;
    text-decoration: none;
	font-weight: bold;
}

.herodotus-layout-compact .herodotus-card__title a:hover {
	text-decoration: underline;
	color: #888 !important;
}
/* ─── Year Badge ───────────────────────────────────────────── */
.herodotus-layout-list .herodotus-card__body:has(.herodotus-year-badge) {
    display: block;
}

.herodotus-year-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 22px;
    padding: 0 4px;
    margin-right: 8px;
    margin-bottom: 0;
    background: #0073aa;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 3px;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    white-space: nowrap;
}

.herodotus-layout-list .herodotus-year-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    margin: 0;
}

.herodotus-layout-list .herodotus-card__title {
    min-width: 0;
}

.herodotus-layout-list .herodotus-card__excerpt {
}

.herodotus-layout-list .herodotus-card__footer {
}

.herodotus-layout-compact .herodotus-year-badge {
    display: none;
}

@media (max-width: 768px) {
    .herodotus-year-badge {
        margin-top: 2px;
    }
}

/* ─── Excerpt ───────────────────────────────────────────────── */
.herodotus-card__excerpt {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #666;
    margin-bottom: 12px;
    text-align: left !important;
}

.herodotus-layout-compact .herodotus-card__excerpt {
    font-size: 0.7rem;
    line-height: 1.3;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.6em;
    word-break: break-word;
}

/* ─── Card Footer ────────────────────────────────────────────── */
.herodotus-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-right: 12px;
    flex-wrap: wrap;
    gap: 6px;
}

.herodotus-card__footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.herodotus-card__category-label,
.herodotus-card__tag-label {
    display: inline;
    font-size: 0.8rem;
    font-weight: 600;
}

.herodotus-card__category-label svg,
.herodotus-card__tag-label svg {
    display: inline-block;
    vertical-align: -2px;
    margin-right: 3px;
}

.herodotus-card__category-name,
.herodotus-card__read-more {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #0073aa !important;
    text-decoration: none !important;
}

.herodotus-card__tag-name {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #0073aa !important;
    text-decoration: none !important;
}

.herodotus-card__category-name:hover,
.herodotus-card__read-more:hover {
    color: #888 !important;
    text-decoration: underline !important;
}

.herodotus-card__tag-name:hover {
    color: #888 !important;
    text-decoration: underline !important;
}

/* ─── Empty State ───────────────────────────────────────────── */
.herodotus-empty {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border: 1px dashed #ccc;
    color: #666;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    /* Standard Layout (Main Content) */
    .herodotus-layout-list .herodotus-card {
        flex-direction: column !important;
    }
    .herodotus-layout-list .herodotus-card__image-link {
        width: 100% !important;
    }
    .herodotus-layout-list .herodotus-card__image-wrap {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
    }

    /* Compact Layout (Widget) - Force Square */
    .herodotus-layout-compact .herodotus-card {
        flex-direction: row !important;
    }
    .herodotus-layout-compact .herodotus-card__image-link {
        width: 50px !important;
        flex-shrink: 0 !important;
    }
    .herodotus-layout-compact .herodotus-card__image-wrap {
        width: 50px !important;
        height: 65px !important;
        flex-shrink: 0 !important;
    }
}
/* --- No Image Mode --- */
.herodotus-card--no-image {
    display: block;
}

.herodotus-card--no-image .herodotus-card__body {
    padding: 16px 18px;
}

/* --- Taxonomy Archive Page --- */
.herodotus-archive-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.herodotus-archive-header {
    text-align: center;
    margin-bottom: 30px;
}

.herodotus-archive-title {
    font-size: 1.8em;
    font-weight: 700;
    color: #222;
    margin: 0 0 12px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.herodotus-archive-date {
    font-size: 1.15em;
    font-weight: 600;
    color: #0073aa;
    margin: 0 0 16px;
}

.herodotus-archive-description {
    font-size: 0.95em;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.herodotus-archive-content .herodotus-container {
    margin-top: 0;
}

/* Hide "On this day..." header and date separator on archive pages */
.herodotus-archive-content .herodotus-header,
.herodotus-archive-content .herodotus-date-separator {
    display: none;
}

/* ─── Single Post ───────────────────────────────────────────── */
.herodotus-single__image img {
    width: 100%;
    height: auto;
    display: block;
}

.herodotus-single__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0 16px;
}

.herodotus-single__meta--no-image {
    margin-top: 16px;
}

.herodotus-single__title {
    margin-top: 0;
}

.herodotus-single__content {
    line-height: 1.7;
}
