.single-page-container .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.single-page-container .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.widget-header {
    background: #004FA0;
    color: #fff;
    font-size: 22px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px;
    text-transform: uppercase;
    border-radius: 10px 10px 0 0;
    height: 50px;
    display: flex;
    justify-content: center;
}

.single-page-container .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.single-page-container .col-lg-8, .single-page-container .col-md-8, .single-page-container .col-sm-12 {
    padding: 0 10px;
}

.announcements-sidebar-widget .widget-content {
    border-radius: 0 0 10px 10px;
    border: 1px solid #EFEFEF;
    background: #FFF;
}

ul.announcements-list {
    padding: 0;
    list-style: none;
    padding: 12px;
}

ul.announcements-list li.announcement-item {
    display: flex;
    border-bottom: 1px solid #EFEFEF;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

ul.announcements-list li.announcement-item a.announcement-link {
    color: #2E2E2E;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 22.4px;
}

ul.announcements-list li.announcement-item:hover a {
    color: #7E0004;
}

ul.announcements-list li.announcement-item:hover rect {
    stroke: #7E0004;
}

.single-page-container {
    padding-top: 30px;
}

.featured-news-list .news-title a {
    color: #004FA0;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
}

.featured-news-list .read-more {
    color: #0D4C92;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 130%;
    letter-spacing: 0.175px;
}

.featured-news-list .date-box {
    border-radius: 6px;
    background: #EEE;
    display: flex;
    flex-direction: column;
    color: #0D4C92;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 130%;
    letter-spacing: 0.016px;
    justify-content: center;
    align-items: center;
    width: 41px;
    height: 46px;
    overflow: hidden;
    margin-top: 10px;
}

.featured-news-list .date-box .month {
    background: #0D4C92;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 130%;
    letter-spacing: 0.035px;
    color: #ffffff;
    width: 100%;
    height: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-date-text {
    display: flex;
    gap: 16px;
}

.group-date-text .news-title {
    margin: 0;
}

.featured-news-list .news-title a:hover, .featured-news-list .read-more:hover {
    color: #7E0004;
}

.featured-news-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.featured-news-sidebar-widget {
    margin-top: 30px;
}

/* Single Page Footer Widgets */
.single-page-container-footer {
    margin-top: 30px;
}

.footer-widgets-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-widget {
    display: flex;
    align-items: center;
}

/* Share Widget Footer */
.share-widget-footer {
    flex-shrink: 0;
}

.share-buttons-horizontal {
    display: flex;
    gap: 10px;
}

.share-facebook-horizontal {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: flex;
    padding: 0 6px;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border-radius: 4px;
    background: #346ED4;
}

.share-facebook-horizontal:hover {
    background-color: #166fe5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
    color: #fff;
    text-decoration: none;
}

.share-facebook-horizontal i {
    font-size: 16px;
}

/* Rating Widget Footer */
.rating-widget-footer {
    flex-shrink: 0;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-label {
    color: #2E2E2E;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 22.4px;
}

.rating-stars-display {
    display: flex;
    gap: 2px;
}

.star-display {
    font-size: 18px;
    color: #ddd;
    transition: color 0.2s ease;
}

.star-display.filled {
    color: #ffc107;
}

/* Responsive Design for Footer Widgets */
@media (max-width: 768px) {
    .footer-widgets-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-widget {
        width: 100%;
    }

    .share-buttons-horizontal {
        width: 100%;
    }

    .share-facebook-horizontal {
        width: 100%;
        justify-content: center;
    }

    .rating-display {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Additional Share Buttons */
.share-twitter-horizontal {
    background-color: #1da1f2;
}

.share-twitter-horizontal:hover {
    background-color: #1a91da;
    box-shadow: 0 2px 8px rgba(29, 161, 242, 0.3);
}

.share-linkedin-horizontal {
    background-color: #0077b5;
}

.share-linkedin-horizontal:hover {
    background-color: #006097;
    box-shadow: 0 2px 8px rgba(0, 119, 181, 0.3);
}

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

.share-whatsapp-horizontal:hover {
    background-color: #20ba5a;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

/* Rating Modal Styles */
.rating-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.rating-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rating-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #005aab, #0077cc);
    color: #fff;
    border-radius: 12px 12px 0 0;
}

.rating-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.rating-modal-close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #fff;
    transition: color 0.2s ease;
}

.rating-modal-close:hover {
    color: #ffd700;
}

.rating-modal-body {
    padding: 30px 25px;
}

.rating-form-container {
    text-align: center;
}

.rating-form-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 25px;
    font-weight: 500;
}

.rating-stars-input {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.rating-stars-input input[type="radio"] {
    display: none;
}

.star-input-label {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star-input-label:hover,
.star-input-label.hover {
    color: #ffc107;
    transform: scale(1.1);
}

.star-input-label.selected {
    color: #ffc107;
}

.rating-description {
    margin-bottom: 25px;
    min-height: 20px;
}

#rating-text {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.rating-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-submit-rating,
.btn-cancel-rating {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit-rating {
    background-color: #005aab;
    color: #fff;
}

.btn-submit-rating:hover {
    background-color: #0077cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 90, 171, 0.3);
}

.btn-submit-rating:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-cancel-rating {
    background-color: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn-cancel-rating:hover {
    background-color: #e9ecef;
    color: #333;
}

/* Rating Success */
.rating-success {
    text-align: center;
    padding: 20px;
}

.rating-success p {
    font-size: 16px;
    color: #28a745;
    margin-bottom: 20px;
    font-weight: 500;
}

.btn-close-modal {
    padding: 10px 20px;
    background-color: #005aab;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.btn-close-modal:hover {
    background-color: #0077cc;
}

/* Make stars clickable in footer */
.rating-stars-display {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.rating-stars-display:hover {
    transform: scale(1.05);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .rating-modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .rating-modal-header {
        padding: 15px 20px;
    }

    .rating-modal-body {
        padding: 20px;
    }

    .rating-form-actions {
        flex-direction: column;
    }

    .btn-submit-rating,
    .btn-cancel-rating {
        width: 100%;
    }

    .star-input-label {
        font-size: 28px;
    }
}

/* Rating Statistics Styles */
.rating-stats {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.rating-average {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.rating-average .rating-value {
    font-size: 24px;
    font-weight: 600;
    color: #005aab;
}

.rating-average .rating-stars {
    display: flex;
    gap: 2px;
}

.rating-average .star {
    font-size: 20px;
    color: #ddd;
}

.rating-average .star.filled {
    color: #ffc107;
}

.rating-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.rating-distribution {
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.star-label {
    font-size: 12px;
    color: #666;
    min-width: 30px;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #ffd700);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.bar-count {
    font-size: 12px;
    color: #666;
    min-width: 30px;
    text-align: right;
}

.footer-widgets-container {
    display: flex;
    padding: 4px 8px;
    align-items: center;
    align-self: stretch;
    border-radius: 4px;
    background: rgba(224, 224, 224, 0.30);
}

li.related-post-item a {
    color: #2E2E2E;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 22.4px;
}

li.related-post-item a:hover {
    color: #7E0004;
}

ul.related-posts-list {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.related-posts-section {
    padding-bottom: 24px;
    border-top: 1px solid #848A8F;
    padding-top: 24px;
    margin-top: 24px;
}

h3.related-posts-title {
    display: inline-flex;
    height: 40px;
    padding: 8px 14px;
    align-items: center;
    gap: 10px;
    background: #004FA0;
    color: #ffffff;
    font-size: 22px;
    font-style: normal;
    font-weight: 700;
    line-height: 30.8px;
    margin: 0;
}

.related-posts-header {
    border-bottom: 2px solid #004FA0;
    margin-bottom: 16px;
}

.single-page-container .col-md-4 {
    margin-bottom: 30px;
}

.post-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 15px;
    justify-content: right;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.toolbar-btn:hover {
    background: #f1f1f1;
    border-color: #999;
}

.toolbar-label {
    font-weight: bold;
    font-size: 14px;
}

/* Dark mode */
body.dark-mode {
    background: #111;
    color: #f1f1f1;
}

body.dark-mode .post-toolbar .toolbar-btn {
    background: #333;
    border-color: #555;
    color: #fff;
}

body.dark-mode .elementor-nav-menu--main .elementor-item {
    color: #ffffff !important;
}

body.dark-mode li.related-post-item a {
    color: #ffffff;
}

body.dark-mode .featured-news-list article.featured-news-item {
    background: #ffffff;
}

@media (max-width: 992px) {
    .single-page-container .col-md-8, .single-page-container .col-md-4 {
        flex: 100%;
        max-width: 100%;
    }

    .single-page-container .row {
        margin: 0;
    }

    .single-page-container .row .col-sm-12 {
        padding: 0;
    }

    .single-page-container .row main#primary {
        padding: 0;
    }

    .single-page-container .col-md-4 {
        margin-bottom: 30px;
    }

}