/**
 * Single Post & Page Styling
 * 
 * CSS cho single post/page, container, wrapper
 */

/* ===========================
   CONTAINER & WRAPPER
   =========================== */

.site-main {
    max-width: var(--woo-container-max-width, 1280px);
    margin: 0 auto;
    padding: var(--woo-spacing-md) var(--woo-spacing-lg);
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Single Header: Title and Meta (Full Width) */
.single-header {
    margin: 32px 0 0 0;
    padding: 0 0 28px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.single-title {
    margin: 0 0 20px 0;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0a1f2e;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.95rem;
    color: #5a7184;
}

.single-meta time {
    display: inline-flex;
    align-items: center;
}

.single-meta .author {
    display: inline-flex;
    align-items: center;
}

.single-meta .author a {
    color: #1abc9c;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.single-meta .author a:hover {
    color: #16a085;
}

/* Layout: two columns for single */
.single-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: var(--woo-spacing-2xl, 48px);
    align-items: start;
}

.single-primary {
    min-width: 0;
}

.single-sidebar {
    position: sticky;
    top: 120px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--woo-spacing-xl, 32px);
}

.sidebar-block {
    background: #0f2e3a;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.sidebar-title {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #e9f7ff;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-list a {
    color: #c8d6e5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-list a:hover {
    color: #1abc9c;
}

/* Featured posts with thumb */
.sidebar-featured-list .featured-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
}

.sidebar-featured-list .featured-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}

.sidebar-featured-list .featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-featured-list .featured-link {
    color: #e9f7ff;
    font-weight: 600;
}

/* Social Share */
.social-share {
    margin: 32px 0;
    padding: 24px;
    background: #0f2e3a;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.04);
}

.social-share-title {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e9f7ff;
}

.social-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.25s ease;
    border: 1px solid rgba(255,255,255,0.08);
}

.share-btn svg {
    flex-shrink: 0;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.share-facebook {
    background: #1877f2;
    color: #ffffff;
}

.share-facebook:hover {
    background: #1460c7;
}

.share-twitter {
    background: #1da1f2;
    color: #ffffff;
}

.share-twitter:hover {
    background: #1a8cd8;
}

.share-linkedin {
    background: #0077b5;
    color: #ffffff;
}

.share-linkedin:hover {
    background: #005f8f;
}

.share-email {
    background: #ea4335;
    color: #ffffff;
}

.share-email:hover {
    background: #c5331d;
}
    text-decoration: none;
    line-height: 1.35;
}

.sidebar-featured-list .featured-link:hover {
    color: #1abc9c;
}

.sidebar-featured-list .featured-date {
    display: block;
    font-size: 0.82rem;
    color: #8aa0b3;
    margin-top: 4px;
}

@media (max-width: 1024px) {
    .single-post-layout {
        grid-template-columns: 1fr;
    }

    .single-sidebar {
        position: relative;
        top: auto;
    }
}

/* Narrow container cho single post/page */
article.single,
article.page {
    max-width: 980px;
    margin: 0 auto;
}

/* Full width sections */
.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.alignwide {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   BREADCRUMB IN SINGLE
   =========================== */

.single .breadcrumb-navigation,
.page .breadcrumb-navigation {
    max-width: 1200px;
    padding: 0 0 var(--woo-spacing-xs) 0;
    border-bottom: var(--woo-border-width) solid var(--woo-color-border);
}

.single .breadcrumbs,
.page .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--woo-spacing-xs);
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: var(--woo-font-size-sm);
}

.single .breadcrumbs li,
.page .breadcrumbs li {
    display: flex;
    align-items: center;
    margin: 0;
}

.single .breadcrumbs li:not(:last-child)::after,
.page .breadcrumbs li:not(:last-child)::after {
    content: "→";
    margin-left: var(--woo-spacing-xs);
    color: var(--woo-color-text-lighter);
}

.single .breadcrumbs a,
.page .breadcrumbs a {
    color: var(--woo-color-text-light);
    transition: color var(--woo-transition-fast);
}

.single .breadcrumbs a:hover,
.page .breadcrumbs a:hover {
    color: var(--woo-color-primary);
}

.single .breadcrumbs li:last-child,
.page .breadcrumbs li:last-child {
    color: var(--woo-color-text);
    font-weight: var(--woo-font-weight-medium);
}

/* ===========================
   SINGLE POST HEADER
   =========================== */

article.single .post-thumbnail,
article.page .post-thumbnail {
    margin-bottom: var(--woo-spacing-2xl);
    border-radius: var(--woo-border-radius-lg);
    overflow: hidden;
}

article.single .post-thumbnail img,
article.page .post-thumbnail img {
    width: 100%;
    height: auto;
}

article.single .entry-header,
article.page .entry-header {
    margin-bottom: var(--woo-spacing-xl);
    text-align: center;
}

article.single .entry-title,
article.page .entry-title {
    font-size: var(--woo-font-size-4xl);
    line-height: var(--woo-line-height-tight);
    margin-bottom: var(--woo-spacing-lg);
}

article.single .entry-meta {
    display: flex;
    justify-content: center;
    gap: var(--woo-spacing-md);
    flex-wrap: wrap;
    font-size: var(--woo-font-size-sm);
    color: var(--woo-color-text-light);
    padding-bottom: var(--woo-spacing-lg);
    border-bottom: var(--woo-border-width) solid var(--woo-color-border);
}

/* ===========================
   SINGLE POST CONTENT
   =========================== */

article.single .entry-content,
article.page .entry-content {
    font-size: var(--woo-font-size-lg);
    line-height: var(--woo-line-height-relaxed);
    margin-bottom: var(--woo-spacing-2xl);
}

article.single .entry-content > *,
article.page .entry-content > * {
    margin-bottom: var(--woo-spacing-lg);
}

article.single .entry-content > *:last-child,
article.page .entry-content > *:last-child {
    margin-bottom: 0;
}

/* Headings in content */
article.single .entry-content h2,
article.page .entry-content h2 {
    margin-top: var(--woo-spacing-2xl);
    margin-bottom: var(--woo-spacing-lg);
}

article.single .entry-content h3,
article.page .entry-content h3 {
    margin-top: var(--woo-spacing-xl);
    margin-bottom: var(--woo-spacing-md);
}

/* Images in content */
article.single .entry-content img,
article.page .entry-content img {
    border-radius: var(--woo-border-radius-md);
}

/* Page Links (pagination for multi-page posts) */
.page-links {
    display: flex;
    gap: var(--woo-spacing-sm);
    align-items: center;
    margin-top: var(--woo-spacing-xl);
    padding-top: var(--woo-spacing-xl);
    border-top: var(--woo-border-width) solid var(--woo-color-border);
}

.page-links a,
.page-links > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--woo-spacing-md);
    background: var(--woo-color-bg-alt);
    border: var(--woo-border-width) solid var(--woo-color-border);
    border-radius: var(--woo-border-radius-sm);
    color: var(--woo-color-text);
    transition: all var(--woo-transition-fast);
}

.page-links a:hover {
    background: var(--woo-color-primary);
    border-color: var(--woo-color-primary);
    color: #fff;
}

.page-links > span {
    background: var(--woo-color-primary);
    border-color: var(--woo-color-primary);
    color: #fff;
    font-weight: var(--woo-font-weight-semibold);
}

/* ===========================
   SINGLE POST FOOTER
   =========================== */

article.single .entry-footer,
article.page .entry-footer {
    padding-top: var(--woo-spacing-xl);
    border-top: var(--woo-border-width) solid var(--woo-color-border);
    display: flex;
    flex-wrap: wrap;
    gap: var(--woo-spacing-lg);
    margin-bottom: var(--woo-spacing-2xl);
}

article.single .cat-links,
article.single .tags-links {
    display: flex;
    gap: var(--woo-spacing-sm);
    align-items: center;
    flex-wrap: wrap;
}

article.single .cat-links a,
article.single .tags-links a {
    display: inline-block;
    padding: var(--woo-spacing-xs) var(--woo-spacing-md);
    background: var(--woo-color-bg-alt);
    border-radius: var(--woo-border-radius-sm);
    font-size: var(--woo-font-size-sm);
    transition: all var(--woo-transition-fast);
}

article.single .cat-links a:hover,
article.single .tags-links a:hover {
    background: var(--woo-color-primary);
    color: #fff;
}

/* ===========================
   POST NAVIGATION
   =========================== */

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--woo-spacing-lg);
    margin: var(--woo-spacing-3xl) 0;
    max-width: 1200px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    padding: var(--woo-spacing-lg);
    background: var(--woo-color-bg-alt);
    border-radius: var(--woo-border-radius-md);
    transition: all var(--woo-transition-base);
}

.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
    background: var(--woo-color-bg);
    box-shadow: var(--woo-shadow-md);
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation a {
    display: block;
    color: var(--woo-color-text);
}

.post-navigation a:hover {
    color: var(--woo-color-primary);
}

.post-navigation .post-title {
    font-size: var(--woo-font-size-lg);
    font-weight: var(--woo-font-weight-semibold);
    margin-top: var(--woo-spacing-sm);
}

/* ===========================
   RELATED POSTS
   =========================== */

.related-posts {
    max-width: 1200px;
    margin: var(--woo-spacing-3xl) auto;
    padding: var(--woo-spacing-3xl) 0;
    border-top: 2px solid var(--woo-color-border);
}

.related-posts-title {
    font-size: var(--woo-font-size-2xl);
    font-weight: var(--woo-font-weight-bold);
    margin-bottom: var(--woo-spacing-xl);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--woo-spacing-xl);
}

.related-post-item {
    background: var(--woo-color-bg);
    border-radius: var(--woo-border-radius-lg);
    overflow: hidden;
    transition: transform var(--woo-transition-base), box-shadow var(--woo-transition-base);
    border: var(--woo-border-width) solid var(--woo-color-border);
}

.related-post-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--woo-shadow-lg);
}

.related-post-thumbnail {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--woo-transition-base);
}

.related-post-item:hover .related-post-thumbnail img {
    transform: scale(1.05);
}

.related-post-content {
    padding: var(--woo-spacing-lg);
}

.related-post-title {
    font-size: var(--woo-font-size-lg);
    font-weight: var(--woo-font-weight-semibold);
    margin-bottom: var(--woo-spacing-sm);
    line-height: var(--woo-line-height-tight);
}

.related-post-title a {
    color: var(--woo-color-heading);
    transition: color var(--woo-transition-fast);
}

.related-post-title a:hover {
    color: var(--woo-color-primary);
}

.related-post-meta {
    font-size: var(--woo-font-size-sm);
    color: var(--woo-color-text-light);
}

/* ===========================
   COMMENTS
   =========================== */

.comments-area {
    max-width: 800px;
    margin: var(--woo-spacing-3xl) auto 0;
    padding-top: var(--woo-spacing-3xl);
    border-top: 2px solid var(--woo-color-border);
}

.comments-title {
    margin-bottom: var(--woo-spacing-xl);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: var(--woo-spacing-xl);
    padding: var(--woo-spacing-lg);
    background: var(--woo-color-bg-alt);
    border-radius: var(--woo-border-radius-md);
}

.comment-body {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: var(--woo-spacing-md);
}

.comment-author img {
    border-radius: 50%;
}

.comment-metadata {
    font-size: var(--woo-font-size-sm);
    color: var(--woo-color-text-light);
    margin-bottom: var(--woo-spacing-sm);
}

.comment-content {
    margin-top: var(--woo-spacing-sm);
}

.reply {
    margin-top: var(--woo-spacing-sm);
}

.reply a {
    font-size: var(--woo-font-size-sm);
    padding: var(--woo-spacing-xs) var(--woo-spacing-md);
    background: var(--woo-color-bg);
    border-radius: var(--woo-border-radius-sm);
}

/* Nested comments */
.children {
    list-style: none;
    padding-left: var(--woo-spacing-2xl);
    margin-top: var(--woo-spacing-lg);
}

/* Comment form */
.comment-respond {
    margin-top: var(--woo-spacing-2xl);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: var(--woo-spacing-lg);
}

/* ===========================
   RELATED POSTS (FULL WIDTH)
   =========================== */

.related-posts {
    margin: 60px 0 40px 0;
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.related-posts-title {
    margin: 0 0 32px 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #e9f7ff;
    text-align: left;
}

/* Grid layout */
.related-posts.is-grid .related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.related-posts.is-grid .related-post-item {
    background: #0f2e3a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.related-posts.is-grid .related-post-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.related-posts.is-grid .related-post-thumb {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}

.related-posts.is-grid .related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.related-posts.is-grid .related-post-item:hover .related-post-thumb img {
    transform: scale(1.05);
}

.related-posts.is-grid .related-post-content {
    padding: 20px;
}

.related-posts.is-grid .related-post-title {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.related-posts.is-grid .related-post-title a {
    color: #e9f7ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-posts.is-grid .related-post-title a:hover {
    color: #1abc9c;
}

.related-posts.is-grid .related-post-date {
    font-size: 0.85rem;
    color: #8ca3b5;
}

/* Slider layout */
.related-posts.is-slider {
    /* Will be implemented with JS slider */
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: var(--woo-spacing-md);
    border: var(--woo-border-width) solid var(--woo-color-border);
    border-radius: var(--woo-border-radius-md);
    font-family: var(--woo-font-primary);
    transition: border-color var(--woo-transition-fast);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--woo-color-primary);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .form-submit {
    margin: 0;
}

.comment-form .submit {
    padding: var(--woo-spacing-md) var(--woo-spacing-xl);
    background: var(--woo-color-primary);
    color: #fff;
    border: none;
    border-radius: var(--woo-border-radius-md);
    font-weight: var(--woo-font-weight-semibold);
    cursor: pointer;
    transition: background var(--woo-transition-fast);
}

.comment-form .submit:hover {
    background: var(--woo-color-primary-dark);
}
/* ===== MINIMAL FORM WRAPPER ===== */
.woo-form-minimal {
  border: 1px solid #9ca3af;
  padding: 24px;
}
.woo-form-minimal br {display: none;}
/* ===== LABEL ===== */
.woo-form-minimal label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #065f46;
} 

/* ===== INPUT & TEXTAREA ===== */
.woo-form-minimal input,
.woo-form-minimal textarea {
  width: 97%;
  background: transparent;
  border: 1px solid #065f46;
  border-radius: 2px;
  padding: 10px 12px;
  font-size: 14px;
  color: #065f46;
}

/* Placeholder */
.woo-form-minimal input::placeholder,
.woo-form-minimal textarea::placeholder {
  color: #6b7280;
}

/* Focus */
.woo-form-minimal input:focus,
.woo-form-minimal textarea:focus {
  outline: none;
  border-color: #047857;
}

/* Textarea height */
.woo-form-minimal textarea {
  min-height: 140px;
  resize: vertical;
}

/* ===== SUBMIT ===== */
.woo-form-submit {
  margin-top: 16px;
}

.woo-form-submit input[type="submit"] {
  background: #065f46;
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Hover */
.woo-form-submit input[type="submit"]:hover {
  opacity: 0.9;
}
/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1024px) {
    .site-main {
        padding: var(--woo-spacing-xl) var(--woo-spacing-md);
    }
}

@media (max-width: 768px) {
    article.single .entry-title,
    article.page .entry-title {
        font-size: var(--woo-font-size-3xl);
    }
    
    article.single .entry-content,
    article.page .entry-content {
        font-size: var(--woo-font-size-base);
    }
    
    /* Single header mobile */
    .single-title {
        font-size: 1.75rem;
    }
    
    .single-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .post-navigation .nav-next {
        text-align: left;
    }
    
    .comment-body {
        grid-template-columns: 1fr;
    }
    
    .children {
        padding-left: var(--woo-spacing-lg);
    }
    
    /* Social share mobile */
    .social-share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        justify-content: center;
    }
    
    /* Related posts mobile */
    .related-posts.is-grid .related-posts-grid {
        grid-template-columns: 1fr;
    }
}
