/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Critical CSS - Above the fold styles */
html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--white);
    overflow-x: hidden;
    font-display: swap;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Read-only field styles */
.readonly-field {
    padding: 0.75rem 1rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
}

.role-badge, .entity-type-badge, .category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.role-badge.youth-role {
    background-color: #dbeafe;
    color: #1e40af;
}

.role-badge.entity-role {
    background-color: #dcfce7;
    color: #166534;
}

.entity-type-badge {
    background-color: #fef3c7;
    color: #92400e;
}

.category-badge {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* Profile info styling */
.profile-info {
    margin-bottom: 2rem;
}

/* Default layout (for entities) - side by side */
.profile-info:not(.profile-info-youth) {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

/* Youth layout - vertical stack (rows) */
.profile-info-youth {
    display: block;
    width: 100%;
}

/* Youth profile layout: image above information */
.profile-image-youth {
    text-align: center;
    margin-bottom: 1.5rem;
    width: 100%;
    display: block;
}

.profile-image-youth .profile-pic {
    object-fit: contain;
    border: 2px solid #e5e7eb;
    display: block;
}

.profile-details-youth {
    width: 100%;
    display: block;
    margin-top: 0;
}

/* Entity profile layout: side-by-side */
.profile-image {
    flex-shrink: 0;
}

.profile-image .profile-pic {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: contain;
    border: 3px solid #e5e7eb;
}

.profile-details {
    flex: 1;
}

/* Profile field styling for RTL alignment */
.profile-details-youth .profile-field {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.profile-details-youth .field-label {
    text-align: right;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.profile-details-youth .field-value {
    text-align: right;
    flex: 1;
}
[dir="ltr"] .profile-details-youth .field-value {
    text-align: left;
}
/* Reduce spacing for youth profile name */
.profile-info-youth .profile-name {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

/* Ensure youth profile is properly stacked on all screen sizes */
@media (max-width: 768px) {
    .profile-info:not(.profile-info-youth) {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-info:not(.profile-info-youth) .profile-image {
        margin-top: 2.5rem;
    }
}

/* Youth profile specific responsive adjustments */
.profile-info-youth {
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.profile-info-youth .profile-image-youth {
    margin-bottom: 1rem;
}

.profile-info-youth .profile-details-youth {
    text-align: right;
    direction: rtl;
    padding: 0.5rem 0;
}
[dir="ltr"] .profile-info-youth .profile-details-youth {
    text-align: left;
    direction: ltr;
    padding: 0.5rem 0;
}

/* PDF icon styling */
.pdf-icon {
    color: #dc2626;
    margin-right: 5px;
    vertical-align: middle;
}

.document-link {
    display: inline-flex;
    align-items: center;
    color: #dc2626;
    text-decoration: none;
    transition: color 0.2s ease;
}

.document-link:hover {
    color: #b91c1c;
    text-decoration: underline;
}

.current-file-link {
    display: inline-flex;
    align-items: center;
    color: #dc2626;
    text-decoration: none;
    transition: color 0.2s ease;
}

.current-file-link:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* Profile description styling */
.profile-description-section {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    width: 100%;
    clear: both;
}

.profile-description {
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.profile-description p {
    margin: 0;
    color: var(--gray-700);
    line-height: 1.7;
    font-size: 1rem;
    text-align: justify;
    width: 100%;
}




/* Optimize animations */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:root {
    /* Color Palette - Government Style with Red/Green Accents */
    --primary-red: #C41E32;
    --secondary-red: #c41e32;
    --light-blue: #dbeafe;
    --primary-green: #1f8941;
    --secondary-green: #10b981;
    --light-green: #d1fae5;
    --accent-red: #dc2626;
    --light-red: #fecaca;
    --dark-gray: #333;
    --white: #fff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --font-arabic: "Cairo", sans-serif;
    --font-english: "Poppins", sans-serif;
    --font-headings: "Nunito", sans-serif;
    --font-body: "Inter", sans-serif;
    --container-max-width: 100%;
    --section-padding: 2rem 0;
    --card-padding: 1.5rem;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0/0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0/0.1), 0 2px 4px -2px rgb(0 0 0/0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0/0.1), 0 4px 6px -4px rgb(0 0 0/0.1);
    --transition: all 0.3s ease;
}

button,
input,
select,
textarea {
    font-family: var(--font-arabic) !important;
}

[lang="en-AU"] button,
[lang="fr"] button,
[lang="en-AU"] input,
[lang="fr"] input,
[lang="en-AU"] select,
[lang="fr"] select,
[lang="en-AU"] textarea,
[lang="fr"] textarea {
    font-family: var(--font-english) !important;
    ;
}

/* RTL/LTR Support */
[dir="rtl"] {
    text-align: right;
}

[dir="ltr"] {
    text-align: left;
}

/* Base Typography */
body {
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

[lang="en-AU"] body{
    font-family: var(--font-english);
}
[lang="ar-LB"] body{
    font-family: var(--font-arabic);
}

[lang="en-AU"],
[lang="fr"] {
    font-family: var(--font-english);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--gray-600);
}

a {
    color: var(--dark-gray);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-red);
}

/* Container */
.container {
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    position: relative;
    z-index: 1000;
    margin: 0;
    padding: 0;
}

/* Top Bar */
.header-top-bar {
    background: #333333;
    color: var(--white);
    padding: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hide top bar on mobile */
@media (max-width: 768px) {
    .header-top-bar {
        display: none;
    }
    .republic-text-mobile{
        display: block !important;
        order: 2;
     }
     .animated-text {
        order: 1;
    }
    .mobile-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        justify-content: flex-start;
    }
    
    .mobile-login-text {
        display: flex;
        align-items: center;
    }
    
    .login-text-link {
        color: white;
        font-weight: 600;
        font-size: 0.85rem;
        text-decoration: none;
        padding: 0.4rem 0.6rem;
        /* border: 1px solid white; */
        border-radius: 4px;
        transition: all 0.3s ease;
        white-space: nowrap;
        /* background: white; */
        display: flex;
        align-items: center;
        justify-content: center;
        height: 36px;
        min-height: 36px;
    }
    
    .login-text-link:hover {
        background: var(--primary-red);
        color: white;
    }
    
    .mobile-login-text {
        display: flex !important;
        align-items: center !important;
    }
    
    
    /* Mobile User Profile */
    .mobile-user-profile {
        position: relative;
        display: block;
    }
    
    .mobile-user-info {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.4rem 0.6rem;
        background: white;
        border: 1px solid #ddd;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.3s ease;
        max-width: 120px;
    }
    
    .mobile-user-info:hover {
        background: #f8f9fa;
        border-color: var(--primary-red);
    }
    
    .mobile-user-avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }
    
    .mobile-user-name {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--gray-800);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
    }
    
    .mobile-dropdown-arrow {
        width: 12px;
        height: 12px;
        color: var(--gray-600);
        flex-shrink: 0;
        transition: transform 0.3s ease;
    }
    
    .mobile-user-profile:hover .mobile-dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .mobile-user-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        min-width: 240px;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        margin-top: 0.25rem;
    }
    
    .mobile-user-profile:hover .mobile-user-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        left: 1px;
    }
    
    .mobile-dropdown-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        color: var(--gray-700);
        text-decoration: none;
        font-size: 0.9rem;
        transition: all 0.3s ease;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .mobile-dropdown-item:last-child {
        border-bottom: none;
    }
    
    .mobile-dropdown-item:hover {
        background: #f8f9fa;
        color: var(--primary-red);
    }
    
    .mobile-dropdown-item svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
    
    .language-switcher {
        margin: 0;
    }
    
    .language-select {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: white;
    }
}

/* Hide mobile login text on desktop */
/* Floating Action Buttons for Mobile (Login & Register) */
.floating-auth-buttons {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%) rotate(270deg);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    z-index: 999;
    transition: opacity 0.3s ease;
}

/* Hide floating buttons on desktop */
@media (min-width: 769px) {
    .floating-auth-buttons {
        display: none !important;
    }
}



.floating-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.floating-login-btn {
    background: white;
    color: var(--primary-red);
    border-color:  var(--primary-red);
}

.floating-login-btn:hover {
    background: var(--primary-red);
    color: white;
}

.floating-login-btn:hover .floating-btn-icon {
    stroke: white;
}

.floating-register-btn {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.floating-register-btn .floating-btn-icon {
    stroke: white;
}

.floating-register-btn:hover {
    background: #c41e3a;
    border-color: #c41e3a;
    transform: translateY(-2px) scale(1.05);
}

.floating-btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke:  var(--primary-red);
    transition: stroke 0.3s ease;
}

.floating-btn-label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Floating Comments Button */
.floating-comments-btn {
    position: fixed;
    bottom: 30px;
    right: -2px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
    background: var(--primary-red);
    color: white;
    border: 2px solid var(--primary-red);
    border-radius: 50px 0 0 50px;
    cursor: pointer;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.floating-comments-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: #c41e3a;
}

.floating-comments-btn .btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-comments-btn .comment-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.floating-comments-btn .btn-label {
    font-size: 1.1rem;
    font-weight: 600;
}

.floating-comments-btn .comment-count-badge {
    background: white;
    color: var(--primary-red);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    margin-left: 6px;

  
/* LTR: Flip button content 180 degrees so text reads upward on mobile */
@media (max-width: 768px) {
    [dir="ltr"] .floating-btn {
        transform: rotate(180deg);
    }

    [dir="ltr"] .floating-btn:hover {
        transform: rotate(180deg) translateY(-2px);
    }

    [dir="ltr"] .floating-register-btn:hover {
        transform: rotate(180deg) translateY(-2px) scale(1.05);
    }
}

}
/* RTL Support for Floating Buttons */
[dir="rtl"] .floating-auth-buttons {
    right: auto;
    left: 0;
    transform: translateY(-50%) rotate(270deg);
    align-items: center;
}

/* LTR Support for Floating Buttons - positioned like floating comments button */
[dir="ltr"] .floating-auth-buttons {
    position: fixed;
    right: -50px;
    top: 60%;
    transform: translateY(-50%) rotate(270deg) !important;
    width: 150px;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    z-index: 999;
    transition: all 0.3s ease;
}

[dir="ltr"] .floating-auth-buttons:hover {
    transform: translateY(-50%) translateX(5px) rotate(270deg) !important;
}

[dir="rtl"] .floating-comments-btn {
    right: auto;
    left: 0px;
    border-radius: 0 50px 50px 0;
}

[dir="ltr"] .floating-comments-btn {
    right: 0px;
    left: auto;
    border-radius: 50px 0 0 50px;
    top: 50%;
}

/* Animation for floating buttons */
@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-auth-buttons {
    animation: floatIn 0.5s ease-out;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .floating-auth-buttons {
        top: 70%;
        right: 0;
        transform: translateY(-50%) rotate(270deg);
        align-items: center;
    }

    [dir="ltr"] .floating-auth-buttons {
        top: 50%;
        right: -50px;
        left: auto;
        transform: translateY(-50%) rotate(270deg) !important;
        width: 150px;
        flex-direction: row;
    }
    
     [dir="rtl"] .floating-auth-buttons {
        top: 50%;
        left: -50px;
        right: auto;
        transform: translateY(-50%) rotate(270deg) !important;
        width: 150px;
        flex-direction: row;
    }
    .floating-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .floating-btn-icon {
        width: 18px;
        height: 18px;
    }
    
    .floating-btn-label {
        font-size: 0.85rem;
    }
    
   
}

/* Landscape mode fixes for floating auth buttons */
@media screen and (orientation: landscape) and (max-width: 768px) {
    .floating-auth-buttons {
        position: fixed !important;
        top: 50% !important;
        right: 0 !important;
        left: auto !important;
        transform: translateY(-50%) rotate(270deg) !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        z-index: 999 !important;
    }
    
    [dir="ltr"] .floating-auth-buttons {
        position: fixed !important;
        top: 50% !important;
        right: -50px !important;
        left: auto !important;
        transform: translateY(-50%) rotate(270deg) !important;
        width: 150px !important;
        flex-direction: row !important;
    }
    
    [dir="rtl"] .floating-auth-buttons {
        position: fixed !important;
        top: 50% !important;
        left: 0 !important;
        right: auto !important;
        transform: translateY(-50%) rotate(270deg) !important;
    }
}

/* Additional landscape mode fixes for very small landscape screens */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .floating-auth-buttons {
        position: fixed !important;
        top: 50% !important;
        right: 0 !important;
        left: auto !important;
        transform: translateY(-50%) rotate(270deg) !important;
        gap: 6px !important;
        z-index: 999 !important;
    }
    
    [dir="ltr"] .floating-auth-buttons {
        position: fixed !important;
        top: 50% !important;
        right: -50px !important;
        left: auto !important;
        transform: translateY(-50%) rotate(270deg) !important;
        width: 150px !important;
        flex-direction: row !important;
    }
    
    [dir="rtl"] .floating-auth-buttons {
        position: fixed !important;
        top: 50% !important;
        left: 0 !important;
        right: auto !important;
        transform: translateY(-50%) rotate(270deg) !important;
    }
    
    .floating-auth-buttons .floating-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }
}

@media (min-width: 769px) {
    .mobile-actions {
        display: none !important;
    }
    
    .mobile-login-text {
        display: none !important;
    }
    
    
    .floating-auth-buttons {
        display: none !important;
    }
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lebanese-republic {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.republic-text-mobile {
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
    margin: 0;
    padding: 0;
    letter-spacing: 1px;
}

.cedar-icon {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.current-date {
    font-size: 0.8rem;
    opacity: 0.95;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.calendar-icon {
    color: var(--white) !important;
    opacity: 1;
    flex-shrink: 0;
    stroke: var(--white) !important;
    display: inline-block;
    vertical-align: middle;
}

.calendar-icon svg {
    color: var(--white) !important;
    stroke: var(--white) !important;
}

.date-text {
    color: var(--white);
    opacity: 0.95;
}

/* RTL/LTR support for calendar icon positioning */
[dir="rtl"] .current-date {
    flex-direction: row-reverse;
}

[dir="ltr"] .current-date {
    flex-direction: row;
}

.social-media {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    color: var(--white);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

/* User Profile Styles */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.2rem 0.2rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.user-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.user-info:hover::before {
    left: 100%;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.user-info:hover .user-avatar {
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    letter-spacing: 0.3px;
}

.user-profile .dropdown-arrow {
    color: var(--white);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.user-info:hover .dropdown-arrow {
    transform: rotate(180deg) scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1200;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
    z-index: 1;
}

.user-profile:hover .user-dropdown,
.user-profile.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    font-weight: 500;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.dropdown-item:hover::before {
    width: 4px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(196, 30, 50, 0.05), rgba(196, 30, 50, 0.02));
    color: var(--primary-red);
    transform: translateX(4px);
    padding-left: 1.5rem;
}

.dropdown-item svg {
    color: var(--gray-500);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.dropdown-item:hover svg {
    color: var(--primary-red);
    transform: scale(1.1);
}

.dropdown-item span {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dropdown-item:hover span {
    font-weight: 600;
}

/* RTL Support for User Profile */
[dir="rtl"] .user-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .user-dropdown::before {
    right: auto;
    left: 20px;
}

[dir="rtl"] .dropdown-item::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .dropdown-item:hover {
    transform: translateX(-4px);
    padding-left: 1.25rem;
    padding-right: 1.5rem;
}

/* Mobile User Profile Styles */
@media (max-width: 768px) {
    .user-info {
        padding: 0.375rem 0.75rem;
        gap: 0.5rem;
    }
    
    .user-avatar {
    width: 32px;
    height: 32px;
        border-width: 2px;
    }
    
    .user-name {
        font-size: 0.8rem;
    }
    
    .user-dropdown {
        min-width: 180px;
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-15px) scale(0.95);
    }
    
    .user-dropdown::before {
        right: auto;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
    }
    
    .user-profile:hover .user-dropdown,
    .user-profile.active .user-dropdown {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    
    .dropdown-item {
        padding: 0.875rem 1rem;
    gap: 0.75rem;
}

    .dropdown-item span {
        font-size: 0.85rem;
    }
}

/* Auth Buttons Styles */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: var(--white, #ffffff);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--white, #ffffff);
}

.register-btn {
    background: var(--primary-red, #c41e32);
    border-color: var(--primary-red, #c41e32);
}

.register-btn:hover {
    background: rgba(196, 30, 50, 0.9);
    border-color: var(--primary-red, #c41e32);
    box-shadow: 0 4px 12px rgba(196, 30, 50, 0.3);
}

.auth-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Mobile Auth Buttons */
@media (max-width: 768px) {
    .auth-buttons {
        display: none;
    }
}

/* Logo Row */
.header-logo-row {
    background: var(--white);
    position: relative;
}

.header-logo-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
}

.logo-row-content {
    position: relative;
    height: 110px;
    overflow: hidden;
}

.flag-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.flag-img {
    width: auto;
    height: 100%;
    float: left;
}

.ministry-logo {
    position: absolute;
    top: 55%;
    left: 0;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

[dir="rtl"] .ministry-logo {
    left: unset;
}

.logo-img {
    height: 90px;
    width: auto;
}

/* .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
} */

.logo-text {
    margin-left: 1.5rem;
    display: flex;
    align-items: center;
    height: 100%;
}

[dir="rtl"] .logo-text {
    margin-left: 0;
    margin-right: 1.5rem;
}

.animated-text {
    font-size: 1.4rem;
    font-weight: 700;
    white-space: normal;
    animation: catchyBounceGlow 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards, triColorShift 6s ease-in-out 1.5s infinite;
    letter-spacing: 1px;
    line-height: 1.5;
    word-wrap: break-word;
    hyphens: auto;
    position: relative;
    display: inline-block;
    padding: 0;
    text-transform: capitalize;
    /* background: linear-gradient(90deg, 
        #ef4444 0%, 
        #dc2626 20%,
        #22c55e 40%, 
        #16a34a 60%,
        #1a1a1a 80%, 
        #000000 100%); */
    background: linear-gradient(90deg,
        #064e3b 0%,    /* very dark green */
        #065f46 20%,   /* deep green */
        #047857 40%,   /* emerald green */
        #16a34a 60%,   /* repeat deep green */
        #0f172a 80%,   /* near-black bluish tone */
        #000000 100%   /* black */
    );   
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.1));
    transform-origin: center;
    background-size: 300% 100%;
}

/* Keyframe animation for bouncy entrance with glow */
@keyframes catchyBounceGlow {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-30px);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.15) translateY(0);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Keyframe animation for gradient color shift */
@keyframes triColorShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes bounceInScale {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-30px);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1) translateY(0);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

[dir="rtl"] .animated-text {
    animation: catchyBounceGlow 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards, triColorShift 8s ease-in-out 1.5s infinite;
    font-family: 'Harmattan', 'Cairo', sans-serif;
    font-style: normal;
    font-size: 1.6rem;
    font-weight: 700;
}


/* Navigation Row */
.header-nav-row {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1001;
    transition: all 0.3s ease;
}

.header-nav-row.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}



.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0.75rem;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-item.active .nav-link {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.nav-link {
    padding: 0.4rem 0.5rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: var(--transition);
    display: block;
    color: var(--white);
    white-space: normal;
    font-size: 1rem;
    line-height: 2;
    text-align: center;
    letter-spacing: 1.2px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    flex-direction: column;
    gap: 4px;
    z-index: 1002;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 36px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Actions - Hidden on desktop */
.mobile-actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    justify-content: flex-start;
}

/* Show mobile actions only on mobile */
@media (max-width: 768px) {
    .mobile-actions {
        display: flex;
    }
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.language-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.7rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-width: 50px;
    /* height: 36px; */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    padding-right: 2rem;
}

.language-select:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-select:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.language-select option {
    background: var(--white);
    color: var(--gray-700);
    padding: 0.5rem;
}

/* Search Toggle Button */
.search-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
}

.search-toggle-btn:hover,
.search-toggle-btn:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.search-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.search-toggle-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Search Dropdown */
.search-dropdown {
    position: relative;
    display: inline-block;
}

.search-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 300px;
    margin-top: 0.5rem;
}

[dir="rtl"] .search-dropdown-content {
    right: unset;
    left: 0;
}


.search-dropdown.active .search-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--white);
}

[dir="rtl"]  .search-dropdown-content::before {
    left: 20px;
    right: unset;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-dropdown .search-form {
    width: 100%;
    padding: 1rem;
}

.search-dropdown .search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-dropdown .search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--gray-700);
}

.search-dropdown .search-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

.search-dropdown .search-submit-btn {
    background: var(--primary);
    border: none;
    color: var(--primary-red);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-dropdown .search-submit-btn:hover {
    background: var(--primary-dark);
}

.search-dropdown .search-submit-btn svg {
    width: 20px;
    height: 20px;
}

/* Search Dropdown Responsive */
@media (max-width: 768px) {
    .search-dropdown-content {
        min-width: 280px;
        right: -10px;
    }
    
    .search-dropdown .search-form {
        padding: 0.75rem;
    }
    
    .search-dropdown .search-field {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }
    
    .search-dropdown .search-submit-btn {
        padding: 0.625rem 0.875rem;
    }
    
    .search-dropdown .search-submit-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Search Page Mobile Styles */
    .search-form-count-container {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .search-count {
        font-size: 1rem;
        padding: 0.625rem 0.875rem;
    }
    
    .search-page .search-input-wrapper {
        padding: 0.375rem;
    }
    
    .search-page .search-field {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .search-page .search-submit {
        min-width: 44px;
        height: 44px;
        padding: 0.625rem;
    }
    
    .search-page .search-submit svg {
        width: 18px;
        height: 18px;
    }
    
    /* Search Results Mobile Styles */
    .search-page .news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .search-form-count-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .search-page .search-form-container {
        max-width: 100%;
    }
    
    .search-page .news-thumbnail {
        height: 200px;
    }
    
    .search-page .news-content {
        padding: 1.25rem;
    }
    
    .search-page .news-content h2 {
        font-size: 1.1rem;
    }
    
    .search-page .news-content p {
        font-size: 0.85rem;
    }
 
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .search-page .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Desktop styles */
@media (min-width: 1025px) {
    .search-page .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    .search-page .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .search-page .news-thumbnail {
        height: 180px;
    }
}

/* Search Page Styles */
.search-form-count-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
}

.search-form-count-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.search-count {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-700);
    text-align: left;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: inline-block;
    flex-shrink: 0;
}

.search-page .search-form-container {
    position: static;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: auto;
    flex: 1;
}

.search-page .search-form {
    width: 100%;
    padding: 0;
}

.search-page .search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    padding: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.search-page .search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.search-page .search-field {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--gray-700);
    outline: none;
}

.search-page .search-field::placeholder {
    color: var(--gray-500);
}

.search-page .search-submit {
    background: var(--primary);
    border: none;
    color: var(--primary-red);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
}

.search-page .search-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.search-page .search-submit svg {
    width: 20px;
    height: 20px;
}


/* Search Wrapper */
.search-wrapper {
    position: relative;
}

/* Search Icon */
.search-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--white);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 10;
}

.search-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Search Form Container */
.search-form-container {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    width: 350px;
    z-index: 1 ;
    margin-top: 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Form */
.search-form {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: var(--font-arabic);
}

.search-input:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.search-submit {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.search-submit:hover {
    background: #dc2626;
}

.search-close {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.search-close:hover {
    background: #4b5563;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .search-form-container {
        width: 300px;
        right: -10px;
    }
    
    .search-form {
        padding: 0.75rem;
    }
    
    .search-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .search-submit,
    .search-close {
        padding: 0.5rem;
    }
}





/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
}

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

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--gray-100);
    color: var(--dark-gray);
}

/* Main Content */
.main-content {
    position: relative;
    margin: 3rem 0;

}
.main-content-homepage {
    position: relative;
    margin-top: 0;
}

.prev-btn {
    left: 20px;
    padding-bottom: 4px;
}

.next-btn {
    right: 20px;
    padding-bottom: 4px;
    padding-left: 1px;
}

/* RTL Support for Simple Slider */
[dir="rtl"] .prev-btn {
    left: auto;
    right: 20px;
}



/* Custom Carousel Navigation Buttons */
.carousel-prev,
.carousel-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: none !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    font-size: 24px !important;
    cursor: pointer !important;
    z-index: 10 !important;
    backdrop-filter: blur(10px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    user-select: none !important;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

.carousel-prev:focus,
.carousel-next:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

.carousel-prev {
    right: 20px !important;
}

.carousel-next {
    left: 20px !important;
}

/* RTL Support for Custom Carousel Buttons */
[dir="rtl"] .carousel-prev {
    right: auto !important;
    left: 20px !important;
}

[dir="rtl"] .carousel-next {
    left: auto !important;
    right: 20px !important;
}


.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--white);
}

/* Sections */
section {
    padding: var(--section-padding);
}

section:first-child {
    padding-top: 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--gray-900);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-red);
    border-radius: 2px;
}

/* About Minister */
/* .about-minister {
    background: var(--gray-50);
} */

.minister-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.minister-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.read-more-btn {
    background: var(--primary-red);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.read-more-btn:hover {
    background: var(--secondary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.minister-image img {
    width: 100%;
    height: 360px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Shortcuts */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}


/* [dir="rtl"] .shortcut-card .card-link {
    align-self: flex-start;
    margin-right: auto;
    position: absolute;
    bottom: 1rem;
    left: 1rem;
} */

.shortcut-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    margin-bottom: 1rem;
    color: var(--dark-gray);
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-icon svg {
    width: 48px;
    height: 48px;
}

.shortcut-card h3 {
    color: var(--dark-gray);
    margin-bottom: 1rem;
}


.card-link:hover {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* [dir="rtl"] .card-link:hover {
    transform: scaleX(-1) translateY(-2px);
} */

/* [dir="ltr"] .card-link:hover {
    transform: scaleX(1) translateY(-2px);
} */

/* Latest Federations and Associations Section */
.federations-section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    position: relative;
    justify-content: space-between;
}
/* [dir="ltr"] .section-header .section-title {
    text-align: left;
} */
.section-header .section-title {
    margin-bottom: 0;
    flex: 1;
    text-align: center;
    position: relative;
}

.section-header .section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-red);
    border-radius: 2px;
}

/* RTL support for Arabic */
[dir="rtl"] .section-header {
    flex-direction: row-reverse;
}

/* [dir="rtl"] .section-header .section-title {
    text-align: right;
} */

/* [dir="rtl"] .section-header .section-title::after {
    left: auto;
    right: 0;
    transform: translateX(-50%);
} */

/* [dir="ltr"] .section-header .section-title::after {
    left: 40px;
    right: auto;
    transform: translateX(-50%);
} */
[dir="rtl"] .section-header .view-all-btn {
    order: -1;
}

[dir="ltr"] .section-header .view-all-btn {
    order: 1;
}

/* .section-header .view-all-btn {
    background: var(--white);
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: var(--font-arabic);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    text-shadow: none;
    white-space: nowrap;
}

.section-header .view-all-btn:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
} */

.federations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.federations-header .section-title {
    margin-bottom: 0;
    flex: 1;
}

.federations-view-all-btn {
    background: var(--white);
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-family: var(--font-arabic);
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    text-shadow: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0;
    right: 0;
}


/* Apply only when page direction is LTR */
html[dir="ltr"] .federations-header .card-link {
    left: unset !important;
    right: 1rem;
}

.federations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.federation-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    text-align: left;
    position: relative;
    transition: var(--transition);
    border: 2px solid #C41E32; /* Red border */
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Override federation-card styles for entities grid */
.entities-grid .federation-card {
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    padding: 1rem !important;
    text-align: left !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    border: 2px solid #C41E32 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    cursor: pointer !important;
    flex-direction: row !important;
}

.federation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: #A01828; /* Darker red on hover */
}

.federation-logo {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.federation-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    border: 3px solid var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 auto;
}

.quote-icon {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #fbbf24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
    font-weight: bold;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.federation-content {
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
[dir="rtl"] .federation-content {
    text-align: right;
}

.federation-content p {
    color: var(--gray-700);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.federation-separator {
    display: none; /* Hide separator for horizontal layout */
}

.federation-content h4 {
    color: var(--gray-900);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.federation-title {
    color: var(--gray-900);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.federation-summary {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-style: normal;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.federation-name {
    color: var(--gray-800);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    /* font-style: italic; */
}

/* Owl Carousel Base Styles */
.owl-carousel {
    display: none;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 1;
}

.owl-carousel .owl-stage {
    position: relative;
    -ms-touch-action: pan-Y;
    touch-action: manipulation;
    -moz-backface-visibility: hidden;
}

.owl-carousel .owl-stage:after {
    content: ".";
    display: block;
    clear: both;
    visibility: hidden;
    line-height: 0;
    height: 0;
}

.owl-carousel .owl-stage-outer {
    position: relative;
    overflow: visible;
    -webkit-transform: translate3d(0px, 0px, 0px);
}

.owl-carousel .owl-item {
    position: relative;
    min-height: 1px;
    float: left;
    -webkit-backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.owl-carousel .owl-item img {
    display: block;
}

.owl-carousel .owl-nav.disabled,
.owl-carousel .owl-dots.disabled {
    display: none;
}

.owl-carousel .owl-nav .owl-prev,
.owl-carousel .owl-nav .owl-next {
    cursor: pointer;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
    background: none;
    color: inherit;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    outline: inherit;
}

.owl-carousel.owl-loaded {
    display: block;
}

.owl-carousel.owl-loading {
    opacity: 0;
    display: block;
}

/* Base owl carousel dots - minimal styling */
.owl-carousel .owl-dots {
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.owl-carousel .owl-dots .owl-dot {
    display: inline-block;
    zoom: 1;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure all carousel dot containers are clean */
.federations-carousel .owl-dots .owl-dot,
.single-item-carousel .owl-dots .owl-dot,
.latest-activities .owl-dots .owl-dot,
.latest-news .owl-dots .owl-dot {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.owl-carousel .owl-dots .owl-dot span {
    width: 10px;
    height: 10px;
    margin: 5px 7px;
    background: #D6D6D6;
    display: block;
    -webkit-backface-visibility: visible;
    transition: opacity 200ms ease;
    border-radius: 30px;
    border: none !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.owl-carousel .owl-dots .owl-dot.active span,
.owl-carousel .owl-dots .owl-dot:hover span {
    background: #869791;
}

/* Federations Carousel Styles */
.federations-carousel-wrapper {
    position: relative;
    margin-top: 2rem;
    overflow: hidden;
}

.federations-carousel.owl-carousel {
    width: 100%;
}

.federations-carousel .owl-stage {
    display: flex;
}

.federations-carousel .owl-item {
    width: 100%;
}

.federations-carousel .federation-card {
    /* margin: 0 10px; */
    min-height: 20rem;
    /* min-height: 280px; */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    margin-bottom: 8px;
}

.federations-carousel .owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% + 100px);
    left: -50px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.federations-carousel .owl-nav button {
    background: var(--white) !important;
    border: 2px solid var(--primary-red) !important;
    color: var(--primary-red) !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: var(--transition) !important;
    pointer-events: auto !important;
    box-shadow: var(--shadow-md) !important;
    margin: 0 !important;
    position: relative !important;
}

.federations-carousel .owl-nav button:hover {
    background: var(--primary-red) !important;
    color: var(--white) !important;
    transform: scale(1.1) !important;
    box-shadow: var(--shadow-lg) !important;
}

.federations-carousel .owl-nav .owl-prev {
    left: 0;
}

.federations-carousel .owl-nav .owl-next {
    right: 0;
}

.federations-carousel .owl-dots {
    text-align: center;
    margin-top: 2rem;
}

.federations-carousel .owl-dots .owl-dot span {
    background: var(--gray-300) !important;
    transition: var(--transition) !important;
    border: none !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.federations-carousel .owl-dots .owl-dot.active span {
    background: var(--primary-red) !important;
    transform: scale(1.2) !important;
}

.federations-carousel .owl-dots .owl-dot:hover span {
    background: var(--primary-red) !important;
    opacity: 0.7;
}

/* Default logo styling */
.default-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray-400);
    border: 3px solid var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    flex-shrink: 0;
}

/* RTL Support for Carousel */
[dir="rtl"] .federations-carousel .owl-nav .owl-prev {
    left: auto;
    right: -25px;
}

[dir="rtl"] .federations-carousel .owl-nav .owl-next {
    right: auto;
    left: -25px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .federations-carousel .owl-nav .owl-prev {
        left: -15px;
    }

    .federations-carousel .owl-nav .owl-next {
        right: -15px;
    }

    [dir="rtl"] .federations-carousel .owl-nav .owl-prev {
        left: auto;
        right: -15px;
    }

    [dir="rtl"] .federations-carousel .owl-nav .owl-next {
        right: auto;
        left: -15px;
    }
}

@media (max-width: 768px) {
    .federations-carousel .owl-nav {
        display: none;
    }

    .federations-carousel .federation-card {
        margin: 0 5px;
        min-height: 250px;
    }

    .federations-carousel .owl-dots {
        margin-top: 1.5rem;
    }
}

@media (max-width: 576px) {
    .federations-carousel .federation-card {
        padding: 1.5rem;
        min-height: 220px;
    }

    .federation-logo img,
    .default-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .federation-content p {
        font-size: 0.9rem;
    }

    .federation-content h4 {
        font-size: 1rem;
    }
}

/* Latest Content Section */
/* .latest-content-section {
    padding: 2rem 0;
} */

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    /* margin: 2rem 0px; */
    width: 100%;
    box-sizing: border-box;
}

.content-column {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    min-height: 450px;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}


.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

.column-title {
    color: var(--dark-gray);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.view-all-btn {
    background: var(--white);
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.view-all-btn:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 30, 50, 0.3);
}

/* Single Item Carousel */
.single-item-carousel {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100% !important;
    position: relative !important;
}

.single-item-carousel .owl-stage-outer {
    flex: 1;
    padding-bottom: 0;
    overflow: hidden !important;
    width: 100% !important;
    position: relative !important;
}

.single-item-carousel .owl-stage {
    display: flex !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.single-item-carousel .owl-item {
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    height: 100% !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.single-item-carousel .activity-card,
.single-item-carousel .news-card {
    width: 100% !important;
    margin: 0 !important;
    height: 100% !important;
    flex: 1 !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Hide arrows but show dots for single item carousels */
.single-item-carousel .owl-nav {
    display: none !important;
}

.single-item-carousel .owl-dots {
    text-align: center;
    margin-top: 0.25rem;
    padding: 0;
    position: relative;
    bottom: 0;
}

.single-item-carousel .owl-dots .owl-dot span {
    width: 8px !important;
    height: 8px !important;
    margin: 0 6px !important;
    background: #d1d5db !important;
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.single-item-carousel .owl-dots .owl-dot.active span {
    background: var(--primary-red) !important;
    transform: scale(1.2) !important;
}

.single-item-carousel .owl-dots .owl-dot:hover span {
    background: var(--primary-red) !important;
    opacity: 0.7;
}


/* Activities and News Carousel - Legacy styles for backward compatibility */
.latest-activities .owl-carousel,
.latest-news .owl-carousel {
    margin-top: 2rem;
}

.latest-activities .owl-item,
.latest-news .owl-item {
    padding: 0 10px 20px 10px;
    display: flex;
    justify-content: center;
    height: 100%;
    align-items: stretch;
}

.latest-activities .activity-card,
.latest-news .news-card {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

/* Hide arrows but show dots */
.latest-activities .owl-nav,
.latest-news .owl-nav {
    display: none !important;
}

.latest-activities .owl-dots,
.latest-news .owl-dots {
    text-align: center;
    margin-top: 2rem;
    padding: 0;
}

.latest-activities .owl-dots .owl-dot span,
.latest-news .owl-dots .owl-dot span {
    width: 10px !important;
    height: 10px !important;
    margin: 0 8px !important;
    background: #d1d5db !important;
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.latest-activities .owl-dots .owl-dot.active span,
.latest-news .owl-dots .owl-dot.active span {
    background: var(--primary-red) !important;
    transform: scale(1.2) !important;
}

.latest-activities .owl-dots .owl-dot:hover span,
.latest-news .owl-dots .owl-dot:hover span {
    background: var(--primary-red) !important;
    opacity: 0.7;
}




/* .activity-card {
    background: var(--white);
    overflow: visible;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 350px;
} */


.activity-card img,
.news-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

/* .activity-content,
.news-content {
    padding: 0.375rem 0.375rem 0.125rem 0.375rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
} */

/* .activity-content h3,
.news-content h3 {
    color: var(--dark-gray);
    margin-top: 0.5rem;
    margin-bottom: 0.125rem;
    font-size: 1.1rem;
} */

/* .activity-content p,
.news-content p {
    margin-bottom: 0.25rem;
    color: var(--gray-600);
    font-size: 0.9rem;
} */

/* .activity-content h4,
.news-content h4 {
    color: var(--dark-gray);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
} */

.activity-date{
    color: var(--gray-500);
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 0;
    padding-top: 0;
}

/* Annual Reports */
.annual-reports {
    background: var(--white);
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.report-card {
    background: var(--white);
    padding: var(--card-padding);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    border-top: 4px solid var(--primary-green);
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--secondary-green);
}

.report-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.report-card h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.report-card p {
    margin-bottom: 1.5rem;
    color: var(--gray-600);
}

.report-link {
    background: var(--primary-red);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.report-link:hover {
    background: var(--secondary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Blog/Forum */
.blog-forum {
    background: var(--gray-50);
}

.topics-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0.75rem;
}

.topic-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    border-left: 3px solid var(--primary-red);
    transition: var(--transition);
    text-decoration: none;
}

[dir="rtl"] .topic-item {
    border-left: 1px solid var(--gray-200);
    border-right: 3px solid var(--primary-red);
}

.topic-item:hover {
    border-left-color: var(--primary-red);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(196, 30, 50, 0.15);
}

[dir="rtl"] .topic-item:hover {
    border-right-color: var(--primary-red);
    transform: translateX(-5px);
}

.topic-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.topic-content h4 {
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.topic-content p {
    margin-bottom: 0.5rem;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.topic-stats {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Calendar Section */
.calendar-section {
    padding: 4rem 0;
}

.calendar-section .calendar-header {
    margin-bottom: 2rem;
}

.calendar-section .calendar-wrapper {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Job Opportunities Section */
.job-opportunities-section {
    padding: 4rem 0;
}

.job-opportunities-grid {
    margin-top: 2rem;
}

.job-opportunities-grid .jobs-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.job-opportunities-grid .job-item {
    display: flex;
    flex-direction: column;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    border-left: 3px solid var(--primary-red);
    transition: var(--transition);
    text-decoration: none;
    height: 100%;
}

[dir="rtl"] .job-opportunities-grid .job-item {
    border-left: 1px solid var(--gray-200);
    border-right: 3px solid var(--primary-red);
}

.job-opportunities-grid .job-item:hover {
    border-left-color: var(--primary-red);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(196, 30, 50, 0.15);
}

[dir="rtl"] .job-opportunities-grid .job-item:hover {
    border-right-color: var(--primary-red);
}

/* Legacy styles for old calendar-jobs grid (kept for backwards compatibility) */
.calendar-jobs-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.calendar-column,
.jobs-column {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Jobs List Styles */
.jobs-wrapper {
    flex: 1;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 600px;
    overflow: hidden;
    padding-right: 0.5rem;
}

.job-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    border-left: 3px solid var(--primary-red);
    transition: var(--transition);
    text-decoration: none;
}

[dir="rtl"] .job-item {
    border-left: 1px solid var(--gray-200);
    border-right: 3px solid var(--primary-red);
}

.job-item:hover {
    border-left-color: var(--primary-red);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(196, 30, 50, 0.15);
}

[dir="rtl"] .job-item:hover {
    border-right-color: var(--primary-red);
    transform: translateX(-5px);
}

.job-content {
    flex: 1;
}

.job-content h4 {
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 600;
}

.job-content p {
    margin-bottom: 0.5rem;
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.5;
}

.job-date {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* .job-date i {
    color: var(--primary-red);
} */

/* Responsive Design */
@media (max-width: 992px) {
    .calendar-jobs-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .job-opportunities-grid .jobs-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .jobs-list {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .calendar-column,
    .jobs-column {
        padding: 1.5rem;
    }

    .calendar-jobs-section,
    .calendar-section,
    .job-opportunities-section {
        padding: 3rem 0;
    }

    .calendar-section .calendar-wrapper {
        padding: 1rem;
    }

    .job-opportunities-grid .jobs-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .job-opportunities-grid .job-item {
        padding: 1.25rem;
    }

    .jobs-description {
        font-size: 1rem;
    }

    .job-content h4 {
        font-size: 1rem;
    }

    .job-content p {
        font-size: 0.9rem;
    }
}

/* Footer */
.footer {
    background: #333;
    color: var(--white);
    position: relative;
    overflow: hidden;
    padding-top: 0;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-red);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: var(--gray-800);
    line-height: 1.6;
}

/* .footer-logo .logo-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.footer-logo .logo-link:hover {
    opacity: 0.8;
} */

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--gray-800);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--dark-gray);
}

.contact-info p {
    margin-bottom: 0.8rem;
    color: var(--gray-800);
    line-height: 1.1;
    padding: 0;
}

.contact-info p a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.contact-info p span {
    display: inline;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    border-top: 1px solid var(--primary-red);
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-600);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-list {
        gap: 0.6rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.5rem;
    }
}

@media (min-width: 769px) {
    .content-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .nav-list {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.4rem;
        white-space: normal;
        line-height: 1.2;
    }
    

    .minister-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .logo-row-content {
        height: 100px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 0;
        position: relative;
    }
    
    .flag-image {
        display: none;
    }
    
    .ministry-logo {
        position: static;
        transform: none;
        padding: 0;
        flex-direction: row;
        align-items: center;
        text-align: right;
        order: 2;
        gap: 1rem;
    }
    
    /* .ministry-logo .logo-link {
        order: 2;
    } */
    
    .ministry-logo .logo-text {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0.75rem;
        padding: 0.5rem 0;
    }
    
    /* Arabic RTL layout - logo on right for mobile only */
    /* [dir="rtl"] .ministry-logo {
        flex-direction: row-reverse;
    } */
    
    [dir="rtl"] .ministry-logo .logo-link {
        order: 1;
    }
    
    [dir="rtl"] .ministry-logo .logo-text {
        order: 2;
        text-align: left;
        align-items: flex-start;
    }
    
    /* .ministry-logo .logo-text .animated-text {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--gray-800);
        margin-bottom: 0.25rem;
    }
     */
    .ministry-logo .republic-text,.republic-text-mobile {
        font-size: 0.9rem;
        color: var(--gray-600);
        font-weight: 500;
    }
    
    .mobile-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .mobile-login-text {
        display: flex;
        align-items: center;
    }
    
    .login-text-link {
        color: white;
        font-weight: 600;
        font-size: 0.9rem;
        text-decoration: none;
        padding: 0.5rem 0.75rem;
        /* border: 1px solid white; */
        border-radius: 4px;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 36px;
        min-height: 36px;
    }
    
    .login-text-link:hover {
        background: var(--primary-red);
        color: white;
    }
    
    
    .logo-img {
        height: 80px;
    }
    
    .logo-text {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .animated-text {
        font-size: 1.2rem;
        text-align: center;
        white-space: normal;
        line-height: 1.5;
        word-wrap: break-word;
        font-weight: 600;
        padding: 0;
        letter-spacing: 0.8px;
        /* Keep animation from base styles */
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .lebanese-republic {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .lebanese-republic .republic-text ,.republic-text-mobile{
        order: 1;
    }
    
    .lebanese-republic .current-date {
        order: 2;
        margin-top: 0.25rem;
    }
    
    .social-media {
        justify-content: center;
    }
    
    /* Mobile Navigation Layout */
    .main-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
        position: relative;
    }
    
    /* Show mobile menu toggle and actions */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 36px;
        width: 36px;
        padding: 0.25rem;
        cursor: pointer;
        z-index: 1001;
        position: relative;
    }
    
    .mobile-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        justify-content: flex-start;
    }
    
    /* Hide desktop navigation */
    .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-red);
        flex-direction: column;
        gap: 0;
        width: 100%;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
        padding: 0.5rem 0;
        max-height: 0;
        overflow: hidden;
    }
    
    .nav-list.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        max-height: 80vh;
        overflow-y: auto;
        display: flex;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        text-align: right;
        padding: 0.75rem 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: var(--white);
        background: transparent;
        border-radius: 0;
        font-size: 0.95rem;
        position: relative;
    }
    
    .nav-link .arrow {
        width: 20px;
        height: 20px;
        margin-left: 0.5rem;
        flex-shrink: 0;
        cursor: pointer;
        padding: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
        font-size: 12px;
        color: var(--white);
    }
    
    .nav-link .arrow::before {
        content: '▼';
        font-size: 10px;
        line-height: 1;
        transition: transform 0.3s ease;
    }
    
    [dir="rtl"] .nav-link .arrow {
        margin-left: 0;
        margin-right: 0.5rem;
    }
    
    .nav-item.dropdown .nav-link .arrow {
        display: block;
    }
    
    .nav-item:not(.dropdown) .nav-link .arrow {
        display: none;
    }
    
    .nav-item.dropdown.open .nav-link .arrow::before {
        transform: rotate(180deg);
    }
    
    .nav-link .arrow:hover::before {
        opacity: 0.8;
        transform: scale(1.2);
    }
    
    .nav-item.dropdown.open .nav-link .arrow:hover::before {
        transform: rotate(180deg) scale(1.2);
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--white);
    }
    
    /* Hide desktop actions */
    .nav-actions {
        display: none;
    }
    
    /* Mobile dropdown menus */
    .dropdown-menu {
        position: static;
        background: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        transform: none;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
        border-radius: 0;
        transition: all 0.3s ease;
    }
    
    .nav-item.dropdown.open .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        padding: 0.5rem 0;
    }
    
    .dropdown-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-menu a {
        padding: 0.5rem 1.5rem;
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.85rem;
    }
    
    .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--white);
    }


    
    /* Mobile Custom Carousel Buttons */
    .carousel-prev,
    .carousel-next {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
    }
    
    .carousel-prev {
        right: 5px !important;
    }
    
    .carousel-next {
        left: 5px !important;
    }
    
    [dir="rtl"] .carousel-prev {
        right: auto !important;
        left: 5px !important;
    }
    
    [dir="rtl"] .carousel-next {
        left: auto !important;
        right: 5px !important;
    }
    

    
    .prev-btn {
        left: 5px !important;
    }
    
    .next-btn {
        right: 5px !important;
    }
    
    [dir="rtl"] .prev-btn {
        left: auto !important;
        right: 5px !important;
    }
    
    [dir="rtl"] .next-btn {
        right: auto !important;
        left: 5px !important;
    }
    
    
    
    .shortcuts-grid,
    .activities-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-column {
        margin-bottom: 2rem;
    }
    
    .federations-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .entities-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .entities-grid .federation-card,
    .entities-grid .entity-card {
        padding: 0.75rem;
        flex-direction: row; /* Keep horizontal layout on mobile */
        text-align: left;
        gap: 0.5rem;
    }
    
    .entities-grid .federation-logo {
        width: 50px;
        height: 50px;
    }
    
    .entities-grid .federation-logo img {
        width: 50px;
        height: 50px;
    }
    
    .entities-grid .federation-title {
        font-size: 0.9rem;
    }
    
    .federation-card {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .federation-logo {
        width: 60px;
        height: 60px;
    }
    
    .federation-logo img {
        width: 60px;
        height: 60px;
    }
    
    .column-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .view-all-btn {
        align-self: flex-end;
    }

    .federations-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .federations-view-all-btn {
        position: static;
        align-self: flex-end;
    }

    .section-header {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .section-header .view-all-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .logo-row-content {
        height: 120px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 0;
        position: relative;
    }
    
    .flag-image {
        display: none;
    }
    
    .ministry-logo {
        position: static;
        transform: none;
        padding: 0;
        flex-direction: row;
        align-items: center;
        text-align: right;
        order: 2;
        gap: 0.75rem;
    }
    
    .ministry-logo .logo-link {
        order: 2;
    }
    
    html[dir="ltr"] .ministry-logo .logo-link {
        order: 1;
    }


    .ministry-logo .logo-link .logo-img {
        width: 80px;
        height: auto;
    }
    
    .ministry-logo .logo-text {
        order: 1;
        text-align: left;
        display: flex;
        flex-direction: column;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        padding: 0;
    }
    
    /* .ministry-logo .logo-text .animated-text {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--gray-800);
        margin-bottom: 0.2rem;
    } */
    
    
    /* Arabic RTL layout - logo on right for small mobile only */
    /* [dir="rtl"] .ministry-logo {
        flex-direction: row-reverse;
    } */
    
    [dir="rtl"] .ministry-logo .logo-link {
        order: 1;
    }
    
    [dir="rtl"] .ministry-logo .logo-text {
        order: 2;
        text-align: left;
        align-items: flex-start;
    }
    
    .mobile-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .mobile-login-text {
        display: flex;
        align-items: center;
    }
    
    .login-text-link {
        color: white;
        font-weight: 600;
        font-size: 0.9rem;
        text-decoration: none;
        padding: 0.5rem 0.75rem;
        /* border: 1px solid white; */
        border-radius: 4px;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 36px;
        min-height: 36px;
    }
    
    .login-text-link:hover {
        background: var(--primary-red);
        color: white;
    }
    
    
    .logo-img {
        height: 70px;
    }
    
    .logo-text {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .animated-text {
        font-size: 1rem;
        text-align: center;
        white-space: normal;
        line-height: 1.5;
        word-wrap: break-word;
        font-weight: 600;
        padding: 0;
        letter-spacing: 0.6px;
        /* Keep animation from base styles */
    }
    
    .mobile-actions {
        gap: 0.75rem;
        justify-content: flex-start;
    }
    
    /* Mobile User Profile for small mobile */
    .mobile-user-info {
        max-width: 100px;
        padding: 0.3rem 0.5rem;
    }
    
    .mobile-user-name {
        font-size: 0.75rem;
    }
    
    .mobile-user-avatar {
        width: 20px;
        height: 20px;
    }
    
   .mobile-actions .lang-dropdown-btn,
    .mobile-actions .search-icon-btn {
        width: 36px;
        height: 36px;
        padding: 0.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    


    .section-title {
        font-size: 1.5rem;
    }
    
    .shortcut-card,
    .activity-card,
    .news-card {
        margin: 0 0.5rem;
    }

    
    /* Small Mobile Custom Carousel Buttons */
    .carousel-prev,
    .carousel-next {
        width: 35px !important;
        height: 35px !important;
        font-size: 18px !important;
    }
    
    .carousel-prev {
        right: 2px !important;
    }
    
    .carousel-next {
        left: 2px !important;
    }
    
    [dir="rtl"] .carousel-prev {
        right: auto !important;
        left: 2px !important;
    }
    
    [dir="rtl"] .carousel-next {
        left: auto !important;
        right: 2px !important;
    }
    

    
    .prev-btn {
        left: 2px !important;
    }
    
    .next-btn {
        right: 2px !important;
    }
    
    [dir="rtl"] .prev-btn {
        left: auto !important;
        right: 2px !important;
    }
    
    [dir="rtl"] .next-btn {
        right: auto !important;
        left: 2px !important;
    }
    
    
}
/* Hide reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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


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

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


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

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



/* Utility Classes */
.bg-white {
    background: var(--white);
}

.bg-grey {
    background: var(--gray-100);
}


/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-top: 2px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


[dir="ltr"] .flag-img {
    float: right;
}

[dir="ltr"] .flag-img {
    float: right;
}

.page-banner {
    background-color: #f5f5f5;
    /* light grey */
    padding: 25px 20px 15px 20px;
    text-align: right;
    position: relative;
    transition: all 0.3s ease;
}

/* Background image styling */
.page-banner.has-bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 130px;
    display: flex;
    align-items: center;
}

/* Ensure content is above overlay */
.page-banner.has-bg-image .container {
    position: relative;
    z-index: 2;
}

/* Adjust text color when background image is present */
.page-banner.has-bg-image .page-banner-title,
.page-banner.has-bg-image .breadcrumb-link,
.page-banner.has-bg-image .breadcrumb-current,
.page-banner.has-bg-image .breadcrumb-text,
.page-banner.has-bg-image .breadcrumb-separator {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Breadcrumb link hover effect with background image */
.page-banner.has-bg-image .breadcrumb-link:hover {
    color: #f0f0f0;
    text-decoration: underline;
}

.page-banner .container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.page-banner-content {
    text-align: right;
    width: 100%;
}

[dir="ltr"] .page-banner-content {
    text-align: left;
}

/* Override breadcrumb alignment in page banner */
.page-banner .breadcrumb {
    text-align: right;
}

[dir="ltr"] .page-banner .breadcrumb {
    text-align: left;
}

.page-banner .breadcrumb-list {
    justify-content: flex-end;
}



.page-banner-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.2;
    padding:5px;
}

[dir="ltr"] .page-banner-title {
    text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
    .page-banner {
        padding: 12px 15px;
    }
    
    .page-banner.has-bg-image {
        min-height: 150px;
    }

    .page-banner-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
}

.news_user_role {
    display: inline-flex;
    align-items: center;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    align-self: flex-start;
    margin-top: auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    background: var(--primary-red);
    padding: 2px 14px;
    border-radius: 5px;
    text-align: center;
    margin: 10px 0px;
}

/* ========================================
   DYNAMIC STYLES (Extracted from scripts.js)
   ======================================== */

/* Form Validation Styles */
.form-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-success {
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification-info {
    background: #C41E32;
}

.notification-success {
    background: #059669;
}

.notification-warning {
    background: #d97706;
}

.notification-error {
    background: #dc2626;
}

/* Fallback Navigation Styles */
.fallback-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
    transform: translateY(-50%);
}

.fallback-prev,
.fallback-next {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.fallback-prev:hover,
.fallback-next:hover {
    background: rgba(0, 0, 0, 0.7);
}



/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #000000;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #C41E32;
    box-shadow: 0 0 0 3px rgba(196, 30, 50, 0.1);
}

.submit-btn {
    width: 100%;
    background: #1e40af;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background: #1d4ed8;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    background: transparent;
}

/* Search Form Styles removed - will be reimplemented */



/* Single Post Sidebar Styles */
.single-news.container {
    padding: 0 2rem;
}

/* RTL Support for single post container */
[dir="rtl"] .single-news.container,
.rtl .single-news.container,
body.rtl .single-news.container {
    direction: rtl;
}

.single-news-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 30px;
    max-width: 100%;
}

/* Force RTL layout - this should override everything */
[dir="rtl"] .single-news-layout,
.rtl .single-news-layout,
body.rtl .single-news-layout,
html[dir="rtl"] .single-news-layout,
body[class*="lang-ar"] .single-news-layout,
.single-news-layout[dir="rtl"],
.single-news-layout.rtl,
body[dir="rtl"] .single-news-layout,
body[class*="rtl"] .single-news-layout {
    grid-template-columns: 2fr 1fr !important;
    direction: rtl !important;
}

[dir="rtl"] .single-news-sidebar,
.rtl .single-news-sidebar,
body.rtl .single-news-sidebar,
html[dir="rtl"] .single-news-sidebar,
body[class*="lang-ar"] .single-news-sidebar,
body[class*="ar"] .single-news-sidebar,
.single-news-sidebar[dir="rtl"],
.single-news-sidebar.rtl,
body[dir="rtl"] .single-news-sidebar,
body[class*="rtl"] .single-news-sidebar {
    order: 2 !important;
    grid-column: 2 !important;
}

[dir="rtl"] .single-news-main,
.rtl .single-news-main,
body.rtl .single-news-main,
html[dir="rtl"] .single-news-main,
body[class*="lang-ar"] .single-news-main,
body[class*="ar"] .single-news-main,
.single-news-main[dir="rtl"],
.single-news-main.rtl,
body[dir="rtl"] .single-news-main,
body[class*="rtl"] .single-news-main {
    order: 1 !important;
    grid-column: 1 !important;
}

.single-news-main {
    /* Main content takes up 2/3 of the space */
    min-width: 0; /* Prevent grid overflow */
}

/* Single News Title Styles */
.single-news-title {
    margin-bottom: 2rem;
}

.single-news-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin: 0 0 1rem 0;
}

/* Single News Meta Styles */
.single-news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.single-news-meta .news-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 1rem;
    font-weight: 500;
}

.single-news-meta .news-date i {
    color: #C41E32;
    font-size: 0.9rem;
}

.single-news-meta .news-taxonomy-badge--inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    line-height: 1;
}

.single-news-meta .news-taxonomy-badge--inline .news-taxonomy-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1;
}

.single-news-meta .news-taxonomy-badge--inline .news-taxonomy-icon {
    width: 1.15rem;
    height: 1.15rem;
}

/* LTR Alignment for English and French */
/* [dir="ltr"] .single-news-title,
.ltr .single-news-title,
body[class*="lang-en"] .single-news-title,
body[class*="lang-fr"] .single-news-title,
body[class*="en"] .single-news-title,
body[class*="fr"] .single-news-title {
    text-align: left !important;
}

[dir="ltr"] .single-news-title h1,
.ltr .single-news-title h1,
body[class*="lang-en"] .single-news-title h1,
body[class*="lang-fr"] .single-news-title h1,
body[class*="en"] .single-news-title h1,
body[class*="fr"] .single-news-title h1 {
    text-align: left !important;
} */

/* [dir="ltr"] .single-news-meta,
.ltr .single-news-meta,
body[class*="lang-en"] .single-news-meta,
body[class*="lang-fr"] .single-news-meta,
body[class*="en"] .single-news-meta,
body[class*="fr"] .single-news-meta {
    text-align: left !important;
} */

[dir="ltr"] .single-news-featured,
.ltr .single-news-featured,
body[class*="lang-en"] .single-news-featured,
body[class*="lang-fr"] .single-news-featured,
body[class*="fr"] .single-news-featured {
    text-align: left !important;
}

/* RTL Alignment for Arabic */
[dir="rtl"] .single-news-title,
.rtl .single-news-title,
body[class*="lang-ar"] .single-news-title {
    text-align: right !important;
}

[dir="rtl"] .single-news-title h1,
.rtl .single-news-title h1,
body[class*="lang-ar"] .single-news-title h1{
    text-align: right !important;
}

[dir="rtl"] .single-news-meta,
.rtl .single-news-meta,
body[class*="lang-ar"] .single-news-meta{
    text-align: right !important;
}

[dir="rtl"] .single-news-featured,
.rtl .single-news-featured,
body[class*="lang-ar"] .single-news-featured{
    text-align: right !important;
}

/* Video Height Limitation */
.news-video .video-wrapper iframe,
.news-video .video-wrapper video {
    max-height: 400px !important;
    width: 100% !important;
    height: auto !important;
}

.single-news-sidebar {
    /* Sidebar takes up 1/3 of the space */
    min-width: 0; /* Prevent grid overflow */
}


.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

/* Sticky Comments Section */
.sidebar-widget.sticky-comments {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    z-index: 10;
}

/* Comments in Sidebar */
.sidebar-widget.sticky-comments .comment-list-container {
    margin-top: 0;
    padding-top: 0;
}

.sidebar-widget.sticky-comments .comment-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-red, #C41E32);
}

.sidebar-widget.sticky-comments .comment-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.sidebar-widget.sticky-comments .comment-item {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--primary-red, #C41E32);
}

.sidebar-widget.sticky-comments .comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-red, #C41E32);
    margin-bottom: 5px;
}

.sidebar-widget.sticky-comments .comment-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 8px;
}

.sidebar-widget.sticky-comments .comment-content {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
}

.sidebar-widget.sticky-comments .comment-replies {
    margin-top: 10px;
    margin-left: 15px;
    border-left: 2px solid #e0e0e0;
    padding-left: 10px;
}

.sidebar-widget.sticky-comments .comment-replies .comment-item {
    background: #fff;
    border-left: 2px solid #ddd;
    margin-bottom: 10px;
}

/* Comment Form in Sidebar */
.sidebar-widget.sticky-comments .comment-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.sidebar-widget.sticky-comments .comment-form-comment textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    resize: vertical;
}

.sidebar-widget.sticky-comments .btn-submit-comment {
    background: var(--primary-red, #C41E32);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sidebar-widget.sticky-comments .btn-submit-comment:hover {
    background: #a0172a;
}

.sidebar-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-gray, #2c3e50);
    margin-bottom: 20px;
    padding-bottom: 10px;
    /* border-bottom: 3px solid var(--primary-red, #C41E32); */
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--primary-red, #C41E32);
}

.sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-post-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

/* Keep sidebar posts layout consistent - picture always on left */

.sidebar-post-item:hover {
    background: #f8f9fa;
    border-color: var(--primary-red, #C41E32);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 50, 0.1);
}

.sidebar-post-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-post-item:hover .sidebar-thumb {
    transform: scale(1.05);
}

.sidebar-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Keep sidebar post content layout consistent */

.sidebar-post-title {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-post-title a {
    color: var(--dark-gray, #2c3e50);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-post-title a:hover {
    color: var(--primary-red, #C41E32);
}

.sidebar-post-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.85rem;
    color: #666;
}

.sidebar-post-author {
    font-weight: 600;
    color: var(--primary-red, #C41E32);
}

.sidebar-post-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sidebar-post-date i {
    font-size: 0.8rem;
}

.no-related-posts {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .single-news.container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .single-news-layout {
        grid-template-columns: 1fr !important;
        gap: 20px;
        margin-top: 20px;
    }
    
    /* Force single column layout for all RTL/LTR on mobile */
    [dir="rtl"] .single-news-layout,
    .rtl .single-news-layout,
    body.rtl .single-news-layout,
    html[dir="rtl"] .single-news-layout,
    body[class*="lang-ar"] .single-news-layout,
    body[class*="ar"] .single-news-layout,
    body[dir="rtl"] .single-news-layout,
    body[class*="rtl"] .single-news-layout {
        grid-template-columns: 1fr !important;
    }
    
    /* Reset order for mobile */
    [dir="rtl"] .single-news-main,
    .rtl .single-news-main,
    body.rtl .single-news-main,
    html[dir="rtl"] .single-news-main,
    body[class*="lang-ar"] .single-news-main,
    body[class*="ar"] .single-news-main,
    body[dir="rtl"] .single-news-main,
    body[class*="rtl"] .single-news-main {
        order: 1 !important;
        grid-column: 1 !important;
    }
    
    [dir="rtl"] .single-news-sidebar,
    .rtl .single-news-sidebar,
    body.rtl .single-news-sidebar,
    html[dir="rtl"] .single-news-sidebar,
    body[class*="lang-ar"] .single-news-sidebar,
    body[class*="ar"] .single-news-sidebar,
    body[dir="rtl"] .single-news-sidebar,
    body[class*="rtl"] .single-news-sidebar {
        order: 2 !important;
        grid-column: 1 !important;
    }
    
    .sidebar-widget {
        padding: 15px;
        margin-top: 20px;
    }
    
    .sidebar-post-item {
        flex-direction: row;
        text-align: left;
        padding: 12px;
        gap: 12px;
    }
    
    .sidebar-post-thumbnail {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .sidebar-post-content {
        text-align: left;
    }
    
    .sidebar-post-title {
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 8px;
    }
    
    .sidebar-post-meta {
        flex-direction: column;
        gap: 4px;
        font-size: 0.8rem;
    }
    
    /* Back to listing button mobile */
    .back-to-listing {
        margin-bottom: 1rem;
        padding-top: 0.5rem;
    }
    
    .back-to-listing .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* Comments section mobile */
    .single-news-main .comment-list-container {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .comment-title {
        font-size: 1.2rem;
    }
    
    .comment-list-container {
        padding: 15px;
    }
    
    /* Sticky comments mobile - disable sticky on mobile */
    .sidebar-widget.sticky-comments {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    
    .sidebar-widget.sticky-comments .comment-list {
        max-height: 300px;
    }

    /* Title mobile */
    .single-news-title {
        margin-bottom: 1.5rem;
    }
    
    .single-news-title h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin: 0 0 0.75rem 0;
    }
    
    .single-news-meta .news-date {
        font-size: 0.9rem;
    }
    
    /* Featured image mobile */
    .single-news-featured {
        margin-bottom: 15px;
    }
    
    .featured-img {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    /* Content mobile */
    .single-news-content {
        padding: 0;
    }
    
    .single-news-body {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Fix bullet list alignment for mobile */
    .single-news-body ul,
    .single-news-content ul {
        margin-left: 1rem;
        padding-left: 0;
        list-style-position: inside;
    }
    
    .news_user_role {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .activity-date {
        font-size: 0.85rem;
    }
}

/* Small Mobile Responsive */
@media (max-width: 480px) {
    .single-news.container {
        padding: 0 0.5rem;
    }
    
    .sidebar-post-item {
        padding: 10px;
        gap: 10px;
    }
    
    .sidebar-post-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .sidebar-post-title {
        font-size: 0.85rem;
        line-height: 1.1;
    }
    
    .sidebar-post-meta {
        font-size: 0.75rem;
    }
    
    .back-to-listing .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .comment-list-container {
        padding: 10px;
    }
    
    .comment-title {
        font-size: 1.1rem;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .single-news.container {
        padding: 0 1.5rem;
        max-width: 100%;
    }
    
    .single-news-layout {
        gap: 25px;
        grid-template-columns: 1.5fr 1fr;
    }
    
    /* Force single column for tablets in portrait mode */
    @media (max-height: 768px) {
        .single-news-layout {
            grid-template-columns: 1fr !important;
        }
        
        [dir="rtl"] .single-news-layout,
        .rtl .single-news-layout,
        body.rtl .single-news-layout,
        html[dir="rtl"] .single-news-layout,
        body[class*="lang-ar"] .single-news-layout,
        body[class*="ar"] .single-news-layout,
        body[dir="rtl"] .single-news-layout,
        body[class*="rtl"] .single-news-layout {
            grid-template-columns: 1fr !important;
        }
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .sidebar-post-item {
        padding: 15px;
    }
    
    .sidebar-post-thumbnail {
        width: 70px;
        height: 70px;
    }
}

/* RTL Support */
[dir="rtl"] .sidebar-title::after {
    left: auto;
    right: 0;
}

/* Keep sidebar posts layout consistent for all languages */

/* Additional RTL support for single post layout */
[dir="rtl"] .single-news-layout,
.rtl .single-news-layout,
body.rtl .single-news-layout {
    text-align: right;
}

[dir="rtl"] .single-news-main,
.rtl .single-news-main,
body.rtl .single-news-main {
    text-align: right;
}

[dir="rtl"] .single-news-sidebar,
.rtl .single-news-sidebar,
body.rtl .single-news-sidebar {
    text-align: right;
}

/* Back to Listing Button */
.back-to-listing {
    margin-bottom: 2rem;
    padding-top: 1rem;
}

.back-to-listing .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #6b7280;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.back-to-listing .btn:hover {
    background-color: #4b5563;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-to-listing .btn i {
    font-size: 0.875rem;
}

/* RTL Support for back button */
[dir="rtl"] .back-to-listing .btn i,
.rtl .back-to-listing .btn i,
body.rtl .back-to-listing .btn i {
    transform: scaleX(-1);
}

/* Forum Layout Specific Styles */
.single-news-main .comment-list-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

/* RTL Support for comments section */
[dir="rtl"] .single-news-main .comment-list-container,
.rtl .single-news-main .comment-list-container,
body.rtl .single-news-main .comment-list-container,
html[dir="rtl"] .single-news-main .comment-list-container,
body[class*="lang-ar"] .single-news-main .comment-list-container,
body[class*="ar"] .single-news-main .comment-list-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

/* Content Bullet Lists - Fix alignment to stay within borders */
.content ul,
.single-news-content ul,
.single-news-body ul,
.entry-content ul,
.post-content ul {
    margin-left: 1.5rem;
    padding-left: 0;
    list-style-position: inside;
}

.content li,
.single-news-content li,
.single-news-body li,
.entry-content li,
.post-content li {
    margin-bottom: 0.5rem;
    padding-left: 0;
}

/* Ensure bullets don't extend outside content area */
.content ul li::marker,
.single-news-content ul li::marker,
.single-news-body ul li::marker,
.entry-content ul li::marker,
.post-content ul li::marker {
    color: var(--primary-red, #C41E32);
}

/* Search Results Page Styles */
.search-results-page {
    padding: 2rem 0;
    min-height: 60vh;
}

.search-results-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.search-results-header .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #d01026;
    margin: 0 0 1rem 0;
}

.search-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.results-count {
    background: #C41E32;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.search-results-list {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.search-result-item {
    display: block;
    position: relative;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.search-result-item:hover,
.search-result-item:focus {
    border-color: #C41E32;
    box-shadow: 0 4px 12px rgba(196, 30, 50, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
    outline: none;
}

.search-result-item:focus {
    box-shadow: 0 4px 12px rgba(196, 30, 50, 0.15), 0 0 0 3px rgba(196, 30, 50, 0.1);
}

.result-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 0.75rem;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #6b7280;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.result-type {
    color: #C41E32;
    font-weight: 600;
    background: #eff6ff;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid #dbeafe;
}

.result-date {
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.result-location {
    color: #059669;
    font-size: 0.8rem;
    background: #ecfdf5;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid #d1fae5;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.result-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: #d70820;
    transition: color 0.2s ease;
}

.search-result-item:hover .result-title {
    color: #C41E32;
}

.result-excerpt {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
    line-height: 1.5;
    font-size: 0.95rem;
}

.result-arrow {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #C41E32;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.search-result-item:hover .result-arrow {
    opacity: 1;
    transform: translateX(2px);
}

.result-actions {
    display: flex;
    align-items: center;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid #C41E32;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    background: #C41E32;
    color: white;
    transform: translateY(-1px);
}

.read-more-btn svg {
    transition: transform 0.2s ease;
}

.read-more-btn:hover svg {
    transform: translateX(2px);
}

.search-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.search-pagination .page-numbers {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-pagination .page-numbers li {
    margin: 0;
}

.search-pagination .page-numbers a,
.search-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    color: #6b7280;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.search-pagination .page-numbers a:hover {
    background: #C41E32;
    color: white;
    border-color: #C41E32;
}

.search-pagination .page-numbers .current {
    background: #C41E32;
    color: white;
    border-color: #C41E32;
}

.search-no-results,
.search-no-query {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-600);
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.no-results-icon,
.no-query-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    opacity: 0.6;
}

.search-no-results h2,
.search-no-query h2 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
}

.search-no-results p,
.search-no-query p {
    margin: 0 0 2rem 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--gray-600);
}

.search-suggestions {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    max-width: 500px;
    margin: 0 auto;
}

.search-suggestions h3 {
    margin: 0 0 1rem 0;
    color: #C41E32;
    font-size: 1.25rem;
    font-weight: 600;
}

.search-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.search-suggestions li {
    padding: 0.5rem 0;
    color: #6b7280;
    position: relative;
    padding-left: 1.5rem;
}

.search-suggestions li::before {
    content: "•";
    color: #C41E32;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .modal-content {
        margin: 1rem;
    }

    .search-results-page {
        padding: 1rem 0;
    }

    .search-results-header .page-title {
        font-size: 2rem;
    }

    .search-result-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .result-image {
        width: 100%;
        height: 200px;
    }

    .result-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .result-title {
        font-size: 1.25rem;
    }

    .result-arrow {
        top: 1rem;
        right: 1rem;
    }

    .search-pagination .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-pagination .page-numbers a,
    .search-pagination .page-numbers span {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* Top Entities Shortcode Styles */
.top-entities-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.entities-column {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.entities-column:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.entities-header {
    background: linear-gradient(135deg, var(--primary-red, #C41E32) 0%, #bf8686 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.entities-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 10px solid var(--primary-red, #C41E32);
}

.entities-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.entities-count {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.entities-list {
    padding: 1.5rem;
}

/* Specific styles for top entities table shortcode */
.top-entities-shortcode .entities-list {
    padding: 1.5rem;
}

.top-entities-shortcode .entity-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.top-entities-shortcode .entity-card::after {
    content: '→';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-red, #C41E32);
    font-size: 1.2rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.top-entities-shortcode .entity-card:hover {
    background: #ffffff;
    border-color: var(--primary-red, #C41E32);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(196, 30, 50, 0.1);
}

.top-entities-shortcode .entity-card:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(3px);
}

.top-entities-shortcode .entity-card:active {
    transform: translateX(3px) scale(0.98);
    box-shadow: 0 2px 8px rgba(196, 30, 50, 0.2);
}

.top-entities-shortcode .entity-card:last-child {
    margin-bottom: 0;
}

.top-entities-shortcode .entity-rank {
    background: var(--primary-red, #C41E32);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(196, 30, 50, 0.3);
}

.top-entities-shortcode .entity-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.top-entities-shortcode .entity-logo {
    width: 50px;
    height: 50px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.top-entities-shortcode .entity-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 4px;
    border: 1px solid #e9ecef;
}

.top-entities-shortcode .entity-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.top-entities-shortcode .entity-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-entities-shortcode .entity-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-entities-shortcode .post-count {
    background: #e3f2fd;
    color: #1976d2;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #bbdefb;
}

/* .top-entities-shortcode .entity-name{
    margin-right: 10px !important;
}
.top-entities-shortcode .entity-logo-img{
    height: 50px !important;
} */
.entity-card {
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}


.entity-card:hover {
    background: #ffffff;
    border-color: var(--primary-red, #C41E32);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(196, 30, 50, 0.1);
}

.entity-card:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(3px);
}

.entity-card:active {
    transform: translateX(3px) scale(0.98);
    box-shadow: 0 2px 8px rgba(196, 30, 50, 0.2);
}

.entity-card:last-child {
    margin-bottom: 0;
}

.entity-rank {
    background: var(--primary-red, #C41E32);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(196, 30, 50, 0.3);
}

.entity-content {
    /* display: flex; */
    align-items: center;
    text-align: center;
    flex: 1;
}

.entity-logo {
    width: 50px;
    /* height: 50px; */
    margin-right: 1rem;
    flex-shrink: 0;
}


.entity-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 4px;
    border: 1px solid #e9ecef;
}

.entity-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.entity-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-count {
    background: #e3f2fd;
    color: #1976d2;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #bbdefb;
}

.no-entities {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Responsive Design for Top Entities */
@media (max-width: 768px) {
    .top-entities-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .entities-header {
        padding: 1rem;
    }
    
    .entities-title {
        font-size: 1.2rem;
    }
    
    .entities-list {
        padding: 1rem;
    }
    
    .entity-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .entity-rank {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        margin-right: 0.75rem;
    }
    
    .entity-logo {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
    }
    
    .entity-name {
        font-size: 0.9rem;
    }
    
    .post-count {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

/* Responsive styles for top entities shortcode */
@media (max-width: 768px) {
    .top-entities-shortcode .entities-list {
        padding: 1rem;
    }
    
    .top-entities-shortcode .entity-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .top-entities-shortcode .entity-rank {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        margin-right: 0.75rem;
    }
    
    .top-entities-shortcode .entity-logo {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
    }
    
    .top-entities-shortcode .entity-name {
        font-size: 0.9rem;
    }
    
    .top-entities-shortcode .post-count {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .top-entities-shortcode .entity-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .top-entities-shortcode .entity-content {
        flex-direction: column;
        margin-top: 0.5rem;
    }
    
    .top-entities-shortcode .entity-logo {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .top-entities-shortcode .entity-rank {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .entity-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .entity-content {
        flex-direction: column;
        margin-top: 0.5rem;
    }
    
    .entity-logo {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .entity-rank {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* ========================================
   PASSWORD TOGGLE STYLES
   ======================================== */

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 50px; /* Make room for the toggle button */
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.password-toggle:hover {
    color: #6b7280;
    background-color: #f3f4f6;
}

/* .password-toggle:focus {
    outline: 2px solid #6b7280;
    outline-offset: 2px;
} */

.password-toggle.active {
    color: #6b7280;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    transition: opacity 0.2s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.password-toggle .eye-icon,
.password-toggle .eye-off-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* RTL Support for password toggle */
[dir="rtl"] .password-input-wrapper .form-input {
    padding-right: 12px;
    padding-left: 50px;
}

[dir="rtl"] .password-toggle {
    right: auto;
    left: 12px;
}

/* ========================================
   FILE VALIDATION STYLES
   ======================================== */

.file-validation-error {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
}

.file-validation-error .error-icon {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.file-validation-error .error-icon svg {
    width: 16px;
    height: 16px;
}

[dir="rtl"] .file-validation-error .error-icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

.file-validation-error .error-text {
    flex: 1;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #dc2626; /* Red color */
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
    font-size: 0;
}
[dir="rtl"] .back-to-top {
    left: 30px;
    right: unset;
}

.back-to-top:hover {
    background-color: #b91c1c; /* Darker red on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.back-to-top:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* Breadcrumb Styles */
.page-banner-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-link {
    color: var(--primary-color, #d81d1d);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    font-weight: 500;
    border: 2px solid transparent;
}

.breadcrumb-link:hover {
    background-color: transparent;
    color: var(--primary-color, #d81d1d);
    text-decoration: none;
    border: 2px solid #d81d1d;
    border-radius: 0.375rem;
}

.breadcrumb-text {
    color: var(--gray-600, #6b7280);
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.breadcrumb-current {
    color: var(--gray-900, #111827);
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.breadcrumb-item--current .breadcrumb-text {
    color: var(--gray-900, #111827);
    font-weight: 600;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
}

.breadcrumb-separator {
    color: var(--gray-400, #9ca3af);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0 0.25rem;
    user-select: none;
}

/* RTL Support for Arabic */
/* [dir="rtl"] .breadcrumb-list {
    flex-direction: row-reverse;
} */

/* [dir="rtl"] .breadcrumb-item {
    flex-direction: row-reverse;
} */

/* [dir="rtl"] .breadcrumb-separator {
    transform: scaleX(-1);
} */

/* Responsive Design */
@media (max-width: 768px) {
    .breadcrumb-list {
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .breadcrumb-link,
    .breadcrumb-text,
    .breadcrumb-current {
        padding: 0.25rem 0.5rem;
    }
    
    .breadcrumb-item--current .breadcrumb-text {
        padding: 0.25rem 0.75rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.25rem;
    }
}

@media (max-width: 480px) {
    .breadcrumb-list {
        font-size: 0.75rem;
        gap: 0.25rem;
    }
    
    .breadcrumb-link,
    .breadcrumb-text {
        padding: 0.15rem 0.3rem;
    }
    
    .breadcrumb-item--current .breadcrumb-text {
        padding: 0.15rem 0.5rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.15rem;
    }
}

/* Breadcrumb Animation */
.breadcrumb-item {
    animation: slideInLeft 0.3s ease-out;
}

.breadcrumb-item:nth-child(1) { animation-delay: 0.1s; }
.breadcrumb-item:nth-child(2) { animation-delay: 0.15s; }
.breadcrumb-item:nth-child(3) { animation-delay: 0.2s; }
.breadcrumb-item:nth-child(4) { animation-delay: 0.25s; }
.breadcrumb-item:nth-child(5) { animation-delay: 0.3s; }

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

[dir="rtl"] .breadcrumb-item {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced hover effects */
.breadcrumb-link {
    position: relative;
    overflow: hidden;
}

.breadcrumb-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.breadcrumb-link:hover::before {
    left: 100%;
}

/* Breadcrumb with background */
.breadcrumb {
    /* background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95)); */
    /* backdrop-filter: blur(15px); */
    /* border-radius: 1rem; */
    padding: 1rem 1.5rem;
    /* border: 1px solid rgba(229, 231, 235, 0.6); */
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); */
    /* max-width: 100%; */
}

@media (max-width: 768px) {
    .page-banner-content {
        min-height: 15px;
        padding: 0.05rem 0;
    }
    
    .breadcrumb {
        padding: 0.25rem 0.4rem;
        border-radius: 0.75rem;
    }
}
.top-entities-container .entity-logo-img {
    width: 50px !important;        /* set fixed size */
    height: 50px !important;       /* same as width */
    border-radius: 50% !important;  /* makes it circular */
    object-fit: cover !important;   /* crop/fill nicely */
    display: block !important;
}
.top-entities-container .entity-details {
   margin-right: 1rem !important;
}

/* Current file preview styles */
.current-file-preview {
    margin-bottom: 1rem;
}

.current-file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--primary-red);
    border: 1px solid var(--primary-red);
    border-radius: 8px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.current-file-link:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: var(--white);
    text-decoration: none;
}

.current-file-link .file-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Password toggle styles */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--gray-500);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary-red);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Secondary button styles */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-left: 0.75rem;
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
    text-decoration: none;
    border-color: #9ca3af;
}

.btn-secondary .btn-icon {
    width: 20px;
    height: 20px;
}

/* Statistics Page Styles */
.statistics-section {
    padding: 40px 0;
}

.statistics-section--cards-hidden {
    padding: 0 !important
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
}

.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.youth-icon {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
}

.federation-icon {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
}

.association-icon {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    color: white;
}

.stat-content h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.stat-number {
    margin: 0;
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
}

.top-entities-section {
    margin-top: 50px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.top-entities-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 768px) {
    .top-entities-grid {
        display: grid;
        gap: 20px;
        grid-template-columns: 1fr;
    }
}

.top-entity-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 50px 80px 1fr;
    gap: 20px;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.top-entity-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.entity-rank {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.entity-logo-small img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-placeholder-small {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.entity-info {
    flex: 1;
}

.entity-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #333;
}

.entity-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.entity-type-badge.federation {
    background: #fee2e2;
    color: #dc2626;
}

.entity-type-badge.association {
    background: #fecaca;
    color: #991b1b;
}

.entity-description {
    margin: 8px 0 0 0;
    font-size: 0.9rem;
    color: #666;
}

.entity-activity {
    text-align: center;
}

.activity-count {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #dc2626;
}

.activity-label {
    display: block;
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
}

.no-entities {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}

/* Statistics Page Responsive Design */
@media (max-width: 768px) {
    .stats-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .top-entity-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }
    
    .entity-rank {
        margin: 0 auto;
    }
    
    .entity-logo-small {
        margin: 0 auto;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}



[dir="rtl"] .cta-btn {
    align-self: start;
}

.search-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0;
    border-radius: var(--border-radius);
    cursor: pointer;
    color: var(--white);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}
.single-news-body a {
    color: #C41E32;
}
.single-job-body a{
    color: #C41E32;
}
.youth-path-title{
    color: var(--primary-red);;
}

.nav-item a, .nav-link {
    /* font-family: var(--font-body); */
    font-weight: 500;
    letter-spacing: 0.01em;
}
.nav-item.active .nav-link {
    background: hsla(0, 0%, 100%, 0.2);
    color: var(--white);
}

.calendar-day.selected .activity-count {
    color: #fff !important;
}
.elementor ul{
    margin-left: 1rem;
}
[dir="rtl"] .elementor ul{
    margin-right: 1rem;
}

/* Social links under profile images */
.profile-social-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-social-links .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
}

/* Facebook brand color */
.profile-social-links .social-link.facebook {
    background: #1877F2;
}

.profile-social-links .social-link.facebook:hover,
.profile-social-links .social-link.facebook:focus {
    background: #1877F2;
    transform: translateY(-2px);
}

/* Instagram brand gradient */
.profile-social-links .social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    position: relative;
}

.profile-social-links .social-link.instagram:hover,
.profile-social-links .social-link.instagram:focus {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    transform: translateY(-2px);
}

/* Twitter/X brand color */
.profile-social-links .social-link.twitter {
    background: #000000;
}

.profile-social-links .social-link.twitter:hover,
.profile-social-links .social-link.twitter:focus {
    background: #000000;
    transform: translateY(-2px);
}

/* LinkedIn brand color */
.profile-social-links .social-link.linkedin {
    background: #0A66C2;
}

.profile-social-links .social-link.linkedin:hover,
.profile-social-links .social-link.linkedin:focus {
    background: #0A66C2;
    transform: translateY(-2px);
}

/* YouTube brand color */
.profile-social-links .social-link.youtube {
    background: #FF0000;
}

.profile-social-links .social-link.youtube:hover,
.profile-social-links .social-link.youtube:focus {
    background: #FF0000;
    transform: translateY(-2px);
}

.profile-social-links .social-link:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.profile-social-links .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.profile-social-links .social-link svg {
    width: 17px;
    height: 17px;
}

.entity-map-container {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.entity-map-coordinates {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.entity-map-coordinates .form-group {
    flex: 1 1 160px;
}
.map-location-controls {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 12px;
    text-align: center;
}

.map-location-controls .map-search-control {
    flex: 0 1 70%;
    width: 100%;
    max-width: 100%;
}
[lang="ar-LB"]  .map-location-controls .map-search-control {
    flex: 0 1 80%;
    width: 100%;
    max-width: 100%;
}

.map-location-controls .map-search-input-row {
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-location-controls .map-search-input-row .form-input {
    flex: 1 1 auto;
    min-width: 0;
}

.map-location-controls .map-search-btn,
.map-location-controls .map-geolocate-btn {
    padding: 9px 16px;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    font-weight: 500;
}

.map-location-controls .map-search-btn {
    background-color: var(--primary-red);
    color: #fff;
    border: 1px solid var(--primary-red);
    padding: 9px 25px;
    margin: 0 1px;
}

.map-location-controls .map-search-btn:hover,
.map-location-controls .map-search-btn:focus {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

.map-location-controls .map-geolocate-btn {
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    background-color: #fff;
    align-self: center;
}

.map-location-controls .map-geolocate-btn:hover,
.map-location-controls .map-geolocate-btn:focus {
    background-color: rgba(27, 110, 194, 0.08);
    border-color: var(--primary-red);;
    color: var(--primary-red);;
}

.map-location-controls .map-search-feedback {
    margin-top: 6px;
    font-size: 0.9rem;
    min-height: 1.2em;
}

.map-location-controls .map-feedback-info {
    color: var(--primary-red);;
}

.entity-map-group .map-feedback-success {
    color: #198754;
}

.entity-map-group .map-feedback-error {
    color: #dc3545;
}
input#entity_profile_map_search {
    padding: 10px 25px !important;
}
@media (max-width: 768px) {
    /* Mobile layout for map location controls - buttons side by side */
    .map-location-controls {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: stretch;
        gap: 0;
    }

    /* Search input stays full width on its own row */
    .map-location-controls .map-search-control {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 10px;
    }

    .map-location-controls .map-search-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    /* Buttons row - make buttons appear side by side on mobile */
    /* Force buttons to appear side by side - override any width: 100% rules */
    .map-location-controls .map-search-btn,
    .map-location-controls .map-geolocate-btn,
    .entity-map-group .map-location-controls .map-search-btn,
    .entity-map-group .map-location-controls .map-geolocate-btn,
    button#entity_map_search_btn,
    button#entity_map_use_my_location {
        flex: 0 0 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Create spacing between buttons - use margin instead of gap */
    .map-location-controls .map-search-btn,
    .entity-map-group .map-location-controls .map-search-btn,
    button#entity_map_search_btn {
        margin-right: 10px !important;
        margin-left: 0 !important;
        font-size: 0.85rem;
    }

    .map-location-controls .map-geolocate-btn,
    .entity-map-group .map-location-controls .map-geolocate-btn,
    button#entity_map_use_my_location {
        margin-left: 0 !important;
        margin-right: 0 !important;
        text-align: center;
    }

    /* For RTL languages - reverse button margins */
    [dir="rtl"] .map-location-controls .map-search-btn,
    [dir="rtl"] .entity-map-group .map-location-controls .map-search-btn,
    [dir="rtl"] button#entity_map_search_btn {
        margin-right: 0 !important;
        margin-left: 10px !important;
        font-size: 0.85rem;
    }

    [dir="rtl"] .map-location-controls .map-geolocate-btn,
    [dir="rtl"] .entity-map-group .map-location-controls .map-geolocate-btn,
    [dir="rtl"] button#entity_map_use_my_location {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    button#entity_profile_map_use_my_location {
        margin: 0px;
        font-size: 0.85rem;
    }
    input#entity_profile_map_search {
        margin-bottom: 10px;
    }
    input#entity_profile_map_search {
        padding: 10px 10px !important;
    }
}
.map-edit-profile .map-location-controls .map-search-control {
    flex: 0 1 90%;
    width: 100%;
    max-width: 100%;
}
section.onetap-container-toggle {
    padding: 0px !important;
}
/* ========================================
   LEAFLET MAP Z-INDEX FIX
   ======================================== */
/* Fix: Ensure Leaflet map controls stay below header when scrolling
   Header has z-index: 1000-1001, so Leaflet controls need lower z-index
   This prevents zoom buttons and other controls from appearing above the header */
   .entity-map-container {
    position: relative;
    z-index: 1; /* Low z-index for the map container itself */
}

/* Leaflet control container - ensure it stays below header */
.entity-map-container .leaflet-control-container {
    z-index: 400 !important; /* Lower than header (1000-1001) but still functional */
}

/* Leaflet zoom controls - ensure they stay below header */
.entity-map-container .leaflet-control-zoom {
    z-index: 400 !important;
}

/* Leaflet control panes - ensure they stay below header */
.entity-map-container .leaflet-control-pane {
    z-index: 400 !important;
}

/* All Leaflet controls within the registration map */
.entity-map-container .leaflet-control {
    z-index: 400 !important;
}

/* Leaflet control positioning classes - ensure all positioned controls stay below header */
.entity-map-container .leaflet-top,
.entity-map-container .leaflet-bottom,
.entity-map-container .leaflet-left,
.entity-map-container .leaflet-right {
    z-index: 400 !important;
}

/* Leaflet popup and other overlays - keep them functional but below header */
.entity-map-container .leaflet-popup-pane,
.entity-map-container .leaflet-marker-pane,
.entity-map-container .leaflet-shadow-pane,
.entity-map-container .leaflet-overlay-pane {
    z-index: 500 !important; /* Slightly higher than controls but still below header */
}

/* Ensure Leaflet tiles and map pane stay in normal stacking order */
.entity-map-container .leaflet-tile-pane,
.entity-map-container .leaflet-map-pane {
    z-index: 200 !important;
}
input#entity_map_search{
    padding: 10px 25px !important;
}

@media (max-width: 1700px) {
.map-edit-profile .map-location-controls .map-search-control{
    flex: 0 1 87%;
    width: 100%;
    max-width: 100%;
}
}

.onetap-container-toggle .onetap-toggle {
    bottom: 65px !important;
}
.entity-map-location{
    display: flex;
    align-items: center;
    gap: 5px;
}
.news-card.achievement-card{
    height: 440px !important;
}
span.select2-selection.select2-selection--multiple{
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    transition: all 0.2s ease-in-out;
}
.select2-container--default .select2-selection--multiple{
    padding-top: 5px;
}
.select2-container .select2-search--inline .select2-search__field{
    height: 21px;
}
/* Force arrow for Select2 multi select */
/* Make Select2 multi-select look like normal select */
.select2-container--default .select2-selection--multiple {
    position: relative;
    padding-right: 44px; /* space for arrow */
}

/* Chevron arrow */
.select2-container--default .select2-selection--multiple::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid #6b7280; /* adjust color if needed */
    border-bottom: 2px solid #6b7280;
    transform: translateY(-60%) rotate(45deg);
    pointer-events: none;
}
.select2-container--open
.select2-selection--multiple::after {
    transform: translateY(-40%) rotate(-135deg);
}
/* Default: show arrow */
.select2-container--default .select2-selection--multiple::after {
    opacity: 1;
}

/* Hide arrow when at least one item is selected */
.select2-container--default
.select2-selection--multiple:has(.select2-selection__choice)::after {
    opacity: 0;
}
[dir="rtl"] .select2-container .select2-search--inline .select2-search__field{
    margin-top: 0px;
    margin-left: 5px;
    margin-bottom: 5px;
    height: 23px;
}
.entity-followers-page__empty {
    padding: 48px 24px;
    border-radius: 16px;
    border: 1px dashed rgba(15, 23, 42, 0.15);
    background: rgba(249, 250, 251, 0.9);
    text-align: center;
    font-size: 1rem;
    color: rgba(31, 41, 55, 0.65);
}