/* =========================================================
   BIMTEKHUB SIDEBAR CSS - FINAL CLEAN
   Untuk sidebar, widget area, dan secondary widget
========================================================= */

.sidebar,
.widget-area,
#secondary {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ==============================
   WIDGET CARD
============================== */

.sidebar .widget,
.widget-area .widget,
#secondary .widget {
    position: relative;
    overflow: hidden;
    padding: 28px 22px 22px;
    border: 1px solid transparent;
    border-radius: 16px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, #0b3768, #f59e0b) border-box;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.sidebar .widget::before,
.widget-area .widget::before,
#secondary .widget::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 7px;
    z-index: 2;
    background: linear-gradient(90deg, #0b3768 0%, #2563eb 42%, #f59e0b 100%);
}

.sidebar .widget::after,
.widget-area .widget::after,
#secondary .widget::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    height: 56px;
    z-index: 1;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(135deg, rgba(11, 55, 104, 0.07), rgba(245, 158, 11, 0.09));
}

.sidebar .widget > *,
.widget-area .widget > *,
#secondary .widget > * {
    position: relative;
    z-index: 3;
}

/* ==============================
   WIDGET TITLE
============================== */

.sidebar .widget-title,
.widget-area .widget-title,
#secondary .widget-title,
.sidebar h2,
.widget-area h2,
#secondary h2,
.sidebar h3,
.widget-area h3,
#secondary h3 {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    color: #0b3768 !important;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.sidebar .widget-title::after,
.widget-area .widget-title::after,
#secondary .widget-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    margin-top: 8px;
    border-radius: 999px;
    background: #f59e0b;
}

/* ==============================
   TEXT, LINK, LIST
============================== */

.sidebar p,
.widget-area p,
#secondary p,
.sidebar li,
.widget-area li,
#secondary li {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.65;
}

.sidebar a,
.widget-area a,
#secondary a {
    color: #0b3768 !important;
    font-weight: 700;
    text-decoration: none !important;
}

.sidebar a:hover,
.widget-area a:hover,
#secondary a:hover {
    color: #f59e0b !important;
}

.sidebar ul,
.widget-area ul,
#secondary ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar li,
.widget-area li,
#secondary li {
    margin: 0 0 10px;
    padding: 0 0 10px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
}

.sidebar li:last-child,
.widget-area li:last-child,
#secondary li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

/* ==============================
   RECENT COMMENTS ALIGN
============================== */

.sidebar .widget_recent_comments ul,
.widget-area .widget_recent_comments ul,
#secondary .widget_recent_comments ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar .widget_recent_comments li,
.widget-area .widget_recent_comments li,
#secondary .widget_recent_comments li,
.sidebar .widget_recent_comments .recentcomments,
.widget-area .widget_recent_comments .recentcomments,
#secondary .widget_recent_comments .recentcomments {
    display: block;
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    line-height: 1.55;
}

.sidebar .widget_recent_comments li:last-child,
.widget-area .widget_recent_comments li:last-child,
#secondary .widget_recent_comments li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.sidebar .widget_recent_comments .comment-author-link,
.widget-area .widget_recent_comments .comment-author-link,
#secondary .widget_recent_comments .comment-author-link,
.sidebar .widget_recent_comments a,
.widget-area .widget_recent_comments a,
#secondary .widget_recent_comments a {
    display: inline;
}

/* ==============================
   SEARCH WIDGET
============================== */

.sidebar .search-form,
.widget-area .search-form,
#secondary .search-form {
    display: flex;
    gap: 8px;
}

.sidebar .search-field,
.widget-area .search-field,
#secondary .search-field,
.sidebar input[type="search"],
.widget-area input[type="search"],
#secondary input[type="search"] {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    outline: none;
}

.sidebar .search-field:focus,
.widget-area .search-field:focus,
#secondary .search-field:focus,
.sidebar input[type="search"]:focus,
.widget-area input[type="search"]:focus,
#secondary input[type="search"]:focus {
    border-color: #0b3768;
    box-shadow: 0 0 0 3px rgba(11, 55, 104, 0.12);
}

.sidebar .search-submit,
.widget-area .search-submit,
#secondary .search-submit,
.sidebar button,
.widget-area button,
#secondary button,
.sidebar input[type="submit"],
.widget-area input[type="submit"],
#secondary input[type="submit"] {
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: #0b3768;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.sidebar .search-submit:hover,
.widget-area .search-submit:hover,
#secondary .search-submit:hover,
.sidebar button:hover,
.widget-area button:hover,
#secondary button:hover,
.sidebar input[type="submit"]:hover,
.widget-area input[type="submit"]:hover,
#secondary input[type="submit"]:hover {
    background: #f59e0b;
    color: #111827;
}

/* ==============================
   CALENDAR WIDGET
============================== */

.sidebar table,
.widget-area table,
#secondary table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.sidebar th,
.sidebar td,
.widget-area th,
.widget-area td,
#secondary th,
#secondary td {
    padding: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.sidebar th,
.widget-area th,
#secondary th {
    background: #f8fafc;
    color: #0b3768;
    font-weight: 800;
}

/* ==============================
   RSS ICON HIDE
============================== */

.sidebar .rss-widget-icon,
.widget-area .rss-widget-icon,
#secondary .rss-widget-icon,
.sidebar .widget_rss img,
.widget-area .widget_rss img,
#secondary .widget_rss img {
    display: none !important;
}

/* ==============================
   RESPONSIVE
============================== */

@media (max-width: 992px) {
    .sidebar,
    .widget-area,
    #secondary {
        margin-top: 32px;
    }
}

@media (max-width: 600px) {
    .sidebar .widget,
    .widget-area .widget,
    #secondary .widget {
        padding: 26px 18px 20px;
        border-radius: 14px;
    }

    .sidebar .widget-title,
    .widget-area .widget-title,
    #secondary .widget-title,
    .sidebar h2,
    .widget-area h2,
    #secondary h2,
    .sidebar h3,
    .widget-area h3,
    #secondary h3 {
        font-size: 0.98rem;
    }

    .sidebar p,
    .widget-area p,
    #secondary p,
    .sidebar li,
    .widget-area li,
    #secondary li,
    .sidebar a,
    .widget-area a,
    #secondary a {
        font-size: 0.9rem;
    }
}
