/*
 * Modern Medical Sidebar CSS
 * MediCare Pro v3.0
 */

/* ========================================
   MODERN SIDEBAR BASE
======================================== */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.widget {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
    border: 1px solid rgba(127, 169, 155, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(127, 169, 155, 0.15);
}

.widget:hover::before {
    transform: scaleX(1);
}

/* Medical Icon Pattern */
.widget::after {
    content: '\f21e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 100px;
    color: rgba(127, 169, 155, 0.03);
    pointer-events: none;
}

/* ========================================
   WIDGET TITLE
======================================== */
.widget-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-secondary);
    position: relative;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.widget-title::before {
    content: '\f0f8';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(127, 169, 155, 0.3);
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    animation: slideRight 2s ease infinite;
}

@keyframes slideRight {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(20px);
    }
}

/* Different icons for different widgets */
.widget_recent_entries .widget-title::before {
    content: '\f1ea';
}

.widget_categories .widget-title::before {
    content: '\f07b';
}

.widget_tag_cloud .widget-title::before {
    content: '\f02b';
}

.widget_search .widget-title::before {
    content: '\f002';
}

.widget_calendar .widget-title::before {
    content: '\f073';
}

.widget_archive .widget-title::before {
    content: '\f187';
}

/* ========================================
   WIDGET CONTENT
======================================== */
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    padding-left: 25px;
}

.widget li:last-child {
    border-bottom: none;
}

.widget li::before {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--color-primary);
    transition: all 0.3s ease;
}

.widget li:hover {
    padding-left: 30px;
    background: rgba(127, 169, 155, 0.05);
    margin: 0 -10px;
    padding-right: 10px;
    border-radius: 8px;
}

.widget li:hover::before {
    transform: translateX(5px);
    color: var(--color-accent);
}

.widget a {
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    font-weight: 500;
}

.widget a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

/* ========================================
   RECENT POSTS WIDGET
======================================== */
.widget_recent_entries li {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding-left: 0;
}

.widget_recent_entries li::before {
    display: none;
}

.widget_recent_entries .post-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.widget_recent_entries .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.widget_recent_entries .post-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.widget_recent_entries li:hover .post-thumbnail img {
    transform: scale(1.1);
}

.widget_recent_entries li:hover .post-thumbnail::after {
    opacity: 0.3;
}

.widget_recent_entries .post-details {
    flex: 1;
}

.widget_recent_entries .post-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.widget_recent_entries .post-date {
    font-size: 12px;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.widget_recent_entries .post-date::before {
    content: '\f017';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    color: var(--color-primary);
}

/* ========================================
   CATEGORIES WIDGET
======================================== */
.widget_categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget_categories .count {
    background: var(--gradient-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* ========================================
   TAG CLOUD
======================================== */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tagcloud a {
    display: inline-block;
    padding: 8px 16px;
    background: var(--color-secondary);
    border-radius: 20px;
    font-size: 13px !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tagcloud a:hover {
    background: var(--gradient-primary);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 169, 155, 0.3);
}

/* ========================================
   SEARCH WIDGET
======================================== */
.widget_search .search-form {
    position: relative;
}

.widget_search .search-field {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid var(--color-border);
    border-radius: 30px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.widget_search .search-field:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(127, 169, 155, 0.1);
}

.widget_search .search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget_search .search-submit:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(127, 169, 155, 0.4);
}

/* ========================================
   MEDICAL INFO BOX
======================================== */
.widget.medical-info {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.widget.medical-info .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.widget.medical-info .widget-title::before {
    background: white;
    color: var(--color-primary);
}

.widget.medical-info p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE - HIDE ON MOBILE
======================================== */
@media screen and (max-width: 768px) {
    .sidebar {
        display: none !important;
    }

    .content-wrapper {
        display: block !important;
    }

    .main-content {
        width: 100% !important;
        max-width: 100% !important;
    }
}