/*
Theme Name:   Hello Elementor Child
Theme URI:    https://elementor.com/hello-theme/
Description:  Hello Elementor Child Theme — adds a custom single blog post layout with sidebar.
Author:       Your Site
Author URI:   https://elementor.com/
Template:     hello-elementor
Version:      1.0.0
Text Domain:  hello-elementor-child
*/

/* ────────────────────────────────────────────
   SINGLE POST LAYOUT
──────────────────────────────────────────── */

.single-post-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.single-post-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px;
    align-items: start;
}

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

/* ── Main article column ── */
.single-post-main {
    min-width: 0; /* prevent grid overflow */
}

.single-post-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 28px;
    background: #f0f0f0;
}
.single-post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.single-post-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 16px;
    color: #1a1a1a;
}

.single-post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.single-post-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.single-post-meta .meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}
.single-post-meta a {
    color: #666;
    text-decoration: none;
}
.single-post-meta a:hover {
    color: #1a1a1a;
}

/* ── Post content ── */
.single-post-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #2a2a2a;
}
.single-post-content > *:first-child { margin-top: 0; }
.single-post-content > *:last-child  { margin-bottom: 0; }

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    margin: 1.8em 0 0.6em;
    line-height: 1.3;
    color: #1a1a1a;
}
.single-post-content h2 { font-size: 1.6rem; }
.single-post-content h3 { font-size: 1.3rem; }
.single-post-content h4 { font-size: 1.1rem; }

.single-post-content p {
    margin: 0 0 1.2em;
}

.single-post-content a {
    color: #254c9d;
    text-decoration: underline;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
}

.single-post-content blockquote {
    margin: 1.5em 0;
    padding: 16px 20px;
    border-left: 4px solid #254c9d;
    background: #f6f7fa;
    font-style: italic;
    color: #444;
}

.single-post-content ul,
.single-post-content ol {
    padding-left: 1.5em;
    margin: 0 0 1.2em;
}
.single-post-content li {
    margin-bottom: 0.4em;
}

.single-post-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.single-post-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
}

/* ── Sidebar ── */
.single-post-sidebar {
    position: sticky;
    top: 20px;
}

.single-post-sidebar .widget {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 20px;
}
.single-post-sidebar .widget:last-child {
    margin-bottom: 0;
}

.single-post-sidebar .widget-title,
.single-post-sidebar h2.widget-title,
.single-post-sidebar h3.widget-title,
.single-post-sidebar .widgettitle {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    color: #1a1a1a;
}

.single-post-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.single-post-sidebar li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.92rem;
}
.single-post-sidebar li:last-child {
    border-bottom: none;
}
.single-post-sidebar a {
    color: #333;
    text-decoration: none;
}
.single-post-sidebar a:hover {
    color: #254c9d;
}

/* Fallback sidebar (when no widgets are assigned) */
.single-post-sidebar-fallback .widget {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 20px;
}
