/* 
    Custom Styling for Sekolah Islam Athirah 2026
    Tidying up and Modernizing the UI
*/

/* 1. Header & Navigation */
#header .header-inner {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#header.sticky-active .header-inner {
    background: rgba(17, 17, 17, 0.95) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

#header.sticky-active #mainMenu nav > ul > li > a {
    color: #fff !important;
}

#header.sticky-active #mainMenu nav > ul > li > a:hover {
    color: #006837 !important;
}

#logo img {
    max-height: 60px !important;
    width: auto;
    margin-top: 0 !important;
    transition: all 0.3s ease;
}

#header.sticky-active #logo .logo-default {
    display: none !important;
}

#header.sticky-active #logo .logo-dark {
    display: block !important;
}

#mainMenu nav > ul > li > a {
    font-weight: 500;
    letter-spacing: 0.5px;
    font-size: 13px;
}

/* 2. News & Article Cards */
.post-entry, .post-thumbnail-entry, .portfolio-item-wrap {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    margin-bottom: 20px;
}

.post-entry:hover, .post-thumbnail-entry:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.post-image img, .post-thumbnail-entry img {
    object-fit: cover !important;
    width: 100% !important;
}

/* Fix specific image heights */
.post-entry .post-image img {
    height: 250px !important; /* Standard height for grid news */
}

.post-thumbnail-entry img {
    height: 180px !important;
}

/* 3. Typography & Headings */
.heading-text.heading-line h4 {
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.heading-text.heading-line h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #006837; /* Brand color */
}

/* 4. Spacing */
section:not(.no-padding) {
    padding: 60px 0;
}

.p-t-40 { padding-top: 60px !important; }
.p-b-40 { padding-bottom: 60px !important; }

/* 5. Content Spacing */
.post-thumbnail-content {
    padding: 15px;
}

.post-thumbnail-content h3 a {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    color: #222;
}

.post-thumbnail-content p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.post-thumbnail-content span {
    font-size: 11px;
    margin-right: 10px;
    color: #999;
}

/* Call to action styling */
.call-to-action-dark {
    padding: 60px 0 !important;
    border-radius: 0;
}

.call-to-action-dark h3 {
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Magazine section */
.portfolio-item-wrap {
    border: none !important;
}

.portfolio-description {
    background: rgba(220, 53, 69, 0.9) !important;
}

/* 7. Dark Header & Menu */
#header.dark .header-inner {
    background: #111 !important;
}

#mainMenu nav > ul > li > a {
    color: #fff !important;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    padding: 15px 12px !important;
}

@media (max-width: 991px) {
    #mainMenu nav > ul > li > a {
        color: #333 !important; /* Fix for invisible text on mobile */
    }
}

#mainMenu nav > ul > li > a i {
    margin-right: 8px;
    font-size: 14px;
    color: #006837; /* Athirah Green for icons */
}

/* 8. Full-Width News Slider (3 Items) */
.grid-articles .post-entry {
    position: relative;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    overflow: hidden;
}

.grid-articles .post-entry .post-image img {
    height: 350px !important; /* Shortened height for 4:3 aspect ratio feel */
    object-fit: cover;
    filter: brightness(0.85);
    transition: all 0.5s ease;
}

.grid-articles .post-entry:hover .post-image img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.grid-articles .post-entry-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

.grid-articles .post-entry-meta-category .badge {
    background-color: #dc3545 !important;
    padding: 5px 12px;
    font-size: 11px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: inline-block;
}

.grid-articles .post-entry-meta-title h2 {
    margin-bottom: 15px;
}

.grid-articles .post-entry-meta-title h2 a {
    color: #fff !important;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.grid-articles .post-date {
    color: rgba(255,255,255,0.7) !important;
    font-size: 13px;
    margin-right: 15px;
}

/* Circular Arrows for Carousel */
.owl-carousel .owl-nav button {
    width: 50px !important;
    height: 50px !important;
    background: #fff !important;
    color: #000 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.owl-carousel .owl-nav button:hover {
    background: #5dbb8b !important;
    color: #fff !important;
}

.owl-carousel .owl-nav .owl-prev { left: 20px !important; }
.owl-carousel .owl-nav .owl-next { right: 20px !important; }

.post-entry-meta-info {
    display: flex;
    gap: 15px;
}

/* 9. Shared News List Styles */
.shared-news-item {
    display: flex;
    margin-bottom: 25px;
    align-items: flex-start;
}

.shared-news-thumb {
    flex: 0 0 85px;
    height: 85px;
    border-radius: 18px;
    overflow: hidden;
    margin-right: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.shared-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shared-news-content {
    flex: 1;
}

.shared-news-category {
    color: #3b5998;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.shared-news-content h5 {
    margin-bottom: 5px;
    line-height: 1.3;
}

.shared-news-content h5 a {
    color: #333;
    font-weight: 700;
    font-size: 15px;
}

.shared-news-date {
    color: #999;
    font-size: 12px;
}

/* 10. Highlights Feature Styles */
.highlight-feature-card {
    position: relative;
    border-radius: 45px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    height: 500px;
}

.highlight-feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.highlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
}

.highlight-overlay h2 a {
    color: #fff;
    font-weight: 800;
    font-size: 28px;
    margin-bottom: 15px;
    display: block;
}

.highlight-meta {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.highlight-meta span {
    margin-right: 20px;
}

/* 11. AthirahTV Styles */
.section-athirahtv {
    background-color: #f8f9fa !important;
    background-image: radial-gradient(#e9ecef 1px, transparent 1px) !important;
    background-size: 20px 20px !important;
}

.video-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.03);
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.video-thumb {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.1);
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff0000;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    z-index: 2;
}

.video-card:hover .video-play-btn {
    background: #ff0000;
    color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 20px;
}

.video-info h5 {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 12. Insight Card Styles */
.insight-card {
    display: flex;
    background: #fff;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    min-height: 400px;
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.insight-image-area {
    flex: 0 0 35%;
    position: relative;
    background: #f4f7f6;
    overflow: hidden;
}

.insight-author-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 74, 53, 0.85);
    color: #fff;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 700;
    z-index: 5;
    text-align: center;
    backdrop-filter: blur(5px);
}

.insight-image-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom;
    display: block;
}

.insight-content-area {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.insight-badge {
    color: #3b5998;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
    letter-spacing: 1px;
}

.insight-card-title {
    font-size: 26px;
    font-weight: 800;
    color: #333;
    line-height: 1.3;
    margin-bottom: 20px;
    font-family: 'Outfit', sans-serif;
}

.insight-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insight-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.insight-footer .btn-read-more {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3b5998;
    background: transparent;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.insight-footer .btn-read-more:hover {
    color: #1a4a35;
    transform: translateX(5px);
}

.insight-footer .btn-read-more i {
    margin-left: 8px;
    font-size: 12px;
}

@media (max-width: 991px) {
    .insight-card {
        flex-direction: column;
        min-height: auto;
    }
    .insight-image-area {
        flex: 0 0 300px;
        width: 100%;
    }
    .insight-content-area {
        padding: 30px;
    }
}
