/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a5d63;
    --primary-dark: #0f4a4f;
    --secondary: #e67e22;
    --accent: #f39c12;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --muted: #6c757d;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --border: #e9ecef;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-dark: 0 6px 20px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.2rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 12px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.2rem;
    font-weight: 600;
}

p {
    margin-bottom: 16px;
    color: var(--dark);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 32px;
    font-weight: 500;
}

/* Header and Navigation */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 20px;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0;
}

.logo p {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0;
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-menu li a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--dark);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu li a:hover {
    background: var(--primary);
    color: white;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: var(--primary);
}

.menu-toggle:hover {
    background: var(--light);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 32px;
    font-weight: 400;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat h3 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 8px;
}

.stat p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* Introduction Section */
.introduction {
    padding: 80px 0;
    background: white;
}

.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.intro-text {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.intro-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.intro-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.geography-info {
    background: white;
    padding: 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.geography-info h3 {
    color: var(--primary);
    margin-bottom: 16px;
}

.geography-info ul {
    list-style: none;
}

.geography-info li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.geography-info li:last-child {
    border-bottom: none;
}

.geography-info strong {
    color: var(--primary-dark);
}

/* Timeline Section */
.timeline-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.timeline-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    justify-content: center;
}

.timeline-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.timeline-btn:hover {
    background: var(--primary);
    color: white;
}

.timeline-btn.active {
    background: var(--primary);
    color: white;
}

.timeline-container {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 32px;
    overflow-x: auto;
}

.timeline-track {
    min-width: 1800px;
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.timeline-event {
    position: relative;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 16px;
    width: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.timeline-event:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-dark);
}

.timeline-event .year {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.timeline-event .title {
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-event .location {
    font-size: 0.9rem;
    color: var(--muted);
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-details {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    min-height: 200px;
}

.timeline-details h3 {
    color: var(--primary);
    margin-bottom: 12px;
}

/* Periods Section */
.periods-section {
    padding: 80px 0;
    background: white;
}

.periods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.period-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.period-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-dark);
}

.period-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.period-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 2;
}

.period-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    z-index: 3;
}

.period-overlay h3 {
    color: white;
    margin-bottom: 4px;
}

.period-overlay p {
    margin-bottom: 0;
    opacity: 0.9;
}

.period-content {
    padding: 24px;
}

.period-content h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.period-content h3 i {
    color: var(--primary);
    background: rgba(26, 93, 99, 0.1);
    padding: 8px;
    border-radius: 8px;
}

.period-content ul {
    list-style: none;
    margin: 16px 0;
}

.period-content li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    padding-left: 20px;
}

.period-content li:before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 0.8rem;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 16px;
    border: 2px solid var(--primary);
}

.btn:hover {
    background: transparent;
    color: var(--primary);
}

/* Background images for periods */
.ancient-bg {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1518098268002-8f2cc1f52f0a?w=800&auto=format&fit=crop') center/cover no-repeat;
}

.roman-bg {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1547981609-4b6bfe67ca0b?w=800&auto=format&fit=crop') center/cover no-repeat;
}

.medieval-bg {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1518173947338-92fcb9353525?w=800&auto=format&fit=crop') center/cover no-repeat;
}

.ottoman-bg {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1518895312354-60204c8353fe?w=800&auto=format&fit=crop') center/cover no-repeat;
}

.national-bg {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1515992873488-52d72e7c7f3f?w=800&auto=format&fit=crop') center/cover no-repeat;
}

.yugoslavia-bg {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1542362567-8cce553ded24?w=800&auto=format&fit=crop') center/cover no-repeat;
}

/* Maps Section */
.maps-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.map-container {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.map-controls {
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.map-controls label {
    font-weight: 600;
    color: var(--primary);
}

.map-controls select {
    padding: 8px 16px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background: white;
    color: var(--dark);
    font-weight: 500;
    cursor: pointer;
}

.map-display {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.map {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    min-height: 400px;
    border-radius: 12px;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow) inset;
}

.map-legend {
    background: var(--light);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.map-legend h4 {
    margin-bottom: 12px;
    color: var(--primary);
}

/* Figures Section */
.figures-section {
    padding: 80px 0;
    background: white;
}

.figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.figure-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.figure-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-dark);
}

.figure-image {
    height: 200px;
    overflow: hidden;
}

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

.figure-card:hover .figure-image img {
    transform: scale(1.05);
}

.figure-content {
    padding: 20px;
}

.figure-content h3 {
    color: var(--primary);
    margin-bottom: 8px;
}

.figure-period {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.figure-facts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.fact {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(26, 93, 99, 0.1);
    color: var(--primary);
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Culture Section */
.culture-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.culture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.culture-item {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.culture-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-dark);
}

.culture-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.culture-icon i {
    color: white;
    font-size: 1.5rem;
}

.culture-item h3 {
    margin-bottom: 12px;
}

.culture-item ul {
    list-style: none;
    margin-top: 16px;
}

.culture-item li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    padding-left: 20px;
}

.culture-item li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* Modern Section */
.modern-section {
    padding: 80px 0;
    background: white;
}

.modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.modern-item {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.modern-item h3 {
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.country-list {
    margin-top: 16px;
}

.country-item {
    padding: 12px;
    margin-bottom: 8px;
    background: var(--light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.country-item h4 {
    margin-bottom: 4px;
    color: var(--primary);
}

.country-item p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.news-timeline {
    margin-top: 16px;
}

.news-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item .date {
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 60px;
    text-align: center;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 60px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 16px;
}

.footer-section p {
    opacity: 0.8;
    margin-bottom: 12px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    padding: 6px 0;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: white;
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 900px) {
    .intro-content {
        grid-template-columns: 1fr;
    }
    
    .map-display {
        grid-template-columns: 1fr;
    }
    
    .timeline-track {
        min-width: 1200px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
        display: none;
        flex-direction: column;
        padding: 16px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .timeline-track {
        min-width: 800px;
    }
    
    .periods-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .intro-content,
    .periods-grid,
    .figures-grid,
    .culture-grid,
    .modern-grid {
        gap: 16px;
    }
    
    .intro-text {
        padding: 24px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.pt-32 { padding-top: 32px; }
.pb-32 { padding-bottom: 32px; }

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-dark: 0 6px 20px rgba(0, 0, 0, 0.4);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
