/* Main Wrapper */
.maveerar-nd-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Search Box */
.maveerar-nd-search {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.maveerar-nd-search form {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 0;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Stronger premium shadow */
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    height: 50px;
    /* Fixed height for consistency */
}

.maveerar-nd-search input[type="text"] {
    padding: 0 20px;
    border: none;
    border-radius: 0;
    width: 300px;
    height: 100%;
    background: transparent;
    font-size: 16px;
    outline: none;
    color: #333;
    font-weight: 500;
}

.maveerar-nd-search button {
    height: 100%;
    padding: 0 30px;
    background: linear-gradient(135deg, #0073aa, #005177);
    /* Gradient button */
    color: #fff;
    border: none;
    border-radius: 0 50px 50px 0;
    /* Rounded only on right */
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.maveerar-nd-search button:hover {
    filter: brightness(1.1);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.maveerar-nd-reset {
    text-decoration: none;
    color: #d63638;
    font-size: 0.9em;
    margin-left: 15px;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.maveerar-nd-reset:hover {
    opacity: 1;
}

/* Filter */
.maveerar-nd-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    justify-content: center;
    padding: 0 10px;
}

.maveerar-nd-char {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 5px 12px;
    text-decoration: none;
    color: #555;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    /* Pill shape */
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.maveerar-nd-char:hover,
.maveerar-nd-char.active {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 115, 170, 0.3);
}

.maveerar-nd-count {
    margin-left: 5px;
    font-size: 0.85em;
    opacity: 0.8;
}

.maveerar-nd-break {
    width: 100%;
    height: 10px;
}

/* Grid */
.maveerar-nd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
    gap: 25px;
}

/* Card */
.maveerar-nd-card {
    background: var(--card-bg, #fff);
    border: none;
    border-radius: 16px;
    /* Increased radius */
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy spring transition */
    position: relative;
    min-height: var(--card-height);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* For pseudo-elements */
    justify-content: center;
}

/* Trending Design: Gradient Border Accent on Left */
.maveerar-nd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    /* Slim accent line */
    height: 100%;
    background: linear-gradient(to bottom, #0073aa, #00c6ff);
    opacity: 0.6;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.maveerar-nd-card:hover {
    transform: translateY(-5px) scale(1.02);
    /* Subtle lift and scale */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.maveerar-nd-card:hover::before {
    width: 6px;
    opacity: 1;
}

.maveerar-nd-name {
    margin: 0;
    /* Remove default margin so small cards look good */
    font-size: 1.3em;
    font-weight: 700;
    color: var(--name-color, #23282d);
    cursor: default;
    border-bottom: 2px solid rgba(0, 0, 0, 0.03);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Space between text and icon */
    flex-wrap: wrap;
}

.maveerar-nd-card-content:has(.maveerar-nd-desc) .maveerar-nd-name {
    margin-bottom: 15px;
    /* Add margin back ONLY if description exists */
}

/* Icon style */
.maveerar-nd-icon-wrapper {
    display: inline-flex;
    align-items: center;
    color: #0073aa;
    /* Default wp blue or consider using current text color */
    opacity: 0.7;
    transition: opacity 0.2s;
}

.maveerar-nd-card:hover .maveerar-nd-icon-wrapper {
    opacity: 1;
    color: #005177;
}

.maveerar-nd-desc {
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
}

/* Pagination */
.maveerar-nd-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    /* Default fallback */
    gap: 8px;
    /* Space between squares */
    flex-wrap: wrap;
    align-items: center;
}

.maveerar-nd-pagination .maveerar-nd-page-item {
    display: inline-block;
}

/* Common style for links and spans inside pagination */
.maveerar-nd-pagination .page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    /* Output exact square */
    height: 40px;
    padding: 0;
    text-decoration: none;
    background: #fff;
    border: 1px solid #ddd;
    /* Light grey border */
    color: #333;
    font-weight: 500;
    border-radius: 4px;
    /* Slight rounding like the image */
    transition: all 0.2s ease;
    font-size: 16px;
    line-height: 1;
    box-shadow: none;
}

.maveerar-nd-pagination a.page-numbers:hover {
    background: #f9f9f9;
    border-color: #bbb;
    transform: none;
    /* No lift for this specific flat design */
    color: #000;
    box-shadow: none;
}

.maveerar-nd-pagination .page-numbers.current {
    background: #e62429;
    /* Red background */
    color: #fff;
    border-color: #e62429;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

.maveerar-nd-pagination .page-numbers.prev,
.maveerar-nd-pagination .page-numbers.next {
    font-weight: 400;
    /* Regular weight for arrows */
    font-size: 20px;
    /* Larger arrow size */
    padding-bottom: 2px;
    /* Visual center correction */
}

/* Tooltip */
.maveerar-nd-image-tooltip {
    display: none;
    position: absolute;
    top: -20px;
    left: 105%;
    /* Show to the right by default */
    width: 220px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 100;
    pointer-events: none;
    /* Let clicks pass through if covered */
}

/* Show tooltip on hover of the whole card */
.maveerar-nd-card:hover .maveerar-nd-image-tooltip {
    display: block;
    animation: fadeIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.maveerar-nd-image-tooltip img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .maveerar-nd-image-tooltip {
        left: 50%;
        top: 100%;
        transform: translateX(-50%);
        width: 200px;
        margin-top: 10px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.maveerar-nd-no-results {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #777;
    background: #f9f9f9;
    border-radius: 8px;
}