/* Media Centre Custom Styles */

/* Global Styles for Media Centre */
.saihatss-media-centre {
    background-color: #f8f9fa;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    width: 100% !important; 
    max-width: 100% !important;
    margin: 0 !important;
}

.saihatss-media-container {
    position: relative;
    z-index: 2;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.saihatss-page-title {
    font-size: 42px;
    font-weight: 800;
    color: #122134;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

.saihatss-page-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #122134, #2a4779);
    border-radius: 2px;
}

.saihatss-page-subtitle {
    font-size: 18px;
    color: #5a6a7e;
    margin-bottom: 40px;
    text-align: center;
}

.saihatss-tabs-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 50px;
    width: 100% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.saihatss-media-tabs {
    display: flex;
    border-bottom: 3px solid #f0f2f5;
    background: #fff;
    justify-content: center;
}

.saihatss-media-tab {
    padding: 20px 30px;
    font-size: 18px;
    font-weight: 600;
    color: #5a6a7e;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.saihatss-media-tab:hover {
    color: #122134;
    background-color: rgba(18, 33, 52, 0.03);
}

.saihatss-media-tab.active {
    color: #122134;
}

.saihatss-media-tab.active:after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #122134;
}

/* Gallery Styles */
.saihatss-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
    width: 100%;
    padding: 0 30px;
    justify-content: center;
}

.saihatss-gallery-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    display: block;
    text-decoration: none;
    width: 100%;
    margin: 0;
}

.saihatss-gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.saihatss-gallery-img-container {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.saihatss-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.saihatss-gallery-card:hover .saihatss-gallery-img {
    transform: scale(1.1);
}

.saihatss-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(18, 33, 52, 0.1), rgba(18, 33, 52, 0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.saihatss-gallery-card:hover .saihatss-gallery-overlay {
    opacity: 1;
}

.saihatss-img-count {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(18, 33, 52, 0.85);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.saihatss-gallery-content {
    padding: 20px;
}

.saihatss-gallery-title {
    font-size: 18px;
    font-weight: 700;
    color: #122134;
    margin-bottom: 10px;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 50px;
}

.saihatss-gallery-card:hover .saihatss-gallery-title {
    color: #1e3a64;
}

.saihatss-gallery-meta {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 14px;
    gap: 15px;
}

.saihatss-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Video Styles */
.saihatss-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
    width: 100%;
    padding: 0 30px;
    justify-content: center;
}

.saihatss-video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    display: block;
    text-decoration: none;
    width: 100%;
    margin: 0;
}

.saihatss-video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.saihatss-video-img-container {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.saihatss-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.saihatss-video-card:hover .saihatss-video-thumb {
    transform: scale(1.1);
}

.saihatss-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(18, 33, 52, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.saihatss-video-card:hover .saihatss-video-play {
    transform: translate(-50%, -50%) scale(1.15);
    background: #122134;
}

.saihatss-video-play i {
    font-size: 24px;
}

.saihatss-video-content {
    padding: 20px;
}

.saihatss-video-title {
    font-size: 18px;
    font-weight: 700;
    color: #122134;
    margin-bottom: 10px;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 50px;
}

.saihatss-video-card:hover .saihatss-video-title {
    color: #1e3a64;
}

.saihatss-video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6c757d;
    font-size: 14px;
}

/* Detail Pages */
.saihatss-detail-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.saihatss-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #122134;
    margin-bottom: 15px;
}

.saihatss-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 15px;
}

.saihatss-detail-divider {
    height: 1px;
    background: #eaedf0;
    margin: 20px 0;
}

.saihatss-detail-content {
    color: #5a6a7e;
    line-height: 1.8;
}

.saihatss-gallery-showcase {
    margin-top: 30px;
}

.saihatss-featured-img {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.saihatss-featured-img img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.saihatss-gallery-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.saihatss-gallery-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    height: 150px;
}

.saihatss-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.saihatss-gallery-item:hover img {
    transform: scale(1.08);
}

.saihatss-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: #f5f5f7;
    color: #122134;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 20px;
}

.saihatss-back-btn:hover {
    background: #122134;
    color: white;
    transform: translateY(-3px);
}

.saihatss-share-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.saihatss-share-label {
    font-weight: 600;
    color: #122134;
}

.saihatss-share-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.saihatss-share-link.facebook {
    background: #3b5998;
}

.saihatss-share-link.twitter {
    background: #1da1f2;
}

.saihatss-share-link.whatsapp {
    background: #25d366;
}

.saihatss-share-link.email {
    background: #ea4335;
}

.saihatss-share-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.saihatss-video-player {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.saihatss-sidebar {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 25px;
}

.saihatss-sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #122134;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
}

.saihatss-related-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.saihatss-related-item:hover {
    transform: translateX(5px);
}

html[dir="rtl"] .saihatss-related-item:hover {
    transform: translateX(-5px);
}

.saihatss-related-thumb {
    width: 100px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.saihatss-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saihatss-related-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(18, 33, 52, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.saihatss-related-info {
    flex-grow: 1;
}

.saihatss-related-title {
    font-size: 15px;
    font-weight: 600;
    color: #122134;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.saihatss-related-meta {
    display: flex;
    justify-content: space-between;
    color: #6c757d;
    font-size: 12px;
}

/* Pagination */
.saihatss-pagination {
    padding: 30px;
    display: flex;
    justify-content: center;
}

.saihatss-pagination .pagination {
    gap: 8px;
}

.saihatss-pagination .page-item .page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    color: #5a6a7e;
    border: none;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.saihatss-pagination .page-item.active .page-link {
    background: #122134;
    color: white;
}

.saihatss-pagination .page-item .page-link:hover:not(.active) {
    background: #f8f9fa;
    color: #122134;
}

/* Responsive Styles */
@media (max-width: 1199px) {
    .saihatss-gallery-grid,
    .saihatss-video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 991px) {
    .saihatss-page-title {
        font-size: 36px;
    }
    .saihatss-media-tab {
        padding: 15px 20px;
        font-size: 16px;
    }
    .saihatss-featured-img img {
        height: 350px;
    }
}

@media (max-width: 767px) {
    .saihatss-page-title {
        font-size: 30px;
    }
    .saihatss-page-subtitle {
        font-size: 16px;
    }
    .saihatss-gallery-grid,
    .saihatss-video-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    .saihatss-gallery-img-container,
    .saihatss-video-img-container {
        height: 200px;
    }
    .saihatss-media-tab {
        padding: 12px 15px;
        font-size: 14px;
    }
    .saihatss-detail-title {
        font-size: 24px;
    }
    .saihatss-featured-img img {
        height: 250px;
    }
    .saihatss-gallery-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .saihatss-gallery-grid,
    .saihatss-video-grid {
        grid-template-columns: 1fr !important;
        padding: 0 15px;
    }
    
    .saihatss-gallery-img-container,
    .saihatss-video-img-container {
        height: 180px;
    }
    
    .saihatss-page-title {
        font-size: 28px;
    }
    
    .saihatss-page-subtitle {
        font-size: 14px;
    }
    
    .saihatss-tabs-container {
        margin-left: 15px;
        margin-right: 15px;
        width: calc(100% - 30px) !important;
    }
    
    .saihatss-detail-container {
        padding: 20px;
    }
}

/* RTL Support */
html[dir="rtl"] .saihatss-meta-item,
html[dir="rtl"] .saihatss-share-section,
html[dir="rtl"] .saihatss-related-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .saihatss-img-count {
    right: auto;
    left: 15px;
}

html[dir="rtl"] .saihatss-back-btn i {
    transform: rotate(180deg);
}

.saihatss-tab-content {
    width: 100% !important;
    padding: 30px 0 !important;
}

.saihatss-media-centre .row,
.saihatss-media-centre .col-lg-12 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.saihatss-view-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #122134;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.saihatss-gallery-card:hover .saihatss-view-btn {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* No content section */
.saihatss-no-content {
    width: 100% !important;
    padding: 50px 20px !important;
    text-align: center !important;
}

.saihatss-no-content i {
    font-size: 48px !important;
    color: #d0d4d9 !important;
    margin-bottom: 15px !important;
}

.saihatss-no-content p {
    font-size: 18px !important;
    color: #6c757d !important;
}

/* Enhanced RTL support for grid items */
html[dir="rtl"] .saihatss-gallery-card .saihatss-gallery-meta,
html[dir="rtl"] .saihatss-video-card .saihatss-video-meta {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .saihatss-gallery-title,
html[dir="rtl"] .saihatss-video-title {
    text-align: right;
}

/* Grid alignment fixes */
.saihatss-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    justify-content: center;
}

.saihatss-video-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    justify-content: center;
}

/* Ensure all children have consistent widths */
.saihatss-gallery-card, 
.saihatss-video-card {
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Fix pagination for RTL */
html[dir="rtl"] .saihatss-pagination .pagination {
    direction: rtl;
} 