/* Services Hero Section - Premium Design with Enhanced Blue Colors */
.services-hero-section {
    position: relative;
    background: linear-gradient(135deg, #0a0f1c 0%, #1a1f3a 25%, #0f1629 50%, #1e2a4a 75%, #0a1220 100%);
    padding: 120px 0 10px;
    overflow: hidden;
    max-height: 500px;
    display: flex;
    align-items: center;
}

/* Premium Dark Blue Background Effects */
.services-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.services-hero-section .container {
    position: relative;
    z-index: 2;
}

/* Hero Grid Layout */
.services-hero-grid {
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

/* Content Area with Glassmorphism */
.services-content-area {
    position: relative;
    z-index: 3;
    padding: 40px;
    background: rgba(30, 58, 138, 0.08);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 
        0 12px 40px rgba(15, 23, 42, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.services-content-area: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.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Premium Badge */
.services-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(20px);
    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);
}

.services-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;
}

.services-badge svg {
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.services-title {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(2.2rem, 3.8vw, 3.2rem);
    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);
}

.services-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: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Service Categories */
.service-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 35px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 58, 138, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #93c5fd;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-badge:hover {
    background: rgba(30, 58, 138, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(30, 58, 138, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.category-badge svg {
    width: 16px;
    height: 16px;
    color: #60a5fa;
}

/* CTA Button */
.services-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(30, 58, 138, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.services-cta-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;
}

.services-cta-btn:hover::before {
    left: 100%;
}

.services-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 30px rgba(30, 58, 138, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.services-cta-btn svg {
    transition: transform 0.3s ease;
}

.services-cta-btn:hover svg {
    transform: translateY(3px);
}

/* Gallery Area */
.services-gallery-area {
    position: relative;
    z-index: 3;
    padding: 30px;
    background: rgba(30, 58, 138, 0.08);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 
        0 12px 40px rgba(15, 23, 42, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.services-gallery-area: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.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.services-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 120px);
    gap: 16px;
    height: 400px;
}

.services-gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(30, 58, 138, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.25);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 25px rgba(15, 23, 42, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.services-gallery-item.large {
    grid-row: span 2;
    grid-column: span 2;
}

.services-gallery-item.wide {
    grid-column: span 2;
}

.services-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.8) saturate(1.1);
}

.services-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(30, 64, 175, 0.4) 0%,
        rgba(59, 130, 246, 0.3) 50%,
        rgba(96, 165, 250, 0.2) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
    z-index: 3;
}

.services-gallery-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e40af;
    transform: scale(0.8);
    transition: all 0.4s ease;
    box-shadow: 
        0 6px 20px rgba(15, 23, 42, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.services-gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 20px 40px rgba(15, 23, 42, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    z-index: 4;
}

.services-gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1) saturate(1.2);
}

.services-gallery-item:hover .services-gallery-overlay {
    opacity: 1;
}

.services-gallery-item:hover .services-gallery-icon {
    transform: scale(1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 8px 25px rgba(15, 23, 42, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Image Modal */
.services-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.services-image-modal.active {
    display: flex;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 28, 0.9);
    backdrop-filter: blur(20px);
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 58, 138, 0.1);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 44px;
    height: 44px;
    background: rgba(30, 58, 138, 0.3);
    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;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 6px 20px rgba(15, 23, 42, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-close:hover {
    background: rgba(59, 130, 246, 0.5);
    transform: scale(1.1);
    box-shadow: 
        0 8px 25px rgba(15, 23, 42, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modal-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 -60px;
}

.modal-nav-btn {
    width: 52px;
    height: 52px;
    background: rgba(30, 58, 138, 0.3);
    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;
    backdrop-filter: blur(15px);
    pointer-events: auto;
    box-shadow: 
        0 6px 20px rgba(15, 23, 42, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-nav-btn:hover {
    background: rgba(59, 130, 246, 0.5);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 
        0 8px 25px rgba(15, 23, 42, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modal-nav-btn svg {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
}

.modal-prev {
    margin-left: -80px;
}

.modal-next {
    margin-right: -80px;
}

/* Background Elements */
.services-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.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);
}

.bg-element-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
}

.bg-element-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
}

.bg-element-3 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    left: 15%;
}

/* Animation on scroll */
.services-content-area {
    opacity: 0;
    transform: translateX(-50px);
    animation: servicesContentSlideIn 1s ease forwards;
    animation-delay: 0.3s;
}

.services-gallery-area {
    opacity: 0;
    transform: translateX(50px);
    animation: servicesGallerySlideIn 1s ease forwards;
    animation-delay: 0.6s;
}

@keyframes servicesContentSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes servicesGallerySlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.services-gallery-item {
    opacity: 0;
    transform: scale(0.9);
    animation: servicesGalleryItemFadeIn 0.5s ease forwards;
}

.services-gallery-item:nth-child(1) { animation-delay: 1.4s; }
.services-gallery-item:nth-child(2) { animation-delay: 1.5s; }
.services-gallery-item:nth-child(3) { animation-delay: 1.6s; }
.services-gallery-item:nth-child(4) { animation-delay: 1.7s; }
.services-gallery-item:nth-child(5) { animation-delay: 1.8s; }

@keyframes servicesGalleryItemFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1199px) {
    .services-hero-section {
        padding: 100px 0 20px;
    }
    
    .services-hero-grid {
        gap: 50px;
    }
    
    .services-content-area,
    .services-gallery-area {
        padding: 35px;
    }
    
    .services-gallery-grid {
        height: 350px;
        grid-template-rows: repeat(3, 100px);
    }
}

@media (max-width: 991px) {
    .services-hero-section {
        padding: 80px 0 20px;
    }
    
    .services-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .services-content-area,
    .services-gallery-area {
        padding: 30px;
        max-width: 700px;
        margin: 0 auto;
    }
    
    .services-description {
        max-width: 100%;
    }
    
    .service-categories {
        justify-content: center;
    }
    
    .services-cta-btn {
        margin: 0 auto;
    }
    
    .services-gallery-grid {
        height: 300px;
        grid-template-rows: repeat(3, 90px);
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .services-hero-section {
        padding: 60px 0 20px;
    }
    
    .services-hero-grid {
        gap: 30px;
    }
    
    .services-content-area,
    .services-gallery-area {
        padding: 25px;
        border-radius: 16px;
        max-width: 90%;
    }
    
    .services-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 120px);
        height: auto;
        gap: 12px;
    }
    
    .services-gallery-item {
        border-radius: 12px;
    }
    
    .services-gallery-item.large {
        grid-row: span 2;
        grid-column: span 1;
    }
    
    .services-gallery-item.wide {
        grid-column: span 2;
    }
    
    .modal-close {
        top: -40px;
        right: -40px;
        width: 36px;
        height: 36px;
    }
    
    .modal-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .modal-prev {
        margin-left: -60px;
    }
    
    .modal-next {
        margin-right: -60px;
    }
}

@media (max-width: 575px) {
    .services-hero-section {
        padding: 50px 0 20px;
    }
    
    .services-hero-grid {
        gap: 25px;
    }
    
    .services-content-area,
    .services-gallery-area {
        padding: 20px;
        max-width: 95%;
    }
    
    .services-gallery-grid {
        grid-template-rows: repeat(4, 100px);
        gap: 10px;
    }
    
    .modal-close {
        top: -30px;
        right: -30px;
        width: 32px;
        height: 32px;
    }
    
    .modal-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .modal-prev {
        margin-left: -50px;
    }
    
    .modal-next {
        margin-right: -50px;
    }
    
    .service-categories {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .category-badge {
        width: 100%;
        justify-content: center;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .services-hero-section {
        padding: 140px 0 20px;
    }
    
    .services-hero-grid {
        gap: 80px;
    }
    
    .services-content-area,
    .services-gallery-area {
        padding: 50px;
    }
    
    .services-gallery-grid {
        height: 450px;
        grid-template-rows: repeat(3, 140px);
        gap: 20px;
    }
}

/* Performance optimizations */
.services-gallery-item,
.services-gallery-item img {
    will-change: transform;
    backface-visibility: hidden;
}

/* Accessibility */
.services-gallery-item:focus-visible,
.category-badge:focus-visible,
.services-cta-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.modal-close:focus-visible,
.modal-nav-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .services-content-area,
    .services-gallery-area,
    .services-gallery-item {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .services-gallery-item:hover {
        transform: none;
    }
    
    .services-gallery-item:hover img {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .services-gallery-item,
    .services-content-area,
    .services-gallery-area {
        border-width: 2px;
        border-color: rgba(255, 255, 255, 0.4);
    }
    
    .services-gallery-item:hover {
        border-color: #3b82f6;
    }
    
    .services-badge {
        background: #1e40af;
        color: white;
        border-color: white;
    }
}