@font-face {
    font-family: 'Cairo';
    src: url('fonts/Cairo-VariableFont_slnt,wght.ttf') format('truetype-variations');
    font-weight: 400 700; /* specify the range you want to use */
    font-style: normal;
}

body {
    font-family: 'Cairo', sans-serif;
}

:root {
    --primary-color: #274a8c; /* A shade of blue from the logo */
    --secondary-color: #335496;
    --accent-color: #e9ecef;
    --secondary-accent-color: #FFA500;
    --text-color: #333;
    --bg-color: #ffffff;
}

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav {
    background-color: var(--bg-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--accent-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nav-logo {
    display: flex;
    align-items: right;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo-img {
    height: 40px;
    margin-left: 10px;
}

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

.nav-links li {
    margin-right: 25px;
}

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

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

.nav-links .fas {
    margin-left: 5px;
}

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

/* Hero Section */
.hero {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    min-height: 40vh; /* Reduced height */
    background-color: var(--accent-color);
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Make hero content stack vertically and center elements */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Featured Content Section */
.featured-content {
    padding: 60px 20px;
    text-align: center;
}

.featured-content h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

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

.feature-card .fas {
    font-size: 3rem;
    color: var(--secondary-accent-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.feature-card p {
    font-size: 1rem;
    line-height: 1.5;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Cairo';
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block; /* ensure it behaves like a button and can accept margins */
    margin-top: 0.5rem; /* small space between paragraph and button */
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Social Footer */
.social-footer {
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
}

/* Lycee Exercices Page */
#section-selection {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

#exercise-list ul {
    list-style: none;
    padding: 0;
    text-align: right;
}

#exercise-list li {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 1rem;
    padding: 1rem;
    transition: background-color 0.3s ease;
}

#exercise-list li:hover {
    background-color: #e9ecef;
}

#exercise-list a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
}

.social-footer h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0 15px;
    transition: color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: white;
        position: absolute;
        top: 70px;
        right: 0;
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .nav-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

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

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Unaccessible Indicator */
.unaccessible-indicator {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    z-index: 10000; /* Ensure it's on top of other elements */
    pointer-events: none; /* Allow clicks to pass through */
    white-space: nowrap; /* Prevent text from wrapping */
    transform: translate(-50%, -100%); /* Adjust position to be above and centered on cursor */
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.unaccessible-indicator.visible {
    opacity: 1;
}

#loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: none; 
    text-align: center; 
    padding: 20px;
}