/* ==========================================================================
   iLearn Global Footer & Floating Action Buttons
   ========================================================================== */

.il-global-footer {
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid #f3f3f3;
    margin-top: 40px;
    padding-top: 30px;
    padding-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #777777;
    box-sizing: border-box;
}

.il-global-footer * {
    box-sizing: border-box;
}

.il-footer-container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px;
}

.il-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 25px;
}

.il-footer-col ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.il-footer-col ul li {
    margin-bottom: 12px;
}

.il-footer-col ul li:last-child {
    margin-bottom: 0;
}

.il-footer-col a {
    display: inline-flex;
    align-items: center;
    color: #555555 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.il-footer-col a:hover {
    color: #FE4C50 !important;
}

.il-footer-col a i {
    font-size: 16px;
    width: 22px;
    text-align: left;
    margin-right: 8px;
    color: #777777;
    transition: color 0.15s ease;
}

.il-footer-col a:hover i {
    color: #FE4C50;
}

/* ==========================================================================
   DRUŠTVENE MREŽE
   ========================================================================== */
.il-social-list {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.il-social-list li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.il-social-list a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    color: #555555 !important;
    text-decoration: none !important;
    border-radius: 6px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.il-social-list a svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    fill: currentColor !important;
    transition: fill 0.15s ease;
}

.il-social-list a:hover {
    color: #FE4C50 !important;
    transform: translateY(-2px);
}

.il-social-list a:hover svg {
    fill: #FE4C50 !important;
}

/* ==========================================================================
   PLATNE KARTICE I COPYRIGHT
   ========================================================================== */
.il-footer-payment-strip {
    border-top: 1px solid #f3f3f3;
    padding-top: 20px;
    margin-top: 10px;
}

#kartice {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

#kartice li {
    display: flex;
    align-items: center;
    margin: 0 !important;
}

.il-copyright-row {
    border-top: 1px solid #f3f3f3;
    margin-top: 20px;
    padding-top: 15px;
    text-align: center;
    font-size: 13px;
    color: #777777;
}

.il-copyright-row a {
    color: #555555 !important;
    text-decoration: none !important;
}

.il-copyright-row a:hover {
    color: #FE4C50 !important;
}

/* ==========================================================================
   STABILNA POZICIJA PLUTAJUĆIH DUGMIĆA NA DESKTOPU (NE MICAJU SE PRI SKROLU)
   ========================================================================== */
#ilBackToTop {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    top: auto !important;
    transform: none !important;
    width: 48px;
    height: 48px;
    background-color: #FE4C50;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, background-color 0.2s ease !important;
    z-index: 9990;
    box-shadow: 0 4px 14px rgba(254, 76, 80, 0.35);
}

#ilBackToTop.is-visible {
    opacity: 1;
    visibility: visible;
}

#ilBackToTop:hover {
    background-color: #D13235;
}

#ilBackToTop svg {
    width: 22px;
    height: 22px;
}

#ilearn-ai-circle-btn {
    position: fixed !important;
    right: 20px !important;
    bottom: 80px !important;
    top: auto !important;
    transform: none !important;
    width: 48px;
    height: 48px;
    background-color: #ffffff;
    border: 2px solid #FE4C50;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(30, 30, 39, 0.2);
    z-index: 9991;
    cursor: pointer;
    transition: all 0.2s ease-in-out !important;
}

#ilearn-ai-circle-btn .ai-btn-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

#ilearn-ai-circle-btn:hover {
    transform: scale(1.04) !important;
    box-shadow: 0 6px 18px rgba(254, 76, 80, 0.4);
}

#ilearn-ai-circle-btn .ai-tooltip {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background-color: #1E1E27;
    color: #ffffff !important;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

#ilearn-ai-circle-btn .ai-tooltip::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent #1E1E27;
}

#ilearn-ai-circle-btn:hover .ai-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

#ilearn-ai-widget {
    position: fixed;
    right: 20px;
    bottom: 140px;
    width: 390px;
    max-width: calc(100vw - 40px);
    height: 540px;
    max-height: calc(100vh - 165px);
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #E5E5E5;
    box-shadow: 0 10px 30px rgba(30, 30, 39, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

#ilearn-ai-widget.is-open {
    display: flex !important;
    animation: aiPopupFadeIn 0.25s ease-out forwards;
}

@keyframes aiPopupFadeIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-modal-header {
    background-color: #1E1E27;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #FE4C50;
    font-family: inherit !important;
}

.ai-modal-header .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
}

.ai-modal-header .brand img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.ai-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
}

.ai-close-btn:hover {
    opacity: 1;
    color: #FE4C50;
}

.ai-modal-chips {
    padding: 10px 14px;
    background: #FAFAFB;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ai-modal-chips .chip {
    display: inline-block;
    background: #ffffff;
    color: #2c2c36;
    border: 1px solid #DCDCE2;
    padding: 6px 12px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    transition: all 0.15s ease-in-out;
    font-family: inherit !important;
}

.ai-modal-chips .chip:hover {
    background: #FE4C50;
    color: #ffffff;
    border-color: #FE4C50;
    font-weight: 600;
}

.ai-modal-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #FDFDFE;
    font-family: inherit !important;
}

.ai-msg {
    max-width: 86%;
    padding: 12px 15px;
    border-radius: 8px;
    line-height: 1.55;
    font-size: 13.5px;
    font-weight: 400;
    font-family: inherit !important;
}

.ai-msg-bot {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid #E5E5E5;
    color: #333333;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    word-break: break-word;
}

.ai-msg-bot strong,
.ai-msg-bot b {
    font-weight: 700;
    color: #1E1E27;
}

.ai-msg-bot a {
    color: #FE4C50;
    font-weight: 600;
    text-decoration: underline;
}

.ai-msg-user {
    align-self: flex-end;
    background: #1E1E27;
    color: #ffffff;
}

.ai-modal-footer {
    padding: 10px 12px;
    border-top: 1px solid #E5E5E5;
    background: #ffffff;
    display: flex;
    gap: 8px;
    position: relative;
    font-family: inherit !important;
}

.ai-modal-footer input[type="text"] {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    color: #1E1E27;
    font-family: inherit !important;
}

.ai-modal-footer input[type="text"]:focus {
    border-color: #FE4C50;
}

.ai-modal-footer button {
    background-color: #FE4C50;
    color: #ffffff;
    border: none;
    padding: 9px 14px;
    font-weight: 600;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit !important;
}

.ai-hp-field {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ==========================================================================
   RESPONSIVNOST I PAMETNO POMERANJE SAMO NA MOBILNOM KADA JE KORPA VIDLJIVA
   ========================================================================== */
@media (max-width: 991px) {
    .il-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .il-social-list {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .il-footer-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .il-footer-col ul {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px 16px !important;
    }

    .il-footer-col ul li {
        flex: 0 0 calc(50% - 8px) !important;
        margin-bottom: 6px !important;
    }

    .il-footer-col:has(.il-social-list) ul,
    .il-social-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 10px !important;
    }

    .il-footer-col:has(.il-social-list) ul li,
    .il-social-list li {
        flex: 0 0 auto !important;
        margin-bottom: 0 !important;
    }

    #kartice {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
    }

    #kartice li {
        justify-content: center;
    }

    #ilBackToTop {
        right: 20px !important;
        bottom: 20px !important;
        width: 44px !important;
        height: 44px !important;
        transition: opacity 0.25s ease, visibility 0.25s ease, background-color 0.2s ease, bottom 0.3s ease !important;
    }

    #ilearn-ai-circle-btn {
        right: 20px !important;
        bottom: 80px !important;
        width: 44px !important;
        height: 44px !important;
        transition: all 0.2s ease-in-out, bottom 0.3s ease !important;
    }

    #ilearn-ai-circle-btn .ai-tooltip {
        display: none !important;
    }

    #ilearn-ai-widget {
        right: 8px;
        left: 8px;
        bottom: 130px;
        width: auto;
        height: 75vh;
    }

    /* Pomeranje nagore ISKLJUČIVO na mobilnom ekranu kada je korpa vidljiva */
    body:has(#ilStickyBuy.is-visible) #ilBackToTop {
        bottom: 75px !important;
    }

    body:has(#ilStickyBuy.is-visible) #ilearn-ai-circle-btn {
        bottom: 135px !important;
    }
}

/* NEWSLETTER */
.il-newsletter-modern { background: #ffffff; border: 1px solid var(--il-border); border-radius: 12px; padding: 24px 28px; margin-top: 35px; margin-bottom: 25px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03); }
.il-nl-modern-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.il-nl-modern-left { display: flex; align-items: center; gap: 16px; }
.il-nl-icon-badge { width: 44px; height: 44px; border-radius: 10px; background: #FFF1F2; color: var(--il-red); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.il-nl-modern-title { font-size: 16px; font-weight: 800; color: var(--il-navy); margin: 0 0 3px 0; letter-spacing: -0.2px; }
.il-nl-modern-desc { font-size: 13px; color: #64748B; margin: 0; line-height: 1.4; }
.il-nl-modern-form { min-width: 380px; }
.il-nl-input-group { display: flex; align-items: center; background: #F8FAFC; border: 1px solid #CBD5E1; border-radius: 30px; padding: 4px 4px 4px 16px; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03); }
.il-nl-input-group:focus-within { border-color: var(--il-red); background: #ffffff; box-shadow: 0 0 0 3px rgba(254, 76, 80, 0.12); }
.il-nl-input-icon { color: #94A3B8; font-size: 14px; margin-right: 8px; }
.il-nl-input-group input { flex: 1; border: none; background: transparent; font-size: 13.5px; color: var(--il-navy); outline: none; padding: 6px 0; }
.il-nl-input-group input::placeholder { color: #94A3B8; }
.il-nl-modern-btn { background: var(--il-red); color: #ffffff; border: none; border-radius: 24px; padding: 8px 20px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background 0.15s ease, transform 0.1s ease; }
.il-nl-modern-btn:hover { background: var(--il-red-hover); }
