/**
 * Drone Connect - Latest Articles Widget Styles
 *
 * @package Drone_Connect
 */

/* ========================================
   Latest Posts Widget Container
   ======================================== */

.drone-latest-widget {
    width: 100%;
    /* padding: 20px; */
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

/* Background Color Variants */
.drone-latest-widget--white {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
}

.drone-latest-widget--black {
    background-color: #1a1a1a;
    border: 1px solid #333;
}

.drone-latest-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ========================================
   Latest Post Item
   ======================================== */

.drone-latest-item {
    margin-bottom: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.drone-latest-item:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Item styling for black background */
.drone-latest-widget--black .drone-latest-item {
    background-color: #1f2937;
    border: 2px solid #374151;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.drone-latest-widget--black .drone-latest-item:hover {
    background-color: #374151;
    border-color: #4b5563;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
}

/* Content container */
.drone-latest-item__content {
    padding: 20px;
}

.drone-latest-item__link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.drone-latest-item__link:hover {
    text-decoration: none;
}

.drone-latest-item:last-child {
    margin-bottom: 0;
}

.drone-latest-item__link {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.drone-latest-item__link:hover {
    opacity: 0.8;
}

/* Avatar styling */
.drone-latest-item__avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f3f4f6;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.drone-latest-widget--black .drone-latest-item__avatar {
    background-color: #374151;
    border-color: #4b5563;
}

.drone-latest-item:hover .drone-latest-item__avatar {
    border-color: #9ca3af;
}

.drone-latest-item__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drone-latest-item__avatar-icon {
    width: 32px;
    height: 32px;
    fill: #6b7280;
}

.drone-latest-widget--black .drone-latest-item__avatar-icon {
    fill: #9ca3af;
}

/* Title styling */
.drone-latest-item__title {
    margin: 0 0 8px 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
    transition: color 0.3s ease;
}

/* Title color for black background */
.drone-latest-widget--black .drone-latest-item__title {
    color: #ffffff;
}

.drone-latest-widget--black .drone-latest-item__link:hover .drone-latest-item__title {
    color: #60a5fa;
}

.drone-latest-item__link:hover .drone-latest-item__title {
    color: #2563eb;
}

.drone-latest-item__link:hover .drone-latest-item__title {
    color: #0073aa;
}

/* Article excerpt styling */
.drone-latest-item__excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.drone-latest-widget--black .drone-latest-item__excerpt {
    color: #e0e0e0;
}

/* Article date styling */
.drone-latest-item__date {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drone-latest-widget--black .drone-latest-item__date {
    color: #bbbbbb;
}

/* Link styling */
.drone-latest-item__link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.drone-latest-item__link:hover {
    text-decoration: none;
}

/* ========================================
   Empty State
   ======================================== */

.drone-latest-empty {
    padding: 30px;
    text-align: center;
    color: #666;
    font-style: italic;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.drone-latest-widget--black .drone-latest-empty {
    color: #cccccc;
    background-color: #333;
    border-color: #555;
}

/* Widget container enhancements */
.drone-latest-widget--white {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.drone-latest-widget--black {
    background-color: #1a1a1a;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    /* .drone-latest-widget {
        padding: 15px;
    } */

    .drone-latest-item {
        padding: 15px;
        margin-bottom: 15px;
    }

    .drone-latest-item__title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .drone-latest-item__excerpt {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .drone-latest-item__date {
        font-size: 11px;
    }
}

/* Elementor specific adjustments */
.elementor-widget-drone_connect_latest .drone-latest-widget {
    margin: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .drone-latest-item {
        border-width: 2px;
    }

    .drone-latest-widget--black .drone-latest-item {
        border-color: #666;
    }
}