/* Mobile Search Bar Styles */
.mobile-fixed-header .navbar-form {
    margin: 5px 0;
    padding: 0;
    width: 100%;
}

.mobile-fixed-header .form-group {
    position: relative;
    margin: 0;
}

.mobile-fixed-header .form-control {
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 40px 6px 15px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 14px;
    transition: all 0.3s ease;
}

.mobile-fixed-header .form-control:focus {
    border-color: #da0000;
    box-shadow: 0 0 0 2px rgba(218, 0, 0, 0.1);
}

.mobile-fixed-header .search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #777;
    padding: 5px 10px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mobile-fixed-header .search-button:hover {
    color: #da0000;
}

.mobile-fixed-header .search-button i {
    font-size: 16px;
}

/* Post Title Overlay Enhancement */

/* Stronger gradient for better visibility */
.post--item.post--layout-1 .post--img .thumb:before {
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.85) 100%) !important;
    opacity: 1 !important;
    -webkit-transition: opacity .25s ease-in-out, background .25s ease-in-out !important;
    transition: opacity .25s ease-in-out, background .25s ease-in-out !important;
}

/* Hover effect for images */
.post--item.post--layout-1 .post--img:hover .thumb:before {
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.9) 100%) !important;
    opacity: 1 !important;
}

/* Enhance text visibility with shadow and better contrast */
.post--item.post--layout-1 .post--info .title .h4 {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    font-weight: bold !important;
    line-height: 1.3 !important;
    transition: color .25s ease-in-out;
}

/* Change text color on hover for better visibility */
.post--item.post--layout-1:hover .post--info .title .h4 a {
    color: #ffffff !important;
}

/* Increase font size for better readability */
.post--item.post--title-large .post--info .title .h4 {
    font-size: 18px !important;
    line-height: 1.3 !important;
}

.post--item.post--title-larger .post--info .title .h4 {
    font-size: 20px !important;
    line-height: 1.3 !important;
}

/* Add padding to the bottom of the text container for better spacing */
.post--item.post--layout-1 .post--info {
    padding-bottom: 10px;
    padding-left: 15px;
    padding-right: 15px;
    z-index: 2 !important; /* Ensure text stays above the gradient */
}

/* Make date more visible */
.post--item.post--layout-1 .post--info .meta > li > a {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    color: #fff !important;
}

.floating-social-menu {
    position: fixed;
    bottom: 70px;
    right: 20px;
    z-index: 9999;
}

.social-toggle {
    background: #ffffff;
    color: #000000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    outline: none;
    position: relative;
}

.social-toggle:hover {
    background: #f8f8f8;
    transform: scale(1.05);
}

.social-items {
    position: absolute;
    bottom: 60px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    padding: 10px;
}

.social-items {
    opacity: 0;
    visibility: hidden;
    display: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.social-items.show {
    opacity: 1;
    visibility: visible;
    display: flex;
}

.social-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 10px 0;
    background: #ffffff !important;
    color: #000000 !important;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.social-item:hover {
    background: #000000 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: all 0.2s ease;
}

.social-item:hover svg {
    transform: none;
    color: #ffffff !important;
}


.social-menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.1);
}


/* Animation for social items */
.social-items {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header--topbar-info li i,
.header--topbar-action li a i {
    margin-right: 5px;
}    

/* Desktop and Mobile View: Move post title and date beneath image */
/* Remove absolute positioning for all screen sizes */
.post--item.post--layout-1 .post--info {
    position: static !important;
    padding: 10px 0 !important;
    background: transparent !important;
}

/* Remove gradient overlay since text is below */
.post--item.post--layout-1 .post--img .thumb:before {
    display: none !important;
}

/* Change text color to dark for visibility on white background */
.post--item.post--layout-1 .post--info .title .h4,
.post--item.post--layout-1 .post--info .title .h4 a {
    color: #222 !important;
    text-shadow: none !important;
}

/* Change date color to dark */
.post--item.post--layout-1 .post--info .meta > li > a {
    color: #999 !important;
    text-shadow: none !important;
}

/* Remove hover effects */
.post--item.post--layout-1:hover .post--info .title .h4 a {
    color: #222 !important;
}

.post--item.post--layout-1 .post--img:hover .thumb:before {
    display: none !important;
}

/* Ensure image container is not relative positioned */
.post--item.post--layout-1 .post--img {
    position: relative;
    margin-bottom: 5px !important;
}

/* Category badge stays on image */
.post--item.post--layout-1 .post--img a.cat {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    border-radius: 4px;
}

/* Mobile View: Additional mobile-specific adjustments */
@media (max-width: 767px) {
    
    /* Fix gap in list posts (layout-3) on mobile */
    .post--items .post--item.post--layout-3 .post--img {
        margin-bottom: 0 !important;
        margin-right: 10px;
    }
    
    .post--items .post--item.post--layout-3 .post--img .thumb {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        width: 100px;
        height: auto;
    }
    
    .post--items .post--item.post--layout-3 .post--img .thumb img {
        position: static !important;
        width: 100%;
        height: auto !important;
        min-height: 70px;
        max-height: 80px;
    }
    
    /* Ensure list items don't have extra spacing */
    .post--items.post--items-3 > ul.nav > li {
        margin-bottom: 15px !important;
        padding-bottom: 15px !important;
    }
    
    .post--items .post--item.post--layout-3 {
        display: flex;
        align-items: flex-start;
    }
    
    .post--items .post--item.post--layout-3 .post--info {
        flex: 1;
        margin-top: 0 !important;
    }
}

/* =============================================
   DARKER DATE & META TEXT
   ============================================= */
/* Make date/author meta text darker across all layouts */
.post--info .meta {
    color: #555 !important;
}

.post--info .meta > li > a,
.post--info .meta > li > span {
    color: #555 !important;
}

/* Keep category link in brand color */
.post--info .meta > li:first-child > a {
    color: #da0000 !important;
}

/* Layout-1 (overlay) meta stays white */
.post--item.post--layout-1 .post--info .meta > li > a {
    color: #555 !important;
}

/* Sidebar widget meta */
.list--widget-2 .post--info .meta > li:first-child {
    color: #555;
}

/* Video date text */
.video-meta .date {
    color: #555 !important;
}

/* =============================================
   ROUNDED CORNERS & LIGHT SHADOW ON IMAGES
   ============================================= */
/* Prevent image stretching - maintain aspect ratio */
.post--img img,
.responsive-img,
img.responsive-img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    display: block;
    border-radius: 6px;
}

/* Layout-1 main post: img must fill the padding-bottom container */
.post--item.post--layout-1 .post--img .thumb img {
    height: 100% !important;
    aspect-ratio: unset !important;
}

/* Specific aspect ratio containers - override fixed heights */
.image-ratio-450-219 {
    width: 100%;
    height: auto !important;
    aspect-ratio: 450 / 219;
    object-fit: cover;
    object-position: center;
}

.image-ratio-100-70 {
    width: 100%;
    height: auto !important;
    aspect-ratio: 100 / 70;
    object-fit: cover;
    object-position: center;
}

.image-ratio-ads-720-90 {
    width: 100%;
    height: auto !important;
    object-fit: contain;
    object-position: center;
}

/* For images inside links/thumbs */
.post--img .thumb img,
.post--img a.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    display: block;
}

/* Ensure parent containers maintain aspect ratio */
.post--img .thumb,
.post--img a.thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 0;
    line-height: 0;
}

/* Main post image (large) */
.post--item.post--layout-1 .post--img .thumb {
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 0;
    line-height: 0;
}

.post--item.post--layout-1 .post--img .thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* Smaller post images (layout-3) */
.post--items .post--item.post--layout-3 .post--img .thumb {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post--items .post--item.post--layout-3 .post--img .thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 6px;
}

/* Override any fixed heights for layout-3 images */
.post--items .post--item.post--layout-3 .post--img img.image-ratio-100-70 {
    height: auto !important;
    min-height: 70px;
    max-height: 100px;
}

/* Mobile specific image adjustments */
@media (max-width: 767px) {
    .post--img img,
    .responsive-img {
        max-width: 100%;
        height: auto !important;
    }
    
    /* Maintain aspect ratio on mobile */
    .post--items .post--item.post--layout-1 .post--img .thumb {
        padding-bottom: 56.25%; /* 16:9 */
    }
    
    .post--items .post--item.post--layout-3 .post--img .thumb {
        padding-bottom: 0; /* No padding for list items on mobile */
    }
}

/* Fix for any stretched images */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent distortion in all post images */
.post--item img {
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 6px;
}

/* Layout-2 images (category-wise smaller cards) */
.post--item.post--layout-2 .post--img .thumb {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post--item.post--layout-2 .post--img .thumb img {
    border-radius: 6px;
}

/* Post single page image */
.post--single .post--img .thumb {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.post--single .post--img .thumb img {
    border-radius: 8px;
}

/* Widget images */
.megamenu--posts > ul > li > .img a.thumb img,
.list--widget-2 .post--img .thumb img {
    border-radius: 6px;
}

/* YouTube / video thumbnails */
.video-thumbnail img,
.card-img-top {
    border-radius: 6px;
}

/* =============================================
   POST DETAIL - MODERN META BAR
   ============================================= */
.post-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 8px;
    padding: 12px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.post-meta-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    color: #444;
    line-height: 1.4;
    white-space: nowrap;
}

.meta-chip i {
    font-size: 12px;
    color: #888;
}

/* Share icons */
.post-share-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-share-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #555;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.post-share-icons a:hover {
    background: #da0000;
    color: #fff;
}

/* Mobile adjustments */
@media (max-width: 575px) {
    .post-meta-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .meta-chip {
        font-size: 12px;
        padding: 3px 10px;
    }

    .post-share-icons a {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
}

/* =============================================
   RELATED POSTS - EQUAL HEIGHT CARDS
   ============================================= */
.post--related .nav.row {
    display: flex;
    flex-wrap: wrap;
}

.post--related .nav.row > li {
    display: flex;
}

.post--related .nav.row > li > .post--item {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.post--related .nav.row > li > .post--item > .post--img {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post--related .nav.row > li > .post--item > .post--img > .post--info {
    flex: 1;
}

/* Match thumb container to the 370/180 image ratio */
.post--related .post--item.post--layout-1 .post--img .thumb {
    padding-bottom: 0;
    aspect-ratio: 370 / 180;
}

.post--related .post--item.post--layout-1 .post--img .thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
