/* Article-specific styles */
.article {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-light);
    margin: 2rem auto;
    transition: all 0.3s ease;
}

.image_container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
    transition: border-color 0.3s ease;
}

.datum {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-gold);
    transition: color 0.3s ease;
}

.author {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* Article text content */
.article p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.article h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
    transition: color 0.3s ease;
}

.article h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem 0;
    transition: color 0.3s ease;
}

/* Swiper styles */
.swiperbox {
    margin: 2rem 0;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px var(--shadow-light);
    transition: all 0.3s ease;
}

.swiper {
    width: 100%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
}

.swiper-slide {
    text-align: center;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: background-color 0.3s ease;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    cursor: zoom-in;
    border-radius: 4px;
}

.img-enlargeable:hover {
    opacity: 0.9;
}

.numbertext {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
}

.text {
    padding: 1rem;
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    background-color: var(--bg-tertiary);
    width: 100%;
    transition: all 0.3s ease;
}

.swiper-pagination {
    position: relative !important;
    margin-top: 1rem;
}

.swiper-pagination-bullet {
    background: var(--accent-gold) !important;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1 !important;
}

.swiper-button-next, .swiper-button-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7) !important;
    color: white !important;
    border: none;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    cursor: pointer;
    font-size: 18px !important;
    z-index: 10;
    transition: all 0.3s ease;
    margin-top: 0 !important;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: var(--accent-gold) !important;
}

.swiper-button-next {
    right: 10px;
}

.swiper-button-prev {
    left: 10px;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 16px !important;
    font-weight: bold;
}

/* Video/Map wrapper */
.videoWrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin: 2rem 0;
}

.videoWrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Popup styles */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.popup.active {
    visibility: visible;
    opacity: 1;
}

.popup .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.popup .content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 8px 32px var(--shadow-medium);
    text-align: center;
    min-width: 300px;
    transition: background-color 0.3s ease;
}

.popup .content p {
    color: var(--text-primary) !important;
    font-size: 18px;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.popup .content button {
    margin: 0 0.5rem;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.delete2 {
    background-color: #dc3545 !important;
    color: white !important;
}

.delete2:hover {
    background-color: #c82333 !important;
}

.close {
    background-color: var(--text-muted) !important;
    color: white !important;
}

.close:hover {
    background-color: var(--text-secondary) !important;
}

/* Admin buttons */
.end_buttons {
    padding: 1.5rem 2rem;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    text-align: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.delete_text {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    background-color: #dc3545;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-light);
}

.delete_text:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

/* Responsive design for article */
@media (max-width: 768px) {
    .article {
        margin: 1rem 0.5rem;
        padding: 1.5rem 1rem;
        box-shadow: 0 2px 8px var(--shadow-light);
    }

    .image_container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.5rem 0;
        margin-bottom: 1.5rem;
    }

    .datum, .author {
        font-size: 14px;
    }

    .article p {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 1.2rem;
    }

    .article h2 {
        font-size: 1.5rem;
        margin: 1.5rem 0 0.8rem 0;
    }

    .article h3 {
        font-size: 1.2rem;
        margin: 1.2rem 0 0.6rem 0;
    }

    .swiperbox {
        margin: 1.5rem 0;
        padding: 0.8rem;
    }

    .swiper-slide img {
        max-height: 300px;
    }

    .text {
        padding: 0.8rem;
        font-size: 13px;
    }

    .numbertext {
        top: 8px;
        right: 10px;
        padding: 3px 8px;
        font-size: 12px;
    }

    .swiper-button-next, .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
        right: 8px;
    }

    .swiper-button-prev {
        left: 8px;
    }

    .swiper-button-next:after, .swiper-button-prev:after {
        font-size: 14px !important;
    }

    .end_buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        padding: 1rem;
    }

    .delete_text {
        width: 100%;
        max-width: 280px;
        padding: 14px 20px;
        font-size: 15px;
    }

    /* Mobile popup improvements */
    .popup .content {
        margin: 1rem;
        padding: 1.5rem;
        min-width: auto;
        max-width: calc(100vw - 2rem);
    }

    .popup .content p {
        font-size: 16px !important;
        margin-bottom: 1.5rem;
    }

    .popup .content button {
        padding: 12px 20px;
        font-size: 15px;
        margin: 0.3rem;
        width: 120px;
    }
}

@media (max-width: 480px) {
    .article {
        margin: 0.5rem 0.25rem;
        padding: 1rem 0.8rem;
        border-radius: 6px;
    }

    .article p {
        font-size: 14px;
        line-height: 1.5;
    }

    .article h2 {
        font-size: 1.3rem;
    }

    .article h3 {
        font-size: 1.1rem;
    }

    .swiperbox {
        margin: 1rem 0;
        padding: 0.6rem;
        border-radius: 6px;
    }

    .swiper-slide img {
        max-height: 250px;
        border-radius: 3px;
    }

    .text {
        padding: 0.6rem;
        font-size: 12px;
    }

    .swiper-button-next, .swiper-button-prev {
        width: 30px !important;
        height: 30px !important;
    }

    .swiper-button-next:after, .swiper-button-prev:after {
        font-size: 12px !important;
    }

    .end_buttons {
        padding: 0.8rem 0.5rem;
        gap: 0.6rem;
    }

    .delete_text {
        max-width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Extra small screen popup */
    .popup .content {
        margin: 0.5rem;
        padding: 1rem;
    }

    .popup .content p {
        font-size: 14px !important;
        margin-bottom: 1rem;
    }

    .popup .content button {
        padding: 10px 16px;
        font-size: 14px;
        width: 100px;
        margin: 0.2rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .swiperbox {
        margin: 1rem 0;
    }

    .swiper-slide img {
        max-height: 200px;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .delete_text {
        padding: 16px 24px;
        font-size: 16px;
        min-height: 48px;
    }

    .swiper-button-next, .swiper-button-prev {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px;
        min-height: 44px;
    }

    .popup .content button {
        min-height: 44px;
        padding: 12px 20px;
    }
}
