/* ==========================================================
   RESPONSIVE DESIGN - OK CENTURION
   ========================================================== */

img, iframe {
    max-width: 100%;
    height: auto;
}

html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* SAKRIJ MOBILNE ELEMENTE NA DESKTOPU */
.centurion-mobile-header,
#mobile-nav-wrapper {
    display: none !important;
}

/* FIX ZA NIVO SLIDER */
.nivoSlider {
    position: relative !important;
    overflow: hidden !important;
}

.nivo-slice, 
.nivo-box {
    max-width: none !important;
}

.nivo-caption,
.nivo-slice img,
.nivo-box img {
    max-width: none !important;
}

.nivoSlider > img[src*="resize.aspx"],
.nivo-main-image {
    max-width: 100% !important;
    height: auto !important;
}

/* UNIVERZALNI FIX ZA SVE CMS SLIKE (Prilagodba visine bez izobličenja) */
.page_content img,
.subpage_content img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin-bottom: 15px !important;
}

/* DESKTOP FIX ZA STARE HTML TABLICE (Igrači/Galerije) */
.page_content table:not(.csstablegenerator-table) {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    border: none !important;
    margin: 0 auto !important;
}

.page_content table:not(.csstablegenerator-table) img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* ==========================================================
   MOBILNI I TABLET PRIKAZ (do 992px)
   ========================================================== */
@media only screen and (max-width: 992px) {

    /* 1. RESET POZADINE I BEZ BOČNIH RAZMAKA */
    .bg_img {
        background-image: none !important;
        background: #111111 !important;
        width: 100% !important;
    }

    .center {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    header, .topnav {
        display: none !important;
    }

    /* 2. MOBILE HEADER - ŽUTA SHEMA (#fff10c) I TAMNE IKONE (#141414) */
    .centurion-mobile-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: #0d0d0d !important;
        padding: 10px 15px !important;
        border-bottom: 2px solid #fff10c !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 999999 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 30px;
    }

    .mobile-logo-wrap img {
        height: 35px !important;
        width: auto !important;
        display: block !important;
    }

    .mobile-action-btn {
        background: #fff10c !important;
        border: 1px solid #fff10c !important;
        padding: 6px 12px !important;
        border-radius: 4px !important;
        cursor: pointer !important;
    }

    #btn-mobile-burger span {
        display: block !important;
        width: 18px !important;
        height: 2px !important;
        background: #141414 !important;
        margin: 3px 0 !important;
    }

    /* 3. MOBILNI IZBORNIK */
    #mobile-nav-wrapper {
        display: none !important;
    }

    #mobile-nav-wrapper.mobile-menu-active {
        display: block !important;
        position: fixed !important;
        top: 55px !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(100vh - 55px) !important;
        background: #141414 !important;
        z-index: 999998 !important;
        padding: 15px 0 !important;
        overflow-y: auto !important;
        box-sizing: border-box !important;
    }

    .mobile-lang-box {
        display: flex !important;
        justify-content: center !important;
        gap: 15px !important;
        padding: 0 15px 15px 15px !important;
        border-bottom: 1px solid #282828 !important;
    }

    .mobile-lang-box a {
        color: #888888 !important;
        text-decoration: none !important;
        font-weight: bold !important;
        font-size: 14px !important;
    }

    .mobile-lang-box a.active {
        color: #fff10c !important;
    }

    .mobile-search-box {
        padding: 15px !important;
        border-bottom: 1px solid #282828 !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    .mobile-search-box form {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
        margin: 0 !important;
    }

    .m-search-in {
        flex: 1 !important;
        height: 40px !important;
        padding: 0 12px !important;
        background: #222222 !important;
        border: 1px solid #444444 !important;
        border-right: none !important;
        color: #ffffff !important;
        border-radius: 4px 0 0 4px !important;
        outline: none !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }

    .m-search-btn {
        width: 48px !important;
        height: 40px !important;
        background: #fff10c !important;
        border: 1px solid #fff10c !important;
        border-radius: 0 4px 4px 0 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .m-search-btn svg {
        width: 20px !important;
        height: 20px !important;
        fill: #141414 !important;
    }

    .mobile-nav-links {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .mobile-nav-links li {
        border-bottom: 1px solid #222222 !important;
    }

    .mobile-nav-links li a {
        display: block !important;
        padding: 14px 20px !important;
        color: #ffffff !important;
        text-decoration: none !important;
        font-size: 16px !important;
        font-weight: bold !important;
    }

    .mobile-nav-links li a:hover {
        background: #fff10c !important;
        color: #141414 !important;
    }

    /* 4. PRILAGODBA SADRŽAJA I RAZMAKA */
    .sidebar {
        width: 100% !important;
        float: none !important;
        box-sizing: border-box !important;
        margin: 15px 0 20px 0 !important;
        padding: 0 10px !important;
    }

    .content, 
    .content.subpage_content, 
    .page_content {
        width: 100% !important;
        float: none !important;
        box-sizing: border-box !important;
        margin: 0 0 20px 0 !important;
        padding: 0 10px !important;
    }

    .novosti {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .novost a {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 0 !important;
    }

    .novost_txt {
        flex: 1 !important;
        width: auto !important;
        padding-left: 10px !important;
        box-sizing: border-box !important;
    }

    .slider, .slider-wrapper, #slider {
        width: 100% !important;
        height: auto !important;
    }

    /* 5. PRILAGODBA PODSTRANICE IGRAČI NA MOBITELIMA */
    .page_content table:not(.csstablegenerator-table), 
    .page_content table:not(.csstablegenerator-table) tbody {
        display: block !important;
        width: 100% !important;
    }

    .page_content table:not(.csstablegenerator-table) tr {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    .page_content table:not(.csstablegenerator-table) td {
        display: block !important;
        width: 48% !important;
        box-sizing: border-box !important;
        margin-bottom: 20px !important;
        padding: 8px !important;
        border: 1px solid #333333 !important;
        background: #181818 !important;
    }

    .page_content table:not(.csstablegenerator-table) td h2 {
        font-size: 14px !important;
        margin-top: 8px !important;
        margin-bottom: 0 !important;
        line-height: 1.3 !important;
    }

    footer, .footer_txt, .footer_social, .footer_cp, .footer_right {
        width: 100% !important;
        float: none !important;
        text-align: center !important;
        margin: 10px 0 !important;
    }

    /* FIX ZA FOOTER I FACEBOOK IKONU */
    .footer_social,
    .footer_social nav.social,
    .footer_social ul {
        float: none !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 10px 0 !important;
    }

    .footer_social li {
        display: inline-block !important;
        float: none !important;
        margin: 0 auto !important;
    }

    .csstablegenerator-table .kolo {
        color: #fff !important;
    }
}

/* 6. MANJI MOBITELI (do 600px) - PRILAGODBA ZA PORTRETE IGRAČA I TEKST */
@media only screen and (max-width: 600px) {

    /* Poništi float s CMS div-a koji omotava profilnu sliku igrača */
    .page_content div[style*="float:left"],
    .page_content div[style*="float: left"] {
        float: none !important;
        margin: 0 auto 15px auto !important;
        text-align: center !important;
        width: 100% !important;
    }

    .page_content div[style*="float:left"] img,
    .page_content div[style*="float: left"] img {
        margin: 0 auto !important;
        display: block !important;
    }

    .page_content table:not(.csstablegenerator-table) td {
        width: 100% !important;
    }

    .csstablegenerator-table {
        display: block;
        overflow-x: auto;
    }

    .csstablegenerator-table > tbody {
        display: table;
        width: 519px;
    }

/*    #utakmica td {
        display: block;
        width: 100%;
    }*/
}

/* ==========================================================
   MODUL: ISKLJUČIVO ZA .user-gallery
   ========================================================== */

/* Sakrij mobilni wrapper na desktopu */
.user-gallery-mobile-wrapper {
    display: none;
}

/* RESPONSIVE PRIKAZ (Do 1024px - obuhvaća mobitele i tablete) */
@media only screen and (max-width: 1024px) {

    /* Sakrij originalne tablice galerije */
    .page_content table:not(.csstablegenerator-table).user-gallery {
        display: none !important;
    }

    .user-gallery ~ br {
        display: none;
    }

    .content.subpage_content {
        margin-top: 20px !important;
    }

    /* Prikaz prilagođene galerije pomoću CSS Grida */
    .user-gallery-mobile-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* SREDNJI PRIKAZ: 2 itema u redu */
        gap: 15px !important;
        width: 100% !important;
        margin: 15px 0 !important;
        box-sizing: border-box !important;
    }

    .user-gallery-mobile-wrapper .user-gallery-card {
        background: #181818 !important;
        border: 1px solid #282828 !important;
        border-radius: 6px !important;
        padding: 10px !important;
        text-align: center !important;
        box-sizing: border-box !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .user-gallery-mobile-wrapper .user-gallery-img img {
        width: 100% !important;
        height: auto !important;
        max-height: 250px !important;
        object-fit: cover !important;
        border-radius: 4px !important;
        display: block !important;
        margin: 0 auto 8px auto !important;
    }

    .user-gallery-mobile-wrapper .user-gallery-txt h3,
    .user-gallery-mobile-wrapper .user-gallery-txt p {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 14px !important;
    }

    .user-gallery-mobile-wrapper .user-gallery-txt a {
        color: #fff10c !important;
        text-decoration: none !important;
        font-weight: bold !important;
    }
}

/* NAJMANJI PRIKAZ (Uski mobiteli do 566px) */
@media only screen and (max-width: 566px) {
    .user-gallery-mobile-wrapper {
        grid-template-columns: 1fr !important; /* NAJMANJI PRIKAZ: 1 item u redu */
    }
}

/* ==========================================================
   MODUL: ISKLJUČIVO ZA table.linkovi
   ========================================================== */

/* Sakrij mobilni wrapper na desktopu */
.user-links-mobile-wrapper {
    display: none !important;
}

/* RESPONSIVE PRIKAZ (Do 992px) */
@media only screen and (max-width: 992px) {

    /* Neutralizacija općih pravila za igrače nad table.linkovi */
    .page_content table.linkovi,
    .page_content table.linkovi tbody,
    .page_content table.linkovi tr,
    .page_content table.linkovi td {
        display: none !important;
    }

    /* Prikaz novog mobilnog wrappera */
    .user-links-mobile-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* 2 kartice u redu za tablete/veće mobitele */
        gap: 15px !important;
        width: 100% !important;
        margin: 20px 0 !important;
        box-sizing: border-box !important;
    }

    .user-links-mobile-wrapper .user-links-card {
        background: #181818 !important;
        border: 1px solid #282828 !important;
        border-radius: 6px !important;
        padding: 12px !important;
        text-align: center !important;
        box-sizing: border-box !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .user-links-mobile-wrapper .user-links-img {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-bottom: 10px !important;
    }

    .user-links-mobile-wrapper .user-links-img img {
        max-width: 100% !important;
        height: auto !important;
        max-height: 150px !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .user-links-mobile-wrapper .user-links-txt {
        color: #ffffff !important;
        font-size: 13px !important;
        font-weight: bold !important;
        line-height: 1.3 !important;
    }

    .user-links-mobile-wrapper .user-links-txt strong {
        font-weight: bold !important;
    }
}

/* NAJMANJI PRIKAZ (Uski mobiteli do 566px) */
@media only screen and (max-width: 566px) {
    .user-links-mobile-wrapper {
        grid-template-columns: 1fr !important; /* 1 kartica u redu za uske ekrane */
    }
}
