﻿/* ============================================
   SECTION STYLING
   ============================================ */

.services-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a1f3a 50%, var(--primary-dark) 100%);
    padding: var(--spacing-xl) var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

    .services-section::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
        pointer-events: none;
    }

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER STYLING
   ============================================ */

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    animation: fadeInDown 0.8s ease-out;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 var(--spacing-md) 0;
    letter-spacing: -0.02em;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan), var(--accent-purple));
    margin: 0 auto;
    border-radius: 2px;
    animation: slideInWidth 0.8s ease-out 0.2s both;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: var(--spacing-lg) auto;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ============================================
   SERVICE CARD STYLING
   ============================================ */

.service-card {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all var(--transition-smooth);
    animation: slideUpCard 0.6s ease-out both;
    animation-delay: var(--card-delay);
    backdrop-filter: blur(10px);
}

    .service-card:hover {
        border-color: rgba(59, 130, 246, 0.5);
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2), 0 0 60px rgba(6, 182, 212, 0.1);
    }

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
}

.service-card:hover .card-glow {
    opacity: 1;
}

/* ============================================
   IMAGE WRAPPER - PROPER FIT
   ============================================ */

.image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}

    .image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: transform var(--transition-smooth);
    }

.service-card:hover .image-wrapper img {
    transform: scale(1.08) rotate(1deg);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(6, 182, 212, 0.1) 100%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
}

.service-card:hover .image-overlay {
    opacity: 1;
}

/* ============================================
   CONTENT STYLING
   ============================================ */

.service-content {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.icon-badge {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.service-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.3;
}

.service-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 var(--spacing-md) 0;
    flex-grow: 1;
}

/* ============================================
   LEARN MORE LINK
   ============================================ */

.learn-more {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    position: relative;
    width: fit-content;
}

    .learn-more::after {
        content: "";
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
        transition: width var(--transition-smooth);
    }

    .learn-more:hover {
        color: var(--accent-blue);
        transform: translateX(4px);
    }

        .learn-more:hover::after {
            width: 100%;
        }

.arrow {
    display: inline-block;
    transition: transform var(--transition-fast);
}

.learn-more:hover .arrow {
    transform: translateX(4px);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideUpCard {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInWidth {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 80px;
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .services-section {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .section-title {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 640px) {
    .services-section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .service-content {
        padding: var(--spacing-md);
    }

    .image-wrapper {
        height: 200px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    .services-section {
        background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
    }
}
