/*!
 * CloudTart — Blog & Single Post Styles
 * Loaded conditionally on: single posts, archives, search results,
 * the default blog index, and authors. Inherits all colors and
 * typography from cloudtart-theme.css via CSS variables.
 *
 * Never overrides .blog__item-2 (already styled in main/theme).
 * Adds only NEW classes prefixed with .single__, .archive__,
 * .search__, and .blog__widget.
 */

/* ===========================================================
   COLOR / VARIABLE BRIDGE — all blog visuals defer to the
   theme palette so they automatically follow brand changes
   made in CloudTart Settings → Appearance.
   =========================================================== */
:root {
    --ct-blog-bg:           var(--secondary, #0d1b2e);
    --ct-blog-surface:      #162032;
    --ct-blog-text:         #e6e6e6;
    --ct-blog-muted:        #a3a3a3;
    --ct-blog-accent:       var(--primary, #d6b9a8);
    --ct-blog-accent-alt:   var(--accent, #d6b9a8);
    --ct-blog-border:       rgba(214, 185, 168, 0.18);
    --ct-blog-radius:       18px;
}

/* ===========================================================
   SINGLE POST HERO
   =========================================================== */
.single__hero {
    position: relative;
    padding: 140px 0 90px;
    overflow: hidden;
    background: linear-gradient(135deg, #162032 0%, #182338 50%, #162032 100%);
}
.single__hero--has-image { padding: 200px 0 100px; min-height: 60vh; display: flex; align-items: flex-end; }

.single__hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: .55;
    transform: scale(1.02);
    z-index: 0;
}
.single__hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(180deg, rgba(13, 27, 46,.25) 0%, rgba(13, 27, 46,.85) 100%),
        radial-gradient(circle at 30% 0%, rgba(214, 185, 168,.12), transparent 60%);
}
.single__hero .container { position: relative; z-index: 2; }

.single__hero-cat {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 16px;
    border: 1px solid var(--ct-blog-border);
    border-radius: 999px;
    color: var(--ct-blog-accent);
    font-size: 0.8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all .25s ease;
}
.single__hero-cat:hover {
    background: var(--ct-blog-accent);
    color: var(--ct-blog-bg);
    border-color: var(--ct-blog-accent);
}

.single__hero-title {
    color: #fff;
    margin: 0 0 24px;
    font-size: clamp(2rem, 5vw, 3.75rem);
    line-height: 1.15;
    letter-spacing: -0.5px;
    text-align: left;
}

.single__hero-meta {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-wrap: wrap;
    gap: 12px 28px;
    color: var(--ct-blog-muted);
    font-size: 0.95rem;
}
.single__hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.single__hero-meta i  { color: var(--ct-blog-accent); }
.single__hero-meta a  { color: inherit; text-decoration: none; transition: color .2s ease; }
.single__hero-meta a:hover { color: var(--ct-blog-accent); }

/* ===========================================================
   SINGLE CONTENT TYPOGRAPHY
   ===========================================================
   The reading column lives over the same dark luxury surface
   as the rest of the theme so the post page reads as part of
   the same product, not a "WordPress article" pasted on top.
*/
.single__content-area {
    background: linear-gradient(180deg, #0d1b2e 0%, #182338 100%);
    color: var(--ct-blog-text);
    position: relative;
}
.single__content-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(214, 185, 168, 0.08), transparent 50%);
    pointer-events: none;
}
.single__content-area > .container { position: relative; z-index: 1; }

.single__content {
    color: var(--ct-blog-text);
    font-size: 1.075rem;
    line-height: 1.85;
}
.single__content > * + * { margin-top: 1.4em; }
.single__content h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-top: 2em; margin-bottom: .6em; line-height: 1.25; }
.single__content h3 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); margin-top: 1.6em; }
.single__content h4 { font-size: 1.25rem; }
.single__content p   { margin: 0 0 1.2em; }
.single__content a   {
    color: var(--ct-blog-accent-alt);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.single__content a:hover { color: var(--ct-blog-accent); text-decoration-thickness: 2px; }
.single__content img,
.single__content .wp-block-image img {
    border-radius: var(--ct-blog-radius);
    max-width: 100%; height: auto;
    margin: 1.5em auto;
    display: block;
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
}
.single__content blockquote {
    margin: 2em 0;
    padding: 1.5em 1.8em;
    border-left: 4px solid var(--ct-blog-accent);
    background: rgba(214, 185, 168,.06);
    border-radius: 0 var(--ct-blog-radius) var(--ct-blog-radius) 0;
    font-size: 1.15rem;
    font-style: italic;
    color: #f3e8de;
}
.single__content blockquote p:last-child { margin-bottom: 0; }
.single__content ul,
.single__content ol { padding-left: 1.5em; margin: 0 0 1.4em; }
.single__content li { margin-bottom: 0.5em; }
.single__content code {
    background: #162032; color: #d6b9a8;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.92em;
}
.single__content pre {
    background: #162032; color: #f1f1f1;
    padding: 1.25em 1.5em;
    border-radius: var(--ct-blog-radius);
    overflow-x: auto;
}
.single__content pre code { background: transparent; padding: 0; }
.single__content figure { margin: 1.5em 0; }
.single__content figcaption {
    color: #777;
    font-size: 0.92em;
    text-align: center;
    margin-top: 8px;
}
.single__content hr {
    border: 0;
    border-top: 1px solid var(--ct-blog-border);
    margin: 2.5em auto;
    max-width: 200px;
}
.single__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}
.single__content th, .single__content td {
    border: 1px solid rgba(214, 185, 168, 0.18);
    padding: 12px 16px;
    text-align: left;
    color: var(--ct-blog-text);
}
.single__content th {
    background: rgba(214, 185, 168, 0.08);
    color: var(--ct-blog-accent);
    font-weight: 600;
}

/* ===========================================================
   TAGS
   =========================================================== */
.single__tags {
    margin: 50px 0 30px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
}
.single__tags-label {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 0.78rem;
    color: #999;
}
.single__tag-chip {
    display: inline-flex; align-items: center;
    padding: 6px 14px;
    background: #f3e8de;
    color: #162032;
    border-radius: 999px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all .2s ease;
}
.single__tag-chip:hover {
    background: var(--ct-blog-accent);
    color: var(--ct-blog-bg);
}

/* ===========================================================
   SHARE
   =========================================================== */
.single__share {
    margin: 30px 0 50px;
    padding: 24px 28px;
    background: #f6f3ec;
    border-radius: var(--ct-blog-radius);
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
}
.single__share-label {
    font-size: 0.85rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #162032;
    font-weight: 600;
}
.single__share-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 10px;
}
.single__share-list a,
.single__share-list .single__share-copy {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: #fff;
    color: #162032;
    border: 1px solid var(--ct-blog-border);
    transition: all .25s ease;
    cursor: pointer;
}
.single__share-list a:hover,
.single__share-list .single__share-copy:hover {
    background: var(--ct-blog-accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(214, 185, 168,.25);
}
.single__share-copy.is-copied { background: #4caf50; color: #fff; }

/* ===========================================================
   AUTHOR CARD
   =========================================================== */
.single__author {
    margin: 60px 0;
    padding: 32px;
    display: flex; gap: 24px; align-items: flex-start;
    background: linear-gradient(135deg, #162032 0%, #1e2d42 100%);
    color: #fff;
    border-radius: var(--ct-blog-radius);
    position: relative; overflow: hidden;
}
.single__author::before {
    content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%;
    background: radial-gradient(circle, rgba(214, 185, 168,.15), transparent 60%);
    pointer-events: none;
}
.single__author-avatar img,
.single__author-img {
    width: 88px; height: 88px;
    border-radius: 50%;
    border: 2px solid var(--ct-blog-accent);
    object-fit: cover;
}
.single__author-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.single__author-label {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--ct-blog-accent);
    margin-bottom: 6px;
}
.single__author-name {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 12px;
}
.single__author-bio {
    color: var(--ct-blog-muted);
    margin: 0 0 14px;
    font-size: 0.98rem;
    line-height: 1.6;
}
.single__author-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ct-blog-accent);
    text-decoration: none;
    font-weight: 500;
    transition: gap .25s ease;
}
.single__author-link:hover { gap: 14px; color: #fff; }

/* ===========================================================
   PREV / NEXT NAVIGATION
   =========================================================== */
.single__nav {
    margin: 50px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.single__nav-link {
    display: flex; align-items: center; gap: 16px;
    padding: 22px 26px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--ct-blog-radius);
    text-decoration: none;
    color: #162032;
    transition: all .3s ease;
    min-width: 0;
}
.single__nav-link:hover {
    border-color: var(--ct-blog-accent);
    box-shadow: 0 12px 30px rgba(13, 27, 46,.08);
    transform: translateY(-3px);
}
.single__nav-prev { text-align: left; }
.single__nav-next { text-align: right; justify-content: flex-end; }
.single__nav-arrow {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--ct-blog-accent);
    color: var(--ct-blog-bg);
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .3s ease;
}
.single__nav-link:hover .single__nav-arrow { transform: scale(1.08); }
.single__nav-text { display: flex; flex-direction: column; min-width: 0; }
.single__nav-label {
    font-size: 0.72rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 4px;
}
.single__nav-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #162032;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ===========================================================
   RELATED POSTS WRAPPER
   =========================================================== */
.single__related { background: var(--ct-blog-bg); }
.single__related .header_v3 { color: #fff; letter-spacing: .12em; }

/* ===========================================================
   COMMENTS
   =========================================================== */
/* Luxury dark comments — match the navy + rose-gold blog theme (no white boxes).
   The comments are their own <section> (outside .single__content-area), so give
   them the same navy gradient + a soft rose-gold glow instead of the white page. */
.single__comments-area {
    background: linear-gradient(180deg, #182338 0%, #0d1b2e 100%);
    position: relative;
}
.single__comments-area::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(214, 185, 168, 0.08), transparent 55%);
    pointer-events: none;
}
.single__comments-area > .container { position: relative; z-index: 1; }
.single__comments-title {
    margin-bottom: 32px;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: #ffffff;
}
.single__comments-list { list-style: none; padding: 0; margin: 0 0 40px; }
.single__comments-list .children { list-style: none; padding-left: 40px; margin-top: 20px; }
.single__comment { margin-bottom: 24px; }
.single__comment-inner {
    padding: 24px;
    background: #162032;                              /* navy-mid card */
    border: 1px solid rgba(214, 185, 168, 0.18);      /* rose-gold hairline */
    border-radius: var(--ct-blog-radius);
}
.single__comment-head {
    display: flex; gap: 16px; align-items: center;
    margin-bottom: 14px;
}
.single__comment-avatar img {
    border-radius: 50%;
    border: 2px solid var(--ct-blog-accent);
}
.single__comment-author {
    margin: 0;
    font-size: 1.05rem;
    color: #ffffff;
}
.single__comment-date {
    font-size: 0.85rem;
    color: var(--ct-blog-muted);
    text-decoration: none;
}
.single__comment-date:hover { color: var(--ct-blog-accent); }
.single__comment-body { color: var(--ct-blog-text); line-height: 1.7; }
.single__comment-body p { margin: 0 0 1em; }
.single__comment-body p:last-child { margin-bottom: 0; }
.single__comment-footer { margin-top: 14px; text-align: right; }
.single__comment-footer a {
    color: var(--ct-blog-accent);
    font-size: 0.92rem;
    text-decoration: none;
}
.single__comment-footer a:hover { color: #ffffff; }
.single__comment-pending {
    display: block;
    color: #d6b9a8;
    font-style: italic;
    margin: 0 0 12px;
}

.single__comment-reply-title { margin-bottom: 18px; color: #ffffff; }
.single__comments-closed { color: var(--ct-blog-muted); font-style: italic; }

.single__comment-form {
    background: #162032;
    padding: 32px;
    border-radius: var(--ct-blog-radius);
    border: 1px solid rgba(214, 185, 168, 0.18);
}
.single__comment-form p { margin-bottom: 16px; }
.single__comment-form label {
    display: block;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 6px;
    font-size: 0.92rem;
}
.single__comment-form input[type="text"],
.single__comment-form input[type="email"],
.single__comment-form input[type="url"],
.single__comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(214, 185, 168, 0.22);
    border-radius: 10px;
    font-size: 1rem;
    background: #0d1b2e;                  /* navy field */
    color: var(--ct-blog-text);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.single__comment-form input::placeholder,
.single__comment-form textarea::placeholder { color: rgba(214, 185, 168, 0.5); }
.single__comment-form input:focus,
.single__comment-form textarea:focus {
    outline: none;
    border-color: var(--ct-blog-accent);
    box-shadow: 0 0 0 3px rgba(214, 185, 168, 0.14);
}
.single__comment-notes,
.single__comment-form .comment-notes,
.single__comment-form .logged-in-as {
    font-size: 0.9rem;
    color: var(--ct-blog-muted);
}
.single__comment-form .logged-in-as a,
.single__comment-notes a { color: var(--ct-blog-accent); }
.single__comment-submit-wrap { margin-top: 12px; }
/* Submit button — glossy rose-gold pill with navy text (matches site accent). */
.single__comment-form input[type="submit"],
.single__comment-form .submit,
.single__comment-submit-wrap .submit,
#commentform #submit {
    background: linear-gradient(135deg, #e7d3c5 0%, #d6b9a8 50%, #b08d6b 100%) !important;
    color: #0d1b2e !important;
    border: none !important;
    padding: 14px 34px !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(214, 185, 168, 0.35) !important;
    transition: transform .25s ease, box-shadow .25s ease !important;
}
.single__comment-form input[type="submit"]:hover,
.single__comment-form .submit:hover,
#commentform #submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(214, 185, 168, 0.5) !important;
}

/* ===========================================================
   ARCHIVE / SEARCH HERO
   =========================================================== */
.archive__hero {
    position: relative;
    padding: 140px 0 80px;
    overflow: hidden;
    background: linear-gradient(135deg, #162032 0%, #1e2d42 50%, #162032 100%);
    color: #fff;
}
.archive__hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(214, 185, 168,.16), transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(214, 185, 168,.14), transparent 50%);
    pointer-events: none;
}
.archive__hero .container { position: relative; z-index: 1; }
.archive__hero-subtitle {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 16px;
    border: 1px solid var(--ct-blog-border);
    border-radius: 999px;
    color: var(--ct-blog-accent);
    font-size: 0.78rem;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.archive__hero-title {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.75rem);
    line-height: 1.15;
    margin: 0 0 20px;
    text-align: left;
}
.archive__hero-desc {
    color: var(--ct-blog-muted);
    font-size: 1.05rem;
    max-width: 720px;
    line-height: 1.7;
}
/* Archive / search hero search bar — layout managed by cloudtart-overrides.css */
.archive__hero-search { margin-top: 28px; }

.archive__empty {
    font-size: 1.15rem;
    color: #777;
    padding: 60px 0;
}
.archive__pagination-wrap { margin-top: 60px; }
.archive__pagination-wrap .nav-links {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.archive__pagination-wrap .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #eee;
    color: #162032;
    text-decoration: none;
    transition: all .25s ease;
}
.archive__pagination-wrap .page-numbers:hover,
.archive__pagination-wrap .page-numbers.current {
    background: var(--ct-blog-accent);
    color: var(--ct-blog-bg);
    border-color: var(--ct-blog-accent);
}

/* Card excerpt addition for archive/search */
.blog__excerpt-2 {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 8px 0 0;
}

/* ===========================================================
   SIDEBAR WIDGETS
   =========================================================== */
.blog__sidebar { display: flex; flex-direction: column; gap: 32px; }
.blog__widget {
    padding: 24px;
    background: #fff;
    border-radius: var(--ct-blog-radius);
    border: 1px solid #eee;
}
.blog__widget-title {
    font-size: 1.15rem;
    margin: 0 0 16px;
    color: #162032;
    position: relative;
    padding-bottom: 12px;
}
.blog__widget-title::after {
    content: '';
    position: absolute; left: 0; bottom: 0;
    width: 40px; height: 3px;
    background: var(--ct-blog-accent);
    border-radius: 3px;
}
.blog__widget-list { list-style: none; padding: 0; margin: 0; }
.blog__widget-list li + li { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1f1f1; }
.blog__widget-list a {
    display: flex; flex-direction: column;
    gap: 4px;
    color: #162032;
    text-decoration: none;
    transition: color .2s ease;
}
.blog__widget-list a:hover { color: var(--ct-blog-accent-alt); }
.blog__widget-date {
    font-size: 0.78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #999;
}
.blog__widget-link { font-weight: 500; line-height: 1.4; }
.blog__widget-cats li {
    display: block;
    border: 0; padding: 0; margin-top: 8px;
}
.blog__widget-cats a {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8f8f8;
}
.blog__widget-cats a:hover { background: #f3e8de; }
.blog__widget-count {
    background: var(--ct-blog-accent);
    color: var(--ct-blog-bg);
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.blog__widget--cta {
    background: linear-gradient(135deg, #162032 0%, #1e2d42 100%);
    color: #fff;
    text-align: center;
    border-color: transparent;
}
.blog__widget--cta .blog__widget-title { color: #fff; }
.blog__widget--cta .blog__widget-title::after { left: 50%; transform: translateX(-50%); }
.blog__widget--cta p { color: var(--ct-blog-muted); margin-bottom: 16px; }
.blog__widget-empty { color: #aaa; font-style: italic; }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 991px) {
    .single__hero        { padding: 100px 0 60px; }
    .single__hero--has-image { padding: 140px 0 70px; min-height: auto; }
    .single__hero-title  { font-size: clamp(1.75rem, 6vw, 2.75rem); }
    .single__nav         { grid-template-columns: 1fr; }
    .single__nav-next    { justify-content: flex-start; text-align: left; flex-direction: row-reverse; }
    .single__nav-next .single__nav-text { text-align: left; }
    .single__author      { flex-direction: column; text-align: center; align-items: center; padding: 24px; }
}
@media (max-width: 767px) {
    .single__hero        { padding: 80px 0 50px; }
    .single__hero--has-image { padding: 110px 0 60px; }
    .single__hero-meta   { gap: 8px 18px; font-size: 0.85rem; }
    .single__content     { font-size: 1rem; line-height: 1.75; }
    .single__share       { padding: 18px 20px; gap: 12px; }
    .single__share-list a, .single__share-list .single__share-copy { width: 38px; height: 38px; }
    .single__comments-list .children { padding-left: 16px; }
    .single__comment-form { padding: 20px; }
    .archive__hero       { padding: 100px 0 60px; }
}

/* RTL-specific tweaks: keep the navigation arrows pointing the right way */
html[dir="rtl"] .single__nav-prev,
html[dir="rtl"] .single__nav-next .single__nav-text { text-align: right; }
html[dir="rtl"] .single__hero-title,
html[dir="rtl"] .archive__hero-title { text-align: right; }
html[dir="rtl"] .single__share-list a:hover { transform: translateY(-2px); }
html[dir="rtl"] .single__author-link:hover { gap: 14px; }
html[dir="rtl"] .single__content blockquote {
    border-left: 0;
    border-right: 4px solid var(--ct-blog-accent);
    border-radius: var(--ct-blog-radius) 0 0 var(--ct-blog-radius);
}
html[dir="rtl"] .single__content ul,
html[dir="rtl"] .single__content ol { padding-left: 0; padding-right: 1.5em; }
html[dir="rtl"] .blog__widget-title::after { left: auto; right: 0; }
