/* ============================================
   Blog Detail Page Styles - WordPress Style
   ============================================ */

/* ============================================
   Base Styles
   ============================================ */
.blog-detail-wrapper {
    padding: 40px 0;
    background: #fff;
}

.blog-detail-wrapper .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Layout
   ============================================ */
.blog-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    align-items: start;
}

/* ============================================
   Main Content
   ============================================ */
.blog-detail-main {
    min-width: 0;
}

/* Single Post */
.single-post {
    background: #fff;
}

/* Entry Header */
.entry-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.entry-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: #2c3e50;
    margin: 0 0 20px 0;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
    align-items: center;
}

.entry-meta > span {
    display: inline-flex;
    align-items: center;
}

.entry-meta a {
    color: #27ae60;
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-meta a:hover {
    color: #229954;
    text-decoration: underline;
}

.entry-meta .posted-on::after,
.entry-meta .byline::after {
    content: "|";
    margin-left: 15px;
    color: #ccc;
}

.cat-links a {
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cat-links a:hover {
    background: #27ae60;
    color: #fff;
}

.reading-time {
    margin-left: auto;
    color: #999;
    font-size: 0.85rem;
}

/* Post Thumbnail */
.post-thumbnail {
    margin-bottom: 30px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Entry Content */
.entry-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.entry-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 40px 0 20px 0;
    line-height: 1.4;
}

.entry-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 30px 0 15px 0;
    line-height: 1.4;
}

.entry-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 25px 0 12px 0;
    line-height: 1.4;
}

.entry-content p {
    margin: 0 0 20px 0;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 20px 0;
    padding-left: 30px;
}

.entry-content li {
    margin-bottom: 10px;
}

.entry-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.entry-content a {
    color: #27ae60;
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-content a:hover {
    color: #229954;
    text-decoration: underline;
}

.entry-content section {
    margin-bottom: 40px;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.topic-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.topic-item h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #27ae60;
    font-size: 1.1rem;
}

.topic-item ul {
    margin: 0;
    padding-left: 20px;
}

.topic-item li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Entry Footer */
.entry-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tags-title {
    font-weight: 600;
    color: #2c3e50;
    margin-right: 5px;
}

.post-tags a {
    padding: 6px 14px;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: #27ae60;
    color: #fff;
    transform: translateY(-1px);
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    margin: 40px 0;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.author-name a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-name a:hover {
    color: #27ae60;
}

.author-bio {
    color: #666;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.nav-previous,
.nav-next {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.nav-previous:hover,
.nav-next:hover {
    background: #f0f0f0;
    border-color: #27ae60;
}

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

.nav-subtitle {
    display: block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.nav-previous a,
.nav-next a {
    text-decoration: none;
    display: block;
}

.nav-previous a:hover .nav-title,
.nav-next a:hover .nav-title {
    color: #27ae60;
}

/* Related Posts */
.related-posts {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.related-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 30px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.related-post {
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.related-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #27ae60;
}

.related-thumbnail {
    display: block;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post:hover .related-thumbnail img {
    transform: scale(1.05);
}

.related-content {
    padding: 20px;
}

.related-post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.related-post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: #27ae60;
}

.related-date {
    font-size: 0.85rem;
    color: #999;
}

/* ============================================
   Sidebar
   ============================================ */
.blog-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 20px;
    align-self: start;
}

/* Widget */
.widget {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s ease;
}

.widget:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #27ae60;
    line-height: 1.4;
}

/* Recent Entries Widget */
.widget_recent_entries ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_recent_entries li {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    transition: padding-left 0.3s ease;
}

.widget_recent_entries li:last-child {
    border-bottom: none;
}

.widget_recent_entries li:hover {
    padding-left: 5px;
}

.widget_recent_entries a {
    display: block;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 5px;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.widget_recent_entries a:hover {
    color: #27ae60;
}

.widget_recent_entries .post-date {
    display: block;
    font-size: 0.85rem;
    color: #999;
    font-weight: normal;
    margin-top: 4px;
}

/* Categories Widget */
.widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_categories li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    transition: padding-left 0.3s ease;
}

.widget_categories li:last-child {
    border-bottom: none;
}

.widget_categories li:hover {
    padding-left: 5px;
}

.widget_categories a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.widget_categories a:hover {
    color: #27ae60;
}

.cat-count {
    float: right;
    color: #999;
    font-size: 0.9rem;
    font-weight: normal;
}

/* Tag Cloud Widget */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-link {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    color: #666;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tag-cloud-link:hover {
    background: #27ae60;
    color: #fff;
    border-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.2);
}

/* CTA Widget */
.widget_cta {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #fff;
    text-align: center;
}

.widget_cta .widget-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.widget_cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #fff;
    color: #27ae60;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-block:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Responsive Design
   ============================================ */

/* Large Desktop (1400px and up) */
@media (min-width: 1400px) {
    .blog-detail-wrapper .container {
        max-width: 1320px;
    }
    
    .blog-detail-layout {
        gap: 60px;
    }
    
    .blog-detail-sidebar {
        width: 320px;
    }
}

/* Desktop (1200px to 1399px) */
@media (max-width: 1399px) {
    .blog-detail-wrapper .container {
        max-width: 1140px;
    }
}

/* Laptop (992px to 1199px) */
@media (max-width: 1199px) {
    .blog-detail-layout {
        grid-template-columns: 1fr 280px;
        gap: 40px;
    }
    
    .entry-title {
        font-size: 2.25rem;
    }
    
    .blog-detail-sidebar {
        width: 280px;
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    .blog-detail-wrapper {
        padding: 35px 0;
    }
    
    .blog-detail-layout {
        grid-template-columns: 1fr 260px;
        gap: 35px;
    }
    
    .entry-title {
        font-size: 2rem;
    }
    
    .entry-content h2 {
        font-size: 1.5rem;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-detail-sidebar {
        width: 260px;
        gap: 25px;
    }
    
    .widget {
        padding: 20px;
    }
}

/* Mobile Landscape (576px to 767px) */
@media (max-width: 767px) {
    .blog-detail-wrapper {
        padding: 30px 0;
    }
    
    .blog-detail-wrapper .container {
        padding: 0 15px;
    }
    
    .blog-detail-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .blog-detail-sidebar {
        order: 2;
        position: static;
        width: 100%;
        gap: 25px;
    }
    
    .blog-detail-main {
        order: 1;
    }
    
    .entry-title {
        font-size: 1.75rem;
    }
    
    .entry-meta {
        font-size: 0.85rem;
        gap: 10px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .entry-meta .posted-on::after,
    .entry-meta .byline::after {
        display: none;
    }
    
    .reading-time {
        margin-left: 0;
    }
    
    .entry-content {
        font-size: 0.95rem;
    }
    
    .entry-content h2 {
        font-size: 1.4rem;
        margin-top: 30px;
    }
    
    .entry-content h3 {
        font-size: 1.25rem;
    }
    
    .entry-content h4 {
        font-size: 1.1rem;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }
    
    .author-avatar {
        margin: 0 auto;
    }
    
    .widget {
        padding: 20px;
    }
    
    .widget-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    .blog-detail-wrapper {
        padding: 25px 0;
    }
    
    .blog-detail-wrapper .container {
        padding: 0 12px;
    }
    
    .blog-detail-layout {
        gap: 30px;
    }
    
    .entry-title {
        font-size: 1.5rem;
    }
    
    .entry-header {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    .entry-meta {
        font-size: 0.8rem;
        gap: 8px;
    }
    
    .post-thumbnail {
        margin-bottom: 25px;
    }
    
    .entry-content {
        font-size: 0.9rem;
        line-height: 1.7;
        margin-bottom: 30px;
    }
    
    .entry-content h2 {
        font-size: 1.3rem;
        margin-top: 25px;
        margin-bottom: 15px;
    }
    
    .entry-content h3 {
        font-size: 1.15rem;
    }
    
    .entry-content h4 {
        font-size: 1rem;
    }
    
    .topic-item {
        padding: 15px;
    }
    
    .entry-footer {
        margin-top: 30px;
        padding-top: 25px;
    }
    
    .post-tags {
        gap: 8px;
    }
    
    .post-tags a {
        padding: 5px 12px;
        font-size: 0.85rem;
    }
    
    .author-box {
        padding: 20px;
        margin: 30px 0;
    }
    
    .author-avatar img {
        width: 60px;
        height: 60px;
    }
    
    .author-name {
        font-size: 1.1rem;
    }
    
    .author-bio {
        font-size: 0.9rem;
    }
    
    .post-navigation {
        margin: 30px 0;
        padding-top: 25px;
        gap: 15px;
    }
    
    .nav-previous,
    .nav-next {
        padding: 15px;
    }
    
    .nav-title {
        font-size: 0.9rem;
    }
    
    .related-posts {
        margin-top: 40px;
        padding-top: 30px;
    }
    
    .related-title {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .related-thumbnail {
        height: 150px;
    }
    
    .related-content {
        padding: 15px;
    }
    
    .related-post-title {
        font-size: 1rem;
    }
    
    .blog-detail-sidebar {
        gap: 20px;
    }
    
    .widget {
        padding: 18px;
    }
    
    .widget-title {
        font-size: 1rem;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .widget_recent_entries li,
    .widget_categories li {
        padding: 8px 0;
    }
    
    .widget_recent_entries a {
        font-size: 0.9rem;
    }
    
    .widget_recent_entries .post-date {
        font-size: 0.8rem;
    }
    
    .tag-cloud-link {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .entry-title {
        font-size: 1.35rem;
    }
    
    .entry-content h2 {
        font-size: 1.2rem;
    }
    
    .related-title {
        font-size: 1.3rem;
    }
    
    .widget {
        padding: 15px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .blog-detail-sidebar,
    .entry-footer,
    .author-box,
    .post-navigation,
    .related-posts {
        display: none;
    }
    
    .blog-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .entry-title {
        page-break-after: avoid;
    }
    
    .entry-content section {
        page-break-inside: avoid;
    }
}

/* ============================================
   Accessibility Improvements
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid #27ae60;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .single-post {
        border: 2px solid #000;
    }
    
    .widget {
        border: 2px solid #000;
    }
}

