/* ========================================
   FLDM Modern Website - Custom Styles
   Moroccan-Inspired Design System
   ======================================== */

/* ========== CSS Variables ========== */
:root {
    /* Primary Colors - Extracted from Logo */
    --primary-color: #234f97;
    --primary-dark: #1a3a6f;
    --primary-light: #2e63b8;

    /* Complementary Colors */
    --gold: #c41e3a;
    --gold-light: #e63946;
    --navy: #1a2332;
    --navy-light: #2c3e50;

    /* Neutral Colors */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark-gray: #343a40;

    /* Gradients */
    --gradient-primary: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--primary-dark) 100%
    );
    --gradient-gold: linear-gradient(
        135deg,
        var(--gold) 0%,
        var(--gold-light) 100%
    );
    --gradient-overlay: linear-gradient(
        135deg,
        rgba(35, 79, 151, 0.9) 0%,
        rgba(26, 58, 111, 0.95) 100%
    );

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========== Global Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Cairo", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark-gray);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--light-gray);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== Navigation Bar ========== */
.navbar-custom {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: all 0.4s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar-custom.scrolled {
    padding: 0.75rem 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    height: 55px;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navbar-custom.scrolled .navbar-brand img {
    height: 45px;
}

.navbar-custom .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--navy) !important;
    margin: 0 0.25rem;
    padding: 0.6rem 1.2rem !important;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Remove old underline effect */
.navbar-custom .nav-link::after {
    display: none;
}

/* New Pill Hover Effect */
.navbar-custom .nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    transform: scale(0.9);
    transition: all 0.3s ease;
    border-radius: 50px;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(35, 79, 151, 0.2);
}

.navbar-custom .nav-link:hover::before,
.navbar-custom .nav-link.active::before {
    opacity: 1;
    transform: scale(1);
}

.navbar-transparent .nav-link {
    color: var(--white) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-transparent .nav-link:hover,
.navbar-transparent .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.navbar-transparent .nav-link::before {
    display: none;
}

/* Language Switcher */
.navbar-custom .lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-custom .lang-switcher a {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--navy);
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.navbar-custom .lang-switcher a:hover,
.navbar-custom .lang-switcher a.active {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(360deg);
}

/* ========== Dropdown Menu Styles ========== */
.navbar-custom .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-radius: 1rem;
    padding: 0.75rem;
    margin-top: 1rem;
    min-width: 240px;
    display: block; /* Required for animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Bridge the gap between nav link and dropdown */
@media (min-width: 992px) {
    .navbar-custom .dropdown-menu::before {
        content: "";
        position: absolute;
        top: -1.5rem;
        left: 0;
        width: 100%;
        height: 1.5rem;
        background: transparent;
    }
}

/* Desktop Hover Effect */
@media (min-width: 992px) {
    .navbar-custom .nav-item.dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

@keyframes dropdownFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-custom .dropdown-item {
    padding: 0.8rem 1.2rem;
    color: var(--navy);
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
}

.navbar-custom .dropdown-item:hover {
    background: rgba(35, 79, 151, 0.08);
    color: var(--primary-color);
    padding-left: 1.5rem;
    font-weight: 600;
}

.navbar-custom .dropdown-item::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.navbar-custom .dropdown-item:hover::before {
    transform: translateY(-50%) scale(1);
}

.navbar-custom .dropdown-toggle::after {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    border: none;
    content: "\F282"; /* Bootstrap Icon chevron-down */
    font-family: "bootstrap-icons";
    font-size: 0.7rem;
    vertical-align: middle;
}

.navbar-custom .nav-item.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* RTL Support */
[dir="rtl"] .navbar-custom .dropdown-item:hover {
    padding-left: 1.2rem;
    padding-right: 1.5rem;
}

[dir="rtl"] .navbar-custom .dropdown-item::before {
    left: auto;
    right: 0.5rem;
}

[dir="rtl"] .navbar-custom .dropdown-toggle::after {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* ========== Mobile Responsiveness ========== */
@media (max-width: 991.98px) {
    .navbar-custom .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        padding: 1rem;
        border-radius: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        max-height: 80vh;
        overflow-y: auto;
    }

    .navbar-custom .nav-link {
        margin: 0.25rem 0;
        border-radius: 0.5rem;
        padding: 0.75rem 1rem !important;
        width: 100%;
        text-align: left;
        display: block;
    }

    .navbar-custom .navbar-nav .nav-link:hover,
    .navbar-custom .navbar-nav .nav-link:focus,
    .navbar-custom .navbar-nav .nav-link:active,
    .navbar-custom .navbar-nav .nav-link.active {
        background: transparent;
        color: var(--white) !important;
        transform: translateX(5px);
        box-shadow: none;
    }

    /* Reset dropdown styles for mobile */
    .navbar-custom .dropdown-menu {
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--primary-color);
        background: transparent;
        padding-left: 1rem;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none; /* Let bootstrap handle toggle via JS */
        border-radius: 0;
        width: 100%;
        min-width: auto;
        animation: none;
        pointer-events: auto;
        position: static;
        float: none;
    }

    .navbar-custom .dropdown-menu.show {
        display: block;
    }

    .navbar-custom .nav-item.dropdown.show .dropdown-menu {
        display: block;
    }

    .navbar-custom .navbar-toggler {
        border: none;
        padding: 0.5rem;
        color: var(--primary-color);
    }

    .navbar-custom .navbar-toggler:focus {
        box-shadow: none;
        outline: 2px solid var(--primary-color);
    }

    .navbar-custom .lang-switcher {
        justify-content: center;
        margin-top: 1rem;
        width: 100%;
    }
}

/* ========== Hero Section ========== */
.hero-section {
    position: relative;
    min-height: 65vh;

    /* Increased height for more impact */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--navy);
    color: var(--white);
    text-align: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../images/hero-bg.jpg");
    background-size: cover;
    background-position: center;
    z-index: 1;
    animation: zoomEffect 20s infinite alternate;
}

/* Mobile hero background */
@media (max-width: 767.98px) {
    .hero-background {
        background-image: url("../images/hero-bg-mobile.jpg");
    }
}

@keyframes zoomEffect {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(35, 79, 151, 0.6) 0%,
        rgba(26, 58, 111, 0.7) 100%
    );
    /* More dynamic gradient */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 2rem;
    opacity: 0;
    /* Initial state for animation */
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    /* Enhanced shadow */
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


.hero-cta {
    display: inline-flex;
    gap: 1rem;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.btn-primary-custom {
    background: var(--white);
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    cursor: pointer;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    background: var(--gold);
    color: var(--white);
}

.btn-outline-custom {
    background: transparent;
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: 2px solid var(--white);
    transition: var(--transition-normal);
    cursor: pointer;
}

.btn-outline-custom:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========== Section Styles ========== */
.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.section-title h2 {
    color: var(--navy);
    font-size: 2.5rem;
    font-weight: 800;
}

.section-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1rem auto;
    border-radius: 2px;
}

/* ========== Card Styles ========== */
.card-custom {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: none;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-custom::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.card-custom:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-custom:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.5rem;
}

.card-title {
    color: var(--navy);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--gray);
    line-height: 1.8;
}

/* ========== News/Announcement Cards ========== */
/* ========== News/Announcement Cards (Premium Redesign) ========== */
.news-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    cursor: pointer;
}

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

.news-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 240px; /* Increased height */
    width: 100%;
}

.news-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.news-card:hover .news-image {
    transform: scale(1.1);
}

.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.news-card:hover .news-overlay {
    opacity: 0.8;
}

.news-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: white;
}

.news-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.news-meta i {
    color: var(--primary-color);
}

.news-title {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-title a {
    color: var(--navy);
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-title a {
    color: var(--primary-color);
}

.news-excerpt {
    color: var(--gray);
    flex-grow: 1;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-link {
    color: var(--navy);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: auto;
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.news-link i {
    transition: transform 0.3s ease;
    background: rgba(35, 79, 151, 0.1);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary-color);
}

.news-link:hover {
    color: var(--primary-color);
}

.news-link:hover i {
    transform: translateX(5px);
    background: var(--primary-color);
    color: var(--white);
}

/* ========== Statistics Section ========== */
.stats-section {
    background-image: url("/images/zellige-stats-bg.png");
    background-size: 400px;
    background-repeat: repeat;
    background-position: center;
    color: var(--white);
    padding: var(--spacing-lg) 0;
    position: relative;
    overflow: hidden;
    border-top: 4px solid #1b325e1c;
}

.stats-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(35, 79, 151, 0.85) 0%,
        rgba(26, 58, 111, 0.9) 100%
    );
    z-index: 0;
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========== Programs Section ========== */
.program-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.program-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--gradient-primary);
    transition: height 0.3s ease;
    z-index: -1;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.program-card:hover::before {
    height: 10px;
}

.program-icon {
    width: 90px;
    height: 90px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    font-size: 2.5rem;
    transition: all 0.4s ease;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.program-card:hover .program-icon {
    background: var(--gradient-primary);
    color: var(--white);
    transform: rotateY(180deg);
    box-shadow: 0 10px 20px rgba(35, 79, 151, 0.3);
}

.program-card:hover .program-icon i {
    transform: rotateY(-180deg); /* Keep icon facing forward */
    display: block;
}

.program-title {
    color: var(--navy);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.program-card:hover .program-title {
    color: var(--primary-color);
}

.program-description {
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.program-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(35, 79, 151, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
}

.program-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(35, 79, 151, 0.2);
}

.program-link i {
    transition: transform 0.3s ease;
}

.program-link:hover i {
    transform: translateX(3px);
}

/* ========== Footer ========== */
.footer {
    background-color: var(--navy);
    color: var(--white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.footer .container {
    position: relative;
    z-index: 2;
}

/* Removed overlay to ensure clean background */

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-title {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition-fast);
}

.social-icon:hover {
    background: var(--white);
    color: var(--navy);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* ========== Glassmorphism ========== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== RTL Support (Arabic) ========== */
[dir="rtl"] {
    text-align: right;
    font-family: "Cairo", "Tajawal", "Almarai", sans-serif;
}

[dir="rtl"] * {
    font-family: "Cairo", "Tajawal", "Almarai", sans-serif;
}

[dir="rtl"] .navbar-nav {
    margin-left: 0 !important;
    margin-right: auto !important;
}

[dir="rtl"] .nav-link {
    margin: 0 0.5rem;
}

[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .dropdown-item {
    text-align: right;
}

[dir="rtl"] .service-card,
[dir="rtl"] .news-card,
[dir="rtl"] .card-custom {
    text-align: right;
}

[dir="rtl"] .program-card {
    text-align: center;
}

[dir="rtl"] .service-arrow-small {
    transform: scaleX(-1);
}

[dir="rtl"] .news-link i,
[dir="rtl"] .program-link i {
    transform: scaleX(-1);
}

[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

[dir="rtl"] .social-icons {
    justify-content: flex-start;
}

[dir="rtl"] .bi-geo-alt,
[dir="rtl"] .bi-telephone,
[dir="rtl"] .bi-envelope {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .hero-cta {
    direction: rtl;
}

[dir="rtl"] .section-title {
    text-align: center;
}

/* Arabic-specific typography improvements */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
    font-weight: 700;
    letter-spacing: 0;
}

[dir="rtl"] p,
[dir="rtl"] .text-muted,
[dir="rtl"] .card-text {
    line-height: 2;
    letter-spacing: 0;
}

[dir="rtl"] .btn,
[dir="rtl"] .badge {
    font-weight: 600;
}

[dir="rtl"] .news-date,
[dir="rtl"] .news-title,
[dir="rtl"] .news-excerpt {
    text-align: right;
}

[dir="rtl"] .form-label {
    text-align: right;
    display: block;
}

[dir="rtl"] .form-control,
[dir="rtl"] .form-select {
    text-align: right;
}

/* Button group RTL support */
[dir="rtl"] .btn-group {
    direction: rtl;
}

[dir="rtl"] .btn-group .btn {
    text-align: center;
}

[dir="rtl"] .btn-group .btn:first-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

[dir="rtl"] .btn-group .btn:last-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Pagination RTL support */
[dir="rtl"] .pagination {
    direction: rtl;
}

[dir="rtl"] .page-item:first-child .page-link {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

[dir="rtl"] .page-item:last-child .page-link {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Active pagination page number */
.page-item.active .page-link {
    background: linear-gradient(135deg, #4A6FA5 0%, #2E5090 100%);
    border-color: #2E5090;
    color: #fff !important;
}

.page-link {
    color: #2E5090;
}

.page-link:hover {
    color: #1E3A6D;
    background-color: #e8eef5;
}

/* ========== Responsive Design ========== */
@media (max-width: 991.98px) {
    /* Navbar Mobile */
    .navbar-custom {
        padding: 0.5rem 0;
        background: rgba(255, 255, 255, 0.98);
    }

    .navbar-collapse {
        background: var(--white);
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-top: 1rem;
        box-shadow: var(--shadow-lg);
        max-height: 80vh;
        overflow-y: auto;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: var(--radius-sm);
        margin: 0.25rem 0;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background: rgba(35, 79, 151, 0.05);
        color: var(--primary-color) !important;
    }

    .navbar-nav .nav-link::after {
        display: none; /* Remove underline on mobile */
    }

    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1.5rem;
        background: transparent;
        margin-top: 0;
    }

    [dir="rtl"] .dropdown-menu {
        padding-left: 0;
        padding-right: 1.5rem;
    }

    .dropdown-item {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    /* Hero Section Mobile */
    .hero-section {
        min-height: auto;
        padding: 8rem 0 4rem; /* Account for fixed navbar */
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
        margin-bottom: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .btn-primary-custom,
    .btn-outline-custom {
        width: 100%;
        display: block;
        padding: 0.875rem 1.5rem;
    }

    /* General Layout */
    .section {
        padding: var(--spacing-lg) 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Statistics */
    .stat-item {
        margin-bottom: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    /* Cards */
    .news-card,
    .program-card,
    .service-card {
        margin-bottom: 1.5rem;
    }

    /* Footer */
    .footer {
        text-align: center;
    }

    .footer-title {
        margin-top: 1.5rem;
    }

    .footer-links a:hover {
        padding-left: 0; /* Disable hover shift on mobile */
    }

    .social-icons {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }

    /* Adjust grid for very small screens if needed */
    /* .col-6 { } */
}

/* ========== Utility Classes ========== */
.text-primary-custom {
    color: var(--primary-color);
}

.bg-primary-custom {
    background: var(--gradient-primary);
}

.text-gold {
    color: var(--gold);
}

.mb-custom {
    margin-bottom: var(--spacing-md);
}

.mt-custom {
    margin-top: var(--spacing-md);
}

/* ========== Scroll Animations ========== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Loading Animation ========== */
.spinner {
    border: 3px solid rgba(35, 79, 151, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========== Service Cards (Premium Redesign) ========== */
.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Softer, deeper shadow */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Gradient Border Effect */
.service-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
    z-index: 2;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(35, 79, 151, 0.15); /* Colored shadow on hover */
    border-color: transparent;
}

.service-card:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Small Card Specifics */
.small-card {
    padding: 2rem !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 240px; /* Slightly taller for better proportions */
}

/* Icon Styling */
.service-icon-small {
    width: 70px;
    height: 70px;
    border-radius: 20px; /* Softer radius */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.75rem;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background-size: 200% 200%;
    animation: gradientAnimation 5s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.small-card:hover .service-icon-small {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    border-radius: 50%; /* Morph to circle on hover */
}

/* Title Styling */
.service-title-small {
    color: var(--navy);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.small-card:hover .service-title-small {
    color: var(--primary-color);
}

/* Arrow Styling */
.service-arrow-small {
    width: 35px;
    height: 35px;
    background: rgba(35, 79, 151, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-top: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.small-card:hover .service-arrow-small {
    opacity: 1;
    transform: translateY(0);
    background: var(--primary-color);
    color: var(--white);
}

/* ==========================================================================
   MODERN PREMIUM TABLE DESIGN SYSTEM
   Supports Rich Content, WYSIWYG Tables, Academic Results & Mobile Devices
   ========================================================================== */

/* 1. Responsive Card Wrapper */
.table-responsive-wrapper,
.content-body .table-responsive {
    width: 100%;
    margin: 2rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.07), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
    position: relative;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.table-responsive-wrapper:hover {
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.1), 0 6px 12px -2px rgba(15, 23, 42, 0.05);
    border-color: #cbd5e1;
}

/* Custom delicate scrollbar for table container */
.table-responsive-wrapper::-webkit-scrollbar {
    height: 6px;
}
.table-responsive-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.table-responsive-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.table-responsive-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 2. Base Table inside Content and General Modern Tables */
.content-body table,
.modern-table,
.table-modern {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background-color: #ffffff !important;
    font-size: 0.95rem;
    color: #1e293b;
    border: none !important;
}

/* Clear default bootstrap borders and backgrounds */
.content-body table.table,
.content-body table.table-bordered {
    border: none !important;
}

/* 3. Table Headers */
.content-body table thead,
.content-body table th {
    background: linear-gradient(135deg, #163666 0%, #234f97 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    padding: 16px 20px !important;
    border: none !important;
    vertical-align: middle !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.content-body table thead tr:first-child th:first-child {
    border-top-left-radius: 15px;
}
.content-body table thead tr:first-child th:last-child {
    border-top-right-radius: 15px;
}
[dir="rtl"] .content-body table thead tr:first-child th:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 15px;
}
[dir="rtl"] .content-body table thead tr:first-child th:last-child {
    border-top-right-radius: 0;
    border-top-left-radius: 15px;
}

/* 4. Table Body, Cells & Zebra Rows */
.content-body table tbody tr {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-body table tbody tr:nth-child(odd) td {
    background-color: #ffffff;
}

.content-body table tbody tr:nth-child(even) td {
    background-color: #f8fafc;
}

.content-body table tbody tr:hover td {
    background-color: #f0f7ff !important;
}

.content-body table td {
    padding: 18px 22px !important;
    vertical-align: middle !important;
    border-top: none !important;
    border-left: none !important;
    border-right: 1px solid #f1f5f9 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    line-height: 1.6;
    color: #334155;
    font-size: 0.95rem;
}

.content-body table td:last-child {
    border-right: none !important;
}

[dir="rtl"] .content-body table td {
    border-right: none !important;
    border-left: 1px solid #f1f5f9 !important;
}

[dir="rtl"] .content-body table td:last-child {
    border-left: none !important;
}

/* Remove border on final row */
.content-body table tbody tr:last-child td {
    border-bottom: none !important;
}

/* First Column / Track & Program Title Highlight */
.content-body table td:first-child {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.96rem;
}

[dir="rtl"] .content-body table:not([dir="ltr"]) td:last-child {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.96rem;
}

/* 5. Clean up paragraphs inside table cells */
.content-body table td p {
    margin: 0.35rem 0 !important;
    line-height: 1.5 !important;
}

.content-body table td p:first-child {
    margin-top: 0 !important;
}

.content-body table td p:last-child {
    margin-bottom: 0 !important;
}

/* 6. Smart Action Buttons / Badges inside Table Cells */
.content-body table td a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 8px 18px !important;
    margin: 4px 0 !important;
    border-radius: 10px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid #bfdbfe !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    letter-spacing: 0.01em !important;
}

.content-body table td a:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px -2px rgba(37, 99, 235, 0.35) !important;
}

/* Force override harsh inline fonts from rich text editor */
.content-body table td a font,
.content-body table td a span {
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    background: transparent !important;
}

/* Type A: Final Results (Résultat définitif / النتيجة النهائية) - Emerald/Green */
.content-body table td a.btn-table-result {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border-color: #a7f3d0 !important;
}

.content-body table td a.btn-table-result:hover {
    background: #059669 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
    box-shadow: 0 6px 16px -2px rgba(5, 150, 105, 0.35) !important;
}

/* Type B: Convocations (Liste des convoqués / لوائح المدعوين) - Navy/Blue */
.content-body table td a.btn-table-convocation {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

.content-body table td a.btn-table-convocation:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 6px 16px -2px rgba(29, 78, 216, 0.35) !important;
}

/* Type C: 2nd List (2ème liste / اللائحة الثانية) - Coral/Rose Accent */
.content-body table td a.btn-table-second-list {
    background: #fff1f2 !important;
    color: #be123c !important;
    border-color: #fecdd3 !important;
}

.content-body table td a.btn-table-second-list:hover {
    background: #e11d48 !important;
    color: #ffffff !important;
    border-color: #e11d48 !important;
    box-shadow: 0 6px 16px -2px rgba(225, 29, 72, 0.35) !important;
}

/* Type D: Download / Document - Violet/Indigo */
.content-body table td a.btn-table-download {
    background: #f5f3ff !important;
    color: #6d28d9 !important;
    border-color: #ddd6fe !important;
}

.content-body table td a.btn-table-download:hover {
    background: #7c3aed !important;
    color: #ffffff !important;
    border-color: #7c3aed !important;
    box-shadow: 0 6px 16px -2px rgba(124, 58, 237, 0.35) !important;
}

/* Type E: Pending Notice (No link attached yet) */
.badge-table-pending {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 7px 16px !important;
    margin: 4px 0 !important;
    border-radius: 10px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    background: #f8fafc !important;
    border: 1px dashed #cbd5e1 !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
}

.badge-table-pending i {
    font-size: 0.95rem;
    color: #94a3b8;
}

/* Hide empty ghost links created in editor */
.content-body table td a:empty,
.content-body table td a:blank {
    display: none !important;
}

/* Icons inside table links */
.content-body table td a i,
.content-body table td a svg {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.content-body table td a:hover i,
.content-body table td a:hover svg {
    transform: scale(1.15);
}

/* ==========================================================================
   PRO EDITOR CONTENT COMPONENTS (Callouts, Buttons, Grids, Cards, Badges)
   FLDM Royal Blue Design System — Synchronized with Admin Pro Modal
   ========================================================================== */

/* ── 1. Pro Callouts / Alerts ── */
.pro-callout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 22px;
    margin: 1.8rem 0;
    border-radius: 12px;
    border: 1px solid transparent;
    line-height: 1.7;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.pro-callout-icon {
    font-size: 1.45rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.pro-callout-body {
    flex-grow: 1;
}
.pro-callout-body p:last-child {
    margin-bottom: 0;
}
.pro-callout-info {
    background: #f0f7ff;
    border-color: #bcdbf9;
    color: #0c4a6e;
    border-left: 4px solid #0284c7;
}
[dir="rtl"] .pro-callout-info,
.pro-callout-info[dir="rtl"] {
    border-left: 1px solid #bcdbf9;
    border-right: 4px solid #0284c7;
}
.pro-callout-info .pro-callout-icon {
    color: #0284c7;
}

.pro-callout-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #14532d;
    border-left: 4px solid #16a34a;
}
[dir="rtl"] .pro-callout-success,
.pro-callout-success[dir="rtl"] {
    border-left: 1px solid #bbf7d0;
    border-right: 4px solid #16a34a;
}
.pro-callout-success .pro-callout-icon {
    color: #16a34a;
}

.pro-callout-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #78350f;
    border-left: 4px solid #d97706;
}
[dir="rtl"] .pro-callout-warning,
.pro-callout-warning[dir="rtl"] {
    border-left: 1px solid #fde68a;
    border-right: 4px solid #d97706;
}
.pro-callout-warning .pro-callout-icon {
    color: #d97706;
}

.pro-callout-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #7f1d1d;
    border-left: 4px solid #dc2626;
}
[dir="rtl"] .pro-callout-danger,
.pro-callout-danger[dir="rtl"] {
    border-left: 1px solid #fecaca;
    border-right: 4px solid #dc2626;
}
.pro-callout-danger .pro-callout-icon {
    color: #dc2626;
}

.pro-callout-tip {
    background: #faf5ff;
    border-color: #e9d5ff;
    color: #581c87;
    border-left: 4px solid #9333ea;
}
[dir="rtl"] .pro-callout-tip,
.pro-callout-tip[dir="rtl"] {
    border-left: 1px solid #e9d5ff;
    border-right: 4px solid #9333ea;
}
.pro-callout-tip .pro-callout-icon {
    color: #9333ea;
}

.pro-callout-deadline {
    background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
    border: 1.5px solid #fecaca;
    border-left: 5px solid #dc2626;
    border-radius: 12px;
    padding: 18px 22px;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.06);
}
[dir="rtl"] .pro-callout-deadline,
.pro-callout-deadline[dir="rtl"] {
    border-left: 1.5px solid #fecaca;
    border-right: 5px solid #dc2626;
}
.pro-deadline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dc2626;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}
.pro-deadline-date {
    font-size: 1.15rem;
    font-weight: 800;
    color: #991b1b;
}

/* ── 2. Pro Action Buttons (Universal & Scoped) ── */
.pro-btn,
.content-body .pro-btn,
.content-body a.pro-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 22px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 8px 6px 8px 0;
    cursor: pointer;
    line-height: 1.4 !important;
    vertical-align: middle;
    box-sizing: border-box;
}
.pro-btn i,
.content-body .pro-btn i {
    font-size: 1.15rem;
    line-height: 1;
}

/* Primary — Royal Blue Gradient */
.pro-btn-primary,
.content-body .pro-btn-primary,
.content-body a.pro-btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #1d4ed8 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25) !important;
}
.pro-btn-primary:hover,
.content-body .pro-btn-primary:hover,
.content-body a.pro-btn-primary:hover {
    background: linear-gradient(135deg, #172554 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35) !important;
}
.pro-btn-primary *,
.pro-btn-primary i,
.pro-btn-primary span {
    color: #ffffff !important;
}

/* Download — Soft Blue */
.pro-btn-download,
.content-body .pro-btn-download,
.content-body a.pro-btn-download {
    background: #f0f7ff !important;
    color: #0284c7 !important;
    border: 1.5px solid #bae6fd !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08) !important;
}
.pro-btn-download:hover,
.content-body .pro-btn-download:hover,
.content-body a.pro-btn-download:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.25) !important;
}
.pro-btn-download *,
.pro-btn-download i,
.pro-btn-download span {
    color: #0284c7 !important;
}
.pro-btn-download:hover *,
.pro-btn-download:hover i,
.pro-btn-download:hover span {
    color: #ffffff !important;
}

/* Gold CTA */
.pro-btn-gold,
.content-body .pro-btn-gold,
.content-body a.pro-btn-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
    color: #78350f !important;
    border: 1.5px solid #f59e0b !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25) !important;
    font-weight: 800 !important;
}
.pro-btn-gold:hover,
.content-body .pro-btn-gold:hover,
.content-body a.pro-btn-gold:hover {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35) !important;
}
.pro-btn-gold *,
.pro-btn-gold i,
.pro-btn-gold span {
    color: #78350f !important;
}
.pro-btn-gold:hover *,
.pro-btn-gold:hover i,
.pro-btn-gold:hover span {
    color: #ffffff !important;
}

/* Outline — High Contrast Royal Blue */
.pro-btn-outline,
.content-body .pro-btn-outline,
.content-body a.pro-btn-outline {
    background: #ffffff !important;
    color: #2563eb !important;
    border: 2px solid #2563eb !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08) !important;
}
.pro-btn-outline:hover,
.content-body .pro-btn-outline:hover,
.content-body a.pro-btn-outline:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25) !important;
}
.pro-btn-outline *,
.pro-btn-outline i,
.pro-btn-outline span {
    color: #2563eb !important;
}
.pro-btn-outline:hover *,
.pro-btn-outline:hover i,
.pro-btn-outline:hover span {
    color: #ffffff !important;
}

/* Button Group */
.pro-btn-group,
.content-body .pro-btn-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 1rem 0;
}

/* ── 3. Pro File Download Chip ── */
.pro-file-chip,
.content-body .pro-file-chip,
.content-body a.pro-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    color: #1e293b !important;
    text-decoration: none !important;
    font-size: 0.92rem;
    font-weight: 600;
    margin: 6px 4px;
    transition: all 0.2s ease;
}
.pro-file-chip:hover,
.content-body .pro-file-chip:hover,
.content-body a.pro-file-chip:hover {
    background: #f0f7ff;
    border-color: #38bdf8;
    color: #0369a1 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.pro-file-chip i {
    font-size: 1.3rem;
    color: #0284c7;
}
.pro-file-ext {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #475569;
    font-weight: 800;
    text-transform: uppercase;
}

/* ── 4. Pro Grid Layouts (2-col and 3-col) ── */
.pro-grid {
    display: grid;
    gap: 20px;
    margin: 2rem 0;
}
.pro-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.pro-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 768px) {
    .pro-grid-2,
    .pro-grid-3 {
        grid-template-columns: 1fr;
    }
}
.pro-col {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

/* ── 5. Pro Cards (Conference, Soutenance, Filière, Announcement) ── */
.pro-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px 24px;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.pro-card-conference {
    border-left: 5px solid #2563eb;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
[dir="rtl"] .pro-card-conference,
.pro-card-conference[dir="rtl"] {
    border-left: 1px solid #e2e8f0;
    border-right: 5px solid #2563eb;
}
.pro-card-soutenance {
    border-left: 5px solid #7c3aed;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}
[dir="rtl"] .pro-card-soutenance,
.pro-card-soutenance[dir="rtl"] {
    border-left: 1px solid #e2e8f0;
    border-right: 5px solid #7c3aed;
}
.pro-card-filiere {
    border-left: 5px solid #059669;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}
[dir="rtl"] .pro-card-filiere,
.pro-card-filiere[dir="rtl"] {
    border-left: 1px solid #e2e8f0;
    border-right: 5px solid #059669;
}
.pro-card-announcement {
    border-left: 5px solid #2563eb;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}
[dir="rtl"] .pro-card-announcement,
.pro-card-announcement[dir="rtl"] {
    border-left: 1px solid #e2e8f0;
    border-right: 5px solid #2563eb;
}
.pro-card-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.pro-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 8px 0;
}
.pro-card-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}
.pro-card-body {
    color: #334155;
    line-height: 1.7;
    margin-bottom: 20px;
}
.pro-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    align-items: center;
}

/* ── 6. Pro Steps / Process Flow ── */
.pro-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 2rem 0;
}
.pro-step-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}
.pro-step-item:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37,99,235,0.08);
}
.pro-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pro-step-content {
    flex: 1;
}
.pro-step-content h5 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}
.pro-step-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
}

/* ── 7. Pro Timeline ── */
.pro-timeline {
    position: relative;
    padding: 10px 0 10px 24px;
    margin: 2rem 0;
    border-left: 2px solid #cbd5e1;
}
[dir="rtl"] .pro-timeline,
.pro-timeline[dir="rtl"] {
    padding: 10px 24px 10px 0;
    border-left: none;
    border-right: 2px solid #cbd5e1;
}
.pro-timeline-item {
    position: relative;
    margin-bottom: 22px;
}
.pro-timeline-item:last-child {
    margin-bottom: 0;
}
.pro-timeline-dot {
    position: absolute;
    top: 4px;
    left: -31px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2563eb;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px #2563eb;
}
[dir="rtl"] .pro-timeline-dot,
.pro-timeline[dir="rtl"] .pro-timeline-dot {
    left: auto;
    right: -31px;
}
.pro-timeline-date {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 4px;
}
.pro-timeline-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.92rem;
    color: #334155;
}

/* ── 8. Pro Speakers / Keynote ── */
.pro-speaker-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 22px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.pro-speaker-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #bfdbfe;
    flex-shrink: 0;
    background: #f1f5f9;
}
.pro-speaker-info h5 {
    margin: 0 0 3px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}
.pro-speaker-title {
    font-size: 0.83rem;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 6px;
}
.pro-speaker-topic {
    font-size: 0.88rem;
    color: #475569;
    margin: 0;
    line-height: 1.45;
}

/* ── 9. Pro Team Grid ── */
.pro-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 1.5rem 0;
}
.pro-team-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.pro-team-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
}
.pro-team-card h6 {
    margin: 0 0 2px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}
.pro-team-card span {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
}

/* ── 10. Pro Contact Card ── */
.pro-contact-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1.5px solid #bfdbfe;
    border-radius: 14px;
    padding: 22px 26px;
    margin: 1.5rem 0;
}
.pro-contact-card h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pro-contact-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.pro-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #334155;
}
.pro-contact-item i {
    color: #2563eb;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ── 11. Pro FAQ Item ── */
.pro-faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin: 1rem 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.pro-faq-q {
    background: #f8fafc;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 0.98rem;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pro-faq-q i {
    color: #2563eb;
    font-size: 1.1rem;
}
.pro-faq-a {
    padding: 16px 20px;
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.6;
    background: #ffffff;
}

/* ── 12. Pro Highlight Box ── */
.pro-box-highlight {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0e7ff 100%);
    border: 2px solid #93c5fd;
    border-radius: 16px;
    padding: 26px 30px;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 10px 30px -8px rgba(37,99,235,0.12);
}
.pro-box-highlight h4 {
    color: #1e3a8a;
    font-weight: 800;
    margin-bottom: 10px;
}
.pro-box-highlight p {
    color: #334155;
    font-size: 1rem;
    max-width: 680px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

/* ── 13. Pro Media & Galleries ── */
.pro-gallery {
    display: grid;
    gap: 16px;
    margin: 2rem 0;
}
.pro-gallery-2 {
    grid-template-columns: repeat(2, 1fr);
}
.pro-gallery-3 {
    grid-template-columns: repeat(3, 1fr);
}
.pro-gallery-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 1.5rem 0;
}
@media (max-width: 600px) {
    .pro-gallery-2,
    .pro-gallery-3,
    .pro-gallery-4 {
        grid-template-columns: 1fr;
    }
}
.pro-gallery-item {
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pro-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}
.pro-gallery-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    border-radius: 0 !important;
}
.pro-gallery-caption {
    display: block;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #475569;
    text-align: center;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.pro-figure {
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.04);
}
.pro-figure img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}
.pro-figure-caption {
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── 14. Pro Badges ── */
.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 2px 4px;
}
.pro-badge-primary {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.25);
}
.pro-badge-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.pro-badge-warning {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.pro-badge-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.pro-badge-teal {
    background: #ccfbf1;
    color: #0f766e;
    border: 1px solid #99f6e4;
}
.pro-badge-purple {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}
.pro-badge-gold {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ── 15. Pro Quote ── */
blockquote.pro-quote {
    position: relative;
    padding: 24px 28px;
    margin: 2rem 0;
    background: #f8fafc;
    border-left: 4px solid #fbbf24;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #334155;
    font-size: 1.1rem;
    line-height: 1.8;
}
[dir="rtl"] blockquote.pro-quote,
blockquote.pro-quote[dir="rtl"] {
    border-left: none;
    border-right: 4px solid #fbbf24;
    border-radius: 12px 0 0 12px;
}
blockquote.pro-quote cite {
    display: block;
    margin-top: 12px;
    font-size: 0.9rem;
    font-style: normal;
    font-weight: 700;
    color: #1e3a8a;
}

/* ── 16. Content Body Tables (Programs, Exams, Jury, Results) ── */
.content-body table,
.content-body .table {
    width: 100% !important;
    margin: 1.5rem 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}
.content-body table thead,
.content-body .table thead {
    background: #1e3a8a !important;
    color: #ffffff !important;
}
.content-body table thead th,
.content-body .table thead th {
    background: #1e3a8a !important;
    color: #ffffff !important;
    padding: 13px 16px !important;
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    border: none !important;
    vertical-align: middle !important;
}
.content-body table tbody td,
.content-body .table tbody td {
    padding: 12px 16px !important;
    font-size: 0.92rem !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-top: none !important;
    vertical-align: middle !important;
}
.content-body table tbody tr:last-child td,
.content-body .table tbody tr:last-child td {
    border-bottom: none !important;
}
.content-body table.table-striped tbody tr:nth-of-type(odd),
.content-body .table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8fafc !important;
}
.content-body table.table-hover tbody tr:hover,
.content-body .table-hover tbody tr:hover {
    background-color: #eff6ff !important;
}



