/* #region Hero — High Impact Above the Fold (D. Banner | E. Title & CTA | F. Lead Form) */

/* D. Large Banner/Image — full-width, project-branded background */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}

.hero-banner {
    position: absolute;
    inset: 0;
    background-color: #1a365d;
    background-image: url('/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.45) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
}

/* E. Primary Lead Magnet Title & CTA — large, compelling headline */
.hero-lead-magnet-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 0.75rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-lead-magnet-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    opacity: 0.95;
    margin: 0 0 2rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* F. Lead Capture Form — integrated into banner, prominent CTA */
.hero-lead-form {
    max-width: 520px;
    margin: 0 auto;
}

.hero-lead-form-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: stretch;
}

.hero-lead-email {
    flex: 1;
    min-width: 200px;
}

.hero-lead-email input {
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
}

.hero-lead-email input::placeholder {
    color: #666;
}

.hero-lead-email input:focus {
    border-color: var(--rz-success, #2e7d32);
    outline: none;
}

.hero-lead-cta {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.hero-lead-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-lead-validation {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.95);
    list-style: none;
    padding: 0;
}

.hero-lead-validation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 540px) {
    .hero-lead-form-inner {
        flex-direction: column;
    }

    .hero-lead-email {
        min-width: 100%;
    }

    .hero-lead-cta {
        min-width: 100%;
    }
}

/* #endregion Hero */

/* #region Latest Articles Implementation */

/* --- SECTION 2 STYLING --- */

.section-container {
    background-color: var(--rz-base-background);
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem !important; /* Add generous padding */
}

.section-title-separator {
    /* A clean line to separate the sections visually */
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rz-primary-dark);
    display: inline-block;
    color: var(--rz-text-color);
}

.article-card-modern {
    /* Base modern card styles */
    border-radius: 12px !important;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    padding: 0 !important; /* Control padding via internal div */
    border: 1px solid var(--rz-base-300); /* Subtle border */
}

    .article-card-modern:hover {
        /* Elevated and interactive hover effect */
        transform: translateY(-8px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    }

.card-image-placeholder {
    /* Ensures the thumbnail takes a fixed space and is responsive */
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
    /* Since we set padding:0 on RadzenCard, we only need to round the top */
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Text Consistency and Truncation */
.article-title-clamp {
    /* Limits title to 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-excerpt-clamp {
    /* Limits excerpt to 3 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 4.5rem; /* Forces consistent height for visual alignment */
}

.latest-sections {
    width: 100%;
}

.latest-block {
    margin-bottom: 2rem;
}

.latest-block-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 900px) {
    .latest-block-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .latest-block-grid {
        grid-template-columns: 1fr;
    }
}

.article-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-card-content {
    padding: 1rem 1.25rem;
}

.article-card-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--rz-primary-light, #e3f2fd);
    color: var(--rz-primary-dark, #0d47a1);
    margin-bottom: 0.5rem;
}

.article-card-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    line-height: 1.35;
}

.article-card-date {
    display: block;
    font-size: 0.875rem;
    color: var(--rz-base-600, #666);
}

.card-image-fallback {
    background: linear-gradient(135deg, var(--rz-base-200, #eee) 0%, var(--rz-base-300, #e0e0e0) 100%);
}

.latest-block-empty {
    grid-column: 1 / -1;
    color: var(--rz-base-600, #666);
    font-style: italic;
    margin: 0;
}

/* #endregion Latest Articles Implementation */

/* #region Post View (public single post) */
.post-view {
    padding-top: 0;
}

/* Row 1: Featured image on its own full-width row */
.post-view-image-row {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: var(--rz-border-radius, 4px);
    overflow: hidden;
}

.post-view-image-row .post-view-image {
    width: 100%;
    margin: 0;
    min-height: 280px;
    background-size: cover;
    background-position: center;
    border-radius: var(--rz-border-radius, 4px);
}

.post-view-inner {
    background-color: var(--rz-base-background);
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.post-view-inner .post-view-header {
    padding-top: 0;
}

/* Grid: article title + content (left) | more section / sidebar (right) */
.post-view-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
    margin-top: 0;
}

@media (max-width: 900px) {
    .post-view-layout {
        grid-template-columns: 1fr;
    }
}

.post-view-content {
    min-width: 0;
}

.post-view-sidebar {
    position: sticky;
    top: calc(var(--public-header-height, 60px) + 1rem);
}

@media (max-width: 900px) {
    .post-view-sidebar {
        position: static;
    }
}

.post-view-image {
    overflow: hidden;
}

.post-view-header {
    margin-bottom: 1.5rem;
}

.post-view-breadcrumb {
    margin-bottom: 0.75rem;
}

.post-view-breadcrumb :deep(.rz-breadcrumb) {
    font-size: 0.875rem;
    color: var(--rz-base-600, #666);
}

.post-view-title {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    line-height: 1.25;
    color: var(--rz-text-color, #212121);
}

/* Single line: date · reading time · Share: [buttons] */
.post-view-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1rem;
    margin: 0 0 1rem 0;
    font-size: 0.9375rem;
    color: var(--rz-base-600, #666);
}

.post-view-meta-line .post-view-meta {
    display: inline-flex;
    align-items: center;
    gap: 0 0.25rem;
    margin: 0;
}

.post-view-meta-sep {
    color: var(--rz-base-500, #999);
    user-select: none;
}

.post-view-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.post-view-share-label {
    font-size: 0.875rem;
    color: var(--rz-base-600, #666);
    margin-right: 0.25rem;
}

.post-view-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--rz-base-400, #bdbdbd);
    border-radius: var(--rz-border-radius, 4px);
    color: var(--rz-base-700, #424242);
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.post-view-share-link svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.post-view-share-link:hover {
    background-color: var(--rz-base-100, #f5f5f5);
    border-color: var(--rz-base-500, #9e9e9e);
}

.post-view-share-link--x:hover { color: #000; border-color: #000; }
.post-view-share-link--facebook:hover { color: #1877f2; border-color: #1877f2; }
.post-view-share-link--linkedin:hover { color: #0a66c2; border-color: #0a66c2; }
.post-view-share-link--pinterest:hover { color: #bd081c; border-color: #bd081c; }

.post-view-toc {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--rz-base-50, #fafafa);
    border-radius: var(--rz-border-radius, 4px);
    border: 1px solid var(--rz-base-200, #eee);
}

.post-view-toc-title {
    margin-bottom: 0.5rem;
    display: block;
}

.post-view-toc-link {
    display: block;
    font-size: 0.9375rem;
    color: var(--rz-primary, #1976d2);
    text-decoration: none;
}

.post-view-toc-link:hover {
    text-decoration: underline;
}

.post-view-body {
    line-height: 1.65;
}

/* Images inside post content: expand only within content width, no overflow */
.post-view-body :deep(img) {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--rz-border-radius, 4px);
}

.post-view-body :deep(p) {
    margin-bottom: 1rem;
}

.post-view-body :deep(h2) {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-view-body :deep(h3) {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.post-view-related {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rz-base-200, #eee);
}

.post-view-related-title {
    margin-bottom: 0.75rem;
    display: block;
}

.post-view-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-view-related-list li {
    margin-bottom: 0.5rem;
}

.post-view-related-link {
    color: var(--rz-primary, #1976d2);
    text-decoration: none;
}

.post-view-related-link:hover {
    text-decoration: underline;
}

.post-view-affiliate-callout {
    margin-top: 1.5rem;
}

.post-view-author-bio {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rz-base-200, #eee);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-view-author-link {
    color: var(--rz-primary, #1976d2);
    text-decoration: none;
    font-size: 0.9375rem;
}

.post-view-author-link:hover {
    text-decoration: underline;
}

.post-view-sidebar-card {
    background: var(--rz-base-50, #fafafa);
    border: 1px solid var(--rz-base-200, #eee);
    border-radius: var(--rz-border-radius, 4px);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.post-view-sidebar-card:last-child {
    margin-bottom: 0;
}

.post-view-sidebar-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.post-view-sidebar-list li {
    margin-bottom: 0.5rem;
}

.post-view-sidebar-link {
    font-size: 0.9375rem;
    color: var(--rz-primary, #1976d2);
    text-decoration: none;
}

.post-view-sidebar-link:hover {
    text-decoration: underline;
}

/* Comment form validation messages — red, underneath field */
.comment-validation-error {
    display: block;
    color: #c62828;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* #endregion Post View */

/* #region Public Not Found (404) */
.not-found-public {
    max-width: 600px;
    margin: 4rem auto;
    padding: 2rem 1.5rem;
    text-align: center;
}

.not-found-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--rz-text-color, #212121);
}

.not-found-message {
    color: var(--rz-base-600, #666);
    margin-bottom: 1.5rem;
}

.not-found-link {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--rz-primary, #1976d2);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
}

.not-found-link:hover {
    background: var(--rz-primary-dark, #1565c0);
    color: #fff;
}

/* #endregion Public Not Found */