﻿/* =========================================================
   JDK KERMANSHAH - MAIN SITE CSS
   Version 2.0
   Dynamic Homepage
   ========================================================= */

/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    direction: rtl;
    font-family: Tahoma, Arial, sans-serif;
    color: #ffffff;
    margin: 0;
    padding: 0;
    background: #020817;
}

main {
    position: relative;
    min-height: 100vh;
}

/* =========================================================
   GENERAL
   ========================================================= */

a {
    text-decoration: none;
}

img {
    max-width: 100%;
}

.jdk-page-reveal {
    width: 100%;
    min-height: 100vh;
}

/* =========================================================
   HEADER
   ========================================================= */

.top-header {
    position: sticky;
    top: 12px;
    z-index: 9999;
    width: 95%;
    min-height: 82px;
    margin: 12px auto 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 22px;
    background: rgba(10, 25, 55, 0.92);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* =========================================================
   LOGO
   ========================================================= */

.logo-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

    .logo-title img {
        width: 62px;
        height: 62px;
        object-fit: contain;
        border-radius: 12px;
    }

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .logo-text h5 {
        margin: 0;
        color: #ffffff;
        font-size: 16px;
        font-weight: 800;
        white-space: nowrap;
    }

    .logo-text small {
        color: #cbd7ea;
        font-size: 12px;
    }

/* =========================================================
   MAIN MENU
   ========================================================= */

.main-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1;
    direction: rtl;
}

.menu-item {
    position: relative;
    padding-bottom: 10px;
}

    .menu-item > a {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        color: #ffffff;
        font-size: 15px;
        font-weight: 700;
        border-radius: 10px;
        transition: color .25s ease, background .25s ease, transform .25s ease;
    }

        .menu-item > a:hover {
            color: #f5c400;
            background: rgba(255,255,255,.08);
            transform: translateY(-2px);
        }

/* =========================================================
   SUBMENU
   ========================================================= */

.submenu {
    position: absolute;
    top: calc(100% - 2px);
    right: 0;
    min-width: 240px;
    padding: 8px 0;
    background: #ffffff;
    border: 1px solid #dbe5f0;
    border-radius: 13px;
    box-shadow: 0 18px 40px rgba(0,0,0,.25);
    display: none;
    z-index: 99999;
}

.menu-item:hover .submenu {
    display: block;
}

.submenu a {
    display: block;
    padding: 11px 18px;
    color: #16324f !important;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s ease, color .2s ease, padding-right .2s ease;
}

    .submenu a:hover {
        background: #f2f7fc;
        color: #0d6efd !important;
        padding-right: 25px;
    }

    .submenu a:not(:last-child) {
        border-bottom: 1px solid #edf2f7;
    }

/* =========================================================
   ADMIN
   ========================================================= */

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.admin-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 17px;
    background: #1f6feb;
    color: #ffffff !important;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(31,111,235,.25);
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

    .admin-login-btn:hover {
        background: #2d7df2;
        color: #ffffff !important;
        transform: translateY(-3px);
        box-shadow: 0 9px 22px rgba(31,111,235,.35);
    }

    .admin-login-btn i {
        font-size: 15px;
    }

.admin-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    background: #16345d;
    color: #ffffff;
    border-radius: 25px;
}

    .admin-menu a {
        color: #ffd54f;
        font-size: 13px;
    }

/* =========================================================
   HERO
   ========================================================= */

.hero-section {
    position: relative;
    width: 95%;
    margin: 0 auto 30px;
    direction: rtl;
}

.home-layout {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 25px;
    direction: ltr;
}

.hero-main,
.departments-grid {
    direction: rtl;
}

/* =========================================================
   MODE 1
   Slider Full Width
   Departments Below
   4 Columns × 3 Rows
   ========================================================= */

.hero-section.layout-mode-1 .home-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 22px;
    direction: rtl;
}

.hero-section.layout-mode-1 .hero-main {
    order: 1;
    width: 100%;
    padding: 0;
}

.hero-section.layout-mode-1 .departments-grid {
    order: 2;
    width: 100%;
}

/* =========================================================
   MODE 1 - SLIDER
   ========================================================= */

#courseSlider {
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 15px 40px rgba(0,0,0,.30);
}

    #courseSlider .carousel-inner,
    #courseSlider .carousel-item {
        width: 100%;
        height: 100%;
    }

    #courseSlider img {
        width: 100%;
        height: 420px;
        object-fit: cover;
        object-position: center;
    }

.hero-section.layout-mode-1 #courseSlider {
    height: 470px;
}

    .hero-section.layout-mode-1 #courseSlider img {
        height: 470px;
    }

/* =========================================================
   SLIDER CONTROLS
   ========================================================= */

.carousel-control-prev,
.carousel-control-next {
    width: 55px;
    opacity: .8;
    transition: opacity .25s ease;
}

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        opacity: 1;
    }

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 38px;
    height: 38px;
    background-color: rgba(0,0,0,.35);
    border-radius: 50%;
    background-size: 45%;
}

/* =========================================================
   NEWS TICKER
   ========================================================= */

.news-ticker {
    width: 100%;
    height: 58px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 14px;
    background: linear-gradient( 90deg, #092846, #14527e, #092846 );
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.ticker-icon {
    width: 58px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(0,0,0,.15);
    color: #f5c400;
    font-size: 20px;
}

.ticker-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ticker-track {
    display: flex;
    width: max-content;
    height: 100%;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
}

.ticker-content {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ticker-item,
.ticker-link {
    margin: 0 28px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

    .ticker-link:hover {
        color: #f5c400;
    }

.ticker-separator {
    color: #f5c400;
    font-size: 18px;
}

/* =========================================================
   HERO MESSAGE
   ========================================================= */

.hero-message {
    text-align: center;
    margin: 22px 0;
}

    .hero-message h1 {
        color: #ffffff;
        font-size: 30px;
        font-weight: 900;
        line-height: 1.7;
    }

        .hero-message h1 span {
            color: #f5c400;
        }

    .hero-message p {
        margin-top: 8px;
        color: #d8e3f4;
        font-size: 16px;
        line-height: 1.8;
    }

/* =========================================================
   SERVICE BUTTONS
   ========================================================= */

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

    .buttons-grid a {
        min-height: 58px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 10px 8px;
        color: #ffffff;
        background: linear-gradient( 135deg, rgba(0,170,255,.20), rgba(0,230,200,.12) );
        border: 1px solid rgba(0,220,255,.32);
        border-radius: 14px;
        font-size: 13px;
        font-weight: 700;
        box-shadow: 0 5px 15px rgba(0,0,0,.15);
        transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
    }

        .buttons-grid a:hover {
            color: #ffffff;
            transform: translateY(-5px);
            background: linear-gradient( 135deg, rgba(0,190,255,.36), rgba(0,240,210,.20) );
            box-shadow: 0 12px 25px rgba(0,180,255,.22);
        }

        .buttons-grid a i {
            font-size: 16px;
        }

/* =========================================================
   MODE 1 - DEPARTMENTS
   12 Departments
   4 Columns × 3 Rows
   ========================================================= */

.departments-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, 170px);
    align-items: flex-start;
}

.hero-section.layout-mode-1 .departments-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    gap: 20px;
    align-items: stretch;
    justify-items: stretch;
    direction: rtl;
}

/* =========================================================
   DEPARTMENT CARD
   ========================================================= */

.department-card {
    width: 170px;
    height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 20px;
    overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease;
}

.hero-section.layout-mode-1 .department-card {
    width: 100%;
    height: 225px;
    min-height: 225px;
    padding: 12px;
    border-radius: 18px;
    justify-content: flex-start;
    box-sizing: border-box;
}

.department-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(0,0,0,.28);
}

/* =========================================================
   DEPARTMENT IMAGE
   ========================================================= */

.department-card img {
    width: 160px;
    height: 130px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
    margin-bottom: 15px;
    transition: transform .3s ease;
}

.department-card:hover img {
    transform: scale(1.05);
}


.hero-section.layout-mode-1
.department-card:hover img {
    transform: scale(1.07);
}

/* =========================================================
   DEPARTMENT TITLE
   ========================================================= */

.department-card h3 {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 10px 0;
    font-size: 20px;
}

.hero-section.layout-mode-1 .department-card h3 {
    width: 100%;
    height: auto;
    min-height: 34px;
    margin: 3px 0;
    font-size: 15px;
    line-height: 22px;
    text-align: center;
}

/* =========================================================
   DEPARTMENT DESCRIPTION
   ========================================================= */

.department-desc {
    height: 60px;
    overflow: hidden;
    text-align: center;
    font-size: 14px;
    line-height: 24px;
}

.hero-section.layout-mode-1 .department-desc {
    width: 100%;
    height: 38px;
    margin-top: 2px;
    font-size: 11px;
    line-height: 17px;
    overflow: hidden;
}

/* =========================================================
   MODE 2
   Horizontal Layout
   Departments Left
   Slider Right
   6 Columns × 2 Rows
   ========================================================= */
/* =========================================
   MODE 2
   Departments: 4 Columns × 3 Rows
   ========================================= */

.hero-section.layout-mode-2 .departments-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(3, auto) !important;
    gap: 2px !important;
    width: 100% !important;
   }

.hero-section.layout-mode-2 .department-card {
    min-height: 150px !important;
    height: 200px !important;
    padding: 5px !important;
   }
/* =========================================================
   MODE 2 - کاهش فاصله عمودی بین ردیف کارت‌ها
   ========================================================= */

    /* تصویر داخل کارت */
    .hero-section.layout-mode-2 .department-card img {
        width: 120px !important;
        height: 70px !important;
        object-fit: contain !important;
    }

    /* عنوان کارت */
    .hero-section.layout-mode-2 .department-card h3 {
        font-size: 18px !important;
        margin: 8px 0 0 !important;
    }

    /* توضیحات کارت */
    .hero-section.layout-mode-2 .department-card .department-desc {
        font-size: 11px !important;
        margin-top: 4px !important;
    }
    /* =========================================================
   MODE 2 - کاهش فاصله عمودی بین ردیف کارت‌ها
   ========================================================= */

.hero-section.layout-mode-2 .departments-grid {
    row-gap: 2px !important;
    column-gap: 2px !important;
}
/* =========================================================
   MODE 2 - SLIDER
   ========================================================= */

.hero-section.layout-mode-2 .mini-slider,
.hero-section.layout-mode-2 #courseSlider {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 20px;
}

    .hero-section.layout-mode-2 .mini-slider img,
    .hero-section.layout-mode-2 #courseSlider img {
        width: 100%;
        height: 500px;
        object-fit: cover;
    }

/* =========================================================
   MODE 2 - TICKER
   ========================================================= */

.hero-section.layout-mode-2 .news-ticker {
    width: 100%;
    height: 50px;
    margin-top: 10px;
}

/* =========================================================
   MODE 2 - BUTTONS
   ========================================================= */

.hero-section.layout-mode-2 .buttons-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 10px;
}

    .hero-section.layout-mode-2 .buttons-grid a {
        min-height: 50px;
        padding: 7px 5px;
        border-radius: 12px;
        font-size: 12px;
    }

/* =========================================================
   MODE 2 - MESSAGE
   ========================================================= */

.hero-section.layout-mode-2 .hero-message {
    margin-top: 18px;
    padding: 0 5px;
}

    .hero-section.layout-mode-2 .hero-message h1 {
        font-size: 24px;
    }

    .hero-section.layout-mode-2 .hero-message p {
        font-size: 13px;
    }

/* =========================================================
   STATISTICS
   ========================================================= */

.stats-section {
    width: 95%;
    margin: 28px auto;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 15px;
    padding: 22px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

.stat-item {
    flex: 1;
    text-align: center;
}

    .stat-item i {
        color: #f5c400;
        font-size: 22px;
    }

    .stat-item h3 {
        margin: 5px 0;
        color: #f5c400;
        font-size: 28px;
    }

    .stat-item span {
        color: #d7e0f1;
        font-size: 14px;
    }


/* =========================================================
   CONTENT
   ========================================================= */

.content-section {
    position: relative;
    width: 95%;
    margin: 30px auto;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 25px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,.20);
}

.glass-box {
    padding: 24px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .glass-box h2 {
        margin-bottom: 20px;
        text-align: center;
        color: #f5c400;
        font-size: 21px;
    }

/* =========================================================
   WHY US
   ========================================================= */

.why-us ul {
    padding: 0 20px;
}

.why-us li {
    margin-bottom: 15px;
    color: #ffffff;
    line-height: 1.8;
}

    .why-us li i {
        color: #f5c400;
    }

.why-us small {
    color: #d7e0f1;
}

/* =========================================================
   TEACHERS
   ========================================================= */

.teacher-grid {
    display: flex;
    gap: 15px;
}

.teacher-card {
    flex: 1;
    text-align: center;
}

    .teacher-card img {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid rgba(255,255,255,.20);
    }

    .teacher-card h5 {
        margin-top: 10px;
        color: #ffffff;
    }

    .teacher-card p {
        margin-top: 5px;
        color: #cbd7ea;
        font-size: 13px;
    }

/* =========================================================
   NEWS
   ========================================================= */

.news-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255,255,255,.07);
    border-radius: 12px;
    transition: transform .25s ease, background .25s ease;
}

    .news-item:hover {
        transform: translateY(-3px);
        background: rgba(255,255,255,.11);
    }

.news-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 10px;
}

.news-text h5 {
    margin: 0;
    color: #ffffff;
    font-size: 15px;
}

.news-text small {
    display: block;
    margin: 5px 0;
    color: #b9c5d8;
}

.news-text p {
    margin: 0;
    color: #e4e9f1;
    font-size: 12px;
    line-height: 1.7;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer-section {
    width: 95%;
    margin: 30px auto;
    padding: 30px;
    text-align: center;
    background: rgba(5,20,45,.85);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 20px;
    color: #d7e0f1;
}

.footer-content h4 {
    margin-bottom: 15px;
    color: #ffffff;
}

.footer-content p {
    margin: 8px 0;
    font-size: 13px;
}

    .footer-content p i {
        margin-left: 7px;
        color: #f5c400;
    }

.footer-content a {
    color: #75baff;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
}

    .footer-social a {
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255,255,255,.08);
        color: #ffffff;
        font-size: 18px;
        transition: transform .25s ease, background .25s ease;
    }

        .footer-social a:hover {
            transform: translateY(-4px);
            background: rgba(31,111,235,.50);
        }

/* =========================================================
   SIDE PANEL
   ========================================================= */

.side-panel {
    position: fixed;
    top: 0;
    right: -520px;
    width: 520px;
    height: 100vh;
    background: #123b69;
    box-shadow: -10px 0 35px rgba(0,0,0,.35);
    transition: right .45s ease;
    z-index: 99999;
    overflow-y: auto;
}

    .side-panel.open,
    .side-panel.active {
        right: 0;
    }

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #1e5b96;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

    .panel-header h3 {
        margin: 0;
        color: #ffffff;
        font-size: 22px;
    }

    .panel-header button {
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 50%;
        background: #e74c3c;
        color: #ffffff;
        font-size: 20px;
        cursor: pointer;
    }

.panel-content {
    padding: 25px;
    color: #ffffff;
    font-size: 16px;
    line-height: 2;
}

/* =========================================================
   RESPONSIVE - MODE 1
   ========================================================= */

@media (max-width: 1200px) {

    .hero-section.layout-mode-1 .departments-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-section.layout-mode-2 .home-layout {
        grid-template-columns: minmax(0, 1fr) 420px;
    }

    .hero-section.layout-mode-2 .departments-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 992px) {

    .top-header {
        flex-wrap: wrap;
    }

    .main-menu {
        order: 3;
        width: 100%;
        flex: none;
        justify-content: center;
        border-top: 1px solid rgba(255,255,255,.08);
        padding-top: 8px;
    }

    .hero-section.layout-mode-1
    .departments-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-section.layout-mode-2 .home-layout {
        grid-template-columns: 1fr;
    }

    .hero-section.layout-mode-2 .hero-main {
        order: 1;
    }

    .hero-section.layout-mode-2 .departments-grid {
        order: 2;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .content-section {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .top-header {
        width: 94%;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }

    .logo-title {
        justify-content: center;
    }

    .logo-text h5 {
        font-size: 14px;
        white-space: normal;
    }

    .main-menu {
        flex-wrap: wrap;
        gap: 4px;
    }

    .header-left {
        justify-content: center;
    }

    .hero-section,
    .stats-section,
    .content-section,
    .footer-section {
        width: 94%;
    }

        .hero-section.layout-mode-1
        .departments-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .hero-section.layout-mode-2
        .departments-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .hero-section.layout-mode-1 #courseSlider,
        .hero-section.layout-mode-1 #courseSlider img {
            height: 300px;
        }

    #courseSlider,
    #courseSlider img {
        height: 280px;
    }

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

    .hero-message h1 {
        font-size: 25px;
    }

    .stats-section {
        flex-wrap: wrap;
    }

    .stat-item {
        min-width: 40%;
    }

    .teacher-grid {
        flex-direction: column;
    }

    .side-panel {
        width: 90%;
    }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .hero-section.layout-mode-1
    .departments-grid {
        grid-template-columns: 1fr;
    }

    .hero-section.layout-mode-2
    .departments-grid {
        grid-template-columns: 1fr;
    }

    .buttons-grid {
        grid-template-columns: 1fr;
    }

    .hero-section.layout-mode-1
    .department-card {
        height: 210px;
    }

        .hero-section.layout-mode-1
        .department-card img {
            width: 95px;
            height: 95px;
        }

    .news-item {
        align-items: flex-start;
    }
}


/* =========================================================
   MODE 2 - Department Cards
   Image LEFT + Text RIGHT
   ========================================================= */

.hero-section.layout-mode-1 .department-card {
    display: grid !important;
    /* ستون اول = عکس سمت چپ
       ستون دوم = متن سمت راست */
    grid-template-columns: 170px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 22px;
    padding: 18px 22px !important;
    min-height: 170px;
    /*
       خیلی مهم:
       جهت Grid را چپ به راست می‌کنیم
       تا ستون اول واقعاً سمت چپ باشد.
    */
    direction: ltr;
}


    /* =========================================================
   عکس
   ========================================================= */

    .hero-section.layout-mode-1 .department-card img {
        /* ستون اول = سمت چپ */
        grid-column: 1;
        /* عکس هر دو ردیف را می‌گیرد */
        grid-row: 1 / 3;
        width: 170px;
        height: 115px;
        margin: 0 !important;
        object-fit: contain;
        border-radius: 10px;
    }


    /* =========================================================
   بخش عنوان
   خط اول
   ========================================================= */

    .hero-section.layout-mode-1 .department-card h3 {
        /* ستون دوم = سمت راست */
        grid-column: 2;
        /* ردیف اول */
        grid-row: 1;
        margin: 0 !important;
        /*
       خود متن فارسی دوباره RTL باشد
    */
        direction: rtl;
        text-align: right;
        font-size: 17px;
        line-height: 1.8;
        white-space: normal;
    }


    /* =========================================================
   توضیحات
   خط دوم
   ========================================================= */

    .hero-section.layout-mode-1 .department-card .department-desc {
        /* ستون دوم = سمت راست */
        grid-column: 2;
        /* ردیف دوم */
        grid-row: 2;
        margin: 5px 0 0 !important;
        direction: rtl;
        text-align: right;
        font-size: 11px;
        line-height: 1.8;
        white-space: normal;
    }

/* =========================================================
   MODE 2
   Statistics directly under Department Cards
   ========================================================= */

@media (min-width: 901px) {

    .hero-section.layout-mode-2 + .stats-section {
        /* عرض تقریباً برابر با ستون کارت‌ها */
        width: 38% !important;
        box-sizing: border-box;
        /* خیلی مهم:
           کادر را وسط نمی‌گذاریم */
        margin-left: 2.75% !important;
        margin-right: auto !important;
        /* فاصله داخلی */
        padding: 18px 20px !important;
        /* فقط یک ستون */
        grid-template-columns: 1fr !important;
        margin-top: -70px !important;
        min-height: 90px;
    }
}
@media (min-width: 901px) {

    .hero-section.layout-mode-2 .departments-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        grid-template-rows: repeat(3, auto) !important;
        gap: 10px !important;
        /* مهم‌ترین خط */
        align-content: start !important;
        /* کارت‌ها هم در ابتدای ردیف قرار بگیرند */
        align-items: start !important;
        width: 100% !important;
    }
}
/* =========================================================
   MODE 2
   انتقال کادر آمار به زیر کارت‌ها
   ========================================================= */

@media (min-width: 901px) {

    .hero-section.layout-mode-2 + .stats-section {
        transform: translateY(-70px) !important;
    }
}
/* =========================================================
   HEADER - Glass / Transparent
   ========================================================= */

.top-header {
    background: rgba(10, 25, 55, 0.05) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
   }
/* =========================================================
   MODE 2 - هماهنگ شدن گوشه عکس با پنل داخلی
   ========================================================= */

.hero-section.layout-mode-2 .department-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit !important;
    display: block !important;
}
.hero-section.layout-mode-2 .department-card .department-image {
    overflow: hidden !important;
    border-radius: 14px !important;
}
/* =========================================================
   MODE 1 - هماهنگ شدن گوشه عکس با پنل داخلی
   ========================================================= */

.hero-section.layout-mode-1 .department-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit !important;
    display: block !important;
   }

