:root {
    --primary-color: #e1261c;
    --primary-dark: #b81e15;
    --primary-light: #ff3b31;
    --text-dark: #2d3748;
    --text-light: #ffffff;
    --background: #f8f9fa;
    --card-bg: transparent;
    --font-primary: 'Mont', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-arabic: 'Cairo', sans-serif;
}

/* Font Face Declarations */
@font-face {
    font-family: 'Mont';
    src: url('./Mont/Mont-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Mont';
    src: url('./Mont/Mont-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Mont';
    src: url('./Mont/Mont-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Mont';
    src: url('./Mont/Mont-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Cairo';
    src: url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap');
    font-display: swap;
}

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

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

.ar,
[dir="rtl"] {
    font-family: var(--font-arabic);
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] p,
[dir="rtl"] a,
[dir="rtl"] span,
[dir="rtl"] button {
    font-family: var(--font-arabic);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar Styles */
.navbar {
    background: transparent;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.logo {
    width: 180px;
    height: auto;
    transition: all 0.3s ease;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

h2 {
    color: #000;
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-section, .pdf-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.video-section {
    text-align: start;
}

.pdf-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pdf-section h2,
.pdf-container p {
    text-align: start;
}

.pdf-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 30px;
}

.pdf-container h4x {
    font-size: 1.4rem;
    color: #000;
    margin: 0;
}

.pdf-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 25px;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    width: auto;
    min-width: 200px;
    max-width: 100%;
    flex-wrap: wrap;
}

.pdf-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.pdf-link i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.video-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.video-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-wrapper {
    width: 100%;
}

video {
    width: 100%;
    display: block;
    border-radius: 12px 12px 0 0;

}



.video-info {
    padding: 15px;
}

.video-info h3 {
    color: #000;
    margin-bottom: 5px;
}

.video-description {
    color: #666;
    font-size: 0.9rem;
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}

footer p {
    margin: 5px 0;
}

footer i {
    color: var(--primary-color);
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    margin-inline-start: auto;
    z-index: 1000;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-current:hover {
    background: var(--primary-color);
    color: white;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    min-width: 120px;
    z-index: 1000;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher:focus-within .lang-dropdown {
    display: flex;
}

.lang-btn {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    text-align: start;
    white-space: nowrap;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .video-section, .pdf-section {
        padding: 20px;
    }

    .video-container {
        grid-template-columns: 1fr;
    }

    .logo {
        width: 150px;
    }

    .pdf-link {
        padding: 15px 30px;
        font-size: 1rem;
        width: 90%;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .lang-switcher {
        margin: 0;
        position: relative;
        width: 100%;
        max-width: 200px;
    }
    
    .lang-current {
        width: 100%;
        justify-content: space-between;
    }
    
    .lang-dropdown {
        width: 100%;
        position: absolute;
        left: 0;
        right: 0;
    }
    
    [dir="rtl"] .lang-switcher {
        margin: 0;
    }
    
    [dir="rtl"] .lang-dropdown {
        left: 0;
        right: 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .pdf-container {
        padding: 10px;
    }

    .pdf-link {
        padding: 12px 20px;
        font-size: 0.9rem;
        width: 95%;
    }

    .pdf-link i {
        font-size: 1.1rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .brand-name {
        font-size: 1rem;
    }

    .navbar {
        padding: 1rem;
    }

    .logo {
        width: 120px;
    }

    .lang-switcher {
        max-width: 160px;
    }
}

@media (max-width: 320px) {
    .pdf-link {
        flex-direction: column;
        gap: 8px;
        padding: 15px;
    }

    .pdf-link span {
        font-size: 0.85rem;
    }
}
