:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary-color: #6c757d;
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Cairo', sans-serif;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
    --card-hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
}

body {
    font-family: var(--font-body);
    background-color: #f3f6f9;
    /* Slightly off-white background */
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    text-align: right;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #1a1e21;
}

/* Links */
a {
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-color);
}

.hover-white:hover {
    color: #fff !important;
}

/* Navbar */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -1px;
}

.nav-link {
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    color: #495057;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Cards Modernization */
.card {
    border: none;
    border-radius: var(--border-radius);
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.card-news .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 4px;
}

.card-news:hover .card-img-top {
    transform: scale(1.05);
    /* Zoom effect */
}

/* Featured Card */
.card-news-featured {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.card-news-featured .card-img-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.3);
}

/* Badges */
.badge-category {
    background-color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    text-transform: uppercase;
}

/* Sidebar */
.sidebar-sticky {
    position: sticky;
    top: 5rem;
}

/* Footer */
footer a.text-secondary:hover {
    color: var(--primary-color) !important;
}

/* Smooth Transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Comments Section */
.comment-list .d-flex {
    background: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
}

.comment-list .d-flex.fade-in {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}