/* Modern Search Results & Search Bar Styles */

/* --- Search Results Grid --- */
.search-results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
    margin-top: 20px;
    margin-bottom: 50px;
}

.search-result-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #eee;
}

.search-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.search-card-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f5f5f5;
    /* Placeholder color */
    position: relative;
}

.search-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.search-result-card:hover .search-card-thumbnail img {
    transform: scale(1.05);
    /* Zoom effect */
}

.search-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.search-card-title {
    font-size: 1.25rem;
    margin: 0 0 15px;
    color: #2c3e50;
    /* Dark slate text */
    line-height: 1.4;
    font-weight: 700;
}

.search-card-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.search-card-title a:hover {
    color: #006838;
    /* Branding Green */
}

.search-card-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
}

.search-card-footer {
    margin-top: auto;
}

.search-read-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: #006838;
    /* Branding Green */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.search-read-more:hover {
    background-color: #004d2a;
    /* Darker Green */
    color: #fff;
}

/* Fallback placeholder if no image */
.no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #eaf4f0;
    /* Light green tint */
    color: #006838;
    font-size: 2rem;
}

/* --- Pagination Modernization --- */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .nav-links span,
.pagination .nav-links a {
    display: inline-block;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #ddd;
    margin: 0 5px;
    text-decoration: none;
    border-radius: 4px;
    color: #333;
}

.pagination .nav-links .current,
.pagination .nav-links a:hover {
    background: #006838;
    color: white;
    border-color: #006838;
}

/* --- Shortcode: Modern Search Bar --- */
.modern-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.modern-search-form {
    display: flex;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid #006838;
}

.modern-search-input {
    flex-grow: 1;
    border: none !important;
    padding: 15px 25px !important;
    font-size: 1rem !important;
    outline: none !important;
    background: #fff !important;
}

.modern-search-submit {
    background-color: #006838 !important;
    color: white !important;
    border: none !important;
    padding: 0 30px !important;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.modern-search-submit:hover {
    background-color: #004d2a !important;
}

/* Mobile Search Bar Optimization */
@media (max-width: 768px) {
    .modern-search-submit {
        padding: 0 15px !important;
        /* Reduce padding */
        font-size: 0 !important;
        /* Hide text */
    }

    .modern-search-submit i {
        font-size: 1.2rem;
        /* Make icon larger */
        display: block;
        /* Ensure icon remains visible */
    }

    .modern-search-input {
        padding: 12px 15px !important;
        /* Slightly smaller input padding */
        font-size: 0.95rem !important;
    }
}

/* Header fix for spacing */
/* Header fix for spacing - Scoped to Search */
body.search .page-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

body.search .page-header .entry-title span {
    color: #006838;
    font-style: italic;
}

/* Fix for top spacing */

/* Fix for top spacing - Scoped to Search */

body.search .hfeed.site {
    margin-top: 100px;
    margin-bottom: 50px;
}


/* Mobile and Tablet responsive */
@media (max-width: 768px) {
    body.search .hfeed.site {
        margin-top: 0px !important;
        margin-bottom: 20px !important;
    }
}

/* --- Modern No Results UI --- */
.no-results-container {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8fdf9 0%, #eaf5ec 100%);
    border-radius: 20px;
    border: 1px solid #d4e8d9;
    max-width: 700px;
    margin: 150px auto 100px auto;
    box-shadow: 0 10px 40px rgba(0, 104, 56, 0.08);
}

@media (max-width: 768px) {
    .no-results-container {
        margin-top: 30px !important;
        margin-bottom: 80px !important;
    }
}

.no-results-icon {
    color: #006838 !important;
    margin-bottom: 25px;
    opacity: 0.8;
}

.no-results-icon svg {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.no-results-title {
    font-size: 1.75rem;
    color: #2c3e50 !important;
    margin: 0 0 15px;
    font-weight: 700;
}

.no-results-message {
    font-size: 1.1rem;
    color: #5a6c7d !important;
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.no-results-message strong {
    color: #006838;
    font-weight: 600;
}

.no-results-search {
    margin-bottom: 35px;
}

.no-results-suggestions {
    padding-top: 25px;
    border-top: 1px dashed #c8dece;
}

.no-results-suggestions>p {
    font-size: 0.95rem;
    color: #7a8a92;
    margin-bottom: 15px;
}

.suggestion-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.suggestion-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    border: 1px solid #d4e8d9;
    border-radius: 50px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.suggestion-link:hover {
    background: #006838;
    color: #fff;
    border-color: #006838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 104, 56, 0.25);
}

.suggestion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}