/**
 * Certifikaty Plugin Styles
 */

.certifikaty-container {
    width: 100%;
}

.certifikaty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.cert-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cert-card {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #ED0053;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.cert-card:hover {
    box-shadow: 0 8px 30px rgba(237, 0, 83, 0.4);
    border-color: #ED0053;
}

/* Black overlay on hover */
.cert-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.cert-card:hover::after {
    opacity: 1;
}

/* Plus icon styling */
.plus-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    pointer-events: none;
    font-weight: 300;
}

.cert-card:hover .plus-icon {
    opacity: 1;
}

.pdf-preview {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    background: white;
    transform-origin: top left;
}

/* Scale PDF to fill container - similar to object-fit: cover */
.pdf-preview-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: white;
}

.pdf-preview-wrapper .pdf-preview {
    width: 100%;
    height: 100%;
    transform: scale(150%);
    transform-origin: top left;
}

/* Image showcase styles */
.image-preview-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cert-showcase-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pdf-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    position: relative;
}

.pdf-placeholder img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.pdf-icon {
    font-size: 4rem;
    color: #ED0053;
    margin-bottom: 1rem;
}

.cert-label {
    text-align: center;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.pdf-tag {
    color: #ED0053;
    font-weight: 600;
    font-size: 0.85rem;
    margin-left: 0.3rem;
}

.cert-link {
    text-decoration: none;
    display: block;
    width: 100%;
}

/* Loading indicator for PDFs */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(237, 0, 83, 0.1);
    border-top-color: #ED0053;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .certifikaty-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .certifikaty-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

