/* Services Section - Categorized Layout Styles */
:root {
    --primary-purple: #6A0DAD;
    --secondary-purple: #8B5FBF;
    --accent-purple: #9D4EDD;
    --text-dark: #1a1a2e;
    --text-light: #64748b;
    --bg-light: #f8f9fa;
    --card-shadow: 0 10px 40px rgba(106, 13, 173, 0.1);
    --card-hover-shadow: 0 20px 60px rgba(106, 13, 173, 0.2);
    
    /* Category Colors */
    --network-color: #3b82f6;
    --hardware-color: #f59e0b;
    --software-color: #8b5cf6;
    --security-color: #ef4444;
    --cloud-color: #06b6d4;
    --development-color: #10b981;
    --consulting-color: #ec4899;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.services {
    padding: 120px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.services::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(106, 13, 173, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.services::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Main Header */
.services-header {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.services-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.services-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-purple), var(--accent-purple));
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(106, 13, 173, 0.3);
}

.services-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    font-weight: 400;
}

/* Category Section */
.service-category {
    margin-bottom: 100px;
    opacity: 0;
    transform: translateY(40px);
    animation: slideInView 0.8s ease-out forwards;
}

.service-category:nth-child(even) {
    animation-delay: 0.1s;
}

.service-category:nth-child(odd) {
    animation-delay: 0.2s;
}

@keyframes slideInView {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Header */
.category-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.category-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.category-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(135deg, currentColor, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
}

.category-icon svg {
    width: 45px;
    height: 45px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    z-index: 1;
}

/* Category Specific Colors */
.category-icon.network {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.category-icon.hardware {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.category-icon.software {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.category-icon.security {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.category-icon.cloud {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.category-icon.development {
    background: linear-gradient(135deg, #10b981, #059669);
}

.category-icon.consulting {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.category-header:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    position: relative;
}

.category-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
    margin-top: 40px;
}

.service-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px);
    animation: cardFadeIn 0.6s ease-out forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-purple), var(--accent-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--card-hover-shadow);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Service Image */
.service-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-image img {
    transform: scale(1.15);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 46, 0.7) 100%);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.service-card:hover .service-overlay {
    opacity: 0.8;
}

/* Service Icon */
.service-icon {
    width: 80px;
    height: 80px;
    margin: -40px auto 0;
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 30px rgba(106, 13, 173, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    border: 4px solid white;
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 15px 40px rgba(106, 13, 173, 0.5);
}

.service-icon svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Service Content */
.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 25px 30px 15px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.service-card:hover .service-title {
    color: var(--primary-purple);
}

.service-description {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1rem;
    margin: 0 30px 25px;
    flex-grow: 1;
}

/* Service Button */
.service-btn {
    display: block;
    margin: 0 30px 30px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-purple));
    color: white;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.3);
}

.service-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.service-btn:hover::before {
    width: 300px;
    height: 300px;
}

.service-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(106, 13, 173, 0.4);
}

.service-btn:active {
    transform: translateY(-1px);
}

/* Responsive Design */
@media screen and (max-width: 1400px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media screen and (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
}

@media screen and (max-width: 992px) {
    .services {
        padding: 100px 0;
    }

    .services-title {
        font-size: 2.8rem;
    }

    .category-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .services {
        padding: 80px 0;
    }
    
    .services-title {
        font-size: 2.2rem;
    }
    
    .services-subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .category-title {
        font-size: 1.8rem;
    }

    .category-icon {
        width: 75px;
        height: 75px;
    }

    .category-icon svg {
        width: 38px;
        height: 38px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }
    
    .service-image {
        height: 200px;
    }

    .service-icon {
        width: 70px;
        height: 70px;
        margin: -35px auto 0;
    }

    .service-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .service-title {
        font-size: 1.4rem;
        margin: 20px 25px 12px;
    }

    .service-description {
        font-size: 0.95rem;
        margin: 0 25px 20px;
    }

    .service-btn {
        padding: 12px 28px;
        font-size: 0.95rem;
        margin: 0 25px 25px;
    }

    .service-category {
        margin-bottom: 70px;
    }
}

@media screen and (max-width: 480px) {
    .services {
        padding: 60px 0;
    }
    
    .services-title {
        font-size: 1.9rem;
    }

    .services-subtitle {
        font-size: 1rem;
    }

    .category-header {
        margin-bottom: 35px;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .category-description {
        font-size: 0.95rem;
    }

    .category-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .category-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .service-image {
        height: 180px;
    }

    .service-icon {
        width: 65px;
        height: 65px;
        margin: -32px auto 0;
        border: 3px solid white;
    }
    
    .service-icon svg {
        width: 30px;
        height: 30px;
    }

    .service-title {
        font-size: 1.3rem;
    }

    .service-category {
        margin-bottom: 60px;
    }
}

/* Accessibility */
.service-btn:focus,
.service-card:focus {
    outline: 3px solid var(--primary-purple);
    outline-offset: 4px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .service-card {
        opacity: 1;
        transform: none;
    }
    
    .service-card:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .services {
        background: white;
        padding: 20px 0;
    }

    .services::before,
    .services::after {
        display: none;
    }

    .service-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .service-btn {
        display: none;
    }
}