/* ===========================================
   Blog Single Page - Premium Design
   =========================================== */

/* --- Hero Section --- */
.blog-single-hero {
    background: linear-gradient(135deg, #234821 0%, #5AAC4E 50%, #234821 100%);
    background-size: 200% 200%;
    animation: heroGradient 8s ease infinite;
    padding: 100px 0 70px;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.blog-single-hero * {
    color: #ffffff !important;
}

.blog-single-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(35, 72, 33, 0.7), rgba(13, 33, 11, 0.6));
    z-index: -1;
    pointer-events: none;
}

.blog-single-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: #f8f9fa;
    clip-path: ellipse(55% 100% at 50% 100%);
}

@keyframes heroGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.blog-single-hero .blog-category {
    background: rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff !important;
    padding: 8px 24px !important;
    border-radius: 50px;
    display: table;
    margin: 0 auto 20px !important;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    animation: fadeInDown 0.6s ease;
}

.blog-single-hero h1 {
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.25;
    letter-spacing: -0.5px;
    color: #ffffff !important;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.7s ease;
}

.blog-meta-header {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    font-size: 14px;
    opacity: 0.9;
    justify-content: center;
    animation: fadeInUp 0.8s ease;
}

.blog-meta-header span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    padding: 6px 16px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.blog-meta-header span i {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 13px;
}

/* --- Content Section --- */
.blog-single-content {
    padding: 50px 0 80px;
    background: #f8f9fa;
}

/* --- Featured Image --- */
.blog-featured-image {
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease;
}

.blog-featured-image:hover {
    transform: scale(1.01);
}

/* --- Content Wrapper --- */
.blog-content-wrapper {
    background: white;
    padding: 50px 55px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
}

.blog-content-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    height: 4px;
    background: linear-gradient(90deg, #5AAC4E, #6dc568, #234821);
    border-radius: 0 0 4px 4px;
}

.blog-content-wrapper h2,
.blog-content-wrapper h3 {
    color: #0D210B;
    margin-top: 35px;
    margin-bottom: 18px;
    font-weight: 700;
    position: relative;
    padding-left: 18px;
    border-left: 4px solid #5AAC4E;
}

.blog-content-wrapper h2 {
    font-size: 30px;
}

.blog-content-wrapper h3 {
    font-size: 24px;
}

.blog-content-wrapper h4,
.blog-content-wrapper h5 {
    color: #1a3a18;
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 600;
}

.blog-content-wrapper p {
    font-size: 16.5px;
    line-height: 1.85;
    color: #3d3d3d;
    margin-bottom: 20px;
}

.blog-content-wrapper ul,
.blog-content-wrapper ol {
    margin: 20px 0;
    padding-left: 25px;
}

.blog-content-wrapper li {
    font-size: 16.5px;
    line-height: 1.85;
    color: #3d3d3d;
    margin-bottom: 10px;
    position: relative;
}

.blog-content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.blog-content-wrapper blockquote {
    background: linear-gradient(135deg, #f0fdf4, #e8f5e9);
    border-left: 5px solid #5AAC4E;
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 18px;
    color: #234821;
    position: relative;
}

.blog-content-wrapper blockquote::before {
    content: '\201C';
    font-size: 60px;
    position: absolute;
    top: -5px;
    left: 15px;
    color: rgba(90, 172, 78, 0.3);
    font-family: Georgia, serif;
    line-height: 1;
}

.blog-content-wrapper a {
    color: #5AAC4E;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.blog-content-wrapper a:hover {
    color: #234821;
}

.blog-content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.blog-content-wrapper table th {
    background: linear-gradient(135deg, #5AAC4E, #234821);
    color: white;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
}

.blog-content-wrapper table td {
    padding: 12px 18px;
    border-bottom: 1px solid #eee;
}

.blog-content-wrapper table tr:nth-child(even) {
    background: #f9fdf8;
}

/* --- Share Section --- */
.blog-share {
    margin-top: 50px;
    padding-top: 35px;
    border-top: 2px solid #eef2ee;
}

.blog-share h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #0D210B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    color: white;
}

.share-btn i {
    font-size: 16px;
}

.share-facebook {
    background: linear-gradient(135deg, #1877f2, #0d5ec7);
}

.share-twitter {
    background: linear-gradient(135deg, #1da1f2, #0d8bd8);
}

.share-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c56);
}

.share-linkedin {
    background: linear-gradient(135deg, #0077b5, #005a8c);
}

/* --- Related Posts --- */
.related-posts {
    margin-top: 60px;
}

.related-posts h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    color: #0D210B;
    text-align: center;
    position: relative;
    border-left: none;
    padding-left: 0;
}

.related-posts h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #5AAC4E, #6dc568);
    margin: 12px auto 0;
    border-radius: 2px;
}

.related-post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.related-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.related-post-card:hover .related-post-image {
    transform: scale(1.05);
}

.related-post-card .related-post-image {
    transition: transform 0.5s ease;
}

.related-post-card>div:first-child,
.related-post-card>a:first-child {
    overflow: hidden;
}

.related-post-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.related-post-content {
    padding: 22px;
}

.related-post-content h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    border-left: none;
    padding-left: 0;
    margin-top: 0;
}

.related-post-content h4 a {
    color: #0D210B;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-content h4 a:hover {
    color: #5AAC4E;
}

.related-post-content p {
    color: #777;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* --- Sidebar --- */
.sidebar-widget {
    background: white;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    margin-bottom: 28px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.sidebar-widget h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 22px;
    color: #0D210B;
    padding-bottom: 14px;
    border-bottom: 2px solid #eef2ee;
    position: relative;
}

.sidebar-widget h4::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #5AAC4E;
}

.recent-post-item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.recent-post-item:hover {
    transform: translateX(5px);
}

.recent-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-post-thumb {
    width: 75px;
    height: 75px;
    min-width: 75px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.recent-post-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.recent-post-info h5 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-info h5 a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-post-info h5 a:hover {
    color: #5AAC4E;
}

.recent-post-date {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.recent-post-date::before {
    content: '\f073';
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    font-size: 11px;
    color: #5AAC4E;
}

/* --- CTA Widget Override --- */
.sidebar-widget[style*="linear-gradient"] {
    border: none !important;
    position: relative;
    overflow: hidden;
}

.sidebar-widget[style*="linear-gradient"]::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.sidebar-widget[style*="linear-gradient"] h4 {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.sidebar-widget[style*="linear-gradient"] h4::after {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   MOBILE RESPONSIVE
   =========================================== */

/* Tablet */
@media (max-width: 991px) {
    .blog-single-hero {
        padding: 85px 0 55px;
    }

    .blog-single-hero h1 {
        font-size: 34px;
    }

    .blog-featured-image {
        height: 350px;
        border-radius: 16px;
    }

    .blog-content-wrapper {
        padding: 35px 30px;
    }

    .blog-content-wrapper h2 {
        font-size: 26px;
    }

    .blog-content-wrapper h3 {
        font-size: 22px;
    }

    .related-post-image {
        height: 160px;
    }

    /* Sidebar stacks below content on tablet */
    .blog-single-content .col-lg-4 {
        margin-top: 40px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .blog-single-hero {
        padding: 80px 0 50px;
    }

    .blog-single-hero::after {
        height: 30px;
    }

    .blog-single-hero h1 {
        font-size: 24px;
        line-height: 1.3;
        letter-spacing: 0;
    }

    .blog-single-hero .blog-category {
        font-size: 11px;
        padding: 6px 16px !important;
        letter-spacing: 1px;
    }

    .blog-meta-header {
        gap: 10px;
        justify-content: center;
        font-size: 12px;
    }

    .blog-meta-header span {
        padding: 5px 12px;
        font-size: 12px;
    }

    .blog-single-content {
        padding: 30px 0 50px;
    }

    .blog-featured-image {
        height: 220px;
        border-radius: 14px;
        margin-bottom: 25px;
    }

    .blog-content-wrapper {
        padding: 25px 18px;
        border-radius: 16px;
    }

    .blog-content-wrapper::before {
        left: 15px;
        right: 15px;
        height: 3px;
    }

    .blog-content-wrapper h2 {
        font-size: 21px;
        padding-left: 14px;
        border-left-width: 3px;
        margin-top: 28px;
    }

    .blog-content-wrapper h3 {
        font-size: 19px;
        padding-left: 14px;
        border-left-width: 3px;
    }

    .blog-content-wrapper p,
    .blog-content-wrapper li {
        font-size: 15px;
        line-height: 1.75;
    }

    .blog-content-wrapper blockquote {
        padding: 20px;
        font-size: 15px;
        margin: 20px 0;
    }

    .blog-content-wrapper blockquote::before {
        font-size: 40px;
        top: 0;
        left: 8px;
    }

    .blog-content-wrapper table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* Share buttons - stack on mobile */
    .blog-share {
        margin-top: 35px;
        padding-top: 25px;
    }

    .blog-share h4 {
        font-size: 16px;
        text-align: center;
    }

    .share-buttons {
        justify-content: center;
        gap: 10px;
    }

    .share-btn {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 10px;
        flex: 0 0 auto;
    }

    .share-btn span,
    .share-btn:not(i) {
        font-size: 0;
    }

    /* On very small screens, show only icons */
    .share-btn {
        padding: 12px 16px;
        min-width: 48px;
        justify-content: center;
    }

    .share-btn i {
        font-size: 18px;
    }

    /* Related Posts mobile */
    .related-posts {
        margin-top: 40px;
    }

    .related-posts h3 {
        font-size: 22px;
        margin-bottom: 20px;
        border-left: none;
        padding-left: 0;
    }

    .related-post-card {
        border-radius: 14px;
    }

    .related-post-image {
        height: 160px;
    }

    .related-post-content {
        padding: 18px;
    }

    .related-post-content h4 {
        font-size: 15px;
        border-left: none;
        padding-left: 0;
    }

    .related-post-content p {
        font-size: 13px;
    }

    /* Sidebar mobile */
    .blog-single-content .col-lg-4 {
        margin-top: 30px;
    }

    .sidebar-widget {
        padding: 22px;
        border-radius: 14px;
        margin-bottom: 20px;
    }

    .sidebar-widget h4 {
        font-size: 18px;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }

    .recent-post-thumb {
        width: 65px;
        height: 65px;
        min-width: 65px;
        border-radius: 10px;
    }

    .recent-post-info h5 {
        font-size: 14px;
    }

    .recent-post-date {
        font-size: 11px;
    }

    .recent-post-item {
        gap: 12px;
        margin-bottom: 14px;
        padding-bottom: 14px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .blog-single-hero h1 {
        font-size: 21px;
    }

    .blog-meta-header {
        gap: 6px;
    }

    .blog-meta-header span {
        font-size: 11px;
        padding: 4px 10px;
    }

    .blog-featured-image {
        height: 180px;
        border-radius: 12px;
    }

    .blog-content-wrapper {
        padding: 20px 15px;
    }

    .blog-content-wrapper h2 {
        font-size: 19px;
    }

    .blog-content-wrapper h3 {
        font-size: 17px;
    }

    .blog-content-wrapper p,
    .blog-content-wrapper li {
        font-size: 14px;
    }

    .share-buttons {
        gap: 8px;
    }

    .share-btn {
        padding: 10px 14px;
        min-width: 44px;
    }

    .related-post-content h4 {
        font-size: 14px;
    }
}