/* Service Cards Section - Premium Blue Design */
.service-cards-section {
    position: relative;
    background: linear-gradient(135deg, #0a0f1c 0%, #1a1f3a 25%, #2a2f5a 50%, #1a1f3a 75%, #0a0f1c 100%);
    padding: 80px 0;
    overflow: hidden;
}

/* Premium Background Effects */
.service-cards-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    animation: premiumPulse 10s ease-in-out infinite;
}

@keyframes premiumPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.service-cards-section .container {
    position: relative;
    z-index: 2;
}

/* Section Header - Premium */
.service-cards-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    background: rgba(30, 58, 138, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 
        0 12px 40px rgba(15, 23, 42, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-cards-header:hover {
    background: rgba(30, 58, 138, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 16px 50px rgba(15, 23, 42, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.service-cards-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 58, 138, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #60a5fa;
    margin-bottom: 20px;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(30, 58, 138, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.service-cards-badge:hover {
    background: rgba(30, 58, 138, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(30, 58, 138, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    color: #93c5fd;
}

.service-cards-badge svg {
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.service-cards-title {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(2.2rem, 3.8vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, #1e40af, #3b82f6, #60a5fa, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 0 35px rgba(59, 130, 246, 0.4);
}

.service-cards-description {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: #bfdbfe; /* Lighter blue for better contrast */
    line-height: 1.7;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Service Cards Grid */
.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Service Card Design */
.service-detail-card {
    background: rgba(30, 58, 138, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 
        0 12px 30px rgba(15, 23, 42, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.service-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    z-index: 2;
}

.service-detail-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 58, 138, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 20px 40px rgba(15, 23, 42, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.service-detail-card:hover::before {
    transform: scaleX(1);
}

/* Video Preview */
.service-video-preview {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    cursor: pointer;
}

.service-video-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-detail-card:hover .service-video-preview img {
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.3) 0%,
        rgba(15, 23, 42, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.4);
    transform: scale(0.9);
}

.play-button svg {
    width: 24px;
    height: 24px;
    margin-left: 4px; /* Adjust for play icon centering */
}

.service-detail-card:hover .play-button {
    transform: scale(1);
    background: rgba(59, 130, 246, 1);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

/* Card Header */
.service-card-header {
    padding: 25px 25px 15px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.service-card-title {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 15px;
    line-height: 1.3;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.4s ease;
    box-shadow: 
        0 6px 20px rgba(30, 58, 138, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.service-detail-card:hover .service-card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 8px 25px rgba(30, 58, 138, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.service-detail-card:hover .service-card-title {
    color: #60a5fa;
}

.service-card-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    color: #bfdbfe;
    line-height: 1.6;
    margin-bottom: 0;
    transition: all 0.3s ease;
}

.service-detail-card:hover .service-card-text {
    color: #dbeafe;
}

/* Card Body */
.service-card-body {
    padding: 15px 25px;
    flex: 1;
}

.service-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: #bfdbfe;
    transition: all 0.3s ease;
}

.service-feature-item:last-child {
    margin-bottom: 0;
}

.feature-icon {
    width: 20px;
    height: 20px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 12px;
    height: 12px;
}

.service-detail-card:hover .service-feature-item {
    transform: translateX(5px);
    color: #dbeafe;
}

.service-detail-card:hover .feature-icon {
    background: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* Card Footer */
.service-card-footer {
    padding: 15px 25px 25px;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
}

.service-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 6px 20px rgba(30, 58, 138, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.service-card-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.service-card-btn:hover::before {
    left: 100%;
}

.service-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(30, 58, 138, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.service-card-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.service-card-btn:hover svg {
    transform: translateX(3px);
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 28, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: rgba(30, 58, 138, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    background: rgba(30, 58, 138, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.video-modal-close:hover {
    background: rgba(59, 130, 246, 0.7);
    transform: scale(1.1);
}

.video-modal-close svg {
    width: 24px;
    height: 24px;
}

/* Background Elements */
.service-cards-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.service-bg-element {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(30, 64, 175, 0.1) 50%, transparent 70%);
    opacity: 0.7;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 
        0 8px 30px rgba(30, 58, 138, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.service-bg-element-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
}

.service-bg-element-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
}

.service-bg-element-3 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    left: 15%;
}

/* Animation on scroll */
.service-cards-header {
    opacity: 0;
    transform: translateY(30px);
    animation: serviceHeaderFadeIn 1.2s ease forwards;
    animation-delay: 0.2s;
}

@keyframes serviceHeaderFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-detail-card {
    opacity: 0;
    transform: translateY(40px);
    animation: serviceCardFadeIn 1s ease forwards;
}

.service-detail-card:nth-child(1) { animation-delay: 0.3s; }
.service-detail-card:nth-child(2) { animation-delay: 0.4s; }
.service-detail-card:nth-child(3) { animation-delay: 0.5s; }
.service-detail-card:nth-child(4) { animation-delay: 0.6s; }
.service-detail-card:nth-child(5) { animation-delay: 0.7s; }
.service-detail-card:nth-child(6) { animation-delay: 0.8s; }
.service-detail-card:nth-child(7) { animation-delay: 0.9s; }
.service-detail-card:nth-child(8) { animation-delay: 1.0s; }
.service-detail-card:nth-child(9) { animation-delay: 1.1s; }
.service-detail-card:nth-child(10) { animation-delay: 1.2s; }
.service-detail-card:nth-child(11) { animation-delay: 1.3s; }
.service-detail-card:nth-child(12) { animation-delay: 1.4s; }
.service-detail-card:nth-child(13) { animation-delay: 1.5s; }
.service-detail-card:nth-child(14) { animation-delay: 1.6s; }

@keyframes serviceCardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1199px) {
    .service-cards-section {
        padding: 70px 0;
    }
    
    .service-cards-header {
        margin-bottom: 50px;
        padding: 25px;
    }
    
    .service-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .service-video-preview {
        height: 160px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-button svg {
        width: 20px;
        height: 20px;
    }
    
    .service-card-header {
        padding: 20px 20px 12px;
    }
    
    .service-card-body {
        padding: 12px 20px;
    }
    
    .service-card-footer {
        padding: 12px 20px 20px;
    }
    
    .service-card-title {
        font-size: 1.3rem;
    }
    
    .service-card-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 991px) {
    .service-cards-section {
        padding: 60px 0;
    }
    
    .service-cards-header {
        margin-bottom: 40px;
        padding: 20px;
    }
    
    .service-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .service-video-preview {
        height: 150px;
    }
    
    .service-card-header {
        padding: 18px 18px 10px;
    }
    
    .service-card-body {
        padding: 10px 18px;
    }
    
    .service-card-footer {
        padding: 10px 18px 18px;
    }
    
    .service-card-title {
        font-size: 1.2rem;
    }
    
    .service-card-text {
        font-size: 0.9rem;
    }
    
    .service-feature-item {
        font-size: 0.85rem;
    }
}

@media (max-width: 767px) {
    .service-cards-section {
        padding: 50px 0;
    }
    
    .service-cards-header {
        margin-bottom: 30px;
        padding: 20px;
    }
    
    .service-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .service-video-preview {
        height: 200px;
    }
}

@media (max-width: 575px) {
    .service-cards-section {
        padding: 40px 0;
    }
    
    .service-cards-header {
        margin-bottom: 25px;
        padding: 15px;
    }
    
    .service-video-preview {
        height: 180px;
    }
    
    .play-button {
        width: 45px;
        height: 45px;
    }
    
    .play-button svg {
        width: 18px;
        height: 18px;
    }
    
    .service-card-header {
        padding: 18px 18px 10px;
    }
    
    .service-card-body {
        padding: 10px 18px;
    }
    
    .service-card-footer {
        padding: 10px 18px 18px;
    }
    
    .service-card-title {
        font-size: 1.1rem;
        gap: 10px;
    }
    
    .service-card-icon {
        width: 32px;
        height: 32px;
    }
    
    .service-card-text {
        font-size: 0.85rem;
    }
    
    .service-feature-item {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .feature-icon {
        width: 18px;
        height: 18px;
    }
    
    .feature-icon svg {
        width: 10px;
        height: 10px;
    }
    
    .service-card-btn {
        width: 100%;
        justify-content: center;
    }
    
    .video-modal-content {
        width: 95%;
    }
    
    .video-modal-close {
        top: -40px;
        right: 0;
        width: 36px;
        height: 36px;
    }
    
    .video-modal-close svg {
        width: 20px;
        height: 20px;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .service-cards-section {
        padding: 100px 0;
    }
    
    .service-cards-header {
        margin-bottom: 70px;
        padding: 40px;
    }
    
    .service-cards-grid {
        gap: 35px;
    }
    
    .service-video-preview {
        height: 200px;
    }
    
    .play-button {
        width: 70px;
        height: 70px;
    }
    
    .play-button svg {
        width: 28px;
        height: 28px;
    }
    
    .service-card-header {
        padding: 30px 30px 20px;
    }
    
    .service-card-body {
        padding: 20px 30px;
    }
    
    .service-card-footer {
        padding: 20px 30px 30px;
    }
    
    .service-card-title {
        font-size: 1.5rem;
    }
    
    .service-card-icon {
        width: 44px;
        height: 44px;
    }
    
    .service-card-text {
        font-size: 1rem;
    }
    
    .service-feature-item {
        font-size: 0.95rem;
    }
}

/* Performance optimizations */
.service-detail-card {
    will-change: transform;
    backface-visibility: hidden;
}

/* Accessibility */
.service-detail-card:focus-visible,
.service-card-btn:focus-visible,
.service-video-preview:focus-visible,
.video-modal-close:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .service-cards-header,
    .service-detail-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .service-detail-card:hover {
        transform: none;
    }
    
    .service-detail-card:hover .service-feature-item {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .service-detail-card {
        border-width: 2px;
        border-color: rgba(255, 255, 255, 0.4);
    }
    
    .service-detail-card:hover {
        border-color: #3b82f6;
    }
    
    .service-cards-badge {
        background: #1e40af;
        color: white;
        border-color: white;
    }
}