/* ============================= */
/* SERVICIOS - SM RACING */
/* ============================= */

.services-section {
    position: relative;
    width: 100%;
    min-height: auto;

    padding: 82px 46px 54px;

    background: #1a1a1a;
    overflow: hidden;

    border-bottom: 3px solid var(--sm-red);
}
/* ============================= */
/* LÍNEAS DECORATIVAS FONDO */
/* ============================= */

.services-bg-lines {
    position: absolute;
    top: 0;
    left: 0;

    width: 340px;
    height: 100%;

    pointer-events: none;
    z-index: 1;
}

.services-bg-lines span {
    position: absolute;
    top: -120px;

    width: 82px;
    height: 520px;

    background: rgba(255, 255, 255, 0.13);
    transform: skewX(-25deg);
}

.services-bg-lines span:nth-child(1) {
    left: 25px;
}

.services-bg-lines span:nth-child(2) {
    left: 150px;
    background: rgba(255, 255, 255, 0.2);
}

/* ============================= */
/* TÍTULO */
/* ============================= */

.services-title-wrapper {
    position: relative;
    z-index: 3;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;

    margin-bottom: 62px;

    animation: servicesTitleReveal 0.8s ease-out both;
}

.services-title {
    font-family: var(--font-title);
    font-style: italic;

    color: var(--sm-white);

    font-size: clamp(2.6rem, 3.5vw, 4rem);
    line-height: 1;

    letter-spacing: 1px;

    transform: skewX(-10deg);
}
.services-title-lines {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.services-title-lines span {
    width: 32px;
    height: 16px;

    background: var(--sm-red);
    transform: skewX(-25deg);
}

.service-title-long {
    font-size: 23px;
    line-height: 0.95;
}

/* ============================= */
/* GRID */
/* ============================= */

.services-grid {
    position: relative;
    z-index: 3;

    width: 100%;
    max-width: 1120px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 56px;
}
/* ============================= */
/* CARD */
/* ============================= */

.service-card {
    position: relative;

    width: 100%;
    aspect-ratio: 1 / 1.15;

    overflow: hidden;

    background: #111;

    transform: translateY(34px);
    opacity: 0;

    animation: serviceCardReveal 0.8s ease-out forwards;
}


.service-card:nth-child(1) {
    animation-delay: 0.08s;
}

.service-card:nth-child(2) {
    animation-delay: 0.16s;
}

.service-card:nth-child(3) {
    animation-delay: 0.24s;
}

.service-card:nth-child(4) {
    animation-delay: 0.32s;
}

.service-card:nth-child(5) {
    animation-delay: 0.40s;
}

.service-card:nth-child(6) {
    animation-delay: 0.48s;
}

.service-card img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;

    transform: scale(1.04);
    transition: transform 0.55s ease;
}

.service-card:hover img {
    transform: scale(1.12);
}

.service-overlay {
    position: absolute;
    inset: 0;

    background:
            linear-gradient(
                    to top,
                    rgba(224, 0, 24, 0.86) 0%,
                    rgba(224, 0, 24, 0.62) 30%,
                    rgba(0, 0, 0, 0.2) 62%,
                    rgba(0, 0, 0, 0.12) 100%
            );

    z-index: 1;
    transition: opacity 0.35s ease;
}

.service-card:hover .service-overlay {
    opacity: 0.92;
}

.service-content {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;

    z-index: 2;

    color: var(--sm-white);
}

.service-heading {
    display: flex;
    align-items: center;
    gap: 19px;

    margin-bottom: 14px;
}

.service-number {
    font-family: var(--font-title);
    font-style: italic;

    font-size: clamp(2.6rem, 4vw, 4rem);
    line-height: 0.8;

    color: var(--sm-white);

    transform: skewX(-10deg);
}

.service-heading h3 {
    margin: 0;

    font-family: var(--font-body);
    font-size: clamp(1.05rem, 1.4vw, 1.45rem);
    line-height: 1.1;
    font-weight: 700;

    color: var(--sm-white);
}

.service-content p {
    margin: 0;

    max-width: 95%;

    color: var(--sm-white);

    font-size: clamp(0.84rem, 1vw, 1rem);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: 0.6px;
}

/* ============================= */
/* ANIMACIONES */
/* ============================= */

@keyframes servicesTitleReveal {
    from {
        opacity: 0;
        transform: translateY(-24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes serviceCardReveal {
    from {
        opacity: 0;
        transform: translateY(34px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================= */
/* TABLET */
/* ============================= */

@media (max-width: 1024px) {
    .services-section {
        padding: 76px 36px 52px;
    }

    .services-grid {
        max-width: 820px;
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 36px;
    }

    .services-title-wrapper {
        gap: 16px;
        margin-bottom: 36px;
    }

    .services-title-lines span {
        width: 26px;
        height: 14px;
    }
    .service-card {
        aspect-ratio: 0.6/ 0.52;
    }
}

/* ============================= */
/* MOBILE */
/* ============================= */

@media (max-width: 768px) {
    .services-section {
        min-height: auto;

        padding: 60px 24px 46px;

        background: #1b1b1b;
    }

    .services-bg-lines {
        width: 220px;
    }

    .services-bg-lines span {
        width: 56px;
        height: 420px;
        top: -90px;
    }

    .services-bg-lines span:nth-child(1) {
        left: -10px;
    }

    .services-bg-lines span:nth-child(2) {
        left: 82px;
    }

    .services-title-wrapper {
        gap: 10px;
        margin-bottom: 28px;
    }

    .services-title {
        font-size: 2.35rem;
    }

    .services-title-lines {
        gap: 5px;
    }

    .services-title-lines span {
        width: 18px;
        height: 10px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 22px;

        max-width: 390px;
    }

    .service-card {
        aspect-ratio: 1 / 0.86;
    }

    .service-content {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .service-heading {
        gap: 12px;
        margin-bottom: 12px;
    }

    .service-number {
        font-size: 3rem;
    }

    .service-heading h3 {
        font-size: 1.18rem;
    }

    .service-title-long {
        font-size: 1.05rem;
    }

    .service-content p {
        font-size: 0.9rem;
        line-height: 1.14;
        max-width: 98%;
    }
}

/* ============================= */
/* MOBILE SMALL */
/* ============================= */

@media (max-width: 480px) {
    .services-section {
    padding: 54px 18px 40px;
}


    .services-title {
        font-size: 2rem;
    }

    .services-title-wrapper {
        gap: 8px;
    }

    .services-title-lines span {
        width: 14px;
        height: 9px;
    }

    .services-grid {
        gap: 20px;
    }

    .service-card {
        aspect-ratio: 1 / 0.86;
    }

    .service-number {
        font-size: 2.65rem;
    }

    .service-heading h3 {
        font-size: 1.02rem;
    }

    .service-title-long {
        font-size: 0.95rem;
    }

    .service-content p {
        font-size: 0.82rem;
        letter-spacing: 0.45px;
    }
}

/* ============================= */
/* MOBILE EXTRA SMALL */
/* ============================= */

@media (max-width: 360px) {
    .services-section {
        padding: 54px 18px 40px;
    }

    .services-title {
        font-size: 1.75rem;
    }

    .services-title-lines span {
        width: 12px;
        height: 8px;
    }

    .service-content {
        left: 14px;
        right: 14px;
        bottom: 14px;
    }

    .service-number {
        font-size: 2.35rem;
    }

    .service-heading h3 {
        font-size: 0.95rem;
    }

    .service-content p {
        font-size: 0.76rem;
    }
}