.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    box-sizing: border-box;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    flex-shrink: 0;
    margin-left: 0.75rem; /* Space between icon and text in RTL */
}

html[dir="rtl"] .logo img {
    margin-left: 0;
    margin-right: 0.75rem;
}

.site-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 2rem;
}

html[dir="rtl"] .nav-links li {
    margin-left: 0;
    margin-right: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

html[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

.main-footer {
    background: linear-gradient(135deg, #002244 0%, var(--primary-color) 50%, #004488 100%);
    color: white;
    padding-top: 4rem;
    position: relative;
    overflow: hidden;
    animation: gradientBG 20s ease infinite;
    /* improved accessibility + spacing */
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.25rem;
    align-items: start;
}

/* footer columns: increase legibility on large screens */
.footer-about p, .footer-links ul a, .footer-contact p {
    color: #e6eef8;
    line-height: 1.9;
    font-size: 1rem;
}

/* headings more prominent */
.footer-links h4, .footer-contact h4 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* link styling with clearer focus state for projector/keyboard navigation */
.footer-links ul a {
    color: #dbeaf8;
    text-decoration: none;
    transition: color 0.18s ease, transform 0.18s ease;
}
.footer-links ul a:hover,
.footer-links ul a:focus {
    color: #fff;
    transform: translateX(6px);
}

/* lighten icons color for contrast */
.footer-contact p span svg { filter: drop-shadow(0 1px 0 rgba(0,0,0,0.35)); }

/* stronger footer-bottom separation */
.footer-bottom {
    text-align: center;
    padding: 1.75rem 2rem;
    background: rgba(0, 0, 0, 0.22);
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.footer-bottom p {
    font-size: 1rem;
    color: #cbdff6;
}

/* make logo area clearer on wide/projector screens */
.footer-about .logo img { height: 56px; }
.footer-about .site-name { font-size: 1.05rem; color: #fff; }

.footer-about .logo {
    margin-bottom: 1rem;
    display: inline-flex;
}

.footer-about .site-name {
    color: white;
}

.footer-about p {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 350px;
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4::after, .footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
}

html[dir="rtl"] .footer-links h4::after, html[dir="rtl"] .footer-contact h4::after {
    right: 0;
    left: auto;
}

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

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

.footer-links ul a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease, padding-right 0.3s ease;
}

html[dir="rtl"] .footer-links ul a {
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links ul a:hover {
    color: white;
    padding-right: 10px;
}

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

.footer-contact p {
    color: #ccc;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-contact p span svg {
    color: var(--secondary-color);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.footer-contact a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: white;
}