/* =========================================================
   DULICHNGAY.NET - HOME
   ========================================================= */

:root{
    --primary:#087E8B;
    --primary-dark:#066875;
    --secondary:#2A9D8F;
    --accent:#F4A261;
    --bg:#FAF9F5;
    --soft:#F0F5F3;
    --white:#fff;
    --text:#173042;
    --muted:#6B7980;
    --border:#E3E9E7;
    --shadow:0 8px 28px rgba(23,48,66,.075);
    --shadow-hover:0 16px 36px rgba(23,48,66,.13);
    --radius:16px;
    --ease:.3s ease;
}

*,
*::before,
*::after{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:"Be Vietnam Pro",sans-serif;
    line-height:1.65;
    overflow-x:hidden;
}

img{display:block;width:100%}
a{text-decoration:none;color:inherit;transition:var(--ease)}
button,input{font:inherit}
button{cursor:pointer}
.container{width:min(1240px,100%);margin:auto;padding:0 24px}

.reading-progress{
    position:fixed;
    top:0;
    left:0;
    height:4px;
    width:0;
    background:var(--accent);
    z-index:9999;
}

/* HEADER */
.main-header{
    height:76px;
    position:sticky;
    top:0;
    z-index:1000;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(12px);
    border-bottom:1px solid rgba(23,48,66,.06);
    transition:var(--ease);
}
.main-header.scrolled{box-shadow:0 6px 24px rgba(0,0,0,.07)}
.header-inner{
    height:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:25px;
}
.logo{
    font-size:24px;
    font-weight:800;
    letter-spacing:-.7px;
    white-space:nowrap;
}
.logo span{color:var(--primary)}

.desktop-nav{
    display:flex;
    align-items:center;
    gap:25px;
}
.desktop-nav a{
    position:relative;
    font-size:13.5px;
    font-weight:600;
}
.desktop-nav a:hover{color:var(--primary)}
.desktop-nav a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-8px;
    width:0;
    height:2px;
    background:var(--primary);
    transition:var(--ease);
}
.desktop-nav a:hover::after{width:100%}

.header-actions{display:flex;align-items:center;gap:5px}
.icon-btn,.menu-toggle,.drawer-close{
    width:40px;height:40px;border:0;border-radius:10px;
    background:transparent;color:var(--text);
}
.icon-btn{font-size:25px;line-height:1}
.icon-btn:hover,.menu-toggle:hover,.drawer-close:hover{background:var(--soft)}
.menu-toggle{display:none;font-size:21px}

/* MOBILE DRAWER */
.mobile-overlay{
    position:fixed;inset:0;background:rgba(0,0,0,.42);
    opacity:0;visibility:hidden;z-index:1900;transition:var(--ease);
}
.mobile-overlay.active{opacity:1;visibility:visible}
.mobile-drawer{
    position:fixed;top:0;right:-100%;width:min(370px,88vw);height:100vh;
    background:var(--white);z-index:2000;padding:24px;
    box-shadow:-12px 0 35px rgba(0,0,0,.12);transition:right .35s ease;
}
.mobile-drawer.active{right:0}
.drawer-head{
    display:flex;align-items:center;justify-content:space-between;
    padding-bottom:22px;border-bottom:1px solid var(--border);
}
.drawer-close{font-size:29px}
.mobile-drawer nav{display:flex;flex-direction:column;margin-top:14px}
.mobile-drawer nav a{
    padding:17px 0;border-bottom:1px solid var(--border);
    font-weight:600;
}
.mobile-drawer nav a:hover{color:var(--primary)}

/* HERO */
.hero{
    height:410px;
    position:relative;
    display:flex;
    align-items:center;
    margin-bottom:68px;
    overflow:hidden;
    color:var(--white);
}
.hero-bg{
    position:absolute;inset:0;
    background:url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=2000") center/cover no-repeat;
}
.hero-shade{
    position:absolute;inset:0;
    background:linear-gradient(90deg,rgba(13,39,52,.88),rgba(13,39,52,.58) 47%,rgba(13,39,52,.18));
}
.hero-content{position:relative;z-index:1;max-width:760px}
.eyebrow-pill{
    display:inline-block;background:var(--accent);color:#fff;
    border-radius:50px;padding:5px 14px;font-size:11px;font-weight:800;
    text-transform:uppercase;letter-spacing:.8px;
}
.hero h1{
    max-width:690px;margin:15px 0 10px;
    font-size:clamp(32px,4.2vw,50px);line-height:1.13;letter-spacing:-1px;
}
.hero p{
    max-width:620px;margin:0 0 22px;
    font-size:16px;color:rgba(255,255,255,.9);
}
.hero-search{
    width:min(600px,100%);display:flex;gap:7px;
    padding:6px;background:#fff;border-radius:11px;
    box-shadow:0 10px 28px rgba(0,0,0,.16);
}
.hero-search input{
    flex:1;min-width:0;border:0;outline:0;padding:0 14px;
    color:var(--text);font-size:14px;
}
.hero-search button{
    border:0;border-radius:8px;padding:12px 19px;
    background:var(--primary);color:#fff;font-weight:700;
}
.hero-search button:hover{background:var(--primary-dark)}

/* SECTION */
.category-section{padding:0 24px;margin-bottom:28px}
.section-soft{max-width:none;padding:40px 0;background:var(--soft)}
.section-soft > .container{max-width:1240px;margin:auto;padding:0 24px}
.section-head{
    display:flex;justify-content:space-between;align-items:end;gap:20px;
    margin-bottom:25px;
}
.section-kicker{
    display:block;color:var(--primary);font-size:11px;font-weight:800;
    text-transform:uppercase;letter-spacing:1px;margin-bottom:4px;
}
.section-kicker.light{color:#BFE8E3}
.section-head h2{font-size:29px;line-height:1.2;margin:0;letter-spacing:-.5px}
.more-link{font-size:13px;color:var(--primary);font-weight:700;white-space:nowrap}
.more-link:hover{color:var(--accent)}

/* CATEGORY LAYOUT */
.category-layout{
    display:grid;
    grid-template-columns:minmax(0,1.16fr) minmax(0,.84fr);
    gap:26px;
}
.featured-post{
    background:#fff;border:1px solid var(--border);border-radius:var(--radius);
    overflow:hidden;box-shadow:var(--shadow);
    transition:var(--ease);
}
.featured-post:hover{transform:translateY(-4px);box-shadow:var(--shadow-hover)}
.featured-image{display:block;height:325px;overflow:hidden}
.featured-image img{height:100%;object-fit:cover;transition:transform .5s ease}
.featured-post:hover .featured-image img{transform:scale(1.04)}
.featured-copy{padding:22px 24px 24px}
.tag{
    display:block;color:var(--primary);font-size:10.5px;font-weight:800;
    text-transform:uppercase;letter-spacing:.55px;margin-bottom:5px;
}
.featured-copy h3{
    margin:0 0 9px;font-size:24px;line-height:1.34;letter-spacing:-.3px;
}
.featured-copy h3 a:hover{color:var(--primary)}
.featured-copy p{margin:0 0 15px;color:var(--muted);font-size:14px;line-height:1.7}
.post-meta{font-size:11.5px;color:#8A969B}

/* LIST POSTS */
.post-list{
    background:#fff;border:1px solid var(--border);border-radius:var(--radius);
    padding:8px 20px;box-shadow:var(--shadow);
}
.list-post{
    display:grid;grid-template-columns:132px minmax(0,1fr);
    gap:15px;padding:16px 0;border-bottom:1px solid var(--border);
}
.list-post:last-child{border-bottom:0}
.thumb{
    display:block;height:96px;border-radius:10px;overflow:hidden;
}
.thumb img{height:100%;object-fit:cover;transition:transform .4s ease}
.list-post:hover .thumb img{transform:scale(1.05)}
.list-post h3{font-size:15px;line-height:1.45;margin:0 0 8px}
.list-post h3 a:hover{color:var(--primary)}

/* CTA */
.closing-cta{padding:0 0 78px}
.cta-box{
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    border-radius:20px;padding:38px 44px;color:#fff;
    display:flex;align-items:center;justify-content:space-between;gap:25px;
}
.cta-box h2{margin:4px 0 6px;font-size:28px;line-height:1.25}
.cta-box p{margin:0;color:rgba(255,255,255,.82);font-size:14px}
.cta-button{
    flex:none;background:#fff;color:var(--primary);
    border-radius:9px;padding:12px 20px;font-size:13px;font-weight:800;
}
.cta-button:hover{transform:translateY(-2px)}

/* FOOTER */
.main-footer{background:var(--text);color:rgba(255,255,255,.68);padding:58px 0 25px}
.footer-grid{display:grid;grid-template-columns:2fr 1fr;gap:80px}
.footer-brand .logo{color:#fff}
.footer-brand p{max-width:500px;margin:15px 0 0;font-size:13px;line-height:1.8}
.footer-links{display:flex;flex-direction:column;align-items:flex-start}
.footer-links h3{margin:0 0 15px;color:#fff;font-size:16px}
.footer-links a{font-size:13px;margin-bottom:9px}
.footer-links a:hover{color:var(--accent)}
.footer-bottom{
    margin-top:45px;padding-top:20px;border-top:1px solid rgba(255,255,255,.1);
    text-align:center;font-size:11px;
}

/* RESPONSIVE */
@media(max-width:1080px){
    .desktop-nav{gap:15px}
    .desktop-nav a{font-size:12px}
    .category-layout{grid-template-columns:1fr}
    .featured-image{height:350px}
}
@media(max-width:900px){
    .desktop-nav{display:none}
    .menu-toggle{display:block}
}
@media(max-width:700px){
    .container,.section-soft > .container{padding-left:18px;padding-right:18px}
    .main-header{height:68px}
    .logo{font-size:21px}
    .hero{height:350px;margin-bottom:50px}
    .hero h1{font-size:30px}
    .hero p{font-size:13.5px}
    .hero-search input{font-size:12.5px}
    .hero-search button{padding:11px 14px;font-size:12px}
    .category-section{padding-left:18px;padding-right:18px;margin-bottom:24px}
    .section-soft{padding:34px 0}
    .section-head{align-items:flex-start;flex-direction:column;margin-bottom:20px}
    .section-head h2{font-size:25px}
    .featured-image{height:250px}
    .featured-copy{padding:20px}
    .featured-copy h3{font-size:20px}
    .list-post{grid-template-columns:105px minmax(0,1fr);gap:12px}
    .thumb{height:82px}
    .list-post h3{font-size:14px}
    .post-list{padding:5px 15px}
    .cta-box{padding:30px 24px;flex-direction:column;align-items:flex-start}
    .cta-box h2{font-size:23px}
    .footer-grid{grid-template-columns:1fr;gap:30px}
}
@media(max-width:430px){
    .hero{height:330px}
    .hero h1{font-size:27px}
    .hero p{font-size:12.5px}
    .hero-search{padding:5px}
    .hero-search input{padding:0 8px;font-size:11.5px}
    .hero-search button{padding:10px;font-size:11.5px}
    .featured-image{height:220px}
    .featured-copy h3{font-size:19px}
    .list-post{grid-template-columns:92px minmax(0,1fr)}
    .thumb{height:76px}
    .list-post h3{font-size:13px}
}


/* ARCHIVE & CATEGORY: balanced editorial cards */
.archive-hero{background:var(--soft);padding:48px 0 42px;margin-bottom:0;border-bottom:1px solid var(--border)}
.archive-hero h1{font-size:clamp(30px,4vw,44px);line-height:1.18;max-width:850px;margin:6px 0 0;letter-spacing:-.8px}
.archive-description{max-width:760px;margin-top:12px;color:var(--muted);font-size:14px;line-height:1.75}
.archive-content{padding-top:42px;padding-bottom:72px}
.archive-grid{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:36px;align-items:start}
.archive-main{min-width:0}
.archive-featured{display:grid;grid-template-columns:minmax(280px,.92fr) minmax(0,1.08fr);background:#fff;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);margin-bottom:26px}
.archive-featured-image{display:block;min-height:260px;max-height:340px;overflow:hidden}
.archive-featured-image img{width:100%;height:100%;object-fit:cover}
.archive-featured-copy{padding:30px;display:flex;flex-direction:column;justify-content:center}
.archive-featured-copy h2{font-size:clamp(23px,2.4vw,32px);line-height:1.28;margin:4px 0 12px;letter-spacing:-.45px}
.archive-featured-copy h2 a:hover,.archive-card h2 a:hover{color:var(--primary)}
.archive-featured-copy p{margin:0 0 16px;color:var(--muted);font-size:14px;line-height:1.75}
.archive-list,.archive-list-full{display:grid;gap:16px}
.archive-card{display:grid;grid-template-columns:210px minmax(0,1fr);gap:22px;background:#fff;border:1px solid var(--border);border-radius:14px;overflow:hidden;padding:0;box-shadow:var(--shadow);transition:var(--ease)}
.archive-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-hover)}
.archive-card-image{display:block;height:148px;overflow:hidden}
.archive-card-image img{width:100%;height:100%;object-fit:cover;transition:transform .45s ease}
.archive-card:hover .archive-card-image img{transform:scale(1.035)}
.archive-card-copy{padding:18px 22px 18px 0;align-self:center}
.archive-card-copy h2{font-size:20px;line-height:1.38;margin:2px 0 8px;letter-spacing:-.25px}
.archive-card-copy p{margin:0 0 10px;color:var(--muted);font-size:13.5px;line-height:1.65}
.archive-side{position:sticky;top:90px}
.side-box{background:#fff;border:1px solid var(--border);border-radius:14px;padding:22px;box-shadow:var(--shadow)}
.side-box h3{margin:3px 0 15px;font-size:20px}
.side-box a{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--border);font-size:13px;color:var(--text)}
.side-box a:last-child{border-bottom:0}.side-box a:hover{color:var(--primary)}.side-box small{color:var(--muted)}
.archive-search{display:flex;gap:8px;margin-top:20px;max-width:620px}.archive-search input{flex:1;border:1px solid var(--border);border-radius:9px;padding:13px 15px;font:inherit}.archive-search button,.primary-button,.side-button{display:inline-block;border:0;border-radius:9px;background:var(--primary);color:#fff;padding:12px 17px;font-weight:700;font-size:13px}
.empty-state{padding:55px 25px;text-align:center;background:#fff;border:1px dashed var(--border);border-radius:14px}

/* SINGLE ARTICLE: keep cover image secondary to content */
.single-main{padding-top:30px;padding-bottom:78px;max-width:1180px}
.single-article{max-width:100%}
.article-header{max-width:900px;margin:0 auto;text-align:center;padding:18px 0 24px}
.article-header .tag{margin-bottom:8px}.article-header h1{font-size:clamp(32px,4.2vw,52px);line-height:1.17;letter-spacing:-1px;margin:0 auto 14px;max-width:1000px}
.article-lead{max-width:760px;margin:0 auto 15px;color:var(--muted);font-size:16px;line-height:1.75}
.article-meta{display:flex;justify-content:center;gap:9px;color:#8A969B;font-size:12px}
.article-cover{width:min(900px,100%);height:420px;margin:8px auto 42px;border-radius:16px;overflow:hidden;background:var(--soft);box-shadow:var(--shadow)}
.article-cover img{width:100%;height:100%;object-fit:cover;display:block}
.article-layout{display:grid;grid-template-columns:minmax(0,760px) 250px;justify-content:center;gap:55px;align-items:start}
.article-body{font-size:17px;line-height:1.9;min-width:0}.article-body p{margin:0 0 1.35em}.article-body h2{font-size:28px;line-height:1.3;margin:1.7em 0 .65em}.article-body h3{font-size:22px;line-height:1.4;margin:1.5em 0 .6em}.article-body img{max-width:100%;height:auto;border-radius:12px}.article-body a{color:var(--primary);text-decoration:underline;text-underline-offset:2px}.article-side{position:sticky;top:90px}.side-button{margin-top:5px}
.related-section{max-width:1000px;margin:72px auto 0;padding-top:38px;border-top:1px solid var(--border)}
.related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.related-card{background:#fff;border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:var(--shadow)}.related-image{display:block;height:150px;overflow:hidden}.related-image img{width:100%;height:100%;object-fit:cover}.related-copy{padding:17px}.related-copy h3{font-size:17px;line-height:1.45;margin:4px 0 8px}.related-copy h3 a:hover{color:var(--primary)}
.pagination{margin-top:30px;display:flex;gap:8px}.pagination .page-numbers{padding:8px 11px;border:1px solid var(--border);border-radius:7px}.pagination .current{background:var(--primary);border-color:var(--primary);color:#fff}
@media(max-width:900px){.archive-grid{grid-template-columns:1fr}.archive-side,.article-side{position:static}.archive-featured{grid-template-columns:1fr}.archive-featured-image{height:280px;min-height:0}.archive-card{grid-template-columns:190px minmax(0,1fr)}.article-layout{grid-template-columns:1fr;max-width:760px;margin:auto}.related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.archive-hero{padding:35px 0}.archive-content{padding-top:28px;padding-bottom:55px}.archive-featured-copy{padding:22px}.archive-featured-image{height:230px}.archive-card{grid-template-columns:125px minmax(0,1fr);gap:14px}.archive-card-image{height:112px}.archive-card-copy{padding:13px 14px 13px 0}.archive-card-copy h2{font-size:16px;margin-bottom:5px}.archive-card-copy p{display:none}.article-header{text-align:left;padding-top:8px}.article-header h1{font-size:32px}.article-meta{justify-content:flex-start}.article-cover{height:260px;border-radius:13px;margin:4px auto 28px}.article-body{font-size:16px;line-height:1.85}.article-body h2{font-size:24px}.article-body h3{font-size:20px}.related-section{margin-top:52px}.related-grid{grid-template-columns:1fr}.related-image{height:185px}}


/* SIDEBAR CATEGORY: chỉ hiển thị chuyên mục được bật trong DulichNgay Core */
.category-sidebar .category-sidebar-link{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;font-size:14px}
.category-sidebar .category-sidebar-link b{font-size:20px;font-weight:500;color:var(--muted);line-height:1}
.category-sidebar .category-sidebar-link.is-current{color:var(--primary);font-weight:800}
.category-sidebar .category-sidebar-link.is-current b{color:var(--primary)}
/* SIDEBAR SINGLE: 5 bài liên quan cùng chuyên mục */
.related-sidebar h3{margin-bottom:10px}
.sidebar-related-item{display:grid!important;grid-template-columns:82px minmax(0,1fr);align-items:center;gap:11px;padding:11px 0!important;justify-content:initial!important}
.sidebar-related-item img{display:block;width:82px;height:62px;object-fit:cover;border-radius:8px}
.sidebar-related-item span{font-size:12.5px;font-weight:700;line-height:1.45;color:var(--text)}
.sidebar-related-item:hover span{color:var(--primary)}
.sidebar-empty{margin:0;color:var(--muted);font-size:13px;line-height:1.6}
@media(max-width:900px){.article-side{margin-top:8px}.related-sidebar{max-width:760px;margin:auto}.sidebar-related-item{grid-template-columns:100px minmax(0,1fr)}.sidebar-related-item img{width:100px;height:70px}}

/* 2.4: mật độ trang chủ gọn hơn, archive dùng nút xem thêm */
.load-more-wrap{display:flex;justify-content:center;margin:34px auto 4px;text-align:center}.load-more-button{display:inline-flex;align-items:center;justify-content:center;min-width:148px;border:0;background:var(--primary);color:#fff;border-radius:999px;padding:13px 30px;font:inherit;font-size:14px;font-weight:800;letter-spacing:.1px;cursor:pointer;transition:var(--ease);box-shadow:0 8px 20px rgba(0,0,0,.12)}.load-more-button:hover{background:var(--primary-dark);color:#fff;transform:translateY(-2px);box-shadow:0 12px 24px rgba(0,0,0,.16)}.load-more-button:disabled{opacity:.72;cursor:wait;transform:none}.article-cover{text-align:center}.article-cover img{margin:0 auto}.article-lead{white-space:normal}

/* FINAL COVER ALIGNMENT: center cover exactly on the article content column */
.single-article > .article-cover{
  width:100%;
  max-width:760px;
  height:auto;
  max-height:480px;
  margin:8px auto 42px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.single-article > .article-cover img{
  width:100%;
  height:auto;
  max-height:480px;
  object-fit:contain;
  object-position:center center;
  margin:0 auto;
}
@media(max-width:900px){
  .single-article > .article-cover{max-width:760px}
}
@media(max-width:700px){
  .single-article > .article-cover{max-width:100%;height:auto;margin:4px auto 28px}
  .single-article > .article-cover img{height:auto;max-height:360px}
}


/* Center all images embedded inside single-post content */
.single-post .entry-content img,
.single .entry-content img,
.post-content img,
.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

/* WordPress alignment classes: keep centered images centered */
.single-post .entry-content .aligncenter,
.single .entry-content .aligncenter,
.post-content .aligncenter,
.article-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    float: none;
}

/* Images wrapped in links or figure elements */
.single-post .entry-content figure,
.single .entry-content figure,
.post-content figure,
.article-content figure {
    margin-left: auto;
    margin-right: auto;
}

.single-post .entry-content figure img,
.single .entry-content figure img,
.post-content figure img,
.article-content figure img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Gutenberg image blocks */
.single-post .entry-content .wp-block-image,
.single .entry-content .wp-block-image,
.post-content .wp-block-image,
.article-content .wp-block-image {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.single-post .entry-content .wp-block-image img,
.single .entry-content .wp-block-image img,
.post-content .wp-block-image img,
.article-content .wp-block-image img {
    margin-left: auto;
    margin-right: auto;
}

/* Remove legacy floats that can force content images to the left/right */
.single-post .entry-content img.alignleft,
.single-post .entry-content img.alignright,
.single .entry-content img.alignleft,
.single .entry-content img.alignright {
    float: none;
    margin-left: auto;
    margin-right: auto;
}


/* === Force all inline article images to be centered === */
.single .entry-content,
.single-post .entry-content,
.single .post-content,
.single-post .post-content,
.single .article-content,
.single-post .article-content {
    overflow: hidden;
}

.single .entry-content p:has(> img),
.single .entry-content p:has(> a > img),
.single-post .entry-content p:has(> img),
.single-post .entry-content p:has(> a > img),
.single .post-content p:has(> img),
.single .post-content p:has(> a > img),
.single .article-content p:has(> img),
.single .article-content p:has(> a > img),
.single-post .article-content p:has(> img),
.single-post .article-content p:has(> a > img) {
    text-align: center !important;
}

.single .entry-content p img,
.single .entry-content p a img,
.single-post .entry-content p img,
.single-post .entry-content p a img,
.single .post-content p img,
.single .post-content p a img,
.single .article-content p img,
.single .article-content p a img,
.single-post .article-content p img,
.single-post .article-content p a img,
.single .entry-content figure img,
.single-post .entry-content figure img,
.single .post-content figure img,
.single-post .post-content figure img,
.single .article-content figure img,
.single-post .article-content figure img,
.single .entry-content .wp-block-image img,
.single-post .entry-content .wp-block-image img,
.single .post-content .wp-block-image img,
.single-post .post-content .wp-block-image img,
.single .article-content .wp-block-image img,
.single-post .article-content .wp-block-image img {
    display: block !important;
    float: none !important;
    position: static !important;
    max-width: 100% !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.single .entry-content p a,
.single-post .entry-content p a,
.single .post-content p a,
.single-post .post-content p a,
.single .article-content p a,
.single-post .article-content p a {
    display: inline-block;
    float: none !important;
}

.single .entry-content figure,
.single-post .entry-content figure,
.single .post-content figure,
.single-post .post-content figure,
.single .article-content figure,
.single-post .article-content figure,
.single .entry-content .wp-block-image,
.single-post .entry-content .wp-block-image,
.single .post-content .wp-block-image,
.single-post .post-content .wp-block-image,
.single .article-content .wp-block-image,
.single-post .article-content .wp-block-image {
    display: block !important;
    float: none !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Legacy WordPress image alignment classes */
.single .entry-content .alignleft,
.single .entry-content .alignright,
.single .post-content .alignleft,
.single .post-content .alignright,
.single .article-content .alignleft,
.single .article-content .alignright,
.single-post .entry-content .alignleft,
.single-post .entry-content .alignright,
.single-post .post-content .alignleft,
.single-post .post-content .alignright,
.single-post .article-content .alignleft,
.single-post .article-content .alignright {
    display: block !important;
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
}


/* Final breadcrumb layout */
.single .breadcrumb,
.single-post .breadcrumb,
.post-breadcrumb {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.5;
}

.single .breadcrumb > *,
.single-post .breadcrumb > *,
.post-breadcrumb > * {
    flex: 0 0 auto;
}

.single .breadcrumb-separator,
.single-post .breadcrumb-separator,
.post-breadcrumb .breadcrumb-separator {
    display: inline-block !important;
    margin: 0 9px !important;
}

.single .breadcrumb-current,
.single-post .breadcrumb-current,
.post-breadcrumb .breadcrumb-current {
    white-space: normal;
}


/* Single-post breadcrumb: keep it on the left and give separators clear spacing */
.single-main > .breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.single-main > .breadcrumbs .breadcrumb-sep {
    display: inline-block;
    margin: 0 9px;
}

.single-main > .breadcrumbs .breadcrumb-current {
    white-space: normal;
}


/* Popular posts below single article */
.popular-posts-row {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(31, 59, 79, .12);
}

.popular-posts-row > h2 {
    margin: 0 0 18px;
    font-size: 1.25rem;
    line-height: 1.3;
}

.popular-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.popular-post-card {
    min-width: 0;
}

.popular-post-image {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 16 / 10;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.popular-post-card h3 {
    margin: 10px 0 0;
    font-size: .96rem;
    line-height: 1.45;
}

.popular-post-card h3 a {
    color: inherit;
    text-decoration: none;
}

.popular-post-card h3 a:hover {
    color: #1f6f78;
}

@media (max-width: 900px) {
    .popular-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .popular-posts-grid {
        grid-template-columns: 1fr;
    }
}
