/* ============================================
   SHARED NAVIGATION MENU STYLES
   For use across all HTML pages (news, contact, etc.)
   ============================================ */

/* Google Fonts - Space Grotesk */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Noto+Kufi+Arabic:wght@300;400;500;600;700&display=swap');

/* ==================== Header Styles ==================== */
.shared-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem 3rem;
    z-index: 3000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: ltr;
}

.shared-header .logo-link {
    z-index: 3001;
    text-decoration: none;
}

.shared-header .logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.shared-header .logo-img:hover {
    transform: scale(1.05);
}

.shared-header .header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Language Button */
.lang-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
    font-family: 'Space Grotesk', 'Noto Kufi Arabic', sans-serif;
}

.lang-btn:hover {
    color: #63F7E5;
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(99,247,229,0.5), 0 1px 3px rgba(0,0,0,0.8);
}

/* Burger Menu Button */
.burger-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: white;
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
}

.burger-btn:hover {
    transform: translateY(-2px);
}

.burger-btn:hover .menu-text {
    color: #63F7E5;
}

.menu-text {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.burger-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.burger-line {
    width: 24px;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.burger-line:nth-child(2) {
    width: 18px;
}

.burger-btn:hover .burger-line {
    background-color: #63F7E5;
    box-shadow: 0 0 8px rgba(99,247,229,0.5);
}

.burger-btn:hover .burger-line:nth-child(2) {
    width: 24px;
}

/* ==================== Menu Overlay ==================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    clip-path: circle(0% at calc(100% - 60px) 40px);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    clip-path: circle(150% at calc(100% - 60px) 40px);
}

.menu-overlay.rtl {
    direction: rtl;
    clip-path: circle(0% at 60px 40px);
}

.menu-overlay.rtl.active {
    clip-path: circle(150% at 60px 40px);
}

/* Background Pattern */
.menu-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(99, 247, 229, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
    pointer-events: none;
}

.menu-bg-pattern::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 100px,
        rgba(255, 255, 255, 0.01) 100px,
        rgba(255, 255, 255, 0.01) 200px
    );
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

/* Menu Logo */
.menu-logo {
    position: absolute;
    top: 2rem;
    left: 0;
    right: 0;
    width: max-content;
    margin-inline: auto;
    transform: none;
    z-index: 10;
}

.menu-logo.rtl {
    left: 0;
    right: 0;
    width: max-content;
    margin-inline: auto;
    transform: none;
}

.menu-logo img {
    height: 50px;
    width: auto;
    filter: brightness(1.2);
}

/* Close Button */
.menu-close-btn {
    position: absolute;
    top: 2rem;
    right: 3rem;
    left: auto;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    transition: all 0.3s ease;
    z-index: 30;
}

.menu-close-btn.rtl {
    right: 3rem;
    left: auto;
}

.menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(99, 247, 229, 0.5);
    transform: rotate(90deg);
}

.close-line {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
}

.close-line:first-child {
    transform: rotate(45deg);
}

.close-line:last-child {
    transform: rotate(-45deg);
}

/* Menu Container */
.menu-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    width: 100%;
    max-width: 1400px;
    padding: 0 4rem;
    gap: 4rem;
    align-items: center;
    z-index: 5;
}

/* Divider */
.menu-divider {
    width: 1px;
    height: 300px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(99, 247, 229, 0.5) 20%,
        rgba(99, 247, 229, 0.5) 80%,
        transparent
    );
}

/* Navigation Links */
.menu-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-nav-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem 1.5rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.menu-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(99, 247, 229, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.menu-nav-link:hover::before {
    transform: translateX(0);
}

.menu-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.link-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: #63F7E5;
    font-family: 'Courier New', monospace;
    opacity: 0.7;
}

.link-text {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.menu-nav-link:hover .link-text {
    letter-spacing: 0.1em;
}

.link-arrow {
    font-size: 1.5rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
    margin-left: auto;
    color: #63F7E5;
}

.menu-nav-link:hover .link-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* RTL Navigation Links */
.menu-overlay.rtl .menu-nav-link {
    flex-direction: row-reverse;
}

.menu-overlay.rtl .menu-nav-link::before {
    background: linear-gradient(-90deg, rgba(99, 247, 229, 0.1), transparent);
    transform: translateX(100%);
}

.menu-overlay.rtl .menu-nav-link:hover::before {
    transform: translateX(0);
}

.menu-overlay.rtl .link-arrow {
    margin-left: 0;
    margin-right: auto;
    transform: translateX(20px);
}

.menu-overlay.rtl .menu-nav-link:hover .link-arrow {
    transform: translateX(0);
}

/* Info Column */
.menu-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-heading {
    font-size: 1rem;
    font-weight: 600;
    color: #63F7E5;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

/* Contact Card */
.menu-contact-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 247, 229, 0.2), rgba(99, 102, 241, 0.2));
    border-radius: 10px;
    color: #63F7E5;
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-family: 'Space Grotesk', 'Noto Kufi Arabic', sans-serif;
}

.contact-text a {
    color: #63F7E5;
    text-decoration: none;
    transition: color 0.3s;
}

.phone-line-ar {
    display: inline-flex;
    flex-direction: row;
    direction: rtl;
    justify-content: flex-start;
    gap: 0.35rem;
    width: 100%;
    white-space: nowrap;
}

.phone-line-ar .phone-label,
.phone-line-ar .phone-number {
    white-space: nowrap;
}

.phone-line-ar .phone-number {
    direction: ltr;
    unicode-bidi: isolate;
}

.contact-text a:hover {
    color: #ffffff;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* RTL Contact Items */
.menu-overlay.rtl .contact-item {
    flex-direction: row-reverse;
    text-align: right;
}

.menu-overlay.rtl .contact-item {
    flex-direction: row !important;
}

.menu-overlay.rtl .contact-item .contact-icon {
    order: 1;
}

.menu-overlay.rtl .contact-item .contact-text {
    order: 2;
}

.menu-overlay.rtl .contact-text {
    align-items: flex-end;
}

.menu-overlay.rtl .menu-info {
    align-items: stretch !important;
}

.menu-overlay.rtl .menu-contact-card {
    width: 100%;
    max-width: 100%;
    direction: rtl !important;
    text-align: right !important;
}

.menu-overlay.rtl .menu-contact-card * {
    text-align: right;
}

.menu-overlay.rtl .contact-label {
    width: 100%;
    text-align: right !important;
}

.menu-overlay.rtl .contact-text a,
.menu-overlay.rtl .contact-text span {
    width: 100%;
    text-align: right !important;
}

.menu-overlay.rtl .contact-item {
    justify-content: flex-start;
}

.menu-overlay.rtl .contact-heading {
    width: 100%;
    text-align: right;
}

/* Social Section */
.social-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-family: 'Space Grotesk', sans-serif;
}

.social-row {
    display: flex;
    gap: 0.8rem;
}

.social-icon-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon-link:hover {
    transform: scale(1.15);
}

.social-icon-link.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-icon-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
    border-color: #dc2743;
}

.social-icon-link.youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
}

.social-icon-link.linkedin:hover {
    background: #0a66c2;
    border-color: #0a66c2;
}

.social-icon-link.twitter:hover {
    background: #000;
    border-color: #fff;
}

/* RTL Social Section */
.menu-overlay.rtl .social-section {
    align-items: flex-end;
}

.menu-overlay.rtl .social-row {
    flex-direction: row-reverse;
}

/* Menu Footer */
.menu-footer {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.1em;
    font-family: 'Space Grotesk', sans-serif;
}

/* ==================== Mobile Responsive ==================== */
@media (max-width: 1024px) {
    .menu-overlay {
        overflow: hidden;
        overscroll-behavior: none;
        justify-content: flex-start;
        padding: 72px 0 20px;
    }

    .menu-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 2rem 3.25rem;
        max-height: calc(100dvh - 92px);
        overflow-y: auto;
        overscroll-behavior: contain;
        text-align: center;
    }

    .menu-divider {
        display: none;
    }

    .menu-links {
        align-items: center;
    }

    .menu-nav-link {
        justify-content: center;
    }

    .menu-overlay.rtl .menu-nav-link {
        flex-direction: row;
    }

    .link-number {
        display: none;
    }

    .link-text {
        font-size: 2rem;
    }

    .link-arrow {
        display: none;
    }

    .menu-info {
        align-items: center;
    }

    .menu-overlay.rtl .menu-info {
        align-items: center;
    }

    .menu-contact-card {
        max-width: 400px;
    }

    .contact-item {
        justify-content: center;
        text-align: left;
    }

    .menu-overlay.rtl .contact-item {
        flex-direction: row;
        text-align: center;
    }

    .menu-overlay.rtl .contact-text {
        align-items: center;
    }

    .social-section {
        align-items: center;
    }

    .menu-overlay.rtl .social-section {
        align-items: center;
    }

    .menu-overlay.rtl .social-row {
        flex-direction: row;
    }

    .menu-overlay.rtl {
        direction: ltr;
        clip-path: circle(0% at calc(100% - 60px) 40px);
    }

    .menu-overlay.rtl.active {
        clip-path: circle(150% at calc(100% - 60px) 40px);
    }

    .menu-close-btn.rtl {
        right: 3rem;
        left: auto;
    }

    .menu-logo,
    .menu-logo.rtl {
        left: 0;
        right: 0;
        width: max-content;
        margin-inline: auto;
        transform: none;
    }

    .menu-footer {
        position: absolute;
        bottom: 0.75rem;
        margin-top: 0;
        padding: 0;
    }
}

@media (max-width: 768px) {
    html[dir="rtl"] .shared-header,
    body[dir="rtl"] .shared-header {
        direction: ltr;
    }

    html[dir="rtl"] .shared-header .header-right,
    body[dir="rtl"] .shared-header .header-right {
        margin-left: auto;
        margin-right: 0;
    }

    .shared-header {
        padding: 0.9rem 1.25rem;
        /* Glassmorphism effect */
        background: rgba(10, 10, 10, 0.7);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .shared-header .logo-img {
        height: 36px;
    }

    .shared-header .header-right {
        gap: 0.8rem;
    }

    .menu-text {
        display: none;
    }

    .burger-btn {
        padding: 6px;
    }

    .burger-lines {
        gap: 4px;
    }

    .burger-line {
        width: 22px;
    }

    .burger-line:nth-child(2) {
        width: 16px;
    }

    .lang-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 600px) {
    .menu-overlay {
        overflow-y: auto;
        padding: 68px 0 16px;
        justify-content: flex-start;
    }

    .menu-container {
        gap: 1.5rem;
    }

    .menu-footer {
        position: absolute;
        bottom: 0.6rem;
        margin-top: 0;
        padding: 0;
    }

    .link-text {
        font-size: 1.5rem;
    }

    .menu-close-btn {
        width: 40px;
        height: 40px;
        top: 1.5rem;
        right: 1.5rem;
        left: auto;
    }

    .close-line {
        width: 16px;
    }

    .menu-logo {
        top: 1.5rem;
        left: 0;
        right: 0;
        width: max-content;
        margin-inline: auto;
        transform: none;
    }

    .menu-logo img {
        height: 35px;
    }

    .menu-contact-card {
        padding: 1.5rem;
    }

    .contact-icon {
        width: 35px;
        height: 35px;
    }

    .social-icon-link {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .menu-overlay {
        padding: 62px 0 12px;
    }

    .menu-container {
        gap: 1.1rem;
    }

    .shared-header {
        padding: 0.75rem 1rem;
    }

    .shared-header .logo-img {
        height: 30px;
    }

    .shared-header .header-right {
        gap: 0.5rem;
    }

    .burger-btn {
        padding: 5px;
    }

    .burger-lines {
        gap: 3px;
    }

    .burger-line {
        width: 20px;
    }

    .burger-line:nth-child(2) {
        width: 14px;
    }

    .lang-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
}

@media (max-width: 360px) {
    .shared-header {
        padding: 0.6rem 0.75rem;
    }

    .shared-header .logo-img {
        height: 26px;
    }

    .shared-header .header-right {
        gap: 0.3rem;
    }

    .burger-btn {
        padding: 4px;
    }

    .burger-line {
        width: 18px;
    }

    .burger-line:nth-child(2) {
        width: 12px;
    }

    .lang-btn {
        padding: 4px 6px;
        font-size: 0.65rem;
    }
}
