﻿.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .modal.show {
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
    }

.modal-content {
    background-color: white;
    margin: 20px;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

    .modal-close:hover {
        color: #333;
    }

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.modal .carousel-images {
    height: 400px;
}

.modal .carousel-prev,
.modal .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 10;
    font-size: 20px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal .carousel-prev {
    left: 15px;
}

.modal .carousel-next {
    right: 15px;
}

    .modal .carousel-prev:hover,
    .modal .carousel-next:hover {
        background-color: rgba(0, 0, 0, 0.7);
    }

@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        padding: 15px;
        width: 95%;
        max-height: 95vh;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }

    .modal-image {
        max-height: 250px;
    }

    .modal .carousel-images {
        height: 250px;
    }

    .modal .carousel-prev,
    .modal .carousel-next {
        padding: 8px;
        font-size: 16px;
        width: 35px;
        height: 35px;
    }
}

.carousel-images {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    object-fit: contain;
}

    .carousel-image.active {
        opacity: 1;
    }

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 10;
    font-size: 20px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

    .carousel-prev:hover, .carousel-next:hover {
        background-color: rgba(0, 0, 0, 0.7) !important;
    }

.indicator {
    transition: background-color 0.3s;
    cursor: pointer;
    border: none;
}

    .indicator:hover {
        background-color: #ef4444 !important;
    }

@media (max-width: 768px) {
    .carousel-images {
        height: 250px;
    }

    .carousel-prev, .carousel-next {
        padding: 8px;
        font-size: 16px;
        width: 35px;
        height: 35px;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }
}

.swiper-slide {
    display: flex;
}

#content-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 20px;
    overflow-x: visible;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    align-items: stretch;
}

    #content-container::-webkit-scrollbar {
        display: none;
    }

    #content-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    #content-container::-webkit-scrollbar-thumb {
        background: #ef4444;
        border-radius: 10px;
    }

        #content-container::-webkit-scrollbar-thumb:hover {
            background: #dc2626;
        }

.content-item {
    flex: 0 0 330px;
    min-height: 280px;
    max-height: 280px;
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .content-item .image-container {
        height: 250px;
        overflow: hidden;
        border-radius: 8px;
        background-color: white;
    }

        .content-item .image-container img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center;
        }

    .content-item .description {
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.3;
        max-height: 2.6em;
        font-size: 0.875rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .content-item .title {
        overflow: hidden;
        display: block;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.2;
        min-height: 2.4em;
        font-size: 0.95rem;
        font-weight: 600;
    }

@media (max-width: 1024px) {
    .content-item {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        flex: 0 0 260px;
        min-height: 260px;
        max-height: 260px;
    }

        .content-item .image-container {
            height: 100px;
        }
}

@@media (max-width: 480px) {
    #content-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #content-container {
        gap: 12px;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .content-item {
        flex: 0 0 240px;
        min-height: 240px;
        max-height: 240px;
    }

        .content-item .image-container {
            height: 90px;
        }

        .content-item .title {
            font-size: 0.875rem;
            min-height: 2.1em;
        }
}

#modal-body p {
    @apply break-words;
}

.news-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
    will-change: transform;
}


.ticker-wrapper {
    height: 40px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.ticker-content {
    position: absolute;
    display: inline-flex;
    gap: 40px;
    white-space: nowrap;
    animation: scroll-left 200s linear infinite;
}

@keyframes scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}