/* Search Results Page Styles */

/* Search Results Header */
.search-results-header {
    background: white;
    border-radius: 8px;
    padding: 0.6rem;
    margin-bottom: 0.6rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.search-results-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background-image: url('../images/visuals/1.png');
    background-size: 40px 40px;
    background-repeat: repeat;
    background-position: center;
    opacity: 0.04;
    z-index: 0;
}

.search-info {
    position: relative;
    z-index: 1;
    margin-bottom: 0.4rem;
}

.search-title {
    color: #2F2D69;
    font-size: 0.82rem;
    font-weight: 900;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    justify-content: center;
}

.search-title i {
    color: #1AAB9E;
    font-size: 0.75rem;
}

.search-stats {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
    text-align: center;
}

.results-count {
    background: linear-gradient(135deg, #1AAB9E, #2F2D69);
    color: white;
    padding: 0.35rem 0.8rem;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.58rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 4px rgba(47, 45, 105, 0.25);
}

.results-count i {
    font-size: 0.62rem;
}

.search-query {
    color: #666;
    font-size: 0.59rem;
    font-weight: 400;
    background: #f8f9fa;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.search-query strong {
    color: #1AAB9E;
    font-weight: 600;
}

/* Search Filters */
.search-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    background: #f8f9fa;
    padding: 0.4rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    color: #2F2D69;
    font-weight: 600;
    font-size: 0.58rem;
    white-space: nowrap;
}

.filter-select {
    padding: 0.3rem 0.6rem;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    background: white;
    color: #2c3e50;
    font-size: 0.54rem;
    font-family: 'Farhang', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 90px;
}

.filter-select:focus {
    outline: none;
    border-color: #1AAB9E;
    box-shadow: 0 0 0 3px rgba(26, 171, 158, 0.1);
}

.view-toggle {
    display: flex;
    gap: 0.3rem;
    background: white;
    border-radius: 6px;
    padding: 0.2rem;
    border: 2px solid #e9ecef;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.54rem;
}

.view-btn.active,
.view-btn:hover {
    background: #1AAB9E;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(26, 171, 158, 0.3);
}

/* Search Results Container */
.search-results-container {
    margin-bottom: 0.5rem;
}

/* Martyrs Grid */
.martyrs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.martyrs-grid.list-view {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* Square Martyr Cards */
.martyr-card-square {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.martyr-card-square:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #1AAB9E;
}

.martyr-card-square::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #1AAB9E, #2F2D69);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.martyr-card-square:hover::before {
    opacity: 1;
}

.martyr-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.martyr-link:hover {
    color: inherit;
    text-decoration: none;
}

.martyr-image-container {
    position: relative;
    height: 80px;
    overflow: hidden;
    background: #f8f9fa;
    background-image: url('../images/visuals/1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.martyr-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background-color: #f8f9fa;
    background-image: url('../images/visuals/1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.martyr-card-square:hover .martyr-image {
    transform: scale(1.05);
}


.martyr-info {
    padding: 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.martyr-name {
    color: #2F2D69;
    font-size: 0.62rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-align: center;
    line-height: 1.2;
}

.martyr-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0;
    flex: 1;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #555;
    font-size: 0.51rem;
    line-height: 1.1;
}

.detail-item i {
    color: #1AAB9E;
    font-size: 0.51rem;
    width: 10px;
    text-align: center;
    flex-shrink: 0;
}

.detail-item span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* List View Styles */
.martyrs-grid.list-view .martyr-card-square {
    flex-direction: row;
    height: 70px;
    min-height: 70px;
}

.martyrs-grid.list-view .martyr-image-container {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    margin: 7px;
}

.martyrs-grid.list-view .martyr-info {
    flex: 1;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.martyrs-grid.list-view .martyr-name {
    font-size: 0.58rem;
    margin-bottom: 0.2rem;
}

.martyrs-grid.list-view .martyr-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.2rem;
}

.martyrs-grid.list-view .detail-item {
    font-size: 0.47rem;
    gap: 0.3rem;
}

.martyrs-grid.list-view .detail-item i {
    font-size: 0.62rem;
    width: 14px;
}

/* Pagination */
.pagination-container {
    background: white;
    border-radius: 8px;
    padding: 0.6rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.pagination-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-image: url('../images/visuals/2.png');
    background-size: 35px 35px;
    background-repeat: repeat;
    background-position: center;
    opacity: 0.04;
    z-index: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    margin-bottom: 0.4rem;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.7rem;
    background: #1AAB9E;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.54rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(26, 171, 158, 0.25);
}

.page-btn:hover {
    background: #159a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 171, 158, 0.4);
    color: white;
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-numbers {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.54rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.page-number:hover {
    background: #1AAB9E;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(26, 171, 158, 0.3);
}

.page-number.active {
    background: #2F2D69;
    color: white;
    border-color: #1AAB9E;
    box-shadow: 0 2px 6px rgba(47, 45, 105, 0.3);
}

.page-ellipsis {
    color: #999;
    font-weight: 500;
    padding: 0 0.5rem;
}

.pagination-info {
    text-align: center;
    color: #666;
    font-size: 0.51rem;
    position: relative;
    z-index: 1;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.no-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background-image: url('../images/visuals/3.png');
    background-size: 45px 45px;
    background-repeat: repeat;
    background-position: center;
    opacity: 0.04;
    z-index: 0;
}

.no-results-icon {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.no-results-icon i {
    font-size: 1.7rem;
    color: #1AAB9E;
    opacity: 0.6;
}

.no-results h3 {
    color: #2F2D69;
    font-size: 0.88rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.no-results p {
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.no-results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.68rem;
}

.btn-primary {
    background: linear-gradient(135deg, #1AAB9E, #2F2D69);
    color: white;
    box-shadow: 0 2px 6px rgba(47, 45, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 45, 105, 0.4);
    color: white;
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .martyrs-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 1rem;
    }
    
    .search-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-group {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .search-results-header {
        padding: 1.5rem;
    }
    
    .search-title {
        font-size: 1.22rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-stats {
        gap: 0.6rem;
    }
    
    .results-count {
        font-size: 0.68rem;
        padding: 0.6rem 1.2rem;
    }
    
    .martyrs-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 0.9rem;
    }
    
    .martyr-image-container {
        height: 140px;
    }
    
    .martyr-info {
        padding: 0.9rem;
    }
    
    .martyr-name {
        font-size: 0.71rem;
    }
    
    .detail-item {
        font-size: 0.54rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .page-btn {
        padding: 0.6rem 1rem;
        font-size: 0.62rem;
    }
    
    .page-number {
        width: 35px;
        height: 35px;
        font-size: 0.62rem;
    }
    
    .no-results {
        padding: 3rem 1.5rem;
    }
    
    .no-results h3 {
        font-size: 1.02rem;
    }
    
    .no-results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .search-results-header {
        padding: 1rem;
    }
    
    .search-title {
        font-size: 1.02rem;
    }
    
    .search-filters {
        padding: 0.8rem;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .filter-group label {
        text-align: center;
    }
    
    .martyrs-grid {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }
    
    .martyr-image-container {
        height: 130px;
    }
    
    .martyr-info {
        padding: 0.9rem;
    }
    
    .martyr-name {
        font-size: 0.68rem;
    }
    
    .detail-item {
        font-size: 0.51rem;
    }
    
    .view-profile {
        padding: 0.5rem 1rem;
        font-size: 0.58rem;
    }
    
    .pagination-container {
        padding: 1.5rem;
    }
    
    .pagination {
        gap: 0.3rem;
    }
    
    .page-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.54rem;
    }
    
    .page-number {
        width: 30px;
        height: 30px;
        font-size: 0.54rem;
    }
    
    .no-results {
        padding: 2rem 1rem;
    }
    
    .no-results-icon i {
        font-size: 2.04rem;
    }
    
    .no-results h3 {
        font-size: 0.88rem;
    }
    
    .no-results p {
        font-size: 0.68rem;
    }
}

/* List View Responsive */
@media (max-width: 768px) {
    .martyrs-grid.list-view .martyr-card-square {
        flex-direction: row;
        height: 90px;
        min-height: 90px;
    }
    
    .martyrs-grid.list-view .martyr-image-container {
        width: 70px;
        height: 70px;
        margin: 10px;
    }
    
    .martyrs-grid.list-view .martyr-info {
        padding: 0.7rem;
    }
    
    .martyrs-grid.list-view .martyr-name {
        font-size: 0.65rem;
        margin-bottom: 0.3rem;
    }
    
    .martyrs-grid.list-view .martyr-details {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .martyrs-grid.list-view .detail-item {
        font-size: 0.51rem;
        gap: 0.35rem;
    }
}

@media (max-width: 480px) {
    .martyrs-grid.list-view .martyr-card-square {
        height: 85px;
        min-height: 85px;
    }
    
    .martyrs-grid.list-view .martyr-image-container {
        width: 65px;
        height: 65px;
        margin: 10px;
    }
    
    .martyrs-grid.list-view .martyr-info {
        padding: 0.6rem;
    }
    
    .martyrs-grid.list-view .martyr-name {
        font-size: 0.58rem;
    }
    
    .martyrs-grid.list-view .detail-item {
        font-size: 0.47rem;
    }
}

/* Animation for card loading */
.martyr-card-square {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for multiple cards */
.martyr-card-square:nth-child(1) { animation-delay: 0.1s; }
.martyr-card-square:nth-child(2) { animation-delay: 0.2s; }
.martyr-card-square:nth-child(3) { animation-delay: 0.3s; }
.martyr-card-square:nth-child(4) { animation-delay: 0.4s; }
.martyr-card-square:nth-child(5) { animation-delay: 0.5s; }
.martyr-card-square:nth-child(6) { animation-delay: 0.6s; }
.martyr-card-square:nth-child(7) { animation-delay: 0.7s; }
.martyr-card-square:nth-child(8) { animation-delay: 0.8s; }
.martyr-card-square:nth-child(9) { animation-delay: 0.9s; }
.martyr-card-square:nth-child(10) { animation-delay: 1.0s; }
.martyr-card-square:nth-child(11) { animation-delay: 1.1s; }
.martyr-card-square:nth-child(12) { animation-delay: 1.2s; }
