:root {
    --gambia-red: #CE1126;
    --gambia-blue: #0C1C8C;
    --gambia-green: #3A7728;
    --sand-light: #fdf6e3;
    --sand-dark: #eee8d5;
    --progress-height: 8px;
    --marker-size: 12px;
}

body {
    margin: 0;
    font-family: 'Source Sans 3', sans-serif;
    background: var(--sand-light);
    color: #2c3e50;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    padding-top: calc(1rem + 60px);
}

h1 {
    font-family: 'Playfair Display', serif;
    text-align: center;
    color: var(--gambia-blue);
    font-size: 2.5rem;
    margin: 1.5rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, 
        var(--gambia-red),
        var(--gambia-blue),
        var(--gambia-green));
    border-radius: 3px;
}

.timeline-events {
    position: relative;
}

.event {
    margin: 1rem 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.event-preview {
    display: flex;
    padding: 1rem;
    gap: 1rem;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
}

.event-preview:hover {
    background-color: var(--sand-light);
}

.event-image {
    position: relative;
    perspective: 1000px;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.event-image-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.event-image:hover .event-image-inner {
    transform: rotateY(180deg);
}

.event-image-front,
.event-image-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
}

.event-image-front {
    background: rgba(0, 0, 0, 0.4);
}

.event-image-front img {
    filter: blur(3px) brightness(0.7);
}

.event-image-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0.8rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background: rgba(0, 0, 0, 0.5);
}

.event-image-back {
    transform: rotateY(180deg);
}

.event-image-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-text {
    flex: 1;
    min-width: 0;
}

.event-year {
    color: var(--gambia-red);
    font-weight: bold;
    font-size: 0.9rem;
}

.event-title {
    margin: 0.25rem 0;
    font-size: 1.1rem;
}

.event-description {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.expand-button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gambia-red);
    transition: transform 0.3s;
}

.event-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.event.expanded .event-expanded {
    max-height: 2000px;
}

.expanded-content {
    padding: 0 1rem 1rem;
    border-top: 1px solid #eee;
}

.did-you-know {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--sand-light);
    border-radius: 8px;
    border-left: 4px solid var(--gambia-red);
}

.event-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--sand-light);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.link-item:hover {
    transform: translateX(4px);
}

/* Desktop adjustments */
@media (min-width: 768px) {
    .event-image {
        width: 120px;
        height: 120px;
    }
    
    .event-image-text {
        font-size: 1.2rem;
        padding: 1rem;
    }
    
    .expanded-content {
        padding: 0 2rem 2rem;
    }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    margin: 5vh auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gambia-red);
    transition: transform 0.2s ease;
}

.close:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .event-content {
        width: 80%;
        margin: 0 auto;
    }
    
    .event.left, .event.right {
        margin: 2rem auto;
    }
    
    h1 {
        font-size: 2rem;
        margin: 1rem 0;
    }
}

.read-more {
    color: var(--gambia-red);
    font-weight: 600;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.event-content:hover .read-more {
    gap: 1rem;
}

.modal-header {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.modal-header.slide-in {
    opacity: 1;
    transform: translateX(0);
}

.modal-image-container {
    opacity: 0;
    transition: opacity 0.5s ease 0.2s;
}

.modal-image-container.fade-in {
    opacity: 1;
}

.modal-description {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease 0.4s;
}

.modal-description.slide-up {
    opacity: 1;
    transform: translateY(0);
}

.modal-year {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--gambia-red);
}

.modal-title {
    font-size: 2rem;
    color: var(--gambia-blue);
    margin: 0.5rem 0 1.5rem;
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.image-source {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

.modal-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sand-dark);
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: var(--sand-light);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-button:hover {
    background: var(--sand-dark);
    transform: translateY(-2px);
}

.nav-button.prev {
    margin-right: auto;
}

.nav-button.next {
    margin-left: auto;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.event-dot {
    animation: pulse 2s infinite;
}

.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.95),
        rgba(255, 255, 255, 0.8)
    );
    backdrop-filter: blur(5px);
    z-index: 100;
}

.progress-bar {
    height: var(--progress-height);
    background: var(--sand-dark);
    border-radius: var(--progress-height);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.progress-bar:hover::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: calc(var(--progress-height) + 8px);
    pointer-events: none;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(to right,
        var(--gambia-red) 0%,
        var(--gambia-red) 33%,
        var(--gambia-blue) 33%,
        var(--gambia-blue) 66%,
        var(--gambia-green) 66%,
        var(--gambia-green) 100%
    );
    transition: width 0.3s ease;
}

.progress-markers {
    position: relative;
    height: 30px;
    margin-top: 4px;
}

.marker {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #666;
    padding-top: var(--marker-size);
    cursor: pointer;
    transition: all 0.3s ease;
}

.marker::before {
    content: '';
    position: absolute;
    top: calc(-1 * (var(--marker-size) + var(--progress-height) + 4px));
    left: 50%;
    transform: translateX(-50%);
    width: var(--marker-size);
    height: var(--marker-size);
    background: white;
    border: 2px solid var(--gambia-blue);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.marker.passed::before {
    background: var(--gambia-green);
    border-color: var(--gambia-green);
}

.marker:hover {
    color: var(--gambia-blue);
    transform: translateX(-50%) scale(1.1);
}

.marker:hover::before {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

@keyframes markerPop {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.3); }
    100% { transform: translateX(-50%) scale(1); }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to right,
        transparent,
        rgba(255, 255, 255, 0.3)
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(500%); }
}

/* Visual feedback for scroll position */
.scroll-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sand-dark);
    transition: all 0.3s ease;
}

.scroll-dot.active {
    background: var(--gambia-green);
    transform: scale(1.5);
}

/* Add these styles */
.loading, .error {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.error {
    color: var(--gambia-red);
}

.event-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--sand-dark);
}

.event-image.placeholder {
    background: linear-gradient(45deg, 
        var(--sand-dark) 25%, 
        var(--sand-light) 25%, 
        var(--sand-light) 50%, 
        var(--sand-dark) 50%, 
        var(--sand-dark) 75%, 
        var(--sand-light) 75%
    );
    background-size: 20px 20px;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-content:hover .event-image img {
    transform: scale(1.05);
}

/* Add to existing styles */
.modal-image-container.placeholder {
    background: linear-gradient(45deg, 
        var(--sand-dark) 25%, 
        var(--sand-light) 25%, 
        var(--sand-light) 50%, 
        var(--sand-dark) 50%, 
        var(--sand-dark) 75%, 
        var(--sand-light) 75%
    );
    background-size: 20px 20px;
    padding: 2rem;
    text-align: center;
}

.modal-image-container.placeholder img {
    max-height: 200px;
    width: auto;
    margin: 0 auto;
}

.did-you-know {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--sand-light);
    border-radius: 8px;
}

.did-you-know h3 {
    color: var(--gambia-red);
    margin-bottom: 0.5rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--gambia-red);
    color: white;
    border: none;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--gambia-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    border-bottom: 3px solid var(--gambia-red);
}

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

.nav-logo {
    font-family: 'Playfair Display', serif;
    color: var(--gambia-blue);
    text-decoration: none;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-link i {
    font-size: 0.85rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gambia-red);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--gambia-red);
    background: var(--sand-light);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--gambia-red);
    background: var(--sand-light);
}

.nav-link.active::after {
    width: 80%;
}

@media (max-width: 768px) {
    .nav-content {
        padding: 0.4rem 0.8rem;
    }
    
    .nav-logo {
        font-size: 1.1rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

.share-button {
    background: #1877f2;  /* Facebook blue */
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.share-button:hover {
    background: #166fe5;
    transform: translateY(-2px);
}

.share-button i {
    font-size: 0.85rem;
}

.floating-share-buttons {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.floating-share {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.floating-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.floating-share.facebook {
    background: #1877f2;
}

.floating-share.facebook:hover {
    background: #166fe5;
}

.floating-share.whatsapp {
    background: #25D366;
}

.floating-share.whatsapp:hover {
    background: #20bd5a;
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .floating-share-buttons {
        bottom: 1rem;
        left: 1rem;
    }
    
    .floating-share {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

/* Thinking indicator */
.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding-bottom: 60px;
}

.message {
    padding: 1rem;
    border-radius: 8px;
    max-width: 80%;
}

.thinking {
    display: flex;
    gap: 8px;
    padding: 1rem;
    position: sticky;
    bottom: 0;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    margin: 0;
    z-index: 10;
    width: fit-content;
    margin-top: auto;
}

.thinking-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: thinking 1.4s infinite ease-in-out both;
}

.thinking-dot:nth-child(1) {
    background-color: var(--gambia-red);
    animation-delay: -0.32s;
}

.thinking-dot:nth-child(2) {
    background-color: var(--gambia-blue);
    animation-delay: -0.16s;
}

.thinking-dot:nth-child(3) {
    background-color: var(--gambia-green);
}

@keyframes thinking {
    0%, 80%, 100% { 
        transform: scale(0);
    } 
    40% { 
        transform: scale(1);
    }
}

.floating-quiz {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.quiz-button {
    background: var(--gambia-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.quiz-button:hover {
    transform: translateY(-2px);
    background: var(--gambia-red);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 1;
}

.quiz-button i {
    font-size: 1rem;
}

/* Make it even smaller on mobile */
@media (max-width: 768px) {
    .quiz-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .quiz-button i {
        font-size: 0.9rem;
    }
} 