/* ==========================================================================
   KEMENAG RI OFFICIAL HEADER, NAVIGATION, CARDS & SECTIONS STYLING
   ========================================================================== */

/* 1. Kemenag Official Topbar */
.kemenag-topbar {
    background: linear-gradient(90deg, #015412 0%, #017119 60%, #008138 100%);
    color: #ffffff;
    font-size: 0.78rem;
    padding: 0.45rem 0;
    border-bottom: 2px solid #ecbd00;
}

.kemenag-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.kemenag-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.kemenag-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.kemenag-badge-pill i {
    color: #ecbd00;
}

.kemenag-motto-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(236, 189, 0, 0.2);
    border: 1px solid rgba(236, 189, 0, 0.45);
    color: #fef08a;
    padding: 1px 8px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
}

.kemenag-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kemenag-quick-links {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.kemenag-quick-links a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.kemenag-quick-links a:hover {
    color: #ecbd00;
}

.kemenag-quick-links a i {
    color: #ecbd00;
    font-size: 0.75rem;
}

/* 2. Sticky Main Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(1, 113, 25, 0.08);
    padding: 0.65rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(1, 113, 25, 0.12);
}

.site-header .header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
}

.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.75rem;
    padding: 4px 0;
}

.site-logo,
.custom-logo-link img {
    height: 44px;
    max-height: 44px;
    width: auto;
    object-fit: contain;
}

.site-title-group {
    display: flex;
    flex-direction: column;
}

.site-title {
    margin: 0;
    line-height: 1.15;
}

.site-title a {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 800;
    color: #017119;
    letter-spacing: -0.3px;
    text-transform: uppercase;
    text-decoration: none;
}

.site-subtitle {
    font-size: 0.68rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.2px;
}

/* 3. Navigation */
.main-navigation {
    flex: 1 1 auto;
    margin: 0;
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    font-size: 0.84rem;
    padding: 0.55rem 0.85rem;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    white-space: nowrap;
}

.main-navigation ul li.current-menu-item > a,
.main-navigation ul li:first-child > a {
    background-color: rgba(1, 113, 25, 0.1);
    color: #017119;
    font-weight: 700;
}

.main-navigation ul li a:hover {
    color: #017119;
    background-color: #f0fdf4;
}

/* Dropdown Submenus (Desktop) */
.main-navigation .sub-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(1, 113, 25, 0.12);
    border-radius: 10px;
    min-width: 220px;
    padding: 0.5rem 0;
    z-index: 999;
    margin-top: 0.25rem;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children.focus > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li {
    display: block;
    width: 100%;
}

.main-navigation .sub-menu a {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 1.15rem;
    font-size: 0.84rem;
    color: #374151 !important;
    background: transparent !important;
    border-radius: 0;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.main-navigation .sub-menu li:last-child a {
    border-bottom: none;
}

.main-navigation .sub-menu a:hover {
    background-color: #f0fdf4 !important;
    color: #017119 !important;
    padding-left: 1.35rem;
}

.main-navigation .sub-menu .sub-menu {
    left: 100%;
    top: 0;
    margin-top: 0;
    margin-left: 0.2rem;
}

.main-navigation .menu-item-has-children > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.62rem;
    margin-left: 0.35rem;
    transition: transform 0.25s ease;
}

.main-navigation .sub-menu .menu-item-has-children > a::after {
    content: '\f054';
}

/* Mobile Nav Actions (Hidden on Desktop) */
.mobile-nav-actions {
    display: none;
}

/* Header Actions - PPDB & Social Media */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.btn-ppdb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    background: linear-gradient(135deg, #017119 0%, #008138 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 50px;
    border: 1px solid rgba(236, 189, 0, 0.5);
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(1, 113, 25, 0.22);
}

.btn-ppdb i {
    color: #ecbd00;
    font-size: 0.9rem;
}

.btn-ppdb:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(1, 113, 25, 0.32);
    background: linear-gradient(135deg, #015412 0%, #017119 100%);
}

.header-social {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background-color: #f0fdf4;
    color: #017119;
    border: 1px solid rgba(1, 113, 25, 0.15);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.social-icon:hover {
    background-color: #017119;
    color: #ffffff;
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
}

/* 4. News, Prestasi & Infografis Cards */
.news-card-large {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    transition: all 0.3s ease;
}

.news-card-large:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(1, 113, 25, 0.25);
}

.news-card-large .news-thumbnail {
    height: 230px;
    overflow: hidden;
    margin-bottom: 0;
}

.news-card-large .news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card-large:hover .news-thumbnail img {
    transform: scale(1.06);
}

.news-card-large .news-content {
    padding: 1rem 1.15rem 0.25rem;
}

.news-card-large .news-category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #017119;
    display: inline-block;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.news-card-large .news-heading {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.news-card-large .news-heading a {
    color: #111827;
    text-decoration: none;
    transition: color 0.25s;
}

.news-card-large .news-heading a:hover {
    color: #017119;
}

.news-card-large .news-date {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Horizontal Card (Grid Bottom) */
.news-card-horizontal {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.news-card-horizontal:hover {
    border-color: rgba(1, 113, 25, 0.3);
    box-shadow: var(--shadow-sm);
}

.news-content-mini {
    flex: 1;
    min-width: 0;
}

.news-thumbnail-mini {
    width: 96px;
    height: 82px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.news-thumbnail-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-category-mini {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #017119;
    display: block;
    margin-bottom: 0.25rem;
}

.news-heading-mini {
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-heading-mini a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.25s;
}

.news-heading-mini a:hover {
    color: #017119;
}

.news-date-mini {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Popular Sidebar */
.news-sidebar {
    background: #f8faf9;
    padding: 1.5rem;
    border-radius: 14px;
    border: 1px solid rgba(1, 113, 25, 0.12);
}

.popular-item {
    display: flex;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: flex-start;
    margin-bottom: 0;
}

.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-item .popular-number {
    font-size: 1.85rem;
    font-weight: 800;
    color: #017119;
    line-height: 1;
    opacity: 0.85;
    min-width: 28px;
}

.popular-item .popular-content .news-category {
    font-size: 0.68rem;
    font-weight: 700;
    color: #017119;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.popular-item .popular-heading {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.popular-item .popular-heading a:hover {
    color: #017119;
}

.popular-item .news-meta,
.popular-item .news-date {
    font-size: 0.75rem;
    color: #6b7280;
}

/* 5. Prestasi & Infografis Section */
.achievements-infografis-section {
    background-color: #f8faf9;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.prestasi-infografis-layout {
    display: grid;
    grid-template-columns: 2.1fr 0.9fr;
    gap: clamp(1.75rem, 3.5vw, 3rem);
    align-items: start;
}

.prestasi-wrapper,
.infografis-wrapper {
    min-width: 0;
    width: 100%;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.prestasi-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #017119;
    font-size: 2rem;
}

.prestasi-badges-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.prestasi-badge-pill {
    background: #017119;
    color: #ffffff;
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.prestasi-badge-pill.mini {
    font-size: 0.66rem;
    padding: 0.15rem 0.5rem;
}

.prestasi-level-tag {
    color: #017119;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.prestasi-level-tag.mini {
    font-size: 0.7rem;
}

.infografis-container {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.infografis-slide-link {
    display: block;
    width: 100%;
}

.infografis-slide-link img {
    width: 100%;
    height: auto;
    display: block;
}

.infografis-empty-box {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6b7280;
    background: #f3f4f6;
}

/* Kemenag Statistics Mini Grid */
.stats-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-top: 1rem;
}

.stat-mini-card {
    border-radius: 12px;
    padding: 1rem 0.75rem;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(1, 113, 25, 0.15);
    transition: transform 0.3s ease;
}

.stat-mini-card:hover {
    transform: translateY(-4px);
}

.stat-mini-card.kemenag-stat-green {
    background: linear-gradient(135deg, #017119 0%, #15803d 100%);
}

.stat-mini-card.kemenag-stat-emerald {
    background: linear-gradient(135deg, #047857 0%, #10b981 100%);
}

.stat-mini-card.kemenag-stat-gold {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
}

.stat-mini-card.kemenag-stat-teal {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
}

.stat-icon-mini {
    width: 38px;
    height: 38px;
    margin: 0 auto 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #ffffff;
}

.stat-number-mini,
.stat-text-mini {
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

.stat-label-mini {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.prestasi-year-selector {
    font-size: 0.65rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    padding: 2px 6px;
    margin-bottom: 0.25rem;
    cursor: pointer;
    outline: none;
}

.prestasi-year-selector option {
    color: #111827;
    background: #ffffff;
}

/* 6. Video Gallery Section (Homepage & Archive) */
.video-gallery-section {
    background-color: #ecfdf5;
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(1, 113, 25, 0.1);
}

.video-slider-wrapper {
    position: relative;
    padding: 0 46px;
}

.video-gallery-slider {
    padding: 8px 4px;
    overflow: hidden;
}

.video-card-carousel {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 16 / 9;
    background: #111827;
}

.video-link-block {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.video-link-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card-carousel:hover .video-link-block img {
    transform: scale(1.06);
}

.video-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #017119, #01410e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 2.5rem;
}

.video-dark-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.22);
    transition: background 0.3s;
}

.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.play-btn-inner {
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #017119;
    padding-left: 3px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.video-card-carousel:hover .play-btn-inner {
    background: #ecbd00;
    color: #111827;
}

.video-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: #ffffff;
}

.video-info-overlay h3 {
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-next,
.video-prev {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #017119;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    cursor: pointer;
    transition: all 0.25s ease;
}

.video-next:hover,
.video-prev:hover {
    background: #017119;
    color: #ffffff;
}

.video-next { right: 0; }
.video-prev { left: 0; }

/* 7. Media Ajar & Informasi Section */
.media-informasi-section {
    padding: 3rem 0;
    background: #ffffff;
}

.media-informasi-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: clamp(1.75rem, 3.5vw, 3rem);
    align-items: start;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

.column-title {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 800;
    color: #111827;
    margin: 0;
    text-transform: uppercase;
}

.column-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, #017119, #ecbd00);
}

.link-more {
    font-size: 0.88rem;
    font-weight: 600;
    color: #017119;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.link-more:hover {
    color: #015412;
    gap: 0.6rem;
}

.media-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.media-small-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.media-card-large,
.media-card-small {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.3s ease;
}

.media-card-large:hover,
.media-card-small:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(1, 113, 25, 0.3);
}

.media-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.media-thumb-large {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
}

.media-thumb-small {
    width: 100%;
    height: 135px;
    overflow: hidden;
    background: #f3f4f6;
}

.media-thumb-large img,
.media-thumb-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.media-card-large:hover img,
.media-card-small:hover img {
    transform: scale(1.05);
}

.media-content-large {
    padding: 1rem;
}

.media-content-small {
    padding: 0.8rem;
}

.media-cat-badge {
    display: inline-block;
    background: #dcfce7;
    color: #017119;
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.media-cat-badge.mini {
    font-size: 0.66rem;
    padding: 0.15rem 0.5rem;
    margin-bottom: 0.35rem;
}

.media-card-heading {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0 0 0.45rem;
    color: #111827;
    line-height: 1.4;
}

.media-card-heading.mini {
    font-size: 0.9rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-card-link:hover .media-card-heading {
    color: #017119;
}

.media-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Informasi List */
.informasi-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    background: #f8faf9;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #017119;
    transition: all 0.25s ease;
}

.info-item:hover {
    transform: translateX(4px);
    background: #f0fdf4;
    border-color: rgba(1, 113, 25, 0.3);
    border-left-color: #ecbd00;
}

.info-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-icon.pdf { color: #dc2626; background: #fee2e2; }
.info-icon.doc { color: #2563eb; background: #dbeafe; }
.info-icon.xls { color: #017119; background: #dcfce7; }
.info-icon.ppt { color: #d97706; background: #fef3c7; }
.info-icon.zip { color: #4b5563; background: #f3f4f6; }
.info-icon.other { color: #017119; background: #dcfce7; }

.info-details {
    flex: 1;
    min-width: 0;
}

.info-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.25rem;
}

.info-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.25s;
}

.info-title a:hover {
    color: #017119;
}

.info-meta {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.info-downloads {
    color: #017119;
    font-weight: 600;
}

/* 8. Layanan Digital Section */
.layanan-digital-section {
    padding: 3rem 0;
    background: linear-gradient(to right, #f0fdf4, #ffffff, #f0fdf4);
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.layanan-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.layanan-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.75rem 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    justify-content: space-between;
}

.layanan-grid::-webkit-scrollbar {
    display: none;
}

.layanan-item {
    flex: 0 0 auto;
    width: 125px;
    text-align: center;
}

.layanan-link {
    text-decoration: none;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    transition: transform 0.3s ease;
}

.layanan-link:hover {
    transform: translateY(-5px);
    color: #017119;
}

.layanan-icon-circle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(1, 113, 25, 0.18);
    transition: all 0.3s ease;
    overflow: hidden;
}

.layanan-link:hover .layanan-icon-circle {
    border-color: #017119;
    background: #f0fdf4;
    box-shadow: var(--shadow-md);
}

.layanan-icon-circle img {
    width: 58%;
    height: 58%;
    object-fit: contain;
}

.layanan-icon-circle i {
    font-size: 1.75rem;
    color: #017119;
}

.layanan-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.25;
}

.layanan-nav {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #017119;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s;
    flex-shrink: 0;
}

.layanan-nav:hover {
    background: #017119;
    color: #ffffff;
    border-color: #017119;
}

/* 9. Footer Styling (Kemenag Dark Forest Green) */
.site-footer {
    background: linear-gradient(180deg, #062e12 0%, #041f0c 100%);
    color: #e5e7eb;
    padding: 3.5rem 0 1.5rem;
    margin-top: 0;
    border-top: 4px solid #ecbd00;
}

.footer-widgets {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.2fr 0.9fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-widget {
    display: flex;
    flex-direction: column;
}

.footer-widget .widget-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.15rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ecbd00;
    display: inline-block;
}

.footer-widget .textwidget p {
    color: #d1d5db;
    line-height: 1.65;
    font-size: 0.9rem;
}

.footer-links li {
    margin-bottom: 0.55rem;
}

.footer-links a {
    color: #d1d5db;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #ecbd00;
    padding-left: 4px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.footer-contact i {
    color: #ecbd00;
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.footer-social {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.footer-social .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 50%;
    transition: all 0.3s;
}

.footer-social .social-link:hover {
    background-color: #ecbd00;
    color: #062e12;
    transform: translateY(-3px);
}

.site-info {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.5rem;
    text-align: center;
}

.site-info p {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* 10. Archive Pages (Prestasi, Video, Berita, Media, Informasi) */
.archive-prestasi-section,
.archive-video-section {
    padding: 3rem 0;
    min-height: 60vh;
}

.archive-header {
    text-align: center;
    margin-bottom: 2.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.archive-title {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 800;
    color: #017119;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.archive-description {
    color: #6b7280;
    font-size: 1rem;
    max-width: 620px;
    margin: 0 auto;
}

.prestasi-filters,
.video-filters {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.88rem;
}

.filter-group label i {
    color: #017119;
}

.filter-group select {
    padding: 0.6rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.92rem;
    color: #374151;
    background-color: #ffffff;
}

.btn-filter,
.btn-reset {
    padding: 0.6rem 1.35rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    border: none;
}

.btn-filter {
    background: #017119;
    color: #ffffff;
}

.btn-reset {
    background: #ef4444;
    color: #ffffff;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.video-grid,
.news-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.video-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.video-thumbnail {
    position: relative;
    width: 100%;
}

.video-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-embed-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-category {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.3rem 0.75rem;
    background: #017119;
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.video-info {
    padding: 1.15rem;
}

.video-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.video-title a:hover {
    color: #017119;
}

.video-excerpt {
    color: #6b7280;
    font-size: 0.88rem;
}

/* Single Post Styling */
.single .site-main.edu-container {
    max-width: 880px !important;
    margin: 2rem auto;
    background: #ffffff;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
}

.single .entry-title {
    font-size: clamp(1.45rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.single .entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.single .entry-content {
    color: #374151;
    font-size: 1.05rem;
    line-height: 1.8;
}

.single .entry-content p {
    margin-bottom: 1.25rem;
}

/* Popup Modal */
.popup-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.popup-content {
    position: relative;
    max-width: 560px;
    max-height: 90vh;
    margin: 0 1rem;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    z-index: 1;
}

.popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}

.popup-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 88vh;
    object-fit: contain;
}

/* AI Chatbot Widget */
#edu-ai-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}

.ai-float-btn {
    background: linear-gradient(135deg, #017119 0%, #008138 100%);
    color: white;
    border: 2px solid rgba(236, 189, 0, 0.6);
    padding: 0.85rem 1.35rem;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(1, 113, 25, 0.3);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.ai-float-btn:hover {
    transform: translateY(-2px);
    background: #015412;
}

.ai-chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: min(350px, calc(100vw - 2rem));
    height: min(480px, calc(100vh - 120px));
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.ai-chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.ai-header {
    background: linear-gradient(135deg, #017119 0%, #008138 100%);
    color: white;
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

#edu-ai-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
}

.ai-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8faf9;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ai-msg {
    max-width: 82%;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.35;
    word-wrap: break-word;
}

.ai-msg.bot {
    align-self: flex-start;
    background: white;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.ai-msg.user {
    align-self: flex-end;
    background: #017119;
    color: white;
}

.ai-input-area {
    padding: 0.75rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
}

#ai-input {
    flex: 1;
    padding: 0.65rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
}

#ai-send {
    background: #017119;
    color: white;
    border: none;
    width: 42px;
    border-radius: 8px;
    cursor: pointer;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 1024px) {
    .site-header .header-main-row {
        flex-wrap: wrap;
        position: relative;
    }

    .header-social {
        display: none;
    }

    .menu-toggle {
        display: inline-flex !important;
        align-items: center;
        gap: 0.45rem;
        background-color: #f0fdf4 !important;
        color: #017119 !important;
        border: 1.5px solid #017119 !important;
        padding: 0.5rem 0.9rem !important;
        border-radius: 8px !important;
        font-weight: 700;
        font-size: 0.88rem !important;
        cursor: pointer;
    }

    .main-navigation {
        width: 100%;
        order: 4;
        display: none;
        flex-direction: column;
        background: #ffffff;
        margin-top: 0.65rem;
        border-top: 2px solid #017119;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.12);
        padding: 0.5rem 0;
    }

    .main-navigation.toggled {
        display: flex !important;
    }

    .main-navigation ul {
        display: flex !important;
        flex-direction: column !important;
        width: 100%;
        align-items: stretch;
        gap: 0;
    }

    .main-navigation ul li {
        width: 100%;
        border-bottom: 1px solid #f3f4f6;
    }

    .main-navigation ul li a {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 0.85rem 1.25rem;
        font-size: 0.95rem;
        border-radius: 0;
    }

    /* Submenu Accordion on Mobile/Tablet */
    .main-navigation .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 3px solid #017119 !important;
        background: #f8faf9 !important;
        margin: 0 0 0 1.25rem !important;
        padding: 0 !important;
        display: none !important;
        min-width: 0;
    }

    .main-navigation .menu-item-has-children.submenu-open > .sub-menu,
    .main-navigation .menu-item-has-children:hover > .sub-menu {
        display: block !important;
    }

    .mobile-nav-actions {
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
        padding: 1rem 1.25rem 0.5rem;
        border-top: 1px solid #e5e7eb;
    }

    .mobile-ppdb-btn {
        width: 100%;
    }

    .mobile-nav-socials {
        display: flex;
        justify-content: center;
        gap: 0.65rem;
    }

    .prestasi-infografis-layout,
    .media-informasi-grid {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-grid,
    .news-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .kemenag-topbar-right {
        display: none;
    }

    .kemenag-topbar-inner {
        justify-content: center;
    }

    .header-actions {
        display: none !important;
    }

    .site-branding {
        max-width: calc(100% - 105px);
    }

    .site-subtitle {
        font-size: 0.62rem;
    }

    .video-slider-wrapper {
        padding: 0 36px;
    }

    .media-featured-grid,
    .media-small-grid {
        grid-template-columns: 1fr;
    }

    .layanan-nav {
        display: none;
    }

    .layanan-grid {
        justify-content: flex-start;
        gap: 1rem;
    }

    .layanan-item {
        width: 105px;
    }

    .layanan-icon-circle {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 540px) {
    .kemenag-motto-tag {
        display: none;
    }

    .achievements-grid,
    .video-grid,
    .news-archive-grid,
    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-filter,
    .btn-reset {
        width: 100%;
        justify-content: center;
    }

    .video-slider-wrapper {
        padding: 0;
    }

    .video-next,
    .video-prev {
        width: 34px;
        height: 34px;
    }

    .video-next { right: 6px; }
    .video-prev { left: 6px; }
}
