/* ===========================================
   BLOG.CSS — Blog cards, article typography,
   breadcrumbs fix, author box, related posts
=========================================== */

/* ------------------------------------------
   BREADCRUMBS (fix ol list-style)
------------------------------------------ */
.breadcrumbs__list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    font-size: 0.875rem;
    opacity: 0.85;
}

.breadcrumbs__item {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.breadcrumbs__item + .breadcrumbs__item::before {
    content: '›';
    margin: 0 0.5rem;
    opacity: 0.6;
}

.breadcrumbs__link {
    color: var(--color-white);
    text-decoration: none;
    transition: opacity 0.15s;
}

.breadcrumbs__link:hover { opacity: 1; color: var(--color-accent-light); }

.breadcrumbs__current { opacity: 0.75; }

/* ------------------------------------------
   PAGE HEADER — Article / Archive
------------------------------------------ */
.page-header {
    padding: 3.5rem 0 3rem;
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.75);
}

.entry-meta .posted-on,
.entry-meta .reading-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ------------------------------------------
   BLOG CARDS (archive.php + related posts)
------------------------------------------ */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card__image {
    display: block;
    overflow: hidden;
    height: 210px;
    background: var(--color-bg-alt);
}

.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover .card__image img { transform: scale(1.05); }

.card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card__date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-bottom: 0.6rem;
}

.card__date::before {
    content: '📅';
    font-size: 0.75rem;
}

.card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.75rem;
    line-height: 1.35;
}

.card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.card__title a:hover { color: var(--color-accent); }

.card__excerpt {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
}

.card__excerpt p { margin-bottom: 0; }

/* ------------------------------------------
   BUTTONS (btn--primary, btn--sm)
------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--accent {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn--accent:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: var(--color-white);
}

.btn--sm {
    padding: 7px 14px;
    font-size: 0.825rem;
}

.btn--lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* ------------------------------------------
   ENTRY CONTENT — Article typography
------------------------------------------ */
.entry-thumbnail {
    margin-bottom: 2.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.entry-thumbnail__image {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text);
}

.entry-content > * + * { margin-top: 1.25rem; }

/* Headings inside article */
.entry-content h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--color-accent);
    line-height: 1.25;
}

.entry-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.entry-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Paragraphs */
.entry-content p {
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

/* Lists */
.entry-content ul,
.entry-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    padding: 0;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Blockquote */
.entry-content blockquote {
    border-left: 4px solid var(--color-accent);
    background: var(--color-bg-alt);
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text-light);
}

/* Tables */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.entry-content th {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

.entry-content td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.entry-content tr:nth-child(even) td { background: var(--color-bg-alt); }

/* CTA box inside content */
.entry-content .wp-block-button a {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    display: inline-block;
}

.entry-content .wp-block-button a:hover { background: var(--color-accent-dark); color: var(--color-white); }

/* ------------------------------------------
   AUTHOR BOX
------------------------------------------ */
.author-box {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.75rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-top: 3rem;
}

.author-box__avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--color-white);
    box-shadow: var(--shadow-md);
}

.author-box__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.author-box__bio {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}

/* ------------------------------------------
   RELATED POSTS
------------------------------------------ */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.related-posts__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

/* card--simple variant */
.card--simple {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: box-shadow 0.2s, transform 0.2s;
}

.card--simple:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.card--simple .card__image {
    height: 160px;
}

.card--simple .card__title {
    font-size: 0.95rem;
    padding: 0.8rem 1rem 0.25rem;
    margin: 0;
}

.card--simple .card__date {
    padding: 0 1rem 1rem;
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-muted);
    display: block;
}

/* ------------------------------------------
   RESPONSIVE
------------------------------------------ */
@media (max-width: 768px) {
    .entry-content h2 { font-size: 1.35rem; }
    .entry-content h3 { font-size: 1.15rem; }
    .author-box { flex-direction: column; }
    .author-box__avatar img { width: 56px; height: 56px; }

    .grid-3 .card + .card { margin-top: 0; }
}

@media (max-width: 640px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}
