/* Global Styles */
:root {
    --primary-color: #991b1b; /* Red as default */
    --secondary-color: #dc2626;
    --accent-color: #dc2626;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --news-bg: #dedede;
    --white: #fff;
    --font-family-ar: "Cairo", sans-serif;
    --font-family-en: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--font-family-en);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

/* Arabic font for RTL */
[dir="rtl"] body {
    font-family: var(--font-family-ar);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 0;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* Temporary fix - remove after implementing proper solution */
/* .site-header .dropdown:hover .dropdown-menu,
.site-header .accessibility-controls:hover .accessibility-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
} */

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* Header and Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* padding: 15px 0; */
    position: relative;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Logo positioning */
.logo {
    flex: 0 0 auto;
}

.logo img {
    height: 80px;
}

/* Center navigation */
nav {
    flex: 1;
    display: flex;
    /* justify-content: center; */
}

nav ul {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--accent-color);
    font-weight: 500;
    padding: 5px 10px;
    transition: color 0.3s;
    white-space: nowrap;
}

nav a:hover {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* Language switcher positioning */
.language-switcher {
    flex: 0 0 auto;
}

.language-switcher a {
    color: var(--accent-color);
    font-weight: bold;
    border: 1px solid var(--accent-color);
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
}

.language-switcher a:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* RTL-specific header adjustments */
[dir="rtl"] .logo {
    order: 1;
}
[dir="rtl"] .logo-text {
    order: 4;
}
[dir="rtl"] .logo-container {
    order: 2;
}

[dir="rtl"] .language-switcher {
    order: 1;
}

[dir="rtl"] nav {
    order: 2;
    justify-content: right;
}

/* LTR-specific (default) */
[dir="ltr"] .logo {
    order: 1;
}
[dir="ltr"] .logo-container {
    order: 1;
}
[dir="ltr"] .logo-text {
    order: 4;
}

[dir="ltr"] nav {
    order: 2;
}

[dir="ltr"] .language-switcher {
    order: 2;
}

/* Main Content */
main {
    /* padding: 40px 0; */
    min-height: 70vh;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Footer */
/* Footer Styles */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004d40 100%);
    color: var(--white);
    padding: 60px 0 0;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.footer-section p {
    color:white;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* About Section */
.footer-section.about p {
    
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--white);
    transform: translateY(-2px);
}

/* Contact Section */
.contact-item-footer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.contact-item-footer i {
    color: var(--white);
    width: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.contact-item-footer span {
   color:white;
    line-height: 1.4;
}

/* Links Section */
.footer-section.links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section.links li {
    margin-bottom: 12px;
}

.footer-section.links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section.links a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

[dir="rtl"] .footer-section.links a:hover {
    transform: translateX(-5px);
}

.footer-section.links a::before {
    content: '›';
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

[dir="rtl"] .footer-section.links a::before {
    content: '‹';
}

.footer-section.links a:hover::before {
    transform: translateX(3px);
}

[dir="rtl"] .footer-section.links a:hover::before {
    transform: translateX(-3px);
}

/* Newsletter Section */
.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-form button {
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: #ffd54f;
    transform: translateY(-1px);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    background: rgba(0, 0, 0, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: white;
    margin: 0;
    opacity: 0.8;
    text-align: center;
    width: 100%;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--secondary-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 40px 0 0;
        margin-top: 60px;
    }
    .site-header .dropdown:hover .dropdown-menu,
.site-header .accessibility-controls:hover .accessibility-menu {
    display: block ;
    opacity: 1 !important;
    visibility: visible !important;
}
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section.about p {
        max-width: none;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    [dir="rtl"] .back-to-top {
        right: auto;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .footer-section h3 {
        font-size: 1.2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    [dir="rtl"] .back-to-top {
        right: auto;
        left: 15px;
    }
}
/* Utility Classes */
.card {
    background-color: var(--white);
    border: 1px solid var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

/* Homepage Sections */
.latest-news, .upcoming-events, .contact-quick {
    margin-bottom: 40px;
}

.latest-news h2, .upcoming-events h2, .contact-quick h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    position: relative;
}

.latest-news h2::after, .upcoming-events h2::after, .contact-quick h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

/* News Carousel */
.news-carousel-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.news-carousel {
    display: flex;
    gap: 30px;
    padding-bottom: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.news-item {
    flex: 0 0 300px;
    scroll-snap-align: start;
    background-color: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.news-item h3 a {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 5px;
    display: block;
}

.news-item .date {
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.news-carousel-nav {
    text-align: center;
    margin-top: 15px;
}

.news-carousel-nav button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.news-carousel-nav button:hover {
    background: var(--secondary-color);
}

.news-carousel::-webkit-scrollbar {
    display: none;
}

.news-carousel {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Events List */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-left: 5px solid var(--secondary-color);
    background-color: var(--light-bg);
    border-radius: 8px;
}

.event-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.event-item .date, .event-item .location {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-right: 15px;
}

/* Contact Quick */
.contact-quick {
    display: flow;
    gap: 30px;
}

.contact-info {
    flex: 1;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-info i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.map-embed {
    flex: 2;
    border-radius: 8px;
    overflow: hidden;
}

.map-embed iframe {
    display: block;
}

/* General Page Content */
.page-content h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.content-body {
    font-size: 1.1rem;
    line-height: 1.8;
}


/* News List Page */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-item.card {
    padding: 0;
}

.news-item .news-image {
    height: 250px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.news-item .news-body {
    padding: 15px;
}

.news-item .read-more {
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
}

/* News Detail Page */
.news-detail-page .news-main-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.news-detail-page .date {
    font-size: 1rem;
    color: var(--text-color);
    /* margin-bottom: 20px; */
}

.news-detail-page .full-content {
    line-height: 1.8;
}

/* Events List Page */
.events-list-page .events-list {
    gap: 15px;
}

.events-list-page .event-item {
    border-left: none;
    border-right: 5px solid var(--secondary-color);
    padding: 20px;
    display: flex;
    align-items: flex-start;
}

.event-date-box {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    min-width: 80px;
    margin-left: 20px;
}

.event-date-box .day {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.event-date-box .month, .event-date-box .year {
    display: block;
    font-size: 0.8rem;
    line-height: 1;
}

.event-details h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.event-details .time-location {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Staff Directory Page */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.staff-member {
    text-align: center;
    padding: 20px;
}

.staff-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--accent-color);
}

.staff-member h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.staff-title {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.staff-bio {
    font-size: 0.9rem;
    color: var(--text-color);
}

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



.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 200px;
    padding: 10px 0;
    border-radius: 4px;
    top: 100%;
}

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

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

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    border-bottom: none;
}

.dropdown-menu a {
    padding: 8px 15px;
    white-space: nowrap;
    color: var(--text-color);
    display: block;
}

.dropdown-menu a:hover {
    background-color: var(--light-bg);
    border-bottom: none;
}

/* Admin Panel Styles */
.admin-body {
    display: flex;
    min-height: 100vh;
    background-color: var(--light-bg);
}

.sidebar {
    width: 250px;
    background-color: var(--text-color);
    color: var(--white);
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--accent-color);
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.sidebar ul li a:hover, .sidebar ul li a.active {
    background-color: var(--text-color);
    color: var(--white);
}

.sidebar ul li a i {
    margin-right: 10px;
}

.admin-main-content {
    flex-grow: 1;
    padding: 30px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--text-color);
}

.admin-header h1 {
    color: var(--text-color);
}

.admin-logout a {
    color: var(--secondary-color);
    font-weight: bold;
}

.admin-logout a:hover {
    text-decoration: underline;
}

/* Admin Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--white);
}

.data-table th {
    background-color: var(--light-bg);
    color: var(--text-color);
    font-weight: bold;
    text-transform: uppercase;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .actions a {
    margin-right: 10px;
    color: var(--primary-color);
}

.data-table .actions a:hover {
    color: var(--secondary-color);
}

/* Admin Forms */
.admin-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="date"],
.admin-form input[type="file"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--light-bg);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form .btn-primary {
    padding: 10px 20px;
    font-size: 1rem;
}

/* Admin Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--light-bg);
}

.login-box {
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 30px;
    color: var(--primary-color);
}

/* Messages (Success/Error) */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 992px) {
    nav ul {
        gap: 15px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .logo, .language-switcher {
        order: initial !important;
        flex: 0 0 auto;
    }

    nav {
        order: 3 !important;
        width: 100%;
        display: none;
        margin-top: 10px;
        justify-content: flex-start;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        text-align: left;
        border-top: 1px solid var(--white);
    }

    [dir="rtl"] nav ul {
        text-align: right;
    }

    

    nav a {
        display: block;
        padding: 10px;
    }

    .menu-toggle {
        display: block;
    }

    .footer-section {
        width: 45%;
    }

    .contact-quick {
        flex-direction: column;
    }

    .contact-info, .map-embed {
        flex: none;
        width: 100%;
    }

    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    /* Mobile dropdown adjustments */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding: 0;
        margin-left: 20px;
        min-width: auto;
        border-radius: 0;
        background-color: transparent;
    }

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

    .dropdown:hover .dropdown-menu {
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-toggle .fa-caret-down {
        transition: transform 0.3s;
    }

    .dropdown.active .dropdown-toggle .fa-caret-down {
        transform: rotate(180deg);
    }

    /* Admin responsive */
    .admin-body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 15px;
    }

    .sidebar h2 {
        margin-bottom: 15px;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sidebar ul li {
        margin: 5px;
    }

    .sidebar ul li a {
        padding: 8px 12px;
    }

    .admin-main-content {
        padding: 20px;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    .logo img {
        height: 40px;
    }
    
    .language-switcher a {
        padding: 4px 8px;
        font-size: 0.9rem;
    }

    .footer-section {
        width: 100%;
    }

    .news-item {
        flex: 0 0 280px;
    }

    .events-list-page .event-item {
        flex-direction: column;
        text-align: center;
    }

    .event-date-box {
        margin: 0 0 15px 0 !important;
    }

    .event-details {
        text-align: center !important;
    }
}

/* Contact Page Specific Styles */
.contact-additional-info {
    margin-top: 40px;
    padding: 30px;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.contact-details h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--white);
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.contact-item i {
    color: var(--light-bg);
    margin-right: 15px;
    margin-left: 15px;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

[dir="rtl"] .contact-item i {
    
    margin-left: 15px;
}

.contact-item span {
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Error page styles */
.error-page {
    text-align: center;
    padding: 50px 0;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-page h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.error-page p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-color);
    max-width: 500px;
}

@media (max-width: 768px) {
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .contact-item i {
        
        font-size: 1.5rem;
    }
    

    
    .error-page h2 {
        font-size: 2rem;
    }
    
    .error-page p {
        font-size: 1rem;
    }
}


/* change theme */

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 0 0 auto;
}

/* Accessibility Controls */
.accessibility-controls {
    position: relative;
}

.accessibility-toggle {
    background: none;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accessibility-toggle:hover {
    background: var(--accent-color);
    color: var(--white);
}

.accessibility-menu {
    min-width: 200px;
    padding: 20px;
    right: 0;
    left: auto;
}

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

.control-group {
    margin-bottom: 15px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Font Size Controls */
.font-size-controls {
    display: flex;
    gap: 5px;
}

.font-size-btn {
    flex: 1;
    background: var(--light-bg);
    border: 2px solid transparent;
    color: var(--text-color);
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-size-btn:hover {
    border-color: var(--accent-color);
}

.font-size-btn.active {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

.font-size-btn:nth-child(1) i { font-size: 0.8rem; }
.font-size-btn:nth-child(2) i { font-size: 1rem; }
.font-size-btn:nth-child(3) i { font-size: 1.2rem; }

/* Theme Color Controls */
.theme-color-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.color-btn {
    width: 30px;
    height: 30px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: var(--text-color);
}

.color-btn.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent-color);
    color: var(--white);
}

/* Theme Classes */
.theme-dark {
   
    --text-color: #e0e0e0;
    --light-bg: #2d3748;
    --news-bg:#2d3748;
    --white: #1a202c;
    background-color: #1a202c;
    color: #e0e0e0;
}

.theme-dark header {
    background-color: #2d3748;
    border-bottom: 1px solid #4a5568;
}

.theme-dark .card {
    background-color: #2d3748;
    border-color: #4a5568;
}

.theme-dark .dropdown-menu {
    background-color: #2d3748;
    border-color: #4a5568;
}

.theme-dark .dropdown-menu a {
    color: #e0e0e0;
}

.theme-dark .dropdown-menu a:hover {
    background-color: #4a5568;
}

.theme-dark .news-item,
.theme-dark .event-item {
    background-color: #2d3748;
}

.theme-dark input,
.theme-dark textarea,
.theme-dark select {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e0e0e0;
}

.theme-dark input::placeholder {
    color: var(--text_color);
}

/* Font Size Classes */
.font-size-small {
    font-size: 14px;
}

.font-size-small h1 { font-size: 1.8rem; }
.font-size-small h2 { font-size: 1.5rem; }
.font-size-small h3 { font-size: 1.2rem; }
.font-size-small .news-title a { font-size: 1.1rem; }

.font-size-medium {
    font-size: 16px;
}

.font-size-medium h1 { font-size: 2.5rem; }
.font-size-medium h2 { font-size: 2rem; }
.font-size-medium h3 { font-size: 1.5rem; }
.font-size-medium .news-title a { font-size: 1.3rem; }

.font-size-large {
    font-size: 18px;
}

.font-size-large h1 { font-size: 3rem; }
.font-size-large h2 { font-size: 2.5rem; }
.font-size-large h3 { font-size: 1.8rem; }
.font-size-large .news-title a { font-size: 1.5rem; }
.font-size-large nav a { font-size: 1.1rem; }

/* Theme Color Classes */
/* Updated Theme Color Variables - Red as default, Gold as option */
.theme-color-default {
    --primary-color: #991b1b; /* Red primary - NOW DEFAULT */
    --secondary-color: #dc2626; /* Red secondary */
    --accent-color: #dc2626; /* Red accent */
}

.theme-color-gold {
    --primary-color: #004d40; /* Dark Teal */
    --secondary-color: #c09300; /* Gold */
    --accent-color: #c09300; /* Gold */
}
.theme-color-green {
    --primary-color: #004d40;
    --secondary-color: #388e3c;
    --accent-color: #388e3c;
}

.theme-color-purple {
    --primary-color: #6b21a8;
    --secondary-color: #a855f7;
    --accent-color: #a855f7;
}

.theme-color-red {
    --primary-color: #991b1b;
    --secondary-color: #dc2626;
    --accent-color: #dc2626;
}

/* Ensure proper contrast in dark mode with different colors */
 .theme-dark.theme-color-default {
    --primary-color: rgb(80, 133, 111); 
}
.theme-dark.theme-color-green {
    --primary-color: #00695c;
    --secondary-color: #4caf50;
}

.theme-dark.theme-color-purple {
    --primary-color: #7c3aed;
    --secondary-color: #c084fc;
}

.theme-dark.theme-color-red {
    --primary-color: #dc2626;
    --secondary-color: #f87171;
}

/* Ensure proper contrast in dark mode */
.theme-dark.theme-color-default,
.theme-dark.theme-color-red {
    --primary-color: #dc2626;
    --secondary-color: #f87171;
}

.theme-dark.theme-color-gold {
    --primary-color: #00695c;
    --secondary-color: #ffc107;
}

/* Responsive Design for Header Controls */
@media (max-width: 768px) {
    .header-controls {
        gap: 10px;
    }
    
    .accessibility-toggle,
    .theme-toggle {
        width: 35px;
        height: 35px;
    }
    
    .accessibility-menu {
        min-width: 180px;
        padding: 15px;
    }
    
    .theme-color-controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .color-btn {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    .header-controls {
        gap: 8px;
    }
    
    .accessibility-toggle,
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .accessibility-menu {
        min-width: 160px;
        padding: 12px;
    }
    
    .font-size-btn {
        padding: 6px;
    }
}