/* =========================
   SECCIÓN GENERAL
========================= */

.serv-prod-section {
    width: 100%;
    background: #131315;

    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(420px, 720px);
    align-items: center;
    justify-content: center;

    gap: clamp(45px, 6vw, 90px);
    padding: clamp(55px, 7vw, 90px) clamp(28px, 5vw, 80px);

    overflow: hidden;
}
/* =========================
   BLOQUE IZQUIERDO
========================= */

.serv-prod-info {
    width: 100%;
    max-width: 430px;
    margin-top: 0;
}

.serv-prod-badge {
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 0.4vw, 6px);

    border: 1px solid #ff1a1a;
    border-radius: 999px;

    color: #ff1a1a;
    font-size: clamp(8px, 0.65vw, 10px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: clamp(0.6px, 0.08vw, 1px);

    padding: clamp(3px, 0.3vw, 4px) clamp(9px, 0.8vw, 12px);

    margin-bottom: clamp(7px, 0.7vw, 10px);
    text-transform: uppercase;
}

.serv-prod-badge-icon {
    font-size: clamp(8px, 0.65vw, 10px);
}

.serv-prod-title {
    color: #f1f1f3;

    font-size: clamp(23px, 5.4vw, 70px);
    line-height: 0.96;
    font-weight: 800;
    letter-spacing: clamp(-4px, -0.22vw, -2px);
}

.serv-prod-title span {
    display: block;
    color: #ff1a1a;
}

.serv-prod-line {
    width: clamp(45px, 4.2vw, 67px);
    height: clamp(4px, 0.42vw, 6px);

    background: #ff1a1a;
    border-radius: 999px;

    margin-top: clamp(20px, 1.7vw, 28px);
    margin-bottom: clamp(10px, 0.9vw, 14px);
}

.serv-prod-line-second {
    margin-top: clamp(38px, 4vw, 56px);
}

.serv-prod-description {
    color: #f4f4f4;

    font-size: clamp(12px, 0.95vw, 15px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: clamp(0.4px, 0.05vw, 0.7px);

    text-transform: uppercase;
}

.serv-prod-description-small {
    font-size: clamp(11px, 0.9vw, 14px);
}

/* =========================
   BOTÓN IZQUIERDO
========================= */

.serv-prod-button {
    --button-transition-speed: 0.35s;

    width: clamp(225px, 17vw, 290px);
    min-height: clamp(52px, 4vw, 64px);

    margin-top: clamp(70px, 10vh, 115px);
    margin-left: clamp(0px, 2.6vw, 36px);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    text-decoration: none;
    color: #ffffff;

    font-size: clamp(14px, 1vw, 16px);
    font-weight: 600;

    border: 1px solid transparent;
    border-radius: 8px;

    background:
        linear-gradient(#7f11124d, #7f11124d) padding-box,
        linear-gradient(90deg, #7F1112 0%, #E51E21 50%, #7F1112 100%) border-box;

    box-shadow: 0 0 34px rgba(255, 0, 0, 0.08);

    transition:
        background var(--button-transition-speed) ease,
        box-shadow var(--button-transition-speed) ease;
}

.serv-prod-button:hover {
    background:
        linear-gradient(90deg, #FF0B0B 0%, #7F1112 100%) padding-box,
        linear-gradient(90deg, #7F1112 0%, #E51E21 50%, #7F1112 100%) border-box;

    box-shadow: 0 0 38px rgba(255, 11, 11, 0.22);
}

.serv-prod-button-icon {
    width: clamp(12px, 0.95vw, 15px);
    height: auto;
    display: block;
}

/* =========================
   CONTENEDOR DEL CARRUSEL
========================= */

.services-carousel {
    position: relative;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: auto;
    margin-top: 0;
}

/* =========================
   TARJETA PRINCIPAL (CORREGIDA)
========================= */

.carousel-card {
    width: 100%;
    max-width: 680px;
    height: auto;
    background: #000;
    position: relative;
    border: 1.5px solid #ff1a1a;
    border-radius: clamp(42px, 4.5vw, 72px);
    overflow: visible;

    /* REDUCCIÓN: Ajustamos el padding superior e inferior */
    padding: clamp(35px, 4vw, 45px) clamp(45px, 5vw, 80px) clamp(75px, 6vw, 95px);
}

/* =========================
   TRACK
========================= */

.carousel-track {
    width: 100%;
    min-height: auto;
    position: relative;
}

/* =========================
   CADA SLIDE
========================= */

.carousel-item {
    display: none;
    animation: fadeIn 0.4s ease;
}

.carousel-item.active {
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: start;
}

/* =========================
   IMAGEN DEL CARRUSEL (CORREGIDA)
========================= */

.carousel-image {
    display: block;
    width: 100%;
    height: auto;
    
    /* REFORMADO: Cambiamos 1/1 a 16/9 para adaptarlo a la proporción real de renders tecnológicos */
    aspect-ratio: 16 / 9;
    
    object-fit: cover; /* Cambiado de 'contain' a 'cover' para eliminar barras negras fantasmas */
    object-position: center;
    border-radius: 16px; /* Le da un acabado limpio a las esquinas de tus imágenes */

    /* REDUCCIÓN: Bajamos la separación con el texto */
    margin: 0 auto clamp(12px, 1.2vw, 18px);
}

/* =========================
   CONTENIDO DEL CARRUSEL
========================= */

.carousel-content {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    padding-bottom: 20px;
}

.carousel-content h3 {
    color: #ff2525;

    font-size: clamp(18px, 1.45vw, 24px);
    font-weight: 900;

    margin-bottom: clamp(6px, 0.6vw, 10px); /* Reducido levemente */

    text-transform: uppercase;
}

.carousel-content p {    
    color: #fff;

    font-size: clamp(14px, 1.05vw, 16px); /* Corregido clamp al revés que tenías (17px a 16px) */
    line-height: 1.5;
    font-weight: 600;

    text-transform: uppercase;
}
/* =========================
   BOTONES DEL CARRUSEL
========================= */

.carousel-btn {
    position: absolute;
    top: 50%;

    width: clamp(62px, 6.5vw, 108px);
    height: clamp(62px, 6.5vw, 108px);

    border: 1.5px solid #ff1a1a;
    border-radius: 50%;

    background: #000;
    color: #ff1a1a;

    font-size: clamp(36px, 4vw, 62px);
    font-weight: 200;

    cursor: pointer;
    z-index: 20;
    line-height: 1;

    transition:
        background 0.3s ease,
        color 0.3s ease;
}

.carousel-btn:hover {
    background: #ff1a1a;
    color: #000;
}

.carousel-btn-left {
    left: 0;
    transform: translate(-50%, -50%);
}

.carousel-btn-right {
    right: 0;
    transform: translate(50%, -50%);
}

/* =========================
   INDICADORES
========================= */

.carousel-dots {
    position: absolute;
    left: 50%;
    bottom: clamp(20px, 1.8vw, 26px); /* Subido sutilmente para balancear */

    transform: translateX(-50%);

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    max-width: 80%;
    gap: clamp(8px, 0.9vw, 14px);
}

.carousel-dot {
    width: clamp(18px, 2.2vw, 36px);
    height: clamp(18px, 2.2vw, 36px);

    border: 1.5px solid #ff1a1a;
    border-radius: 50%;

    background: transparent;
    cursor: pointer;
}

.carousel-dot.active {
    background: #d71010;
}

/* =========================
   ANIMACIÓN
========================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }

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

/* =========================
   PANTALLAS GRANDES
========================= */

/* =========================================================
   PRODUCTOS / SERVICIOS - ESCRITORIO GRANDE
   1600px en adelante
========================================================= */

@media (min-width: 1600px) {

    .serv-prod-section {
        width: 100%;
        min-height: calc(100svh - 96px);

        grid-template-columns: minmax(520px, 0.82fr) minmax(850px, 1.18fr);
        gap: clamp(80px, 5vw, 130px);

        padding: 80px 3vw;
        justify-content: center;
    }

    .serv-prod-info {
        max-width: 620px;
    }

    .serv-prod-badge {
        font-size: 13px;
        padding: 7px 18px;
        margin-bottom: 18px;
        gap: 8px;
    }

    .serv-prod-badge-icon {
        font-size: 13px;
    }

    .serv-prod-title {
        font-size: clamp(76px, 4.4vw, 96px);
        line-height: 0.94;
        letter-spacing: -3px;
    }

    .serv-prod-line {
        width: 86px;
        height: 8px;
        margin-top: 34px;
        margin-bottom: 18px;
    }

    .serv-prod-line-second {
        margin-top: 58px;
    }

    .serv-prod-description {
        font-size: clamp(17px, 0.95vw, 21px);
        line-height: 1.15;
        letter-spacing: 0.8px;
    }

    .serv-prod-description-small {
        font-size: clamp(16px, 0.9vw, 20px);
    }

    .serv-prod-button {
        width: 330px;
        min-height: 72px;

        margin-top: 110px;
        margin-left: 40px;

        font-size: 18px;
        border-radius: 10px;
        gap: 9px;
    }

    .serv-prod-button-icon {
        width: 18px;
    }

    .services-carousel {
        width: 100%;
        justify-content: center;
    }

    .carousel-card {
        width: 100%;
        max-width: 920px;

        border-radius: 78px;
        padding: 54px 86px 110px;
    }

    .carousel-image {
        width: 100%;
        height: auto;

        aspect-ratio: 16 / 9;
        object-fit: contain;
        border-radius: 22px;

        margin-bottom: 26px;
    }

    .carousel-content {
        max-width: 690px;
        padding-bottom: 24px;
    }

    .carousel-content h3 {
        font-size: clamp(28px, 1.6vw, 36px);
        line-height: 1.08;
        margin-bottom: 16px;
    }

    .carousel-content p {
        font-size: clamp(18px, 1vw, 22px);
        line-height: 1.5;
    }

    .carousel-btn {
        width: 112px;
        height: 112px;
        font-size: 64px;
    }

    .carousel-dots {
        bottom: 34px;
        gap: 14px;
    }

    .carousel-dot {
        width: 34px;
        height: 34px;
    }
}


/* =========================================================
   PRODUCTOS / SERVICIOS - ESCRITORIO EXTRA GRANDE
   2100px en adelante / 2560x1440
========================================================= */

@media (min-width: 2100px) {

    .serv-prod-section {
        min-height: calc(100svh - 108px);

        grid-template-columns: minmax(720px, 0.82fr) minmax(1200px, 1.18fr);
        gap: clamp(110px, 5vw, 170px);

        padding: 100px 3vw;
    }

    .serv-prod-info {
        max-width: 780px;
    }

    .serv-prod-badge {
        font-size: 17px;
        padding: 10px 24px;
        margin-bottom: 26px;
        gap: 10px;
    }

    .serv-prod-badge-icon {
        font-size: 17px;
    }

    .serv-prod-title {
        font-size: clamp(108px, 4.7vw, 132px);
        line-height: 0.92;
        letter-spacing: -4.5px;
    }

    .serv-prod-line {
        width: 112px;
        height: 10px;
        margin-top: 44px;
        margin-bottom: 24px;
    }

    .serv-prod-line-second {
        margin-top: 74px;
    }

    .serv-prod-description {
        font-size: clamp(24px, 1.05vw, 30px);
        line-height: 1.12;
        letter-spacing: 1px;
    }

    .serv-prod-description-small {
        font-size: clamp(22px, 1vw, 28px);
    }

    .serv-prod-button {
        width: 420px;
        min-height: 88px;

        margin-top: 140px;
        margin-left: 60px;

        font-size: 23px;
        border-radius: 13px;
        gap: 12px;
    }

    .serv-prod-button-icon {
        width: 24px;
    }

    .carousel-card {
        max-width: 1220px;

        border-radius: 96px;
        padding: 72px 118px 142px;
    }

    .carousel-image {
        aspect-ratio: 16 / 9;
        object-fit: contain;
        border-radius: 30px;

        margin-bottom: 36px;
    }

    .carousel-content {
        max-width: 900px;
        padding-bottom: 30px;
    }

    .carousel-content h3 {
        font-size: clamp(40px, 1.8vw, 52px);
        line-height: 1.06;
        margin-bottom: 22px;
    }

    .carousel-content p {
        font-size: clamp(25px, 1.05vw, 31px);
        line-height: 1.45;
    }

    .carousel-btn {
        width: 142px;
        height: 142px;
        font-size: 82px;
    }

    .carousel-dots {
        bottom: 46px;
        gap: 18px;
    }

    .carousel-dot {
        width: 44px;
        height: 44px;
    }
}

/* =========================
   TABLET
========================= */

@media (max-width: 950px) {
     .serv-prod-section {
        grid-template-columns: 1fr;
        gap: 45px;
        padding: 55px clamp(20px, 5vw, 35px);
    }

    .serv-prod-info {
        max-width: 600px;
        margin: 0 auto;
        text-align: left;
    }

    .services-carousel {
        min-height: auto;
        margin-top: 0;
    }

    .carousel-card {
        width: min(100%, 620px);
        height: auto;
        min-height: auto; /* Quitamos altura mínima rígida */
    }

    .carousel-btn-left {
        left: 0;
        transform: translate(-35%, -50%);
    }

    .carousel-btn-right {
        right: 0;
        transform: translate(35%, -50%);
    }
}

/* =========================
   MÓVIL
========================= */

@media (max-width: 650px) {
    .serv-prod-section {
        padding: 45px 18px;
    }

    .serv-prod-info {
        text-align: center;
    }

    .serv-prod-title {
        font-size: clamp(30px, 9vw, 48px);
        line-height: 1.05;
        letter-spacing: -1px;
    }

    .serv-prod-line {
        margin-left: auto;
        margin-right: auto;
    }

    .serv-prod-description {
        font-size: 12px;
    }

    .serv-prod-line-second {
        margin-top: 38px;
    }

    .serv-prod-button {
        width: min(100%, 280px);
        min-height: 56px;
        display: flex;
        margin: 65px auto 0;
    }

    .carousel-card {
        width: 100%;
        min-height: auto;
        border-radius: 38px;
        padding: 22px 36px 75px; /* Reducción lateral adaptada */
    }

    .carousel-image {
        max-width: 100%; /* Deja que use el ancho del contenedor */
    }

    .carousel-content h3 {
        font-size: 18px;
        text-align: center; /* Mejor centrado en móviles */
    }

    .carousel-content p {
        font-size: 14px;
        text-align: center;
    }

    .carousel-btn {
        width: 42px;
        height: 42px;
        font-size: 24px;
        top: 40%; /* Lo subimos para que quede centrado con la imagen en vertical */
    }

    .carousel-btn-left {
        left: -10px;
    }

    .carousel-btn-right {
        right: -10px;
    }
}