/* Enhanced Vibrant Card Styles */
.service-card-numbered {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06), 0 3px 10px rgba(0,0,0,0.04);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    padding: 18px 16px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    margin-bottom: 20px;
    z-index: 1;
    transform: translateY(0);
}

.service-card-numbered::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 106, 27, 154), 0.03) 0%, rgba(var(--primary-rgb, 106, 27, 154), 0.01) 100%);
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.service-card-numbered:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(var(--primary-rgb, 106, 27, 154, 0.15)), 0 8px 15px rgba(0,0,0,0.05);
}

.service-card-numbered:hover::after {
    opacity: 1;
}

.service-card-numbered::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 0;
    background: linear-gradient(to bottom, var(--primary, #6a1b9a), var(--primary-light, #8e24aa));
    transition: height 0.6s ease;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.service-card-numbered:hover::before {
    height: 100%;
}

.service-number {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary, #6a1b9a), var(--primary-light, #8e24aa));
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb, 106, 27, 154, 0.25));
    transition: all 0.3s ease;
}

.service-card-numbered:hover .service-number {
    border-radius: 50%;
    transform: rotate(360deg);
    right: 10px;
    top: 10px;
}

.service-icon {
    position: relative;
    margin-bottom: 14px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: linear-gradient(135deg, var(--primary-light, #8e24aa), var(--primary, #6a1b9a));
    color: white;
    box-shadow: 0 6px 15px rgba(var(--primary-rgb, 106, 27, 154, 0.2));
    transition: all 0.5s ease;
}

.service-card-numbered:hover .service-icon {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 12px 25px rgba(var(--primary-rgb, 106, 27, 154, 0.4));
    border-radius: 20px;
}

.service-card-body {
    padding-top: 0;
    padding-left: 0;
    position: relative;
}

.service-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary, #6a1b9a);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    background: linear-gradient(to right, var(--primary, #6a1b9a), var(--primary-light, #8e24aa));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary, #6a1b9a), var(--primary-light, #8e24aa));
    transition: width 0.5s ease;
    border-radius: 5px;
}

.service-card-numbered:hover .service-title::after {
    width: 100%;
}

.service-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.service-card-numbered:hover .service-desc {
    color: #333;
}

.learn-more {
    background: linear-gradient(135deg, var(--primary, #6a1b9a), var(--primary-light, #8e24aa));
    color: white !important;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s;
    border: none;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb, 106, 27, 154, 0.25));
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.learn-more i {
    margin-left: 6px;
    transition: transform 0.4s ease;
    font-size: 11px;
}

.learn-more:hover {
    box-shadow: 0 10px 20px rgba(var(--primary-rgb, 106, 27, 154, 0.4));
    transform: translateY(-3px);
}

.learn-more:hover i {
    transform: translateX(5px);
}

.learn-more::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: all 0.8s;
}

.learn-more:hover::after {
    left: 100%;
}

/* Service Card Badge */
.service-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(to right, #ff9800, #ff5722);
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.3);
    z-index: 2;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

.service-card-numbered:hover .service-badge {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 87, 34, 0.4);
}

/* Service Locations Styling */
.service-locations .badge {
    font-size: 11px;
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--primary-rgb, 106, 27, 154), 0.1);
}

.service-locations .badge:hover {
    background-color: var(--primary, #6a1b9a) !important;
    color: white !important;
    box-shadow: 0 3px 8px rgba(var(--primary-rgb, 106, 27, 154), 0.2);
    transform: translateY(-2px);
}

.service-locations .badge.bg-light.text-primary:hover i {
    color: white !important;
}

/* Card Animation */
@keyframes cardPulse {
    0% { box-shadow: 0 15px 30px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.05); }
    50% { box-shadow: 0 20px 40px rgba(var(--primary-rgb, 106, 27, 154, 0.15)), 0 12px 20px rgba(0,0,0,0.05); }
    100% { box-shadow: 0 15px 30px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.05); }
}

/* Add animation to every 3rd card for variety */
.service-card-numbered:nth-child(3n) {
    animation: cardPulse 5s infinite ease-in-out;
}

/* Find Lawyers button style */
.btn-find {
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 106, 27, 154), 0.9), rgba(var(--primary-rgb, 106, 27, 154), 0.7));
    border: 1px solid rgba(var(--primary-rgb, 106, 27, 154), 0.3);
}

.btn-find:hover {
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 106, 27, 154), 0.8), rgba(var(--primary-rgb, 106, 27, 154), 0.6));
}

/* Custom Pagination Styling */
.pagination {
    margin-top: 2rem;
}

.pagination .page-item .page-link {
    padding: 0.6rem 1rem;
    color: var(--primary, #6a1b9a);
    border-color: rgba(var(--primary-rgb, 106, 27, 154), 0.2);
    border-radius: 6px;
    margin: 0 3px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary, #6a1b9a), var(--primary-light, #8e24aa));
    border-color: var(--primary, #6a1b9a);
    color: white;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb, 106, 27, 154, 0.2));
}

.pagination .page-item .page-link:hover {
    background: rgba(var(--primary-rgb, 106, 27, 154), 0.05);
    color: var(--primary-dark, #4a148c);
}

.pagination .page-item.active .page-link:hover {
    background: linear-gradient(135deg, var(--primary, #6a1b9a), var(--primary-light, #8e24aa));
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #aaa;
    background-color: #f8f9fa;
}

/* Sidebar Styles */
.sidebar {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 20px;
    position: sticky;
    top: 20px;
    border: 1px solid rgba(var(--primary-rgb, 106, 27, 154), 0.1);
    border-left: 4px solid var(--primary, #6a1b9a);
    background-image: 
        linear-gradient(to bottom right, 
            rgba(var(--primary-rgb, 106, 27, 154), 0.03) 0%, 
            rgba(var(--primary-rgb, 106, 27, 154), 0.01) 50%,
            rgba(255, 255, 255, 0) 50%),
        linear-gradient(to top right, 
            rgba(var(--primary-rgb, 106, 27, 154), 0.02) 0%, 
            rgba(var(--primary-rgb, 106, 27, 154), 0.01) 50%,
            rgba(255, 255, 255, 0) 50%);
    background-size: 100% 100%;
}

.sidebar-title {
    font-size: 18px;
    color: var(--primary, #6a1b9a);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(var(--primary-rgb, 106, 27, 154), 0.1);
    font-weight: 600;
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, var(--primary, #6a1b9a), var(--primary-light, #8e24aa));
}

.sidebar .form-control {
    border-radius: 30px;
    border: 1px solid rgba(var(--primary-rgb, 106, 27, 154), 0.1);
    padding: 12px 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.sidebar .form-control:focus {
    border-color: rgba(var(--primary-rgb, 106, 27, 154), 0.3);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb, 106, 27, 154), 0.1);
}

.search-btn {
    background: linear-gradient(135deg, var(--primary, #6a1b9a), var(--primary-light, #8e24aa));
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb, 106, 27, 154), 0.2);
}

.featured-service-item {
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #444;
    background-color: rgba(var(--primary-rgb, 106, 27, 154), 0.03);
}

.featured-service-item:hover {
    background-color: rgba(var(--primary-rgb, 106, 27, 154), 0.08);
    transform: translateX(3px);
    color: var(--primary, #6a1b9a);
}

.featured-service-item i {
    color: var(--primary, #6a1b9a);
    margin-right: 8px;
}

/* Real-time Search Results Styling */
.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: rgba(var(--primary-rgb, 106, 27, 154), 0.05);
}

.search-result-item h6 {
    color: var(--primary, #6a1b9a);
    margin-bottom: 5px;
    font-weight: 600;
}

.search-result-item p {
    font-size: 12px;
    color: #666;
    margin-bottom: 0;
}

.search-result-item .result-icon {
    color: var(--primary, #6a1b9a);
    background-color: rgba(var(--primary-rgb, 106, 27, 154), 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 14px;
}

.search-no-results {
    padding: 15px;
    text-align: center;
    color: #666;
}

/* Spinner for loading state */
.search-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(var(--primary-rgb, 106, 27, 154), 0.2);
    border-top: 2px solid var(--primary, #6a1b9a);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Blog Item Styles */
.blog-item {
    display: block;
    text-decoration: none;
    background-color: #fff;
    border-bottom: 1px solid rgba(var(--primary-rgb, 106, 27, 154), 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blog-item:hover {
    background-color: rgba(var(--primary-rgb, 106, 27, 154), 0.03);
    transform: translateX(3px);
}

.blog-item:after {
    content: "\f054";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary, #6a1b9a);
    opacity: 0;
    transition: all 0.3s ease;
}

.blog-item:hover:after {
    right: 10px;
    opacity: 0.7;
}

.blog-item:hover .blog-title {
    color: var(--primary, #6a1b9a);
}

.blog-meta {
    font-size: 11px;
    color: #888;
}

.blog-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(var(--primary-rgb, 106, 27, 154), 0.1);
    transition: all 0.3s ease;
}

.blog-item:hover .blog-image {
    border-color: var(--primary, #6a1b9a);
}

/* Sidebar Corner Accent */
.sidebar-corner-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    overflow: hidden;
}

.sidebar-corner-accent::before {
    content: '';
    position: absolute;
    top: -35px;
    right: -35px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, transparent 30%, rgba(var(--primary-rgb, 106, 27, 154), 0.1) 30%, var(--primary, #6a1b9a));
    transform: rotate(45deg);
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Main Content Wrapper */
.main-content-wrapper {
    background-image: 
        linear-gradient(to bottom left, 
            rgba(var(--primary-rgb, 106, 27, 154), 0.02) 0%, 
            rgba(var(--primary-rgb, 106, 27, 154), 0.01) 50%,
            rgba(255, 255, 255, 0) 50%);
    background-size: 100% 100%;
}

.main-corner-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    overflow: hidden;
}

.main-corner-accent::before {
    content: '';
    position: absolute;
    top: -35px;
    left: -35px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary, #6a1b9a), transparent 70%);
    transform: rotate(45deg);
    opacity: 0.1;
} 