/* =====================================================
RESET
===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =====================================================
BODY BASE
===================================================== */
body {
    font-family: 'Poppins', sans-serif;
    background: #f5f7fb;
    color: #111;
    overflow-x: hidden;
    direction: ltr;
    text-align: left;
}

/* =====================================================
RTL GLOBAL (IDENTIQUE À INDEX.PHP)
===================================================== */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Poppins', sans-serif;
}

html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
    font-family: 'Poppins', sans-serif;
}

/* =====================================================
CONTAINER
===================================================== */
.program-container {
    width: 95%;
    max-width: 1450px;
    margin: 30px auto 60px;
   
}

/* =====================================================
TITLE
===================================================== */
.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

body[dir="rtl"] .page-title {
    text-align: right;
}

/* =====================================================
SEARCH FORM
===================================================== */
.search_form {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);

    direction: inherit;
}

/* input */
.search_form input[type="text"] {
    width: 100%;
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    margin-bottom: 12px;
}

/* =====================================================
FILTER ROW
===================================================== */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

/* TITLE */
.filter-row strong {
    min-width: 120px;
    font-weight: 600;
}

body[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.9;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* RADIO LABELS */
.filter-row label {
    font-size: 13px;
    padding: 6px 10px;
    background: #f1f5f9;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* RTL label fix */
body[dir="rtl"] .filter-row label {
    flex-direction: row-reverse;
}

/* hover */
.filter-row label:hover {
    background: #2f80ed;
    color: #fff;
}

/* =====================================================
FILTER GRID
===================================================== */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

/* RTL selects */
body[dir="rtl"] .filter-grid {
    direction: rtl;
}

.filter-grid select {
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
}

/* text alignment */
body[dir="rtl"] select {
    text-align: right;
}

/* =====================================================
BUTTONS
===================================================== */
.buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* RTL buttons */
body[dir="rtl"] .buttons-row {
    flex-direction: row-reverse;
}

.buttons-row button,
.button {
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* validate */
.buttons-row button {
    background: #2f80ed;
    color: #fff;
}

/* reset */
.buttons-row .button {
    background: #f59e0b;
    color: #fff;
}

/* =====================================================
PROGRAM GRID
===================================================== */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

/* CARD */
.program-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* header */
.program-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

body[dir="rtl"] .program-header {
    flex-direction: row-reverse;
}

.program-header img {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

/* text */
.program-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

body[dir="rtl"] .program-card {
    text-align: right;
}

/* =====================================================
PAGINATION
===================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

body[dir="rtl"] .pagination {
    flex-direction: row-reverse;
}

/* =====================================================
NO PROGRAMS
===================================================== */
.no-programs {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
}
/* =====================================================
ARABIC DESIGN
===================================================== */

body[dir="rtl"] .page-title{
    font-family:'Cairo',sans-serif;
    font-size:34px;
    font-weight:800;
}

body[dir="rtl"] .search_form{
    font-family:'Cairo',sans-serif;
}

body[dir="rtl"] .filter-row,
body[dir="rtl"] .filter-grid,
body[dir="rtl"] select,
body[dir="rtl"] input,
body[dir="rtl"] button,
body[dir="rtl"] .button{
    font-family:'Cairo',sans-serif;
    font-size:15px;
    font-weight:600;
}

body[dir="rtl"] .program-card{
    text-align:right;
    font-family:'Cairo',sans-serif;
}

body[dir="rtl"] .program-header h3{
    font-size:20px;
    font-weight:700;
    line-height:1.7;
}

body[dir="rtl"] .program-card p{
    font-size:15px;
    line-height:2;
    font-weight:500;
}

body[dir="rtl"] .program-card strong{
    font-weight:700;
}

body[dir="rtl"] .pagination a{
    font-family:'Cairo',sans-serif;
    font-weight:700;
}