/* Single Post Widget Styles */
.spw-card {
    position: relative;
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(52, 68, 86, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.spw-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(52, 68, 86, 0.15);
}

/* Featured Image */
.spw-featured-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.spw-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.spw-card:hover .spw-featured-image img {
    transform: scale(1.05);
}

/* Category Badge */
.spw-category-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.spw-category-badge a {
    display: inline-block;
    background-color: #077070;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.spw-category-badge a:hover {
    background-color: #344456;
}

/* Content Area */
.spw-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Title */
.spw-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
}

.spw-title a {
    color: #344456;
    text-decoration: none;
    transition: color 0.3s ease;
}

.spw-title a:hover {
    color: #077070;
}

/* Meta Information */
.spw-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.spw-meta > span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.spw-meta i {
    color: #077070;
}

.spw-meta a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.spw-meta a:hover {
    color: #077070;
}

/* Excerpt */
.spw-excerpt {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Tags */
.spw-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    font-size: 14px;
}

.spw-tags i {
    color: #077070;
    margin-left: 5px;
}

.spw-tags a {
    color: #077070;
    text-decoration: none;
    padding: 4px 12px;
    background-color: rgba(7, 112, 112, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.spw-tags a:hover {
    background-color: #077070;
    color: #ffffff;
}

/* Footer */
.spw-footer {
    margin-top: auto;
    padding-top: 20px;
}

/* Read More Button */
.spw-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #077070;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.spw-read-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #344456;
    transition: left 0.3s ease;
    z-index: 0;
}

.spw-read-more:hover::before {
    left: 0;
}

.spw-read-more:hover {
    color: #ffffff;
    transform: translateX(-5px);
}

.spw-read-more > * {
    position: relative;
    z-index: 1;
}

.spw-read-more i {
    transition: transform 0.3s ease;
}

.spw-read-more:hover i {
    transform: translateX(-5px);
}

/* RTL Support */
.rtl .spw-category-badge {
    right: auto;
    left: 20px;
}

.rtl .spw-tags i {
    margin-left: 0;
    margin-right: 5px;
}

.rtl .spw-read-more:hover {
    transform: translateX(5px);
}

.rtl .spw-read-more i {
    transform: rotate(180deg);
}

.rtl .spw-read-more:hover i {
    transform: rotate(180deg) translateX(-5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .spw-content {
        padding: 20px;
    }
    
    .spw-title {
        font-size: 20px;
    }
    
    .spw-meta {
        font-size: 13px;
        gap: 15px;
    }
    
    .spw-excerpt {
        font-size: 15px;
    }
    
    .spw-read-more {
        padding: 10px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .spw-category-badge {
        top: 10px;
        right: 10px;
    }
    
    .spw-category-badge a {
        padding: 4px 12px;
        font-size: 12px;
    }
    
    .spw-meta {
        gap: 10px;
    }
    
    .spw-tags {
        font-size: 13px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spw-card {
    animation: fadeIn 0.6s ease;
}

/* Accessibility */
.spw-card:focus-within {
    outline: 2px solid #077070;
    outline-offset: 2px;
}

.spw-read-more:focus {
    outline: 2px solid #344456;
    outline-offset: 2px;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .spw-card {
        background-color: #1a1a1a;
    }
    
    .spw-title a {
        color: #ffffff;
    }
    
    .spw-excerpt {
        color: #ccc;
    }
    
    .spw-meta {
        color: #999;
    }
    
    .spw-meta a {
        color: #999;
    }
    
    .spw-tags a {
        background-color: rgba(7, 112, 112, 0.2);
    }
}
