/* =========================================
   Blog Detail Page Styles
   ========================================= */

/* --- Main Content Header --- */
.section-header.text-left {
    text-align: left;
}

.section-line.ml-0 {
    margin-left: 0;
    width: 60px;
}

/* Featured Image (Solid Color Placeholder) */
.blog-featured-image {
    width: 100%;
    height: 400px;
    background: #673AB7;
    /* Deep Purple */
    background: linear-gradient(135deg, #673AB7 0%, #2196F3 100%);
    margin-bottom: 30px;
    border-radius: var(--border-radius);
}

/* Article Meta */
.article-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--color-light-gray);
    padding-bottom: 20px;
}

.article-meta {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-en);
    color: var(--color-primary);
    margin-bottom: 10px;
}

.meta-separator {
    margin: 0 10px;
    color: var(--color-text-light);
}

.article-title {
    font-size: 36px;
    color: var(--color-secondary);
    margin-bottom: 15px;
    line-height: 1.1;
    text-transform: uppercase;
}

.article-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--color-text-light);
    font-weight: 600;
}

.stat-item i {
    color: var(--color-primary);
    /* Blue Icons */
    margin-right: 5px;
}

/* Article Body */
.article-body {
    margin-bottom: 50px;
}

.article-body p {
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text);
}

.article-body ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 25px;
    padding-left: 20px;
}

.article-body ol {
    list-style: decimal;
    margin-left: 20px;
    margin-bottom: 25px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.article-body h3 {
    font-size: 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: var(--color-secondary);
}

/* --- Common Blog Elements --- */

/* Blockquote */
.article-body blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    border-left: 5px solid var(--color-primary);
    background-color: #f9f9f9;
    font-style: italic;
    font-family: var(--font-jp);
    color: var(--color-text-light);
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 14px;
}

.article-body th,
.article-body td {
    border: 1px solid var(--color-border);
    padding: 12px 15px;
    text-align: left;
}

.article-body th {
    background-color: #f5f5f5;
    font-weight: 700;
    color: var(--color-secondary);
}

.article-body tr:nth-child(even) {
    background-color: #fafafa;
}

/* Code Blocks & Preformatted Text */
.article-body pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 30px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.article-body code {
    background: #f0f0f0;
    color: #c7254e;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 90%;
}

.article-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* WordPress Image Alignments */
.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
    max-width: 50%;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
    max-width: 50%;
}

.aligncenter {
    display: block;
    margin: 20px auto;
    text-align: center;
}

.alignnone {
    margin: 20px 0;
}

/* Image Captions */
.wp-caption {
    margin-bottom: 25px;
    max-width: 100%;
    background: #f9f9f9;
    padding: 5px;
    border: 1px solid #ddd;
    text-align: center;
}

.wp-caption img {
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.wp-caption-text {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
    padding: 5px;
}

/* Responsive Embeds (iframe/video) */
.article-body iframe,
.article-body object, 
.article-body embed {
    max-width: 100%;
}

.responsive-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 30px;
}

.responsive-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Floating Layout Section */
.float-layout {
    overflow: hidden;
    /* Clearfix */
    margin: 40px 0;
}

.section-image {
    float: left;
    width: 250px;
    height: 250px;
    margin-right: 30px;
    margin-bottom: 10px;
}

.placeholder-box {
    width: 100%;
    height: 100%;
    background-color: #673AB7;
    /* Purple */
    border-radius: var(--border-radius);
}

.section-text {
    overflow: hidden;
}

.section-text h3 {
    margin-top: 0;
}

/* Video Section */
.video-section {
    margin: 40px 0;
}

.video-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.video-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.play-button:hover {
    background: var(--color-primary);
}

.video-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.video-badge .badge-icon {
    font-size: 16px;
    color: #FFC107;
}

.video-badge span {
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    color: #333;
}

.video-title-overlay {
    color: white;
    margin-top: auto;
    margin-bottom: 40px;
}

.video-main-title {
    display: block;
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-en);
}

.video-sub-title {
    display: block;
    font-size: 12px;
    opacity: 0.8;
}

.vimeo-logo {
    position: absolute;
    bottom: 50px;
    right: 20px;
    color: white;
    font-size: 20px;
    opacity: 0.8;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 15px;
    color: white;
    font-size: 12px;
}

.control-bar {
    flex-grow: 1;
    height: 4px;
    background: #555;
    border-radius: 2px;
}

.control-progress {
    width: 30%;
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
}

/* Article Footer (Share & Tags) */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-light-gray);
    border-bottom: 1px solid var(--color-light-gray);
    padding: 20px 0;
    margin-bottom: 60px;
}

.share-area,
.tags-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.article-footer .label {
    font-size: 12px;
    font-weight: 800;
    color: var(--color-secondary);
    font-family: var(--font-en);
}

.share-icons {
    display: flex;
    gap: 5px;
}

.share-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 2px;
    font-size: 14px;
    transition: var(--transition);
}

.share-icon:hover {
    transform: translateY(-2px);
}

.share-icon.fb {
    background: #3b5998;
}

.share-icon.tw {
    background: #55acee;
}

.share-icon.gp {
    background: #dd4b39;
}

.share-icon.rss {
    background: #f26522;
}

.share-icon.dr {
    background: #ea4c89;
}

.share-icon.vm {
    background: #1ab7ea;
}

.share-icon.more {
    background: #95a5a6;
}

.share-icon.ig {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-icon.yt {
    background: #FF0000;
}

.share-icon.pin {
    background: #BD081C;
}

.share-icon.gh {
    background: #333;
}

.share-icon.wa {
    background: #25d366;
}

.share-icon.li {
    background: #0077b5;
}

.share-icon.line {
    background: #00c300;
}

.tags-list {
    display: flex;
    gap: 5px;
}

.tag-link {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    padding: 4px 8px;
    border-radius: 2px;
    transition: var(--transition);
    text-transform: uppercase;
}

.tag-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* --- Comments Area --- */
.comments-area {
    margin-bottom: 60px;
}

.comments-header {
    margin-bottom: 30px;
}

.comments-title {
    font-size: 24px;
    color: var(--color-secondary);
    font-family: var(--font-jp);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}

.comment {
    margin-bottom: 30px;
}

.comment-body {
    display: flex;
    gap: 20px;
    background: white;
}

.comment-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
}

.avatar-purple {
    background-color: #673AB7;
}

.avatar-blue {
    background-color: #2196F3;
}

/* Custom Avatars (Faces) */
.avatar-face-blue {
    background-color: #E3F2FD;
    color: #2196F3;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-face-pink {
    background-color: #FCE4EC;
    color: #E91E63;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-face-yellow {
    background-color: #FFFDE7;
    color: #FFC107;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-content {
    flex: 1;
    border-bottom: 1px solid var(--color-light-gray);
    padding-bottom: 20px;
}

.comment:last-child .comment-content {
    border-bottom: none;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-en);
}

.comment-date {
    color: var(--color-primary);
}

.comment-reply-link {
    color: var(--color-text-light);
}

.comment-reply-link i {
    margin-right: 5px;
}

.comment-reply-link:hover {
    color: var(--color-primary);
}

.comment-author {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 10px;
    font-family: var(--font-en);
}

.comment-text,
.comment-content p {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.6;
}

.comment-text {
    background: linear-gradient(135deg, #f0f7fa 0%, #f5f5f5 100%);
    padding: 15px 20px;
    border-radius: 12px;
    margin-top: 5px;
}

.comment-text p {
    margin-bottom: 10px;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

.comment-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.edit-link {
    font-size: 11px;
    color: var(--color-text-light);
    margin-top: 10px;
    display: inline-block;
}

.edit-link:hover {
    color: var(--color-primary);
}

/* Nested Comments */
.children {
    list-style: none;
    padding-left: 100px;
    /* Indent */
    margin-top: 30px;
}

/* Pagination */
.comments-pagination {
    display: flex;
    gap: 5px;
}

.comments-pagination .page-numbers {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 12px;
    transition: var(--transition);
}

.comments-pagination .page-numbers.current,
.comments-pagination .page-numbers:hover:not(.dots) {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.comments-pagination .dots {
    border: none;
}

/* --- Comment Form --- */
.comment-respond {
    background: #f9f9f9;
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.comment-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.comment-form .three-col>.form-group {
    width: 33.33%;
}

.comment-form label {
    font-size: 12px;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 8px;
    display: block;
}

.comment-form .required {
    color: var(--color-primary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    font-family: var(--font-jp);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--color-primary);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

/* Avatar Selector */
.avatar-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-selector label {
    margin-bottom: 0;
}

.avatar-options {
    display: flex;
    gap: 10px;
}

.avatar-option {
    cursor: pointer;
}

.avatar-option input {
    display: none;
}

.avatar-face {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    /* Square with rounded corners as per image hint */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.face-blue {
    background: #E3F2FD;
    color: #2196F3;
}

.face-pink {
    background: #FCE4EC;
    color: #E91E63;
}

.face-yellow {
    background: #FFFDE7;
    color: #FFC107;
}

/* Selected State */
.avatar-option input:checked+.avatar-face {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-secondary);
    transform: scale(1.1);
}

/* Submit Button */
.btn--submit {
    border-radius: 2px;
    padding: 12px 30px;
    font-size: 13px;
    letter-spacing: 1px;
}

/* Sidebar Custom Colors */
.thumb-purple {
    background-color: #673AB7;
}

.thumb-blue {
    background-color: #2196F3;
}

.product-thumb-square {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    flex-shrink: 0;
}

.purple-bg {
    background-color: #673AB7;
}

.blue-bg {
    background-color: #2196F3;
}

/* Featured Image with actual image */
.blog-featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Post Navigation */
.post-navigation {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid var(--color-light-gray);
    border-bottom: 1px solid var(--color-light-gray);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    max-width: 45%;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation a {
    display: block;
    padding: 15px 20px;
    background: #f9f9f9;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.post-navigation a:hover {
    background: var(--color-primary);
    color: white;
}

.post-navigation a:hover .nav-label,
.post-navigation a:hover .nav-title {
    color: white;
}

.post-navigation .nav-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 5px;
    font-family: var(--font-en);
}

.post-navigation .nav-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-layout__container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
        margin-top: 40px;
    }
}

@media (max-width: 767px) {
    .article-header {
        text-align: center;
    }

    .article-stats {
        justify-content: center;
    }

    .float-layout .section-image {
        float: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .form-row.three-col {
        flex-direction: column;
    }

    .comment-form .three-col>.form-group {
        width: 100%;
    }

    .form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .children {
        padding-left: 20px;
    }
}