/* --- Global Utilities (Exact Match) --- */
body {
    font-family: 'Poppins', sans-serif !important;
}

/* Override Astra Theme Container Width */
.ast-container,
.ast-page-builder-template .ast-container,
.site-content .ast-container,
.ast-single-post .ast-container,
.ast-archive-description .ast-container {
    max-width: 1800px !important;
    width: 100% !important;
}

/* Reduce width for pages with sidebar to prevent overlap */
body.single .ast-container,
body.archive .ast-container,
body.search .ast-container {
    max-width: 1400px !important;
}

/* Mobile sidebar control */
.sidebar-mobile.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .sidebar-mobile.hide-mobile {
        display: block;
    }
}

@media (min-width: 1024px) {
    .sidebar-mobile {
        position: -webkit-sticky !important;
        /* Safari */
        position: sticky !important;
        top: 20px !important;
        align-self: start !important;
        height: fit-content !important;
    }
}

.rounded-custom {
    border-radius: 5px !important;
}

/* --- Search Box (Reflecting Preview Design) --- */
.search-box {
    position: relative !important;
    max-width: 100% !important;
}

.search-box form {
    position: relative !important;
    margin: 0 !important;
}

.search-box input[type="search"],
.search-box input[type="text"] {
    width: 100% !important;
    padding: 12px 15px !important;
    /* Standard padding */
    border: 1px solid #e5e7eb !important;
    /* Lighter border like preview */
    border-radius: 5px !important;
    /* Square with slight radius */
    font-size: 14px !important;
    background: #f9fafb !important;
    /* Slightly gray bg often used in Tailwind previews, or white */
    background-color: #f9fafb !important;
    height: 48px !important;
    box-shadow: none !important;
    outline: none !important;
    color: #1a1a1a !important;
}

.search-box input:focus {
    border-color: #000 !important;
    background-color: #fff !important;
}

.search-box button {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 16px !important;
    height: 48px !important;
    width: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    outline: none !important;
    color: #94a3b8 !important;
    /* Default greyish color */
    transition: color 0.2s ease !important;
}

.search-box button:hover {
    color: #000000 !important;
    /* Pure black on hover */
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.search-box button:hover i {
    color: #000000 !important;
}

/* --- AJAX Results Dropdown --- */
.zit-ajax-results {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-top: none !important;
    border-radius: 0 0 5px 5px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
    z-index: 9999 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    text-align: left !important;
}

/* --- Sidebar Common Styles (From HTML) --- */
.sidebar-widget {
    margin-bottom: 40px !important;
}

.sidebar-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #000 !important;
    padding-bottom: 8px !important;
    margin-bottom: 20px !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #000 !important;
    display: block !important;
}

/* Social Icons (Reflecting HTML classes) */
.social-links-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.social-btn {
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 5px !important;
    /* Fixed radius */
    color: #1a1a1a !important;
    background: white !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    font-size: 16px !important;
}

.social-btn:hover {
    background: #000 !important;
    color: white !important;
    border-color: #000 !important;
}

/* Categories List */
.cat-item-custom {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin-bottom: 12px !important;
}

.cat-link-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-family: 'Poppins', sans-serif !important;
    text-transform: uppercase !important;
}

.cat-link-row:hover {
    color: #000 !important;
}

.cat-count {
    color: #cbd5e1 !important;
}

.cat-divider {
    width: 100% !important;
    border-bottom: 1px dashed #e5e7eb !important;
    /* Lighter dashed line */
    margin-top: 5px !important;
}

/* Recommended Posts Sidebar */
.rec-post-item {
    padding-bottom: 20px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    margin-bottom: 20px !important;
    display: block !important;
}

.rec-post-item:last-child {
    border: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.rec-post-inner {
    display: flex !important;
    gap: 12px !important;
    /* Smaller gap */
}

.rec-thumb {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0 !important;
    border-radius: 5px !important;
    /* Fixed radius */
    overflow: hidden !important;
}

.rec-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.rec-content {
    flex: 1 !important;
}

.rec-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 11px !important;
    /* Smaller font match */
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-transform: uppercase !important;
    margin-bottom: 4px !important;
    color: #1a1a1a !important;
}

.rec-title a {
    color: inherit !important;
    text-decoration: none !important;
}

.rec-title a:hover {
    text-decoration: underline !important;
}

.rec-date {
    font-size: 9px !important;
    /* Smaller */
    color: #9ca3af !important;
    margin-bottom: 2px !important;
}

.rec-excerpt {
    font-size: 10px !important;
    color: #6b7280 !important;
    line-height: 1.4 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tags */
.tag-pill {
    display: inline-block !important;
    padding: 5px 12px !important;
    /* Match HTML */
    background: #f1f5f9 !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    /* Match HTML */
    margin-right: 5px !important;
    margin-bottom: 8px !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
    border: none !important;
    text-transform: uppercase !important;
    font-family: 'Poppins', sans-serif !important;
}

.tag-pill:hover {
    background: #000 !important;
    color: #fff !important;
}

/* --- Pagination Design --- */
.page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 14px !important;
    margin: 0 4px !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 5px !important;
    color: #1a1a1a !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.page-numbers:hover {
    border-color: #000 !important;
    background: #fdfdfd !important;
    color: #000 !important;
}

.page-numbers.current {
    background: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
}

.page-numbers.dots {
    border: none !important;
    background: transparent !important;
    color: #94a3b8 !important;
    min-width: 20px !important;
    padding: 0 !important;
}

.page-numbers .fas {
    font-size: 12px !important;
}