/* Dokumenty Elementor Widget Styles */

.dokumenty-widget-wrapper {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #fff;
    width: 100%;
}

.dokumenty-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.category {
    margin-bottom: 2rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.category-header:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(237, 0, 83, 0.5);
    box-shadow: 0 5px 15px rgba(237, 0, 83, 0.15);
}

.category-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ED0053;
    margin: 0;
    transition: all 0.3s ease;
}

.category-header:hover .category-title {
    transform: translateX(5px);
}

.accordion-icon {
    font-size: 1.5rem;
    color: #ED0053;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: inline-block;
    line-height: 1;
}

.accordion-icon.active {
    transform: rotate(180deg);
}

.documents-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.documents-wrapper.active {
    grid-template-rows: 1fr;
}

.documents-list {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease, padding 0.4s ease;
}

.documents-wrapper.active .documents-list {
    padding: 1.5rem 0 0 0;
    opacity: 1;
    transform: translateY(0);
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    gap: 1.5rem;
    cursor: pointer;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.5s ease forwards;
}

.documents-wrapper.active .document-item {
    animation: slideIn 0.5s ease forwards;
}

.document-item:nth-child(1) { animation-delay: 0.1s; }
.document-item:nth-child(2) { animation-delay: 0.15s; }
.document-item:nth-child(3) { animation-delay: 0.2s; }
.document-item:nth-child(4) { animation-delay: 0.25s; }
.document-item:nth-child(5) { animation-delay: 0.3s; }
.document-item:nth-child(6) { animation-delay: 0.35s; }
.document-item:nth-child(7) { animation-delay: 0.4s; }
.document-item:nth-child(8) { animation-delay: 0.45s; }
.document-item:nth-child(9) { animation-delay: 0.5s; }
.document-item:nth-child(10) { animation-delay: 0.55s; }
.document-item:nth-child(11) { animation-delay: 0.6s; }
.document-item:nth-child(12) { animation-delay: 0.65s; }
.document-item:nth-child(13) { animation-delay: 0.7s; }
.document-item:nth-child(14) { animation-delay: 0.75s; }
.document-item:nth-child(15) { animation-delay: 0.8s; }
.document-item:nth-child(16) { animation-delay: 0.85s; }
.document-item:nth-child(17) { animation-delay: 0.9s; }
.document-item:nth-child(18) { animation-delay: 0.95s; }
.document-item:nth-child(19) { animation-delay: 1s; }
.document-item:nth-child(20) { animation-delay: 1.05s; }
.document-item:nth-child(21) { animation-delay: 1.1s; }
.document-item:nth-child(22) { animation-delay: 1.15s; }
.document-item:nth-child(n+23) { animation-delay: 1.2s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.document-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(237, 0, 83, 0.5);
    transform: translateX(5px) scale(1.01);
    box-shadow: 0 5px 20px rgba(237, 0, 83, 0.2);
    color: #fff;
}

.document-item:visited {
    color: rgba(255, 255, 255, 0.9);
}

.document-item:visited:hover {
    color: #fff;
}

.document-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.download-icon {
    width: 40px;
    height: 40px;
    background: rgba(237, 0, 83, 0.2);
    border: 1px solid #ED0053;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
    color: #ED0053;
}

.document-item:hover .download-icon {
    background: rgba(237, 0, 83, 0.4);
    transform: translateY(2px) rotate(5deg);
    color: #fff;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .dokumenty-container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .category-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .category-title {
        font-size: 1.25rem;
    }

    .category-header {
        padding: 1rem 1.25rem;
    }

    .document-item {
        padding: 1rem;
        gap: 1rem;
    }

    .document-text {
        font-size: 0.9rem;
    }

    .download-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .accordion-icon {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .dokumenty-container {
        padding: 0 10px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .category-title {
        font-size: 1.1rem;
    }

    .category-header {
        padding: 0.875rem 1rem;
    }

    .document-item {
        padding: 0.875rem;
        gap: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .document-text {
        font-size: 0.85rem;
        width: 100%;
    }

    .download-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        align-self: flex-end;
    }

    .documents-list {
        gap: 0.5rem;
    }
}

/* Elementor Editor Styles */
.elementor-editor-active .documents-wrapper,
.elementor-editor-active .documents-wrapper.active {
    grid-template-rows: 1fr;
}

.elementor-editor-active .documents-list,
.elementor-editor-active .documents-wrapper.active .documents-list {
    padding: 1.5rem 0 0 0;
    opacity: 1;
    transform: translateY(0);
}

.elementor-editor-active .document-item {
    opacity: 1;
    transform: translateX(0);
    animation: none;
}

.elementor-editor-active .accordion-icon {
    transform: rotate(180deg);
}

/* Ensure accordion works in editor preview */
.elementor-editor-active .category-header {
    cursor: pointer;
}

