/* === General Styles for Widget Containers === */
.widget-container {
    padding: 20px;
    margin-bottom: 20px;
    background-color: #ffffff; /* Default background color */
    border: 1px solid #ddd; /* Subtle border */
    border-radius: 8px; /* Adds rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
}

/* Widget Titles */
.widget-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0073aa; /* Theme primary color */
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 2px solid #0073aa; /* Underline effect */
}

/* Hover Effects for Widget Containers */
.widget-container:hover {
    background-color: #f9f9f9; /* Slightly lighter background */
    border-color: #0073aa; /* Match theme primary color */
    transform: scale(1.02); /* Subtle zoom effect */
    transition: all 0.3s ease; /* Smooth animation */
}

/* === Sidebar-Specific Styles === */
.sidebar-widget {
    padding: 15px;
    background-color: #fcfcfc;
    border-left: 3px solid #0073aa;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: normal;
    color: #333;
    margin-bottom: 10px;
}

/* === Footer Widget Styles === */
.footer-widget {
    padding: 20px;
    background-color: #f4f4f4;
    border-top: 3px solid #0073aa; /* Footer theme accent */
}

.footer-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    text-transform: capitalize;
    margin-bottom: 10px;
}

/* === Header Widget Styles === */
.header-widget {
    padding: 15px;
    background-color: #e9f5ff; /* Light blue for header widgets */
    border-bottom: 3px solid #0073aa;
}

.header-title {
    font-size: 1.2rem;
    color: #0073aa;
    text-align: center;
    margin-bottom: 5px;
}

/* === Contact Page Widget Styles === */
.contact-widget {
    padding: 20px;
    background-color: #fef6f6; /* Subtle pink background */
    border: 2px dashed #ff6b6b; /* Dashed border for emphasis */
    border-radius: 10px;
}

.contact-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff6b6b;
    text-transform: uppercase;
    text-align: center;
}

/* === Recent Posts Widget === */
.recent-posts-list {
    list-style-type: none; /* Remove bullets */
    padding: 0;
    margin: 0;
}

.recent-posts-list li {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.recent-posts-list li:last-child {
    border-bottom: none; /* Remove border for last item */
}

.post-thumbnail {
    margin-right: 10px;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 5px; /* Rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
}

.post-info {
    flex: 1;
}

.post-info a {
    font-size: 1.2rem;
    font-weight: bold;
    color: #0073aa;
    text-decoration: none;
}

.post-info a:hover {
    text-decoration: underline;
    color: #005177; /* Darker blue hover effect */
}

.post-info p {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* === Accessibility Enhancements === */
.widget-container:focus-within {
    outline: 3px solid #0073aa; /* High-visibility outline for accessibility */
}

/* === Responsive Styles === */
@media (max-width: 768px) {
    .widget-container {
        padding: 15px;
        margin-bottom: 15px;
    }

    .widget-title {
        font-size: 1.3rem;
    }

    .recent-posts-list li {
        flex-direction: column;
        margin-bottom: 20px;
    }

    .post-thumbnail {
        margin-bottom: 10px;
        width: 100px;
        height: 100px;
    }

    .post-info a {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .widget-container {
        padding: 10px;
        border-radius: 5px;
    }

    .widget-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .recent-posts-list li {
        margin-bottom: 15px;
    }

    .post-info a {
        font-size: 1rem;
    }
}