/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --text-color: #333;
    --background-color: #f5f5f5;
    --card-gradient: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    --card-border: rgba(255,255,255,0.18);
    --hero-overlay: rgba(0,0,0,0.4);
}
.view-toggle {
    background: linear-gradient(135deg, #8b7355 0%, #cd853f 100%);
    color: white;
    border: 2px solid rgba(205, 133, 63, 0.3);
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.view-toggle:hover {
    background: linear-gradient(135deg, #cd853f 0%, #8b7355 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(205, 133, 63, 0.5);
}

.view-toggle:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #34495e;
        --secondary-color: #2c3e50;
        --text-color: #f5f5f5;
        --background-color: #1a1a1a;
    }
}

html {
    scroll-behavior: smooth;
}

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lora:ital@0;1&display=swap');
.hero {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background: linear-gradient(var(--hero-overlay), var(--hero-overlay)), url('https://images.unsplash.com/photo-1461360370896-922624d12aa1?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
}

.hero h1 {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border-bottom: 3px double rgba(255, 255, 255, 0.5);
    padding-bottom: 1rem;
}

.hero p {
    font-size: 1.5rem;
    margin-top: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
/* Sticky Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    padding: 1rem;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.sticky-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}
.sticky-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.sticky-nav a:hover {
    background-color: var(--secondary-color);
}
/* Timeline Layout */
.timeline {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Horizontal Timeline */
.timeline.horizontal {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
}

.timeline.horizontal .era {
    min-width: 100vw;
    scroll-snap-align: start;
}

/* Ancient Text Styling */
.ancient-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: 'Cinzel', serif;
    padding: 1rem;
    background: var(--card-gradient);
    border-radius: 8px;
    margin: 1rem 0;
    height: 200px;
    display: inline-block;
}
.era {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    padding: 4rem 2rem;
}
/* Ancient Era Styling */
#ancient .history-card {
    border: 8px double #8b7355;
    background: var(--card-gradient),
                url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIklEQVQIW2NkQAKrVq36zwjjgzhhYWGMYAEYB8RmROaABADeOQ8CXl/xfgAAAABJRU5ErkJggg==');
}
#ancient h2 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: var(--text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}
#ancient .history-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #8b7355;
    border-bottom: 2px solid var(--card-border);
    padding-bottom: 0.5rem;
}
#ancient .history-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    color: #cd853f;
}
.history-card {
    width: 80%;
    background: var(--card-gradient);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    transform-style: preserve-3d;
    transition: all 0.5s;
    position: relative;
    overflow: hidden;
}

.history-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    mix-blend-mode: multiply;
    filter: grayscale(100%);
    transition: all 0.5s ease;
    z-index: -1;
}

#ancient .history-card::before {
    background-image: url('https://images.unsplash.com/photo-1608425234255-96a25a6c0a1e?auto=format&fit=crop&w=1920&q=80');
}

#medieval .history-card::before {
    background-image: url('https://images.unsplash.com/photo-1599939571322-792a326991f2?auto=format&fit=crop&w=1920&q=80');
}

#modern .history-card::before {
    background-image: url('https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&w=1920&q=80');
}

.history-card:hover::before {
    filter: grayscale(0%);
    transform: scale(1.1);
}
.history-card:hover {
    transform: translateZ(20px);
}
/* Animated Quotes */
.quote-scroll {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--primary-color);
    color: white;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    padding: 0.5rem 0;
}
.quote-scroll p {
    display: inline-block;
    animation: scroll-left 20s linear infinite;
    padding: 1rem 2rem;
    margin: 0 auto;
}
@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
/* Parallax Effect */
.era::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: -1;
    filter: grayscale(30%);
}
#ancient::before {
    background-image: url('https://images.unsplash.com/photo-1608425234255-96a25a6c0a1e?auto=format&fit=crop&w=1920&q=80');
}
#medieval::before {
    background-image: url('https://images.unsplash.com/photo-1599939571322-792a326991f2?auto=format&fit=crop&w=1920&q=80');
}
#modern::before {
    background-image: url('https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&w=1920&q=80');
}