/* --- MODELE Z DYNAMICZNYMI KOLORAMI --- */

.ca-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.ca-model-card-first,
.ca-model-card-second {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dynamiczne cienie nawiązujące do neonów maszyny */
.ca-model-card-first {
    box-shadow: 0 8px 25px rgba(0, 255, 128, 0.25), 
                0 3px 6px rgba(0, 0, 0, 0.08);
}

.ca-model-card-second {
    box-shadow: 0 8px 25px rgba(230, 0, 126, 0.25), 
                0 3px 6px rgba(0, 0, 0, 0.08);
}

.ca-model-img-placeholder {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;

    background: 
    #ffffffcb;  /* czarne tło */
}

.ca-model-img-placeholder img {
    width: 50%;
    height: auto;
    display: block;
    margin: 20px auto;
    transition: transform 0.3s ease;
}

.ca-model-img-placeholder:hover img {
    transform: scale(1.05);
}

/* KLUCZOWA ZMIANA: Animowane tła paneli dolnych */
.ca-model-content-first,
.ca-model-content-second {
    padding: 20px;
    flex-grow: 1;
    background-size: 300% 300% !important;
    animation: flowGradient 8s ease infinite;
    color: #ffffff; 
    font-size: 1.5rem;
    font-weight: bold;
}

@keyframes flowGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Model A - Dynamiczna Zieleń (Compact) */
.ca-model-content-first {
    background: linear-gradient(-45deg, #00c96b, #68ff68, #00f2fe, #00a85a);
}

/* Model B - Dynamiczny Róż/Fiolet (Pro) */
.ca-model-content-second {
    background: linear-gradient(-45deg, #e45cc2, #f08fe0, #9d00ff, #d030a8);
}

.ca-model-content-first h3,
.ca-model-content-second h3 {
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    color: white;
    font: bold;
    font-size: 2rem;
}

.ca-info-box {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    color: #000000;
    font-size: 1.5rem
}

/* Modal dla powiększonego obrazu */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.image-modal-close:hover {
    color: #00c96b;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .ca-model-img-placeholder img {
        width: 70%;
    }
}