/* Frontend Custom Styles */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.famfamfam-flags {
	display: inline-block;
}

/* Card hover effects */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Article content */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Meta info */
.article-meta {
    color: #7d6c6c;
    font-size: 0.9rem;
}

.article-meta i {
    margin-right: 0.25rem;
}

.cd-top {
	display: inline-block;
	height: 45px;
	width: 45px;
	position: fixed;
	bottom: 100px;
	right: 20px;
	box-shadow: 0 0 10px rgba(51, 51, 51, 0.1);
	overflow: hidden;
	text-indent: 100%;
	white-space: nowrap;
	background: rgba(51, 51, 51, 0.7) url(/assets/images/cd-top-arrow.svg) no-repeat center 50%;
	visibility: hidden;
	opacity: 0;
	-webkit-transition: opacity .3s 0s, visibility 0s .3s;
	-moz-transition: opacity .3s 0s, visibility 0s .3s;
	transition: opacity .3s 0s, visibility 0s .3s;
	z-index: 70000;
	border-radius: 5px;
}

.cd-top.cd-is-visible,
.cd-top.cd-fade-out,
.no-touch .cd-top:hover {
	-webkit-transition: opacity .3s 0s, visibility 0s 0s;
	-moz-transition: opacity .3s 0s, visibility 0s 0s;
	transition: opacity .3s 0s, visibility 0s 0s
}

.cd-top.cd-is-visible {
	visibility: visible;
	opacity: 1
}

.cd-top.cd-fade-out {
	opacity: .5
}

.cd-top:hover {
	background-color: rgba(51, 51, 51, 1);
	opacity: 1
}

/* ── Article figure (TinyMCE content images) ─────────────── */
.article-content .article-figure {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 1.5rem 0;
}

.article-content .article-figure img {
    display: block;
    max-width: 100%;
    border-radius: 0.375rem;
}

/* Alt overlay — prikazuje se na hover */
.img-alt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.375rem 0.375rem 0 0;
    transition: opacity 0.25s ease;
}

/* Caption ispod slike */
.img-caption {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    padding: 0.35rem 0.5rem 0;
    font-style: italic;
}

/* Gallery figure */
.gallery-figure {
    margin: 0;
}


/* Share buttons hover effects */
.article-share .btn {
    transition: all 0.3s ease;
    border: 2px solid;
}

.article-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.article-share .btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.article-share .btn-outline-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: white;
}

.article-share .btn-outline-success:hover {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.article-share .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.article-share .btn-outline-dark:hover {
    background-color: #212529;
    border-color: #212529;
    color: white;
}

/* Viber specific hover */
.article-share .btn[style*="7360F2"]:hover {
    background-color: #5a47cc !important;
    border-color: #5a47cc !important;
    color: white !important;
}

#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd, #6610f2);
    z-index: 9999;
    transition: width 0.1s ease;
    border-radius: 0 2px 2px 0;
}

/* ===== LISTING ARCHIVE ===== */
.listing-alpha-nav {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 14px;
}

.listing-alpha-btn {
    min-width: 36px;
    font-weight: 600;
    letter-spacing: .02em;
}

.listing-alpha-btn:hover {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

.listing-letter-section {
    scroll-margin-top: 80px; /* visina sticky headera ako ga imaš */
}

.listing-letter {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-primary);
    border-left: 4px solid var(--bs-primary);
    padding-left: 12px;
    line-height: 1;
}

.listing-letter-heading {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.listing-card__img {
    height: 200px;
    object-fit: cover;
}