/**
 * Services/Training Categories Section Styles
 *
 * @package Kursai
 * @since 1.0.0
 */

/* ==========================================================================
   Services Section
   ========================================================================== */
.services {
    padding: 80px 0;
    background: #ffffff;
}

.services__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ==========================================================================
   Services Header
   ========================================================================== */
.services__header {
    text-align: center;
    margin-bottom: 60px;
}

.services__kicker {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #3671ff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

.services__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    color: #23262f;
    margin: 0 0 20px 0;
}

.services__subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #777e90;
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================================
   Services Grid
   ========================================================================== */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ==========================================================================
   Service Card
   ========================================================================== */
.service-card {
    position: relative;
    background: rgba(243, 243, 243, 0.5);
    border-radius: 15px;
    padding: 35px 35px 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transform-origin: center center;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 231px;
    height: 480px;
    background: rgba(35, 33, 82, 0.1);
    filter: blur(100px);
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    pointer-events: none;
}

.service-card:hover {
    background: #ffffff;
    transform: rotate(2.47deg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card--featured {
    background: rgba(243, 243, 243, 0.5);
}

/* Card Icon */
.service-card__icon {
    width: 53px;
    height: 51px;
    margin-bottom: 20px;
    object-fit: contain;
}

/* Card Title */
.service-card__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #23262f;
    margin: 0 0 8px 0;
}

/* Card Description */
.service-card__desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #777e90;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

/* Card Tag */
.service-card__tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #ffffff;
    border-radius: 5px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #383333;
    width: fit-content;
    box-shadow: 0px 2px 4px -1px rgba(51, 53, 64, 0.1),
                inset 0px 0.5px 1px 0px rgba(52, 54, 64, 0.15);
}

/* Card Button - Hidden by default, shows on hover */
.service-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    background: #3671ff;
    color: #f8f9fb;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 15px;
    margin-top: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(10px);
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.service-card:hover .service-card__btn {
    opacity: 1;
    transform: translateY(0);
    max-height: 60px;
    padding: 14px 40px;
    margin-top: 20px;
}

.service-card__btn:hover {
    background: #2860e6;
    color: #ffffff;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .services {
        padding: 60px 0;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .services__title {
        font-size: 32px;
    }

    .service-card--featured {
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .services {
        padding: 50px 0;
    }

    .services__container {
        padding: 0 19px;
    }

    .services__header {
        margin-bottom: 40px;
    }

    .services__title {
        font-size: 28px;
    }

    .services__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 28px 25px 24px;
    }

    /* On touch devices, show button always and disable rotation */
    .service-card:hover {
        transform: none;
    }

    .service-card__btn {
        opacity: 1;
        transform: translateY(0);
        max-height: 60px;
        padding: 14px 40px;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .services {
        padding: 40px 0;
    }

    .services__container {
        padding: 0 15px;
    }

    .services__title {
        font-size: 24px;
    }

    .service-card__title {
        font-size: 18px;
    }

    .service-card__btn {
        width: 100%;
    }
}
