@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Lora:wght@400;700&display=swap');

body {
    font-family: 'Lora', serif;
    background-color: #fdfaf6;
    color: #333;
    line-height: 1.8;
    margin: 0;
    padding: 0;
}

header {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    padding: 1rem 0;
    text-align: center;
    border-bottom: 1px solid #ddd;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease;
    backdrop-filter: blur(10px);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #8B4513;
}

.nav-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    position: relative;
    transition: background 0.2s ease-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: #333;
    left: 0;
    transition: transform 0.2s ease-out;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

main {
    padding-top: 80px; 
}

#hero {
    background-image: url('https://omrania.com/wp-content/uploads/Sidi-MCid-Bridge_Flickr_Brahim-Ait-ouarab-1200x628.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin: 0;
}

.hero-content p {
    font-size: 1.2rem;
}

section {
    background: #fff;
    margin: 40px auto;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    opacity: 1; /* Make section visible by default */
    transform: translateY(0); /* Remove initial transform */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    max-width: 900px;
}

.content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.text-content {
    flex: 2;
}

.image-content {
    flex: 1;
    text-align: center;
}

.image-content img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.caption {
    font-style: italic;
    margin-top: 10px;
    color: #555;
}

.scrolling-list {
    height: 150px;
    overflow: hidden;
    position: relative;
}

.scrolling-list ul {
    position: absolute;
    animation: scroll 10s linear infinite;
    list-style: none;
    padding: 0;
    margin: 0;
}

.scrolling-list li {
    padding: 10px 0;
    text-align: center;
    font-size: 1.2rem;
    color: #333;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

.name-variations {
    margin-top: 30px;
    padding: 20px;
    background-color: #fdfaf6;
    border-left: 4px solid #d2b48c;
    border-radius: 5px;
}

.name-variations h3 {
    margin-top: 0;
    font-family: 'Playfair Display', serif;
    color: #8B4513;
}

.name-variations ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.name-variations ul li {
    padding: 10px;
    font-size: 1.2em;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.name-variations ul li:last-child {
    border-bottom: none;
}

.name-variations ul li:hover {
    background-color: #e0e0e0;
    cursor: pointer;
}

h2 {
    font-family: 'Playfair Display', serif;
    color: #8B4513;
    border-bottom: 2px solid #d2b48c;
    padding-bottom: 10px;
    margin-top: 0;
}

.cta-button {
    display: inline-block;
    background-color: #8B4513;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: 20px;
    margin-bottom: 20px;
}

.cta-button:hover {
    background-color: #5a2d0c;
}

#sources ul {
    list-style-type: none;
    padding: 0;
}

#sources li {
    background: #fdfaf6;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    border-left: 5px solid #8B4513;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.gallery-item p {
    text-align: center;
    font-style: italic;
    margin-top: 10px;
}

.highlight-date {
    font-weight: bold;
    color: #8B4513;
}

/* Person Card Styles */
.person-card-gallery {
    display: grid;
    grid-template-columns: 1fr; /* Only one card for now */
    gap: 20px;
    margin-top: 20px;
}

.person-card {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: linear-gradient(135deg, #f9f9f9, #e0e0e0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.person-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
    object-fit: cover;
}

.person-info {
    flex: 1;
}

.person-info h3 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.person-info p {
    margin: 5px 0;
    font-size: 1em;
    color: #555;
}

.person-info a {
    color: #007BFF;
    text-decoration: none;
    font-weight: bold;
}

.person-info a:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        z-index: 1001;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .nav-links.nav-open {
        display: flex;
    }

    .nav-links li {
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .nav-open .hamburger {
        background: transparent;
    }

    .nav-open .hamburger::before {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-open .hamburger::after {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    section {
        padding: 20px;
        margin: 20px auto;
    }

    .person-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .person-card img {
        width: 150px;
        height: 150px;
        margin-bottom: 15px;
    }

    .content-wrapper {
        flex-direction: column;
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.modal-content, #caption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.close-button {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 20px;
    background: #333;
    color: #fff;
}

#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #8B4513;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
}

#scrollToTopBtn:hover {
    background-color: #5a2d0c;
}
