body {
    background-image: url('../../materials/bg3.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.header {
    background: linear-gradient(90deg, rgba(139, 69, 19, 1) 0%, rgba(218, 121, 42, 1) 100%);
}

.links {
    background: rgba(255, 229, 182, 0.9);
}

.cards {
    background: rgba(255, 229, 182, 0.9);
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 25px;
    text-align: center;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cards-list {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.card-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 380px;
}

.card-item {
    font-family: Arial, sans-serif;
    font-weight: 100;
    width: 100%;
    height: 320px;
    border-radius: 25px;
    background-color: rgba(255, 235, 198, 0.9);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-position: center left -20px !important;
    cursor: pointer;
}

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

.card-item a {
    color: black;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: space-between;
    width: 100%;
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.1) 80%, rgba(0, 0, 0, 0) 100%);
    color: white;
    padding: 12px 10px 8px 10px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    transition: all 0.3s ease;
    min-height: 35px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    max-width: 95%;
    max-height: 85vh;
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.15);
    animation: zoomIn 0.25s ease;
    object-fit: contain;
}

#modalCaption {
    margin-top: 15px;
    color: white;
    font-size: 18px;
    text-align: center;
    font-weight: bold;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 42px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #ccc;
    transform: scale(1.1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .cards-list {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .card-column {
        max-width: 100%;
        gap: 12px;
    }

    .card-item {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .card-item {
        height: 250px;
    }

    .caption {
        font-size: 14px;
        padding: 10px 8px 6px 8px;
        min-height: 30px;
    }

    .modal-content {
        max-width: 98%;
        max-height: 75vh;
    }

    #modalCaption {
        font-size: 16px;
    }

    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 36px;
    }
}