html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* ============================================
   IDENTITY FORME - DARK MODE OVERRIDE
   ============================================ */

/* Kad je dark tema, sva polja za unos su tamna */
html[data-theme="dark"] input.form-control,
html[data-theme="dark"] input.form-check-input,
html[data-theme="dark"] textarea.form-control,
html[data-theme="dark"] select.form-control,
html[data-theme="dark"] select.form-select,
html:not([data-theme]) input.form-control,
html:not([data-theme]) input.form-check-input,
html:not([data-theme]) textarea.form-control,
html:not([data-theme]) select.form-control,
html:not([data-theme]) select.form-select {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
    border: 1px solid #444 !important;
}

    /* Fokus stanje - žuti obrub */
    html[data-theme="dark"] input.form-control:focus,
    html[data-theme="dark"] textarea.form-control:focus,
    html[data-theme="dark"] select.form-control:focus,
    html[data-theme="dark"] select.form-select:focus,
    html:not([data-theme]) input.form-control:focus,
    html:not([data-theme]) textarea.form-control:focus,
    html:not([data-theme]) select.form-control:focus,
    html:not([data-theme]) select.form-select:focus {
        background-color: #2a2a2a !important;
        color: #ffffff !important;
        border-color: #ffc107 !important;
        box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25) !important;
    }

    /* Placeholder tekst - svjetliji */
    html[data-theme="dark"] input.form-control::placeholder,
    html[data-theme="dark"] textarea.form-control::placeholder,
    html:not([data-theme]) input.form-control::placeholder,
    html:not([data-theme]) textarea.form-control::placeholder {
        color: #888 !important;
    }

    /* Disabled polja */
    html[data-theme="dark"] input.form-control:disabled,
    html[data-theme="dark"] textarea.form-control:disabled,
    html:not([data-theme]) input.form-control:disabled {
        background-color: #1a1a1a !important;
        color: #666 !important;
    }

/* Labele - svjetla slova */
html[data-theme="dark"] label,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .control-label,
html:not([data-theme]) label,
html:not([data-theme]) .form-label,
html:not([data-theme]) .control-label {
    color: #e0e0e0 !important;
}

/* Checkbox */
html[data-theme="dark"] .form-check-input,
html:not([data-theme]) .form-check-input {
    background-color: #2a2a2a !important;
    border-color: #555 !important;
}

    html[data-theme="dark"] .form-check-input:checked,
    html:not([data-theme]) .form-check-input:checked {
        background-color: #ffc107 !important;
        border-color: #ffc107 !important;
    }

html[data-theme="dark"] .form-check-label,
html:not([data-theme]) .form-check-label {
    color: #e0e0e0 !important;
}

/* Validation poruke - crvene */
html[data-theme="dark"] .text-danger,
html:not([data-theme]) .text-danger {
    color: #ff6b6b !important;
}

html[data-theme="dark"] .validation-summary-errors,
html:not([data-theme]) .validation-summary-errors {
    color: #ff6b6b !important;
}

    html[data-theme="dark"] .validation-summary-errors ul,
    html:not([data-theme]) .validation-summary-errors ul {
        color: #ff6b6b !important;
    }

/* ============================================
   IDENTITY STRANICE - KARTICE I KONTEJNERI
   ============================================ */

/* Kartica oko forme */
html[data-theme="dark"] .card,
html:not([data-theme]) .card {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border: 1px solid #333 !important;
}

html[data-theme="dark"] .card-body,
html:not([data-theme]) .card-body {
    color: #e0e0e0 !important;
}

/* Container i main */
html[data-theme="dark"] .container,
html[data-theme="dark"] .container-fluid,
html:not([data-theme]) .container,
html:not([data-theme]) .container-fluid {
    color: #e0e0e0;
}

/* Sekcija oko forme */
html[data-theme="dark"] .row,
html:not([data-theme]) .row {
    color: #e0e0e0;
}

/* ============================================
   IDENTITY DUGMAD
   ============================================ */

/* Primarno dugme (Login, Register) */
html[data-theme="dark"] .btn-primary,
html:not([data-theme]) .btn-primary {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
    font-weight: 600;
}

    html[data-theme="dark"] .btn-primary:hover,
    html:not([data-theme]) .btn-primary:hover {
        background-color: #e0a800 !important;
        border-color: #e0a800 !important;
        color: #000 !important;
    }

/* Sekundarno dugme */
html[data-theme="dark"] .btn-secondary,
html:not([data-theme]) .btn-secondary {
    background-color: #444 !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

/* Link dugmad */
html[data-theme="dark"] .btn-link,
html:not([data-theme]) .btn-link {
    color: #ffc107 !important;
}

    html[data-theme="dark"] .btn-link:hover,
    html:not([data-theme]) .btn-link:hover {
        color: #ffdb4d !important;
    }

/* ============================================
   IDENTITY - LINKOVI I TEKST
   ============================================ */

html[data-theme="dark"] h1, html[data-theme="dark"] h2,
html[data-theme="dark"] h3, html[data-theme="dark"] h4,
html[data-theme="dark"] h5, html[data-theme="dark"] h6,
html:not([data-theme]) h1, html:not([data-theme]) h2,
html:not([data-theme]) h3, html:not([data-theme]) h4,
html:not([data-theme]) h5, html:not([data-theme]) h6 {
    color: #e0e0e0 !important;
}

html[data-theme="dark"] p,
html:not([data-theme]) p {
    color: #d0d0d0;
}

html[data-theme="dark"] hr,
html:not([data-theme]) hr {
    border-color: #444 !important;
}

/* ============================================
   AUTOFILL - uklanja bijelu pozadinu iz Chroma
   ============================================ */

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus,
html[data-theme="dark"] input:-webkit-autofill:active,
html:not([data-theme]) input:-webkit-autofill,
html:not([data-theme]) input:-webkit-autofill:hover,
html:not([data-theme]) input:-webkit-autofill:focus,
html:not([data-theme]) input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #2a2a2a inset !important;
    -webkit-text-fill-color: #e0e0e0 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ============================================
   HERO SEKCIJA
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 12px;
    padding: 60px 20px;
}

.hero-logo {
    max-height: 100px;
    width: auto;
}

.hero-section h1 {
    font-size: 3rem;
    letter-spacing: 4px;
}

/* ============================================
   KARTICE
   ============================================ */
.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* ============================================
   SEARCH INPUT
   ============================================ */
.input-group .form-control {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
}

    .input-group .form-control:focus {
        background-color: #2a2a2a;
        color: #ffffff;
        border-color: #ffc107;
        box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
    }

/* ============================================
   KARTICE KNJIGA
   ============================================ */
.book-card {
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

    .book-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
        border-color: #ffc107 !important;
    }

.book-cover-link {
    display: block;
    overflow: hidden;
}

.book-cover {
    width: 100%;
    height: 280px;
    object-fit: contain; /* Prikazuje cijelu sliku bez rezanja */
    background-color: #1a1a1a; /* Tamna pozadina oko slike */
    padding: 5px; /* Mali odmak da slika ne dodiruje rubove */
    transition: transform 0.3s;
}

@media (max-width: 576px) {
    .book-cover {
        height: 220px;
    }
}

.book-card:hover .book-cover {
    transform: scale(1.05);
}

.book-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.book-author {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #666;
}

/* ============================================
   RESPONSIVE KARTICE
   ============================================ */
@media (max-width: 576px) {
    .book-cover {
        height: 220px;
    }

    .book-title {
        font-size: 0.85rem;
    }

    /* ============================================
   ALERT DARK (za poruke bez rezultata)
   ============================================ */
    .alert-dark {
        background-color: #1a1a1a !important;
        border-color: #ffc107 !important;
        color: #e0e0e0 !important;
    }

    /* ============================================
   NO RESULTS BOX (Prisilno tamno zbog browser dark modea)
   ============================================ */
    .no-results-box {
        background-color: #1a1a1a !important;
        border: 2px solid #ffc107 !important;
        border-radius: 8px !important;
        color: #e0e0e0 !important;
        padding: 40px 20px !important;
    }

        .no-results-box h4,
        .no-results-box p {
            color: #e0e0e0 !important;
        }
}

/* ============================================
   DARK MODE FIX ZA BOOTSTRAP ALERTE
   ============================================ */
.alert-success {
    background-color: #0f5132 !important;
    color: #d1e7dd !important;
    border-color: #198754 !important;
}

.alert-danger {
    background-color: #842029 !important;
    color: #f8d7da !important;
    border-color: #dc3545 !important;
}

.alert-warning {
    background-color: #664d03 !important;
    color: #fff3cd !important;
    border-color: #ffc107 !important;
}

.alert-info {
    background-color: #055160 !important;
    color: #cff4fc !important;
    border-color: #0dcaf0 !important;
}

.alert-dark {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}

.alert-secondary {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

/* Fix za text-muted unutar alerta i kartica */
.alert .text-muted {
    color: #aaa !important;
}

/* ============================================
   WYSIWYG SADRŽAJ (VIJESTI) - RESPONZIVNOST
   ============================================ */
.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.news-content table {
    width: 100%;
    margin-bottom: 1rem;
    color: #e0e0e0;
    border-collapse: collapse;
}

    .news-content table th, .news-content table td {
        padding: 0.75rem;
        border: 1px solid #444;
    }

.news-content a {
    color: #ffc107;
    text-decoration: underline;
}

.news-content blockquote {
    border-left: 4px solid #ffc107;
    padding-left: 15px;
    color: #aaa;
    font-style: italic;
}

.news-card:hover {
    border-color: #ffc107 !important;
    transition: border-color 0.2s ease-in-out;
}

/* ============================================
   UJEDNA?ENI GUMBI U HERO SEKCIJI
   ============================================ */
.hero-btn {
    min-width: 220px; /* Sva tri ?e biti iste širine */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-width: 2px;
    border-radius: 50px; /* Zaobljeni rubovi (pill shape) */
    transition: all 0.3s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Razmak izme?u ikone i teksta */
}

    /* Isti hover efekt za sva tri gumba */
    .hero-btn:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
        background-color: #ffc107 !important;
        color: #000 !important;
        border-color: #ffc107 !important;
    }