/* Base Styling */
body {
    font-family: 'Inter', sans-serif;
    background-color: #121212;
    background-image: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2005;
    display: flex;
    gap: 10px;
}

.lang-switcher button {
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-switcher button:hover {
    border-color: rgba(212, 175, 55, 0.6);
}

.lang-switcher button.active {
    color: #d4af37;
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
}

/* Language Display Logic */
body.lang-sr .lang-en { display: none !important; }
body.lang-en .lang-sr { display: none !important; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.8);
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: #f5f5f5;
    margin: 0;
}

/* Navigation - Glassmorphism Sticky Top Bar */
.top-nav {
    position: sticky;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
    z-index: 2000;
    gap: 30px;
}

.top-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.top-nav a:hover, .top-nav a.active {
    color: #d4af37; /* Subtle gold accent */
    transform: translateY(-2px);
}

/* Layout Elements */
.content {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Fullscreen Media Sections */
.fullscreen-section, .image-section, .section {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0d0d0d;
}

.fullscreen-section img, .image-section img, .section img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed to contain to prevent cropping/stretching */
    object-position: center;
    filter: grayscale(80%) sepia(20%);
    transition: filter 1.2s ease, transform 1.2s ease;
}

.fullscreen-section:hover img, .image-section:hover img, .section:hover img {
    filter: grayscale(0%) sepia(0%);
    transform: scale(1.03);
}

/* Text Overlays on Media */
.text-overlay {
    position: absolute;
    bottom: 15%;
    left: 10%;
    text-align: left;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transform: translateY(0);
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.fullscreen-section:hover .text-overlay {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.4);
}

.text-overlay h1 {
    font-size: 3.5em;
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 2px 4px 10px rgba(0,0,0,0.5);
}

.text-overlay p {
    font-size: 1.2em;
    font-weight: 300;
    color: #cccccc;
    margin: 0;
}

/* Text Sections */
.fullscreen {
    position: relative;
    width: 100%;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    box-sizing: border-box;
    text-align: center;
}

.fullscreen h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #d4af37;
}

.fullscreen div {
    max-width: 800px;
    text-align: left;
    border-left: 2px solid rgba(212, 175, 55, 0.2);
    padding-left: 40px;
    position: relative;
}

.fullscreen div::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
    transition: transform 0.5s ease;
}

.fullscreen div:hover::before {
    transform: scale(1.5);
}

.fullscreen p {
    font-size: 1.15em;
    color: #cccccc;
    margin-bottom: 20px;
}

/* Zig-Zag Alternating Gallery */
.zigzag-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
    position: relative;
}

/* Optional vertical line connecting them */
.zigzag-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(212, 175, 55, 0.2);
    transform: translateX(-50%);
    z-index: 0;
}

.zigzag-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.zigzag-item:nth-child(even) {
    flex-direction: row-reverse;
}

.zigzag-text {
    flex: 1;
}

.gallery-img-z {
    width: 70%; /* Increased width */
    max-width: 600px;
    height: 585px;
    object-fit: contain;
    border-radius: 8px;
    filter: grayscale(80%) sepia(20%);
    transition: filter 0.6s ease, transform 0.6s ease, box-shadow 0.6s ease;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    cursor: pointer;
}

.gallery-img-z:hover {
    filter: grayscale(0%) sepia(0%);
    transform: scale(1.08) translateY(-5px);
    box-shadow: 0 25px 60px rgba(212, 175, 55, 0.3);
    z-index: 10;
}

.zigzag-gallery .gallery-caption {
    margin-top: 20px;
    z-index: 1;
    background: rgba(18, 18, 18, 0.8);
    padding: 5px 15px;
    border-radius: 20px;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.gallery-img {
    position: relative;
    width: 100%;
    height: 350px;
    object-fit: contain;
    border-radius: 8px;
    filter: grayscale(80%) sepia(20%);
    transition: filter 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, z-index 0s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    cursor: pointer;
    z-index: 1;
}

.gallery-img:hover {
    filter: grayscale(0%) sepia(0%);
    transform: scale(1.6);
    box-shadow: 0 25px 60px rgba(0,0,0,0.8);
    z-index: 100;
}

.gallery-caption {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #a0a0a0;
    font-style: italic;
    font-size: 1em;
    grid-column: 1 / -1;
}

/* Pen as a Sword Image Pop-up */
.pen-sword-img {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    z-index: 1;
    position: relative;
}

.pen-sword-img:hover {
    transform: scale(1.15);
    box-shadow: 0 25px 60px rgba(0,0,0,0.8) !important;
    z-index: 100;
}

/* Scroll Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Background Timeline Overlay */
.bg-timeline {
    position: absolute;
    right: 40px;
    top: 0;
    bottom: 0;
    padding: 150px 0;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.05);
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: flex-end;
}

.timeline-city {
    color: rgba(255, 255, 255, 0.06);
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 5px;
    transform: translateX(-30px);
    position: relative;
    user-select: none;
}

.timeline-city::after {
    content: '';
    position: absolute;
    right: -36px; 
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .top-nav {
        justify-content: flex-start;
        padding: 15px;
        overflow-x: auto;
        white-space: nowrap;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .top-nav::-webkit-scrollbar {
        display: none;
    }

    .top-nav a {
        font-size: 1em;
        padding: 0 10px;
    }

    .text-overlay {
        bottom: 5%;
        left: 5%;
        right: 5%;
        padding: 25px;
        text-align: center;
    }

    .text-overlay h1 {
        font-size: 2.2em;
    }

    .fullscreen h1 {
        font-size: 2em;
    }

    .fullscreen p {
        font-size: 1.05em;
        text-align: left;
    }

    .zigzag-item {
        flex-direction: column !important;
        gap: 20px;
    }
    
    .gallery-img-z, .zigzag-text {
        width: 100% !important;
        box-sizing: border-box;
    }

    .zigzag-item:nth-child(even) .zigzag-text {
        text-align: left;
        border-right: none;
        border-left: 2px solid rgba(212, 175, 55, 0.5);
    }
    
    .bg-timeline {
        display: none;
    }
}