/* ============================================
   PREMIUM CNC SERVICES SECTION - SCOPED STYLES
   ============================================ */

.cnc-services-wrapper {
    position: relative;
    padding: 100px 20px;
    background: transparent;
    overflow: hidden;
}

.cnc-services-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ===================================
   SECTION HEADER
   =================================== */
.cnc-services-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    animation: cnc-services-fade-in 0.8s ease-out;
}

@keyframes cnc-services-fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tag */
.cnc-services-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.cnc-services-tag-icon {
    font-size: 8px;
    color: #EE6C4D;
    animation: cnc-services-pulse 2s ease-in-out infinite;
}

@keyframes cnc-services-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.cnc-services-tag-text {
    font-size: 14px;
    font-weight: 700;
    color: #EE6C4D;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Heading */
.cnc-services-heading {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
}

.cnc-services-heading-accent {
    display: block;
    background: linear-gradient(135deg, #EE6C4D 0%, #E29578 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 8px;
}

/* Description */
.cnc-services-description {
    font-size: 17px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ===================================
   SERVICES GRID
   =================================== */
.cnc-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Service Card */
.cnc-services-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: cnc-services-card-fade-in 0.6s ease-out backwards;
}

@keyframes cnc-services-card-fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cnc-services-card:nth-child(1) {
    animation-delay: 0.1s;
}

.cnc-services-card:nth-child(2) {
    animation-delay: 0.2s;
}

.cnc-services-card:nth-child(3) {
    animation-delay: 0.3s;
}

.cnc-services-card:nth-child(4) {
    animation-delay: 0.4s;
}

.cnc-services-card:nth-child(5) {
    animation-delay: 0.5s;
}

.cnc-services-card:nth-child(6) {
    animation-delay: 0.6s;
}

.cnc-services-card:nth-child(7) {
    animation-delay: 0.7s;
}

.cnc-services-card:nth-child(8) {
    animation-delay: 0.8s;
}

/* Gradient background on hover */
.cnc-services-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(238, 108, 77, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.cnc-services-card:hover::before {
    opacity: 1;
}

.cnc-services-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

/* All card content above background */
.cnc-services-card>* {
    position: relative;
    z-index: 1;
}

/* Card Icon */
.cnc-services-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.cnc-services-card-icon svg {
    color: #60a5fa;
    transition: all 0.4s ease;
}

.cnc-services-card:hover .cnc-services-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.3) 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.cnc-services-card:hover .cnc-services-card-icon svg {
    color: #3b82f6;
    transform: scale(1.1);
}

/* Card Title */
.cnc-services-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.3;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card Text */
.cnc-services-card-text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 20px 0;
    min-height: 66px;
}

/* Card Link */
.cnc-services-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #60a5fa;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cnc-services-card-link svg {
    transition: transform 0.3s ease;
}

.cnc-services-card-link:hover {
    color: #3b82f6;
    gap: 10px;
}

.cnc-services-card-link:hover svg {
    transform: translateX(4px);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Large Desktop */
@media (max-width: 1280px) {
    .cnc-services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .cnc-services-wrapper {
        padding: 80px 20px;
    }

    .cnc-services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .cnc-services-heading {
        font-size: 40px;
    }

    .cnc-services-description {
        font-size: 16px;
    }

    .cnc-services-card {
        padding: 28px 20px;
    }

    .cnc-services-card-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .cnc-services-card-icon svg {
        width: 40px;
        height: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .cnc-services-wrapper {
        padding: 60px 16px;
    }

    .cnc-services-header {
        margin-bottom: 40px;
    }

    .cnc-services-heading {
        font-size: 32px;
    }

    .cnc-services-description {
        font-size: 15px;
    }

    .cnc-services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cnc-services-card {
        padding: 24px 20px;
    }

    .cnc-services-card-title {
        font-size: 16px;
        min-height: auto;
    }

    .cnc-services-card-text {
        font-size: 13px;
        min-height: auto;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .cnc-services-heading {
        font-size: 28px;
    }

    .cnc-services-card-icon {
        width: 60px;
        height: 60px;
    }

    .cnc-services-card-icon svg {
        width: 36px;
        height: 36px;
    }
}