/*
 * Style sheet for the ADAS website
 *
 * This file defines the base styles, layout and responsive behaviour of the site.
 */

/* Reset default margins/padding and set global box-sizing */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Reusable container to constrain content width */
.container {
    width: 90%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* Navigation */
.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 100;
    background: rgba(0, 0, 0.4, 0.4);
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #d4edda;
}

/* Hero section */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    /* Utilise une photographie de N'Djamena depuis Wikimedia Commons comme image d'arrière-plan */
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/thumb/7/71/Storm_clouds_over_N%27Djamena_%2815386229016%29.jpg/1280px-Storm_clouds_over_N%27Djamena_%2815386229016%29.jpg");
    background-size: cover;
    background-position: center center;
}

/* Add an overlay for better contrast */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.cta-button {
    background-color: #4caf50;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #43a047;
}

/* Section styling */
.section {
    padding: 4rem 0;
    background-color: #ffffff;
}

.section-alt {
    background-color: #fafafa;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #4caf50;
    text-align: center;
}

.section p {
    margin-bottom: 1rem;
    text-align: justify;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    flex: 1 1 30%;
    background-color: #f0fdf4;
    border: 1px solid #e8f5e9;
    border-radius: 5px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature-item h3 {
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

/* List styling */
.list {
    list-style: disc inside;
    margin-top: 1rem;
    margin-left: 1rem;
}

.list li + li {
    margin-top: 0.5rem;
}

/* Actions grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.action-item {
    background-color: #fff3e0;
    border: 1px solid #ffe0b2;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.action-item h3 {
    color: #ef6c00;
    margin-bottom: 0.5rem;
}

/* Partner logos */
.partner-logos {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.partner-logos img {
    width: 120px;
    height: auto;
    object-fit: contain;
    filter: grayscale(60%);
    transition: filter 0.3s ease;
}

.partner-logos img:hover {
    filter: grayscale(0%);
}

/* Blog posts */
.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.blog-post {
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.blog-post h3 {
    color: #1e88e5;
    margin-bottom: 0.5rem;
}

.read-more {
    display: inline-block;
    margin-top: 0.5rem;
    color: #1e88e5;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

/* Donation options */
.donation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.donation-item {
    background-color: #fce4ec;
    border: 1px solid #f8bbd0;
    border-radius: 5px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.donation-item h3 {
    color: #c2185b;
    margin-bottom: 0.5rem;
}

/* Contact info */
.contact-info {
    list-style: none;
    margin-top: 1rem;
}

.contact-info li + li {
    margin-top: 0.5rem;
}

.contact-info a {
    color: #4caf50;
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: #4caf50;
    color: #ffffff;
    text-align: center;
    padding: 1rem 0;
}

.footer p {
    font-size: 0.9rem;
}

/* Responsive navigation: hide nav links on small screens and display toggle button */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 60px;
        right: 0;
        background: rgba(0, 0, 0, 0.8);
        flex-direction: column;
        width: 200px;
        text-align: right;
        padding: 1rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    .nav-links.active {
        transform: translateX(0);
    }
    .nav-links li {
        margin-bottom: 1rem;
    }
    .navbar .logo {
        z-index: 2;
    }
    /* Toggle button (hamburger) */
    .nav-toggle {
        display: block;
        cursor: pointer;
        color: #ffffff;
        font-size: 1.5rem;
        z-index: 2;
    }
    .nav-links {
        gap: 0;
    }
    .nav-links a {
        color: #ffffff;
        padding: 0.5rem 0;
        display: block;
    }
    /* Hide default flex layout */
    .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}
