/* --- Globalne postavke и osnovni stilovi --- */
:root {
    --font-primary: 'Montserrat', sans-serif;
    --font-headings: 'Montserrat', sans-serif;
    --color-text: #333333;
    --color-background: #fdfdfa;
    --color-primary: #bfa15a;
    --color-dark: #2c2c2c;
    --spacing-small: 10px; 
    --spacing-small-medium: 15px; /* Manji razmak ispod H2 */
    --spacing-medium: 20px;
    --spacing-large: 40px; /* Glavni razmak između sekcija */
    --spacing-extra-large: 60px;
    --swiper-theme-color: var(--color-primary);
    --swiper-navigation-size: 30px;
}

html { scroll-behavior: smooth; scroll-padding-top: 40px; }
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.7;
}

h1, h2, h3 {
    font-family: var(--font-headings);
    color: var(--color-dark);
    font-weight: 700;
}

/* --- ИСПРАВЉЕНА ЛОГИКА ЗА ПРИКАЗ ЈЕЗИКА --- */
.lang-sr, .lang-en { display: none; }
body:not(.lang-en-active) .lang-sr { display: inline; }
body:not(.lang-en-active) h1 .lang-sr, body:not(.lang-en-active) h2 .lang-sr, body:not(.lang-en-active) h3 .lang-sr, body:not(.lang-en-active) p .lang-sr { display: block; }
body.lang-en-active .lang-en { display: inline; }
body.lang-en-active h1 .lang-en, body.lang-en-active h2 .lang-en, body.lang-en-active h3 .lang-en, body.lang-en-active p .lang-en { display: block; }

/* --- Stil za sakrivanje Sign Language Guide-a na EN --- */
body.lang-en-active #sign-language-section {
    display: none;
}

/* --- Дугмад за језик (Absolute pozicija, skriva se pri skrolovanju) --- */
.language-switcher {
    position: absolute; 
    top: var(--spacing-medium); 
    right: var(--spacing-medium);
    z-index: 1002;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 14px; 
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}
.language-switcher a {
    display: inline-block;
    padding: 5px 10px;
    text-decoration: none;
    color: var(--color-dark);
    font-weight: bold;
    transition: background-color 0.3s ease;
    font-size: 0.8rem;
}
.language-switcher a.active {
    background-color: var(--color-primary);
    color: white;
    cursor: default;
}

/* --- Hero секција --- */
.hero-section {
    position: relative;
    height: 45vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-image: url("01.jpg");
    background-size: cover;
    background-position: center;
    padding: var(--spacing-extra-large) var(--spacing-medium) var(--spacing-medium) var(--spacing-medium); 
    box-sizing: border-box;
    overflow: hidden;
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3)); }
.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.hero-content h1 {
    color: #fdfdfa;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.1;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: clamp(1.3rem, 4vw, 3.5rem);
    margin: 0;
}


/* --- Главни садржај --- */
.content-wrapper { 
    padding: var(--spacing-large) var(--spacing-medium); 
    max-width: 800px; 
    margin: 0 auto; 
    position: relative;
}

.content-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("001.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

.content-section { 
    margin-bottom: var(--spacing-large); /* Razmak između sekcija */
    background-color: rgba(253, 253, 250, 0.95);
    padding: 0 10px; /* Unutrašnje margine: 0 gore/dole, 10px levo/desno */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.content-section:last-child { margin-bottom: 0; } 

.content-section h2 { 
    font-size: 2.2rem; 
    margin: 10px 0; /* 10px gore/dole */
    border-bottom: 2px solid var(--color-primary); 
    padding-bottom: 5px; 
    display: inline-block; 
}
.content-section h3 { 
    font-size: 1.5rem; 
    margin: 10px 0; /* 10px gore/dole */
}
.content-section p {
    max-width: 85ch; /* Proširena širina teksta */
    margin: 10px 0; /* 10px gore/dole */
}
.content-section p:first-of-type {
    margin-top: 10px; /* 10px od vrha */
}
.content-section p:last-child {
    margin-bottom: 10px; /* 10px od dna */
}

/* --- Stilovi za Galerija Slider --- */
.swiper {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 8px;
    margin: 10px 0; /* 10px gore/dole */
}
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #eee;
}
.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.swiper-caption {
    padding-top: 10px;
    text-align: center;
    font-style: italic;
    color: #666;
    min-height: 40px; 
    margin: 10px 0; /* 10px gore/dole */
}

/* --- IZMENE ZA MEDIJA BLOKOVE --- */
.media-container { 
    margin: 10px 0; /* 10px gore/dole */
}
/* Prvi media container u sekciji kreće odmah ispod h2 */
.content-section:not(#gallery) .media-container:first-child {
    margin-top: 10px; 
}

.media-container h3:first-child {
    margin-top: 10px; 
}

video, audio { 
    width: 100%; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
    margin: 10px 0; /* 10px gore/dole */
}
audio { margin-bottom: 0; } 


/* --- Media Queries за веће екране --- */
@media (min-width: 768px) {
    /* Dodatni stilovi za veće ekrane po potrebi */
}

/* --- Stilovi za Swiper navigaciju i paginaciju --- */
.swiper-button-next,
.swiper-button-prev {
    color: var(--color-primary) !important;
}

.swiper-pagination-bullet-active {
    background: var(--color-primary) !important;
}

/* --- Fullscreen dugmići --- */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0; /* 10px gore/dole */
    gap: var(--spacing-small);
}

.fullscreen-btn,
.exit-fullscreen-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    z-index: 1003;
}

.exit-fullscreen-btn {
    display: none;
}

.fullscreen-btn span,
.exit-fullscreen-btn span {
    display: none;
}

body:not(.lang-en-active) .fullscreen-btn .lang-sr,
body:not(.lang-en-active) .exit-fullscreen-btn .lang-sr {
    display: inline;
}

body.lang-en-active .fullscreen-btn .lang-en,
body.lang-en-active .exit-fullscreen-btn .lang-en {
    display: inline;
}

/* --- Responsive za fullscreen dugmiće --- */
@media (max-width: 768px) {
    .gallery-controls {
        flex-direction: column;
        gap: var(--spacing-small);
    }
    
    .fullscreen-btn,
    .exit-fullscreen-btn {
        width: 100%;
        justify-content: center;
    }
    
    .fullscreen-btn span,
    .exit-fullscreen-btn span {
        font-size: 0.8rem;
    }
}

.fullscreen-btn:hover,
.exit-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}