/* XMTek Blog Widgets */

/* Base */
.xmtek-widget {
    background: #eae5d9;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 24px;
}

.xmtek-widget:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 16px 40px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.xmtek-widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #6a996a;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.xmtek-widget-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #16a34a;
    border-radius: 4px;
    flex-shrink: 0;
}

/* CTA Widget */
.xmtek-widget-cta {
    background: linear-gradient(145deg, #166534 0%, #15803d 50%, #14532d 100%);
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    color: #fff;
}

.xmtek-widget-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(134,239,172,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.xmtek-widget-cta .xmtek-cta-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.xmtek-widget-cta .xmtek-cta-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
}

.xmtek-widget-cta h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.xmtek-widget-cta p {
    color: #bbf7d0;
    font-size: 0.875rem;
    margin: 0 0 1.25rem 0;
    line-height: 1.6;
}

.xmtek-widget-cta .xmtek-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: #166534;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.xmtek-widget-cta .xmtek-cta-btn:hover {
    background: #f0fdf4;
    transform: translateX(2px);
}

.xmtek-widget-cta .xmtek-cta-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.xmtek-widget-cta .xmtek-cta-btn:hover svg {
    transform: translateX(4px);
}

.xmtek-widget-cta .xmtek-trust {
    color: #86efac;
    font-size: 0.75rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.xmtek-widget-cta .xmtek-trust svg {
    width: 14px;
    height: 14px;
}

/* Recent Posts Widget */
.xmtek-widget-posts {
    padding: 1.25rem;
}

.xmtek-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.xmtek-post-item {
    margin: 0;
    padding: 0;
}

.xmtek-post-item a {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.xmtek-post-item a:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.xmtek-post-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #000000;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.xmtek-post-item a:hover .xmtek-post-number {
    background: #166534;
    color: #fff;
}

.xmtek-post-content h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #000;
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.xmtek-post-meta {
    font-size: 0.75rem;
    color: #000;
}

.xmtek-posts-footer {
    margin-top: 1rem;
    text-align: center;
}

.xmtek-posts-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #6a996a;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.xmtek-posts-footer a:hover {
    color: #6a996a;
}

.xmtek-posts-footer svg {
    width: 16px;
    height: 16px;
}

/* Search Widget */
.xmtek-widget-search {
    padding: 1.25rem;
}

.xmtek-search-form {
    position: relative;
}

.xmtek-search-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    font-size: 0.875rem;
    color: #000000;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.xmtek-search-input::placeholder {
    color: #94a3b8;
}

.xmtek-search-input:focus {
    outline: none;
    border-color: #22c55e;
    background: #eae5d9;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.xmtek-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") center/16px no-repeat;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.xmtek-search-btn:hover {
    background-color: #15803d;
}



.xmtek-r-searches {
    margin-top: 1rem;
}

.xmtek-popular-label {
    font-size: 0.75rem;
    color: #000000;
    font-weight: 500;
}

.xmtek-popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.xmtek-popular-tag {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #000;
    text-decoration: none;
    transition: all 0.2s ease;
}

.xmtek-popular-tag:hover {
    background: #dcfce7;
    color: #15803d;
}

/* Newsletter Widget */
.xmtek-widget-newsletter {
    padding: 1.25rem;
    background: linear-gradient(to bottom right, #eae5d9, rgba(240, 253, 244, 0.5));
}

.xmtek-newsletter-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.xmtek-credits-icon {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(to bottom right, #4ade80, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 16px rgba(22, 163, 74, 0.25);
}

.xmtek-credits-icon svg {
    width: 28px;
    height: 28px;
}

@keyframes xmtek-pulse-ring {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

.xmtek-credits-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(to bottom right, #4ade80, #16a34a);
    animation: xmtek-pulse-ring 2s ease-out infinite;
    z-index: -1;
}

.xmtek-newsletter-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 0.25rem 0;
}

.xmtek-newsletter-header p {
    font-size: 0.875rem;
    color: #000;
    margin: 0;
}

.xmtek-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.xmtek-newsletter-input {
    width: 100%;
    background: #eae5d9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #000;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.xmtek-newsletter-input::placeholder {
    color: #000;
}

.xmtek-newsletter-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.xmtek-newsletter-btn {
    width: 100%;
    background: #16a34a;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}

.xmtek-newsletter-btn:hover {
    background: #15803d;
}

.xmtek-newsletter-btn svg {
    width: 16px;
    height: 16px;
}

.xmtek-newsletter-footer {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    margin-top: 1rem;
}

/* Categories Widget */
.xmtek-widget-categories {
    padding: 1.25rem;
}

.xmtek-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.xmtek-category-tag {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.xmtek-category-tag:not(.xmtek-category-active) {
    background: #f1f5f9;
    color: #000;
}

.xmtek-category-tag:not(.xmtek-category-active):hover {
    background: #dcfce7;
    color: #166534;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.15);
}

.xmtek-category-active {
    background: #16a34a;
    color: #fff;
}

.xmtek-category-count {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: 0.25rem;
}

/* Posts by Category Widget (Footer) */
.xmtek-footer-posts-widget {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.xmtek-footer-posts-widget:hover {
    box-shadow: none;
    transform: none;
}

.xmtek-footer-posts-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #6a996a;
    margin: 0 0 1rem 0;
}

.xmtek-footer-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.xmtek-footer-post-item {
    margin: 0 0 0.5rem 0;
    padding: 0;
}

.xmtek-footer-post-link {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    text-decoration: none;
    font-family: Roboto, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #6a996a;
    line-height: 27.2px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.xmtek-footer-post-link:hover {
    background: transparent;
    transform: none;
    opacity: 0.8;
}

.xmtek-footer-post-num {
    flex-shrink: 0;
    font-size: 17px;
    font-weight: 700;
    color: #6a996a;
    background: transparent;
    border-radius: 0;
    width: auto;
    height: auto;
    display: inline;
    transition: none;
}

.xmtek-footer-post-link:hover .xmtek-footer-post-num {
    background: transparent;
    color: #6a996a;
}

.xmtek-footer-post-info {
    flex: 1;
    display: inline;
}

.xmtek-footer-post-title {
    display: inline;
    font-size: 17px;
    font-weight: 700;
    color: #6a996a;
    margin: 0;
    line-height: 27.2px;
    font-family: Roboto, sans-serif;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
}

.xmtek-footer-post-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: 0.5rem;
}

.xmtek-footer-post-cat {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 6px;
    background: #dcfce7;
    color: #166534;
}

.xmtek-footer-post-time {
    font-size: 0.75rem;
    color: #6a996a;
}

.xmtek-footer-posts-link-wrapper {
    margin-top: 1rem;
}

.xmtek-footer-posts-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #6a996a;
    font-size: 12px;
    font-weight: 500;
    font-style: italic;
    font-family: Roboto, sans-serif;
    text-decoration: none;
    padding: 0;
    background: transparent;
    line-height: 27.2px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.xmtek-footer-posts-link:hover {
    opacity: 0.8;
}

.xmtek-footer-posts-link svg {
    width: 16px;
    height: 16px;
}
