/* Additional Custom Styles for TechNews Theme */

/* ========== Single Post Page ========== */

.post-featured-image {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding: 60px 0;
    margin-bottom: 40px;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.featured-content {
    position: relative;
    z-index: 2;
    color: white;
}

.featured-meta {
    margin-bottom: 20px;
}

.post-category {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.post-meta-featured {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.95rem;
    opacity: 0.95;
}

.meta-left,
.meta-right {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item a {
    color: white;
    text-decoration: underline;
}

.meta-item a:hover {
    opacity: 0.8;
}

/* Post Container */
.post-container {
    padding: 40px 0;
}

.post-wrapper {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
}

/* Post Content */
.post-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.post-article {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-main);
}

.post-body h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 30px 0 15px;
    color: var(--primary);
}

.post-body h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 25px 0 12px;
    color: var(--text-main);
}

.post-body p {
    margin-bottom: 20px;
}

.post-body ul,
.post-body ol {
    margin: 20px 0 20px 30px;
    line-height: 1.9;
}

.post-body li {
    margin-bottom: 10px;
}

.post-body blockquote {
    border-right: 4px solid var(--primary);
    padding: 20px;
    margin: 30px 0;
    background: var(--bg-body);
    border-radius: 8px;
    font-style: italic;
    color: var(--text-light);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-body a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.post-body a:hover {
    color: var(--secondary);
}

/* Post Tags */
.post-tags {
    padding: 30px;
    background: var(--bg-body);
    border-radius: 12px;
    margin-top: 30px;
}

.post-tags h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

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

.tag-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tag-badge:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Author Box */
.author-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 30px;
    border-radius: 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 25px;
    align-items: center;
    color: white;
    margin-top: 30px;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.author-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.author-info h3 a {
    color: white;
}

.author-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.95;
}

.author-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid white;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

/* Post Share */
.post-share {
    padding: 30px;
    background: var(--bg-body);
    border-radius: 12px;
    margin-top: 30px;
}

.post-share h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.facebook:hover {
    background: #0a66c2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.twitter:hover {
    background: #1a8cd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.3);
}

.share-btn.linkedin {
    background: #0a66c2;
}

.share-btn.linkedin:hover {
    background: #084594;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.3);
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.whatsapp:hover {
    background: #1ebd59;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Comments Section */
.post-comments {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.comments-area {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-top: 0;
    box-shadow: none;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--text-main);
}

.comment-list {
    list-style: none;
    margin-bottom: 30px;
}

.comment-list li {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-body);
    border-radius: 12px;
    border-left: 3px solid var(--primary);
}

.comment-author {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.comment-content {
    color: var(--text-main);
    line-height: 1.6;
}

/* Comment Form */
.comment-form {
    background: var(--bg-body);
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form input[type="submit"] {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Related Posts */
.related-posts {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.related-posts h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--text-main);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.related-card {
    background: var(--bg-body);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.related-image {
    display: block;
    position: relative;
    overflow: hidden;
    height: 180px;
}

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

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.related-card:hover .related-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.related-body {
    padding: 15px;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.related-category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.related-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.related-card h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.related-card h3 a {
    color: var(--text-main);
    transition: color 0.3s ease;
}

.related-card:hover h3 a {
    color: var(--primary);
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 40px;
}

.nav-post {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--shadow);
}

.nav-post:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.nav-post.next-post {
    border-left: none;
    border-right: 4px solid var(--primary);
}

.nav-post.next-post:hover {
    transform: translateX(5px);
}

.nav-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.nav-post h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-main);
}

.nav-post i {
    margin-top: 10px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.nav-post:hover i {
    transform: translateX(-5px);
}

.nav-post.next-post:hover i {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-featured-image {
        min-height: 350px;
        padding: 40px 0;
    }

    .post-title {
        font-size: clamp(1.4rem, 4vw, 2rem);
    }

    .post-meta-featured {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .meta-left,
    .meta-right {
        gap: 15px;
    }

    .post-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .post-article {
        padding: 25px;
    }

    .author-box {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .author-avatar {
        margin: 0 auto;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        gap: 8px;
    }

    .share-btn span {
        display: none;
    }

    .share-btn {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .post-featured-image {
        min-height: 280px;
        padding: 30px 0;
    }

    .post-title {
        font-size: 1.3rem;
    }

    .post-meta-featured {
        font-size: 0.85rem;
    }

    .post-article {
        padding: 20px;
    }

    .post-body {
        font-size: 1rem;
    }

    .post-body h2 {
        font-size: 1.4rem;
    }

    .post-comments {
        padding: 20px;
    }

    .related-posts {
        padding: 20px;
    }
}
