/* --- OSNOVNO & NAVIGACIJA --- */
html, body {
    width: 100vw;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #0a0e1a;
    font-family: 'DM Sans', sans-serif;
    color: #eaf6fb;
}
.izbornik {
    max-width: 100vw;
    justify-content: space-between;
    align-items: center;
    background: #18181d;
    padding: 0 20px;
    height: 55px;
    position: fixed;
    top: 0;
    width: 100vw;
    transition: top 0.3s;
    z-index: 9999;
    display: flex;
}
.navigacija {
    justify-content: flex-end;
    align-items: center;
    width: auto;
    flex: 1;
    max-width: 1700px;
    display: flex;
    position: relative;
}
.tab {
    display: flex;
    margin-right: 30px;
    width: 50%;
    justify-content: end;
}
.nav_link a {
    color: #eaf6fb;
    margin: 10px;
    text-align: center;
    line-height: 35px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border 0.2s, color 0.2s;
}
.nav_link a:hover {
    color: #ff9800;
    border-bottom: 2px solid #ff9800;
}
.nav-logo {
    height: 38px;
    width: auto;
    margin-right: 18px;
    display: block;
    align-self: center;
}
.sadrzaj {
    display: flex;
    flex-direction: column;
    background: #18181d;
    margin: 0;
    margin-top: 60px;
}
#scrollToTop {
    position: fixed;
    bottom: 80px;
    right: 30px;
    background: #fff !important;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 8px #0008;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}
#scrollToTop svg polyline {
    stroke: #111;
    transition: stroke 0.3s;
}
#scrollToTop:hover {
    background: #111 !important;
}
#scrollToTop:hover svg polyline {
    stroke: #fff;
}

/* --- HERO SEKTOR --- */
.hero {
    position: relative;
    height: 650px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: none;
    overflow: hidden;
    background: var(--section-bg);
    color: var(--text-light);
}
.hero-static-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    background: url('slike/Špancir.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    /* background-color: #18181d; */
    opacity: 0.9;
    z-index: 1;
    filter: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 540px;
    padding: 60px 20px 60px 20px;
    background: rgba(24,24,29,0.92);
    border-radius: 18px;
    box-shadow: 0 4px 32px #000a;
    margin-left: 0;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.hero .h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    align-self: center;
}
.hero .h4.light {
    color: #bfc9d1;
    font-weight: 600;
}

@media (max-width: 900px) {
    .hero-content {
        max-width: 95vw;
        padding: 32px 10vw 32px 10vw;
    }
}
@media (max-width: 600px) {
    .hero {
        min-height: 320px;
        max-height: 400px;
    }
    .hero-content {
        margin-left: auto;
        margin-right: auto;
        max-width: 98vw;
        padding: 18px 4vw 18px 4vw;
        background: rgba(24,24,29,0.97);
    }
    .hero .h1 { font-size: 1.3rem; align-self: center;}
    .hero .h2 { font-size: 1.1rem; align-self: center;}
    .hero .h4 { font-size: 1rem; align-self: center;}
    .hero .h6 { font-size: 0.9rem; }
}

/* --- O NATJECANJU --- */
.about {
    background: var(--section-light);
    padding: 80px 0;
    text-align: center;
    font-size: 20px;
}
.about .container2 {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.about .h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent-orange);
}

/* --- IGRE --- */
.games {
    background: var(--main-bg);
    padding: 80px 0;
    text-align: center;
}
.games .container3 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.games .h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--accent-green);
}
.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}
.game-card {
    background: var(--section-light-alt);
    padding: 30px;
    border-radius: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1.5px solid var(--border-light);
    box-shadow: 0 2px 8px #0001;
}
.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 24px 0 #fff, 0 8px 32px 0 #0002;
    border-color: var(--accent-blue);
}
.game-logo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: #333;
}
.game-card .h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-orange);
}

/* --- PRIJAVA --- */
.signup {
    background: var(--main-bg);
    padding:  0 0 80px 0;
    text-align: center;
}
.signup .container4 {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.signup .h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #000;
}
.signup .container4 .p {
    margin-top: 56px;
    margin-bottom: 32px;
    color: #000;
}
.prijava2 {
    background: #000;
    color: #fff;
    border: 2px solid #000;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    margin-top: 2rem;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px #0003;
}
.prijava2:hover {
    background: #fff;
    color: #000;
    border-color: #000;
}

/* --- GALERIJA --- */
.gallery {
    background: var(--section-light);
    padding: 80px 0;
    text-align: center;
}
.gallery .container5 {
    max-width: 100vw;
    margin: 0;
    padding: 10px 50px 10px 50px;
}

.gallery .h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--accent-green);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-top: 2rem;
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 800px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 400px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
    background: var(--section-light-alt);
    border-radius: 2px;
    box-shadow: 0 2px 8px #0001;
}
.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
    filter: none;
}
.gallery-item:hover {
    transform: scale(1.05);
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: modalZoomIn 0.3s ease-out;
}
.gallery-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 224, 255, 0.3);
}
@keyframes modalZoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--accent-orange);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
.gallery-modal-close:hover {
    color: var(--accent-green);
}

/* --- PRAVILA/FAQ --- */
.rules {
    background: var(--section-bg);
    padding: 40px 0;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
    color: var(--text-light);
}
.rules .zaglavlje {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    gap: 12px;
}
.rules .zaglavlje h1, .rules .arrow {
    color: #fff;
    }
.rules .arrow {
    font-size: 1.5rem;
    color: #fff;
    transition: transform 0.3s;
    }
.rules .satrzaj_uvijek, .rules .content {
    text-align: center;
}
.rules .satrzaj_uvijek {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}
.rules .content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}
.rules.expanded .content {
    max-height: 1000px;
    padding: 20px;
}
.rules.expanded .arrow {
    transform: rotate(180deg);
}
.rules .content, .rules .satrzaj_uvijek {
    background: #18181d;
    color: var(--text-light);
    }
.rules .content ul {
    list-style: none;
    padding-left: 0;
}
.rules .content li {
    margin-bottom: 8px;
}

/* --- PODNOŽJE (FOOTER) --- */
.footer {
    background: #18181d;
    padding: 40px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1.5px solid #23232a;
    color: #5a5a5a;
}
.footer > div {
    display: flex;
    align-items: center;
}
.p_footer {
    justify-content: flex-start;
}
.footer-logos {
    justify-content: center;
    gap: 32px;
    width: 100%;
}
.social-icons {
    justify-content: flex-end;
    gap: 15px;
    width: 100%;
}
.social-icons .fa {
    color: #fdfffeb9;
    font-size: 1.5rem;
    transition: color 0.3s;
    filter: grayscale(1);
}
.social-icons .fa:hover {
    color: #fdfffeb9;
}
.footer-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: none;
}
@media (max-width: 700px) {
    .footer {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
        padding: 30px 10px;
    }
    .footer > div {
        width: 100%;
        justify-content: center;
    }
    .footer-logos {
        margin: 10px 0;
    }
    .social-icons {
        justify-content: center;
    }
    .p_footer {
        justify-content: center;
    }
}
.icon {
    display: none;
}
@media (max-width: 700px) {
    .izbornik {
        padding: 0 10px;
        height: 60px;
    }
    .icon {
        display: block;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        padding: 0;
        z-index: 2000;
    }
    .icon .fa-bars {
        color: #fff !important;
        font-size: 32px;
        padding-right: 20px;
    }
    .tab {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        background: #18181d;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        border-radius: 0 0 8px 8px;
        z-index: 1000;
        min-width: 200px;
    }
    .tab.responsive {
        display: flex !important;
    }
    .tab:not(.responsive) {
        display: none !important;
    }
    .nav_link {
        width: 100%;
        justify-content: flex-start;
    }
    .nav_link a {
        width: 100%;
        padding: 12px 20px;
        margin: 0;
        border-bottom: 1px solid #23232a;
        text-align: left;
        font-size: 16px;
    }
    .navigacija {
        width: 100%;
        position: relative;
    }
    .icon {
        margin-right: 0;
    }
}
.about, .game-card, .signup .container4, .gallery, .gallery-item {
    background: #fff;
    color: #18181d;
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 #0001;
}
.sponsor-marquee-wrapper {
  width: 100%;
  overflow: hidden;
  background: #18181d;
  padding: 12px 0;
  box-sizing: border-box;
}
.sponsor-marquee {
  display: flex;
  align-items: center;
  animation: sponsor-scroll 25s linear infinite;
  gap: 36px;
}
.sponsor-marquee a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
}
.sponsor-marquee img {
  height: 40px;
  max-width: 130px;
  object-fit: contain;
  padding: 0 10px;
}
@keyframes sponsor-scroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}
a {
    color: white;
}