/* ================================================================
   block_jaunumi – Styles
   ================================================================ */

/* ---------- Slider wrapper ---------- */
.block-jaunumi-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.jaunumi-slider {
    position: relative;
    overflow: hidden;
}

/* Track holds all slides side-by-side */
.jaunumi-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* Each slide takes 1/3 of the container = 3 per view */
.jaunumi-slide {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding: 0 10px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .jaunumi-slide {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .jaunumi-slide {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ---------- Card ---------- */
.jaunumi-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
    display: flex;
    flex-direction: column;
    height: 100%;
    border-top: 4px solid #8a181a;
    transition: box-shadow .2s, transform .2s;
}

.jaunumi-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,.16);
    transform: translateY(-2px);
}

.jaunumi-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.jaunumi-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.jaunumi-date {
    font-size: 0.78rem;
    color: #888;
    margin-bottom: 6px;
}

.jaunumi-title {
    font-size: 1rem;
    margin: 0 0 8px;
    line-height: 1.4;
}

.jaunumi-title a {
    color: #8a181a;
    text-decoration: none;
}

.jaunumi-title a:hover {
    text-decoration: underline;
}

.jaunumi-excerpt {
    font-size: 0.87rem;
    color: #555;
    margin-bottom: 12px;
    flex: 1;
}

.jaunumi-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
}

.jaunumi-readmore {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff !important;
    background-color: #8a181a;
    text-decoration: none !important;
    line-height: 1;
    transition: opacity .2s, transform .15s;
    border: none;
    white-space: nowrap;
}

.jaunumi-readmore:hover,
.jaunumi-readmore:focus {
    color: #fff !important;
    opacity: 0.88;
    transform: translateY(-1px);
    text-decoration: none !important;
}

/* ---------- Nav bar (arrows + dots) ---------- */
.jaunumi-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 0 4px;
}

.jaunumi-prev,
.jaunumi-next {
    flex-shrink: 0;
    background: none;
    color: #444;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s, color .2s;
    line-height: 1;
    padding: 0;
}

.jaunumi-prev:hover,
.jaunumi-next:hover {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

/* ---------- Dots ---------- */
.jaunumi-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jaunumi-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.jaunumi-dot.active {
    background: #0066cc;
    transform: scale(1.3);
}

/* ---------- No news ---------- */
.jaunumi-nonews {
    text-align: center;
    color: #888;
    font-size: 0.95rem;
    padding: 2rem 1rem;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin: 1rem 0;
}

/* ================================================================
   Single news view
   ================================================================ */

/* Hero banner */
.jaunumi-view-hero {
    min-height: 200px;
    background: linear-gradient(135deg, #6b1214 0%, #a81e21 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: stretch;
}

.jaunumi-view-hero-overlay {
    flex: 1;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.18) 0%,
        rgba(0,0,0,0.62) 100%
    );
    display: flex;
    align-items: flex-end;
    padding-bottom: 2rem;
}

.jaunumi-view-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jaunumi-view-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    transition: color .2s;
}

.jaunumi-view-back:hover {
    color: #fff !important;
}

.jaunumi-view-title {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.25;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.jaunumi-view-date {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.80);
}

/* Article card */
.jaunumi-view-article {
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .jaunumi-view-article {
        padding: 1.25rem 1rem;
    }
}

.jaunumi-view-body {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: #333;
}

/* ---------- Gallery grid ---------- */
.jaunumi-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.jaunumi-gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 1;
}

.jaunumi-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
    display: block;
}

.jaunumi-gallery-item:hover img {
    transform: scale(1.05);
}

/* ================================================================
   Lightbox
   ================================================================ */
#jaunumi-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#jaunumi-lightbox-overlay.active {
    display: flex;
}

.jlb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.82);
}

.jlb-dialog {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jlb-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.jlb-img {
    max-width: 85vw;
    max-height: 80vh;
    border-radius: 4px;
    object-fit: contain;
    box-shadow: 0 4px 24px rgba(0,0,0,.6);
}

.jlb-caption {
    color: #ddd;
    margin-top: 8px;
    font-size: .85rem;
    text-align: center;
}

.jlb-close,
.jlb-prev,
.jlb-next {
    position: absolute;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 2;
}

.jlb-close:hover,
.jlb-prev:hover,
.jlb-next:hover {
    background: rgba(255,255,255,.30);
}

.jlb-close { top: -50px; right: 0; }
.jlb-prev  { left: -50px; top: 50%; transform: translateY(-50%); }
.jlb-next  { right: -50px; top: 50%; transform: translateY(-50%); }

/* ================================================================
   Social share buttons
   ================================================================ */

/* Full-size (on view page) */
.jaunumi-share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 2rem 0 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e5e5;
}

.jaunumi-share-label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
    margin-right: 4px;
}

.jaunumi-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
    line-height: 1;
    transition: opacity .2s, transform .15s;
    border: none;
    cursor: pointer;
}

.jaunumi-share-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.jaunumi-share-facebook {
    background-color: #1877F2;
}

.jaunumi-share-x {
    background-color: #000;
}

.jaunumi-share-threads {
    background-color: #101010;
}

/* Small variant (on slider cards) */
.jaunumi-card-share {
    display: flex;
    gap: 6px;
}

.jaunumi-share-sm {
    padding: 5px 10px;
    font-size: 0.75rem;
    border-radius: 3px;
}

/* ---------- Manage link (admin only, block footer) ---------- */
.jaunumi-manage-link {
    display: inline-block;
    font-size: 0.8rem;
    color: #666;
    text-decoration: none;
    padding: 4px 0;
    opacity: 0.7;
    transition: opacity .2s;
}

.jaunumi-manage-link:hover {
    opacity: 1;
    color: #0066cc;
    text-decoration: none;
}

/* ---------- Embed body ---------- */
.jaunumi-embed-body {
    margin: 0;
    padding: 10px;
    background: transparent;
    font-family: "Roboto", sans-serif;
}
