/* Enhanced Service Cards - High Specificity Override */
.fulham-container .services-grid-4col,
.benefits-section .services-grid-4col,
.services-grid-4col {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 3.5rem !important;
    margin: 4rem 0 !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 2rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Desktop - 2x2 square grid layout for classy look */
@media (min-width: 993px) {
    .fulham-container .services-grid-4col,
    .benefits-section .services-grid-4col,
    .services-grid-4col {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4rem !important;
        max-width: 1300px !important;
        margin: 5rem auto !important;
    }
}

/* Extra Large Desktop - still 2x2 but with more space */
@media (min-width: 1400px) {
    .fulham-container .services-grid-4col,
    .benefits-section .services-grid-4col,
    .services-grid-4col {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5rem !important;
        max-width: 1400px !important;
        margin: 6rem auto !important;
    }
}

.fulham-container .service-card-with-image,
.benefits-section .service-card-with-image,
.service-card-with-image {
    background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%) !important;
    border-radius: 28px !important;
    overflow: hidden !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 25px rgba(0, 0, 0, 0.08),
        0 3px 10px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    transition: all 0.4s ease-out !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    position: relative !important;
    cursor: pointer !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    will-change: transform !important;
    min-height: auto !important;
}

.service-card-with-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, 
            rgba(255, 255, 255, 0.2) 0%, 
            rgba(255, 255, 255, 0.1) 30%,
            rgba(0, 0, 0, 0.02) 70%,
            rgba(0, 0, 0, 0.05) 100%);
    opacity: 0;
    transition: all 0.3s ease-out;
    pointer-events: none;
    z-index: 1;
}

.service-card-with-image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 70%);
    opacity: 0;
    transform: rotate(-45deg) translate(-100%, -100%);
    transition: all 0.4s ease-out;
    pointer-events: none;
    z-index: 2;
}

.service-card-with-image:hover {
    transform: translateY(-6px) scale(1.02) !important;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.service-card-with-image:hover::before {
    opacity: 1;
}

.service-card-with-image:hover::after {
    opacity: 0.7;
    transform: rotate(-45deg) translate(-20%, -20%);
}

/* Service Image */
.service-image {
    position: relative !important;
    width: 100% !important;
    height: 320px !important;
    overflow: hidden !important;
    background: 
        radial-gradient(circle at center, rgba(248, 249, 250, 0.9) 0%, rgba(233, 236, 239, 0.95) 100%),
        linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* Desktop 2x2 optimized image sizing */
@media (min-width: 993px) {
    .service-image {
        height: 350px !important;
    }
}

.service-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.02) 0%,
        transparent 30%,
        transparent 70%,
        rgba(255, 255, 255, 0.05) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.4s ease-out;
    filter: brightness(0.95) contrast(1.1) saturate(1.15) hue-rotate(0deg);
    transform: scale(1.02);
}

.service-card-with-image:hover .service-img {
    transform: scale(1.05);
    filter: brightness(1.02) contrast(1.08) saturate(1.1);
}

/* Service Content */
.service-content {
    padding: 2.5rem 2.2rem !important;
    position: relative !important;
    z-index: 2 !important;
    background: #fff !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* Desktop 2x2 optimized content padding */
@media (min-width: 993px) {
    .service-content {
        padding: 3rem 2.5rem !important;
        min-height: 220px !important;
    }
    
    /* Modern classy offset styling for desktop */
    .service-card-with-image:nth-child(1) {
        transform: translateY(-20px) rotate(-1deg) !important;
        z-index: 4 !important;
    }
    
    .service-card-with-image:nth-child(2) {
        transform: translateY(20px) rotate(1deg) !important;
        z-index: 3 !important;
    }
    
    .service-card-with-image:nth-child(3) {
        transform: translateY(20px) rotate(-0.5deg) !important;
        z-index: 2 !important;
    }
    
    .service-card-with-image:nth-child(4) {
        transform: translateY(-20px) rotate(0.5deg) !important;
        z-index: 1 !important;
    }
    
    /* Enhanced hover effects for offset cards */
    .service-card-with-image:nth-child(1):hover {
        transform: translateY(-30px) rotate(0deg) scale(1.02) !important;
        box-shadow: 
            0 40px 80px rgba(0, 0, 0, 0.15),
            0 20px 40px rgba(0, 0, 0, 0.1),
            0 8px 20px rgba(0, 0, 0, 0.05) !important;
    }
    
    .service-card-with-image:nth-child(2):hover {
        transform: translateY(10px) rotate(0deg) scale(1.02) !important;
        box-shadow: 
            0 35px 70px rgba(0, 0, 0, 0.15),
            0 18px 35px rgba(0, 0, 0, 0.1),
            0 6px 18px rgba(0, 0, 0, 0.05) !important;
    }
    
    .service-card-with-image:nth-child(3):hover {
        transform: translateY(10px) rotate(0deg) scale(1.02) !important;
        box-shadow: 
            0 35px 70px rgba(0, 0, 0, 0.15),
            0 18px 35px rgba(0, 0, 0, 0.1),
            0 6px 18px rgba(0, 0, 0, 0.05) !important;
    }
    
    .service-card-with-image:nth-child(4):hover {
        transform: translateY(-30px) rotate(0deg) scale(1.02) !important;
        box-shadow: 
            0 40px 80px rgba(0, 0, 0, 0.15),
            0 20px 40px rgba(0, 0, 0, 0.1),
            0 8px 20px rgba(0, 0, 0, 0.05) !important;
    }
    
    /* Modern gradient overlay for desktop */
    .service-card-with-image::before {
        background: 
            radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
            linear-gradient(135deg, 
                rgba(255, 255, 255, 0.3) 0%, 
                rgba(255, 255, 255, 0.15) 30%,
                rgba(0, 0, 0, 0.02) 70%,
                rgba(0, 0, 0, 0.08) 100%) !important;
    }
    
    /* Enhanced shadow depth for modern feel */
    .service-card-with-image {
        box-shadow: 
            0 25px 70px rgba(0, 0, 0, 0.12),
            0 10px 30px rgba(0, 0, 0, 0.08),
            0 4px 15px rgba(0, 0, 0, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    }
    
    /* Subtle border radius variations for modern asymmetry */
    .service-card-with-image:nth-child(1) {
        border-radius: 32px 28px 32px 28px !important;
    }
    
    .service-card-with-image:nth-child(2) {
        border-radius: 28px 32px 28px 32px !important;
    }
    
    .service-card-with-image:nth-child(3) {
        border-radius: 32px 28px 32px 28px !important;
    }
    
    .service-card-with-image:nth-child(4) {
        border-radius: 28px 32px 28px 32px !important;
    }
    
    /* Modern spacing adjustments */
    .services-grid-4col {
        perspective: 1000px !important;
    }
}

.service-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 1.2rem;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.2;
    transition: all 0.3s ease-out;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
}

.service-content h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #000 0%, #333 100%);
    transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
}

.service-card-with-image:hover .service-content h3 {
    color: #000;
    transform: translateY(-1px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.service-card-with-image:hover .service-content h3::after {
    width: 40%;
}

.service-content p {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    flex-grow: 1;
}

.service-card-with-image:hover .service-content p {
    color: #333;
}

/* Enhanced CTA Button */
.service-cta-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    background: 
        linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%),
        linear-gradient(135deg, #000 0%, #1a1a1a 30%, #333 70%, #555 100%);
    background-size: 200% 100%, 100% 100%;
    background-position: -200% center, center;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    cursor: pointer;
    transition: all 0.3s ease-out;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.25),
        0 6px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-family: 'Montserrat', sans-serif;
    margin-top: auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.service-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #333 0%, #555 30%, #777 70%, #999 100%);
    transition: left 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: -1;
}

.service-cta-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transition: all 0.3s ease-out;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 1;
}

.service-cta-btn:hover::before {
    left: 0;
}

.service-cta-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.2),
        0 6px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    letter-spacing: 1.9px;
}

.service-cta-btn:hover::after {
    width: 200px;
    height: 200px;
}

.service-cta-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Service Icons (Optional Enhancement) */
.service-content::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 1.8rem;
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border-radius: 50%;
    opacity: 0;
    transform: translateY(10px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card-with-image:hover .service-content::before {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Responsive Design */
@media (max-width: 992px) {
    .fulham-container .services-grid-4col,
    .benefits-section .services-grid-4col,
    .services-grid-4col {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 3rem !important;
        padding: 0 1.5rem !important;
        max-width: 100% !important;
    }
    
    .service-image {
        height: 240px;
    }
    
    .service-content {
        padding: 2.2rem 2rem;
        min-height: 180px;
    }
    
    .service-content h3 {
        font-size: 1.3rem;
    }
    
    .service-content p {
        font-size: 0.95rem;
        margin-bottom: 1.8rem;
    }
    
    .service-cta-btn {
        padding: 1.1rem 1.8rem;
    }
}

@media (max-width: 768px) {
    .fulham-container .services-grid-4col,
    .benefits-section .services-grid-4col,
    .services-grid-4col {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 1.5rem !important;
        margin: 2rem 0 !important;
        padding: 0 1rem !important;
        max-width: 100% !important;
    }
    
    .service-card-with-image {
        border-radius: 16px !important;
        max-width: 100% !important;
        margin: 0 !important;
        min-height: auto !important;
        transform: none !important;
        backdrop-filter: none !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .service-card-with-image:hover {
        transform: translateY(-2px) scale(1.01) !important;
    }
    
    .service-card-with-image::before,
    .service-card-with-image::after {
        display: none !important;
    }
    
    .service-image {
        height: 200px !important;
        flex-shrink: 0 !important;
    }
    
    .service-content {
        padding: 1.5rem 1.2rem !important;
        min-height: auto !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .service-content h3 {
        font-size: 1.2rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .service-content p {
        font-size: 0.9rem !important;
        margin-bottom: 1.2rem !important;
        line-height: 1.5 !important;
        flex-grow: 1 !important;
    }
    
    .service-cta-btn {
        padding: 0.9rem 1.2rem !important;
        font-size: 0.9rem !important;
        border-radius: 12px !important;
        letter-spacing: 1px !important;
        margin-top: auto !important;
        flex-shrink: 0 !important;
    }
    
    .service-cta-btn:hover {
        transform: translateY(-1px) scale(1.005) !important;
        letter-spacing: 1.1px !important;
    }
}

@media (max-width: 480px) {
    .fulham-container .services-grid-4col,
    .benefits-section .services-grid-4col,
    .services-grid-4col {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 1.2rem !important;
        padding: 0 0.8rem !important;
        margin: 1.5rem 0 !important;
        max-width: 100% !important;
    }
    
    .service-card-with-image {
        max-width: 100% !important;
        min-height: auto !important;
        border-radius: 14px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .service-image {
        height: 180px !important;
        flex-shrink: 0 !important;
    }
    
    .service-content {
        padding: 1.2rem 1rem !important;
        min-height: auto !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .service-content h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.6rem !important;
        line-height: 1.3 !important;
    }
    
    .service-content p {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
        line-height: 1.4 !important;
        flex-grow: 1 !important;
    }
    
    .service-cta-btn {
        padding: 0.8rem 1rem !important;
        font-size: 0.85rem !important;
        border-radius: 10px !important;
        letter-spacing: 0.8px !important;
        margin-top: auto !important;
        flex-shrink: 0 !important;
    }
    
    .service-cta-btn:hover {
        transform: translateY(-1px) !important;
        letter-spacing: 0.9px !important;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 375px) {
    .fulham-container .services-grid-4col,
    .benefits-section .services-grid-4col,
    .services-grid-4col {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 1rem !important;
        padding: 0 0.5rem !important;
        margin: 1rem 0 !important;
        max-width: 100% !important;
    }
    
    .service-card-with-image {
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .service-image {
        height: 160px !important;
        flex-shrink: 0 !important;
    }
    
    .service-content {
        padding: 1rem 0.8rem !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .service-content h3 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .service-content p {
        font-size: 0.8rem !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.3 !important;
        flex-grow: 1 !important;
    }
    
    .service-cta-btn {
        padding: 0.7rem 0.8rem !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
        letter-spacing: 0.5px !important;
        margin-top: auto !important;
        flex-shrink: 0 !important;
    }
}

/* Smooth Loading Animations */
@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.service-card-with-image {
    animation: cardSlideIn 0.6s ease-out both;
}

.service-card-with-image:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card-with-image:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card-with-image:nth-child(3) {
    animation-delay: 0.3s;
}

.service-card-with-image:nth-child(4) {
    animation-delay: 0.4s;
}

/* Accessibility Enhancements */
.service-cta-btn:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.service-card-with-image:focus-within {
    outline: 2px solid #333;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .service-card-with-image {
        background: #2a2a2a;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .service-content {
        background: #2a2a2a;
    }
    
    .service-content h3 {
        color: #fff;
    }
    
    .service-content p {
        color: #ccc;
    }
}
