/**
 * Document Info List Widget Styles
 */


/* Container Styles */

.document-info-list-container {
    width: 100%;
    margin-bottom: 30px;
}


/* Year Section Styles */

.document-info-year-section {
    margin-bottom: 40px;
}

.document-info-year-section:last-child {
    margin-bottom: 0;
}


/* Year Title Styles */

.document-info-year-title {
    margin-bottom: 2rem;
    color: #333;
    position: relative;
    padding-bottom: 3.5rem;
}


/* .document-info-year-title.has-border {
    border-bottom: 1px solid #eeeeee;
} */


/* List Styles */

.document-info-list {
    display: grid;
    width: 100%;
}

.document-info-list.two-columns {
    grid-template-columns: 1fr 1fr;
    column-gap: 30px;
}

.document-info-list.one-column {
    grid-template-columns: 1fr;
}


/* Item Styles */

.document-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* Remove general item hover effect since download links handle their own hover */


/* .document-info-item:hover transform is now handled by individual elements */


/* Content Styles */

.document-info-content {
    flex: 1;
}


/* Header Styles */

.document-info-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}


/* Icon Styles */

.document-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    transition: background-color 0.3s ease;
}

.document-info-icon.with-bg {
    background-color: #f5f5f5;
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.document-info-icon i,
.document-info-icon svg {
    transition: transform 0.3s ease;
}


/* Legacy hover effects for items without download links */

.document-info-header:not(.document-info-download-link) .document-info-icon i,
.document-info-header:not(.document-info-download-link) .document-info-icon svg {
    transition: transform 0.3s ease;
}

.document-info-item:hover .document-info-header:not(.document-info-download-link) .document-info-icon i,
.document-info-item:hover .document-info-header:not(.document-info-download-link) .document-info-icon svg {
    transform: scale(1.1);
}


/* Document Title Styles */

.document-info-document-title {
    font-weight: 500;
    color: #333;
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.document-info-document-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}


/* Legacy hover underline effects for items without download links */

.document-info-item:hover .document-info-header:not(.document-info-download-link) .document-info-document-title::after {
    transform: scaleX(1);
}


/* Download Link Styles */

.document-info-download-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    padding: 8px;
    margin: -8px -8px 2px -8px;
}

.document-info-download-link:hover {
    background-color: rgba(0, 115, 170, 0.05);
    transform: translateY(-2px);
}

.document-info-download-link:hover .document-info-document-title {
    color: #0073aa;
}

.document-info-download-link:hover .document-info-icon {
    transform: scale(1.05);
}


/* Tooltip Implementation for Download Link */

.document-info-download-link::before {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 9999;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: normal;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}


/* Show tooltip on hover */

.document-info-download-link:hover::before {
    opacity: 1;
    visibility: visible;
}


/* Make tooltips visible in the editor for preview */

body.elementor-editor-active .document-info-download-link::before {
    opacity: 0.7 !important;
    visibility: visible !important;
}


/* Legacy Link Styles (for backward compatibility) */

.document-info-link-wrapper {
    margin-top: 10px;
    margin-left: 63px;
    /* Aligns with the icon + margin */
}

.document-info-link {
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    overflow: visible;
    padding-bottom: 2px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.document-info-link:hover {
    color: #00a0d2;
}


/* Link underline effect */

.document-info-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.document-info-link:hover::after {
    transform: scaleX(1);
}


/* Tooltip Implementation using ::before pseudo-element */

.document-info-link::before {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 9999;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: normal;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}


/* Show tooltip on hover */

.document-info-link:hover::before {
    opacity: 1;
    visibility: visible;
}


/* Show underline on hover */

.document-info-link:hover::after {
    transform: scaleX(1);
}


/* Hide any span tooltip elements (cleanup) */

.document-info-link .document-tooltip {
    display: none !important;
}


/* Make tooltips visible in the editor for preview */

body.elementor-editor-active .document-info-link::before {
    opacity: 0.7 !important;
    visibility: visible !important;
}


/* Animation Styles */

.document-info-list--animated .document-info-year-title,
.document-info-list--animated .document-info-item {
    opacity: 0;
}


/* Elementor Editor Fix - Make visible in editor */

body.elementor-editor-active .document-info-list--animated .document-info-year-title,
body.elementor-editor-active .document-info-list--animated .document-info-item {
    opacity: 1;
}


/* Responsive Styles - Handled in the template.php with dynamic breakpoints */

@media (max-width: 768px) {
    .document-info-list.two-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .document-info-item {
        flex-direction: column;
    }
    .document-info-link-wrapper {
        margin-left: 0;
    }
    /* Adjust download link padding on mobile */
    .document-info-download-link {
        padding: 12px;
        margin: -12px -12px 2px -12px;
    }
    /* Improve tooltip positioning on mobile */
    .document-info-download-link::before {
        bottom: calc(100% + 12px);
        font-size: 11px;
        padding: 6px 10px;
    }
}