/* Single Post Styles */
.single-title {
    font-size: 42px;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 800;
    color: #111;
}

.single-sub-title {
    font-size: 26px;
    font-weight: 600;
    color: #555;
    margin-top: 8px;
    margin-bottom: 10px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .single-sub-title {
        font-size: 20px;
    }
}

.entry-meta-top {
    margin-bottom: 10px;
}

.entry-meta-top a {
    background: var(--primary-color);
    color: #fff;
    padding: 2px 10px;
    font-size: 12px;
    text-transform: uppercase;
    border-radius: 3px;
    display: inline-block;
}

.entry-meta {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.entry-meta .byline {
    margin-right: 20px;
    font-weight: 600;
    color: #333;
}

.entry-meta .posted-on {
    color: #888;
}

.entry-featured-image {
    margin-bottom: 30px;
    position: relative;
}

.entry-featured-image img {
    border-radius: 4px;
    width: 100%;
}

.entry-featured-image .caption {
    font-size: 13px;
    color: #777;
    margin-top: 8px;
    font-style: italic;
}

.entry-content {
    font-size: 19px;
    line-height: 1.8;
    color: #222;
    font-family: var(--font-primary);
    text-align: justify;
    /* Justify Content */
}

/* WordPress Core Alignment Classes */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Fix for Images with Captions Overflowing Container */
.wp-caption {
    max-width: 100%;
    /* Force caption container to respect parent width */
    margin-bottom: 1.5em;
    text-align: center;
}

.wp-caption img {
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    display: block;
}

.wp-caption-text {
    font-size: 14px;
    color: #666;
    margin-top: 6px;
    font-style: italic;
    line-height: 1.5;
}

/* Handle aligncenter with caption specifically */
.aligncenter.wp-caption {
    margin-left: auto;
    margin-right: auto;
}

.entry-content p {
    margin-bottom: 25px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #000;
    font-weight: 700;
}

/* Bold Text */
.entry-content strong,
.entry-content b {
    color: var(--primary-color);
    font-weight: 700;
}

/* Links */
.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.entry-content a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Attractive Blockquote */
.entry-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    background: #f9f9f9;
    border-left: 5px solid var(--secondary-color);
    font-style: italic;
    font-size: 20px;
    color: #444;
    position: relative;
    border-radius: 0 4px 4px 0;
}

.entry-content blockquote::before {
    content: "\201C";
    /* Left Double Quote */
    font-size: 60px;
    color: rgba(0, 0, 0, 0.1);
    position: absolute;
    left: 10px;
    top: -10px;
    font-family: serif;
}

/* Make Inputs Workable (Comment form etc) */
.entry-content input[type="text"],
.entry-content input[type="email"],
.entry-content input[type="url"],
.entry-content textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.entry-content input:focus,
.entry-content textarea:focus,
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(0, 79, 148, 0.2);
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.comment-form .submit {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

.comment-form .submit:hover {
    background: var(--secondary-color);
}

.entry-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-bottom: 0;
    padding-bottom: 5px;
}

.tags-links a {
    display: inline-block;
    background: #f5f5f5;
    color: #555;
    padding: 5px 12px;
    border-radius: 15px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 13px;
}

.tags-links a:hover {
    background: var(--secondary-color);
    color: #fff;
}

@media (max-width: 768px) {
    .single-title {
        font-size: 28px;
    }

    .entry-content {
        font-size: 18px;
    }
}

/* Responsive Embeds */
.responsive-video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    padding-top: 30px;
    height: 0;
    overflow: hidden;
    margin-bottom: 30px;
}

.responsive-video-container iframe,
.responsive-video-container object,
.responsive-video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.entry-content iframe,
.entry-content object,
.entry-content embed {
    max-width: 100%;
}

/* Related Content */
.related-content {
    margin-top: 50px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.related-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 25px;
    border-left: 4px solid var(--secondary-color);
    padding-left: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 15px;
}

.related-item {
    display: flex;
    flex-direction: column;
}

.related-thumb {
    margin-bottom: 12px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    height: 180px;
    width: 100%;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease-in-out;
}

.related-item:hover .related-thumb img {
    transform: scale(1.15);
}

.related-item-title {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    margin: 0;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item-title a {
    color: inherit;
    text-decoration: none;
}

.related-item-title a:hover {
    color: #e11b22;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-thumb {
        height: 220px;
    }
}