/* Jaunumu saraksta un detalas lapas stili. */

/* ===== JAUNUMU LAPA ===== */
.jaunumi-page {
    padding: 40px 0;
    background-color: #f8f9fa;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #520505;
    margin-bottom: 2rem;
    text-align: left;
    border-bottom: 3px solid #ffcc00;
    padding-bottom: 10px;
    display: inline-block;
}

/* ===== JAUNUMU IZVĒLŅU KONTEINERS ===== */
#jaunumi-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

/* ===== ATSEVIŠĶA IZVELNE ===== */
.jaunuma-izvelne {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(82,5,5,0.05);
    border: 1px solid rgba(82,5,5,0.1);
    overflow: hidden;
}

.jaunuma-izvelne:hover {
    box-shadow: 0 5px 15px rgba(82,5,5,0.1);
}

/* ===== IZVELNES GALVENE ===== */
.jaunuma-izvelne-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    cursor: pointer;
}

.jaunuma-izvelne-header:hover {
    background: rgba(82,5,5,0.02);
}

/* ===== ATTĒLA KONTEINERS AR HOVER EFEKTU ===== */
.jaunuma-izvelne-attels {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jaunuma-izvelne-attels:hover {
    opacity: 0.8;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(82,5,5,0.3);
}

.jaunuma-izvelne-attels img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.jaunuma-izvelne-attels:hover img {
    filter: brightness(0.85);
}

.jaunuma-izvelne-attels-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(82,5,5,0.1);
    color: #520505;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.jaunuma-izvelne-attels-fallback:hover {
    background: rgba(82,5,5,0.2);
    color: #7a0f0f;
}

/* ===== INFORMĀCIJAS DAĻA ===== */
.jaunuma-izvelne-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.jaunuma-izvelne-virsraksts {
    font-size: 1.2rem;
    font-weight: 600;
    color: #520505;
    margin-bottom: 5px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.jaunuma-izvelne-datums {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.jaunuma-izvelne-datums i {
    color: #ffcc00;
    font-size: 0.8rem;
}

/* ===== BULTIŅA ===== */
.jaunuma-izvelne-arrow {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #520505;
}

.jaunuma-izvelne-arrow i {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.jaunuma-izvelne.active .jaunuma-izvelne-arrow i {
    transform: rotate(180deg);
}

/* ===== IZVĒRSTAIS SATURS ===== */
.jaunuma-izvelne-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f9f9f9;
    border-top: 0 solid rgba(82,5,5,0.05);
}

.jaunuma-izvelne.active .jaunuma-izvelne-content {
    max-height: 2000px;
    border-top-width: 1px;
}

/* ===== APRAKSTS ===== */
.jaunuma-izvelne-apraksts {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    padding: 20px;
    margin: 0;
}

.jaunuma-izvelne-apraksts p {
    margin-bottom: 1rem;
}

/* ===== REDZĒT VAIRĀK POGA ===== */
.redzet-vairak-container {
    text-align: center;
    margin-top: 20px;
}

.redzet-vairak-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #520505;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(82,5,5,0.15);
}

.redzet-vairak-btn:hover {
    background: #7a0f0f;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(82,5,5,0.25);
}

.redzet-vairak-btn:hover i {
    transform: translateY(3px);
}

.redzet-vairak-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== ATTĒLU LIGHTBOX ===== */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    cursor: pointer;
    background: rgba(82,5,5,0.6);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10000;
    border: 2px solid rgba(255,255,255,0.2);
    font-size: 28px;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
}

.lightbox-close:hover {
    background: #7a0f0f;
    transform: scale(1.1);
    border-color: white;
}

.lightbox-close::before {
    content: "×";
    display: block;
    line-height: 1;
    margin-top: -1px;
}

.zoom-controls {
    position: fixed;
    bottom: 100px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10002;
    background: rgba(82,5,5,0.8);
    padding: 8px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    color: #520505;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background: #ffcc00;
    transform: scale(1.1);
}

/* ===== MOBILĀ VERSIJA ===== */
@media (max-width: 768px) {
    .jaunumi-page { padding: 30px 0; }
    .jaunuma-izvelne-header { padding: 15px; gap: 15px; }
    .jaunuma-izvelne-attels { width: 60px; height: 60px; }
    .jaunuma-izvelne-virsraksts { font-size: 1.1rem; }
    .jaunuma-izvelne-datums { font-size: 0.8rem; }
    .redzet-vairak-btn { padding: 10px 25px; font-size: 0.95rem; }

    .zoom-controls {
        bottom: 80px;
        right: 15px;
        gap: 8px;
        padding: 6px;
    }

    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .jaunuma-izvelne {
        position: relative;
    }
    
    .jaunuma-izvelne-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 0;
    }
    
    .jaunuma-izvelne-attels {
        width: 100%;
        height: 150px;
        border-radius: 12px 12px 0 0;
    }
    
    .jaunuma-izvelne-info {
        width: 100%;
        padding: 20px 20px 50px 20px;
    }
    
    .jaunuma-izvelne-arrow {
        position: absolute;
        bottom: 15px;
        right: 20px;
        top: auto;
        z-index: 10;
        background: rgba(82,5,5,0.1);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .jaunuma-izvelne-arrow i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .jaunumi-page { padding: 20px 0; }
    .container { padding: 0 15px; }
    .section-title { font-size: 1.5rem; margin-bottom: 1.5rem; padding-bottom: 8px; }
    .jaunuma-izvelne-apraksts { padding: 15px; }
    .redzet-vairak-btn { width: 100%; padding: 12px 20px; }
    
    .jaunuma-izvelne-info {
        padding: 15px 15px 45px 15px;
    }
    
    .jaunuma-izvelne-arrow {
        bottom: 10px;
        right: 15px;
        width: 32px;
        height: 32px;
    }
}