/* MI ASY-SYAUQI STYLE KEMENAG LAYOUT */

:root {
    --kemenag-dark-green: #0d5e35;
    --kemenag-light-green: #eaf3ed;
    --kemenag-text-dark: #222222;
    --kemenag-text-grey: #666666;
    --kemenag-border: #e0e0e0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f7f9f8;
    background-image: linear-gradient(rgba(247, 249, 248, 0.4), rgba(247, 249, 248, 0.4)), url('../img/bg-pattern.png');
    background-repeat: repeat;
    background-attachment: fixed;
}

/* =========================================
   HEADER & NAVBAR OVERRIDES (If applicable)
   ========================================= */
.top-bar-kemenag {
    background-color: var(--kemenag-dark-green);
    color: #fff;
    padding: 8px 0;
    font-size: 12px;
}

.top-bar-kemenag a {
    color: #fff;
    text-decoration: none;
    margin-right: 15px;
}

.top-bar-kemenag .social-icons a {
    margin-left: 10px;
    margin-right: 0;
}

.header-main-kemenag {
    background: #fff;
    padding: 15px 0;
}

.header-main-kemenag .logo-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-main-kemenag .logo-left img {
    height: 45px;
}

.header-main-kemenag .logo-right {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-end;
}

.header-main-kemenag .logo-right img {
    height: 50px;
}

/* Tagline alamat di header — warna hijau tua */
.header-main-kemenag .brand-logo-centered p {
    color: #0d5e35 !important;
    font-weight: 700;
}

.nav-kemenag {
    background-color: var(--kemenag-dark-green);
}

.nav-kemenag .navbar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.nav-kemenag .navbar-menu>li>a {
    color: #fff;
    text-decoration: none;
    padding: 15px 12px;
    display: block;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-kemenag .navbar-menu>li>a:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* =========================================
   HERO SECTION
   ========================================= */
.hero-assalam {
    position: relative;
    width: 100%;
    height: 550px;
    background-color: #eee;
    overflow: hidden;
}

.hero-assalam-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-assalam-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 40%, rgba(255, 255, 255, 0) 70%);
    display: flex;
    align-items: center;
}

.hero-assalam-content {
    max-width: 600px;
}

.hero-assalam-content p.welcome {
    font-size: 20px;
    color: #333;
    margin-bottom: 5px;
}

.hero-assalam-content h1 {
    font-size: 55px;
    font-weight: 800;
    color: var(--kemenag-dark-green);
    margin-bottom: 5px;
    line-height: 1.1;
}

.hero-assalam-content h3 {
    font-size: 24px;
    color: #555;
    font-weight: 400;
    margin-bottom: 30px;
}

.hero-assalam-content p.quote {
    font-size: 16px;
    font-style: italic;
    color: #444;
    margin-bottom: 25px;
    font-weight: 500;
}

.btn-assalam {
    background-color: var(--kemenag-dark-green);
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-assalam:hover {
    background-color: #094727;
    color: #fff;
}


/* =========================================
   QUICK LINKS (OVERLAP)
   ========================================= */
.quick-links-assalam {
    position: relative;
    z-index: 10;
    margin-top: -50px;
    margin-bottom: 60px;
}

.qla-wrapper {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 30px 15px;
}

.qla-item {
    text-align: center;
    text-decoration: none;
    color: inherit;
    padding: 0 10px;
    border-right: 1px solid #f0f0f0;
}

.qla-item:last-child {
    border-right: none;
}

.qla-item:hover .qla-icon {
    transform: translateY(-5px);
}

.qla-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--kemenag-light-green);
    color: var(--kemenag-dark-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s;
}

.qla-item h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--kemenag-dark-green);
    margin: 0 0 5px 0;
}

.qla-item p {
    font-size: 11px;
    color: var(--kemenag-text-grey);
    margin: 0;
}


/* =========================================
   SAMBUTAN KEPALA MADRASAH
   ========================================= */
.sambutan-assalam {
    margin-bottom: 60px;
}

.sambutan-wrapper {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
}

.sambutan-img {
    width: 35%;
    position: relative;
}

.sambutan-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sambutan-img-label {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.sambutan-content {
    width: 65%;
    padding: 50px;
    position: relative;
    background-image: url('../img/pattern-islamic.png');
    /* Opsional */
    background-position: right center;
    background-repeat: no-repeat;
    background-size: contain;
}

.sambutan-content h2 {
    color: var(--kemenag-dark-green);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 25px;
}

.sambutan-content p {
    color: var(--kemenag-text-dark);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 15px;
}


/* =========================================
   STATS BANNER
   ========================================= */
.stats-banner-assalam {
    background: var(--kemenag-dark-green);
    border-radius: 15px;
    padding: 30px 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
    color: #fff;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-box i {
    font-size: 40px;
    opacity: 0.9;
}

.stat-box-content h3 {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

.stat-box-content p {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}


/* =========================================
   3 COLUMNS: BERITA, PENGUMUMAN, AGENDA
   ========================================= */
.three-cols-assalam {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.col-assalam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--kemenag-light-green);
}

.col-assalam-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--kemenag-dark-green);
    margin: 0;
}

.col-assalam-header a {
    font-size: 12px;
    color: var(--kemenag-text-grey);
    text-decoration: none;
}

.col-assalam-header a:hover {
    color: var(--kemenag-dark-green);
}

/* List Item styles (Berita & Pengumuman) */
.list-assalam-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.list-assalam-img {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.list-assalam-icon {
    width: 60px;
    height: 60px;
    background: var(--kemenag-light-green);
    color: var(--kemenag-dark-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.list-assalam-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--kemenag-text-dark);
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.list-assalam-text p {
    font-size: 12px;
    color: var(--kemenag-text-grey);
    margin: 0;
}

/* Calendar Widget (Agenda) */
.calendar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 700;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 5px;
    font-size: 12px;
}

.calendar-day-name {
    font-weight: 600;
    color: var(--kemenag-text-grey);
    margin-bottom: 10px;
}

.calendar-day {
    padding: 5px 0;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.calendar-day.active {
    background: var(--kemenag-dark-green);
    color: #fff;
}

.calendar-event {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 15px;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.calendar-event-icon {
    width: 40px;
    height: 40px;
    background: var(--kemenag-light-green);
    color: var(--kemenag-dark-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.calendar-event-text h4 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 3px 0;
    color: #222;
}

.calendar-event-text p {
    font-size: 11px;
    color: var(--kemenag-text-grey);
    margin: 0;
}


/* =========================================
   FOOTER
   ========================================= */
.footer-assalam {
    background-color: var(--kemenag-dark-green, #0d5e35) !important;
    color: #ffffff !important;
    padding: 70px 0 35px;
    font-size: 14px;
}

.footer-assalam p,
.footer-assalam span,
.footer-assalam li,
.footer-assalam div {
    color: #ffffff !important;
}

.footer-assalam-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1.2fr 1.2fr 1.8fr;
    gap: 25px;
}

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

.footer-col h4 {
    color: #ffffff !important;
    font-weight: 800;
    font-size: 17px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
    padding-bottom: 10px;
    letter-spacing: 0.5px;
}

.footer-col p {
    line-height: 1.75;
    color: #ffffff !important;
    margin-bottom: 16px;
}

.footer-assalam a {
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.25s ease;
}

.footer-assalam a:hover {
    color: #f39c12 !important;
    text-decoration: underline;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li span,
.footer-links li a {
    color: #ffffff !important;
    line-height: 1.6;
}

.footer-contact li i {
    color: #f39c12 !important;
    font-size: 15px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-assalam .footer-social {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-assalam .footer-contact li,
.footer-assalam .footer-links li {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    color: #ffffff !important;
}

.footer-assalam .footer-social li {
    display: block;
    margin-bottom: 0;
}

.footer-assalam .footer-social a {
    display: inline-flex;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff !important;
}
    color: rgba(255, 255, 255, 0.8);
    transform: none;
}

.footer-assalam .footer-social a:hover {
    color: #fff;
    background: none;
    transform: none;
}

.footer-assalam .footer-social a i {
    width: 24px;
    text-align: center;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.footer-bottom-links a {
    margin: 0 10px;
}

.nav-toggle-kemenag {
    display: none;
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .nav-toggle-kemenag {
        display: flex;
        flex-direction: column;
        background: none;
        border: none;
        padding: 15px;
        cursor: pointer;
        gap: 5px;
        margin-left: auto;
    }

    .nav-toggle-kemenag span {
        width: 25px;
        height: 3px;
        background-color: #fff;
        transition: 0.3s;
    }

    .nav-toggle-kemenag.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle-kemenag.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle-kemenag.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .qla-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 20px;
    }

    .qla-item {
        border: none;
    }

    .sambutan-wrapper {
        flex-direction: column;
    }

    .sambutan-img,
    .sambutan-content {
        width: 100%;
    }

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

    .three-cols-assalam {
        grid-template-columns: 1fr;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    /* Mobile Nav Fixes */
    .nav-kemenag .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .nav-kemenag .navbar-menu.show {
        display: flex;
    }

    .nav-kemenag .navbar-menu>li {
        width: 100%;
    }

    .nav-kemenag .navbar-menu>li>a {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        justify-content: space-between;
    }

    .has-dropdown .dropdown {
        position: static;
        width: 100%;
        transform: none;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.15);
        padding: 0;
        display: none;
    }

    .has-dropdown:hover .dropdown,
    .has-dropdown:focus-within .dropdown {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .has-dropdown .dropdown a {
        color: #fff;
        padding: 12px 20px 12px 40px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .has-dropdown .dropdown a:hover {
        background-color: rgba(0, 0, 0, 0.2);
        color: #fff;
        padding-left: 45px;
    }
}

@media (max-width: 576px) {
    .qla-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-banner-assalam {
        grid-template-columns: 1fr;
    }

    .hero-assalam-content h1 {
        font-size: 35px;
    }

    .hero-assalam-content h3 {
        font-size: 18px;
    }

    .footer-assalam-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   NEW HERO LAYOUT (IMAGE REFERENCE)
   ========================================= */
.hero-layout-section {
    width: 100%;
}

.hero-layout-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
}

.hero-sidebar {
    background-color: var(--kemenag-green, #64a631);
    /* Brighter green like reference */
}

.hero-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-sidebar-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.3s;
}

.hero-sidebar-menu li a:hover {
    background: rgba(0, 0, 0, 0.1);
}

.hero-sidebar-menu li a i {
    font-size: 10px;
    opacity: 0.8;
}

.hero-slider-wrap {
    position: relative;
    overflow: hidden;
    height: 450px;
}

.hero-four-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 30px 0;
    width: 100%;
}

.footer-col-like {
    width: 100%;
}

.footer-col-like h4 {
    font-size: 16px;
    color: var(--kemenag-dark-green, #0d5e35);
    margin-bottom: 14px;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 2px solid var(--kemenag-dark-green, #0d5e35);
    padding-bottom: 6px;
    letter-spacing: 0.5px;
}

.footer-col-like ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col-like ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 14px;
}

.footer-col-like ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: -1px;
    color: var(--kemenag-dark-green, #0d5e35);
    font-size: 12px;
}

.footer-col-like ul li a {
    color: var(--kemenag-green, #0d5e35);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-col-like ul li a:hover {
    color: #333;
}

@media (max-width: 992px) {
    .hero-layout-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-four-columns {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px 10px;
    }

    .footer-col-like {
        min-width: 0;
    }
}

/* GLOBAL OVERRIDES: NO BACKGROUND CARD & DARK GREEN ACCENTS ACROSS ALL PAGES */
.category-block,
.sidebar-widget,
.academic-tabs,
.academic-content,
.ekstra-item,
.card,
.spmb-card,
.pamphlet-card,
.article-card,
.artikel-utama-item,
.artikel-kontributor-column,
.calendar-widget,
.sambutan-wrapper,
.qla-wrapper,
.three-cols-assalam,
.front-sidebar,
.hero-sidebar-kabar,
.page-with-sidebar .sidebar-widget,
.info-list-section,
.gallery-section,
.artikel-terbaru-section,
.news-section {
    background: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

h1, h2, h3, h4, h5, h6,
.section-title,
.sidebar-widget-title,
.kontributor-title,
.col-assalam-header h3,
.category-block h3,
.page-title {
    color: var(--kemenag-dark-green, #0d5e35) !important;
}

.category-block h3,
.col-assalam-header,
.kontributor-title,
.sidebar-widget-title {
    border-bottom-color: var(--kemenag-dark-green, #0d5e35) !important;
}

/* =========================================
   RESPONSIVE — CENTERED BRAND HEADER
   ========================================= */
@media (max-width: 768px) {
    .header-main-kemenag .container {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
        padding: 15px !important;
    }
    .header-left-spacer {
        display: none !important;
    }
    .header-search-right {
        width: 100% !important;
        justify-content: center !important;
    }
    .header-search-right form {
        max-width: 100% !important;
    }
    .brand-logo-centered h1 {
        font-size: 20px !important;
    }
    .brand-logo-centered p {
        font-size: 11px !important;
    }
}

/* =========================================
   RESPONSIVE — HERO SLIDER + SIDEBAR
   ========================================= */
@media (max-width: 900px) {
    /* Hero layout: slider + sidebar kabar → stack */
    .hero-layout-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    .hero-slider-wrap {
        width: 100% !important;
        min-height: 260px !important;
        height: 260px !important;
        border-radius: 10px !important;
    }
    /* Sidebar Kabar Madrasah di hero — full width + jarak atas */
    .hero-layout-container > div:last-child {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 10px !important;
        padding-top: 15px !important;
        border-top: 2px solid #e2e8f0 !important;
    }
}

/* =========================================
   RESPONSIVE — 4 NAV COLUMNS BELOW HERO
   ========================================= */
@media (max-width: 768px) {
    .hero-four-columns {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 20px 0 !important;
        margin-top: 20px !important;
    }
    .footer-col-like h4 {
        font-size: 13px !important;
    }
    .footer-col-like ul li a {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .hero-four-columns {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 15px 0 !important;
    }
}

/* =========================================
   RESPONSIVE — CATEGORY NEWS GRID
   ========================================= */
@media (max-width: 768px) {
    .category-news-section .category-news-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
}

/* =========================================
   RESPONSIVE — CATEGORY ARTICLE CARDS
   ========================================= */
@media (max-width: 480px) {
    .category-articles-list a {
        gap: 10px !important;
    }
    .category-articles-list a > div:first-child {
        width: 80px !important;
        height: 60px !important;
        min-width: 80px !important;
    }
    .category-articles-list h4 {
        font-size: 12px !important;
    }
}

/* =========================================
   RESPONSIVE — GENERAL TEXT OVERFLOW FIX
   ========================================= */
@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    h1 { font-size: 22px !important; }
    h2 { font-size: 19px !important; }
    h3 { font-size: 16px !important; }

    /* Prevent any grid from overflowing horizontally */
    [style*="grid-template-columns: 1fr 340px"] {
        grid-template-columns: 1fr !important;
    }
    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}