.hero {
    position: relative;
    overflow: hidden;
    padding: 2.8rem 0 5.6rem;
    isolation: isolate;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(29, 57, 61, 0.395),
        rgba(6, 48, 54, 0.777)
    );
    z-index: -1;
}

.hero__grid {
    display: grid;
    z-index: 0;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    gap: 4.4rem;
    align-items: center;
}

.hero__content {
    min-width: 0;
    padding: 1rem 0 0.3rem;
}

.hero__content h1 {
    margin: 0 0 1.2rem;
    color: #ffffff;
    font-size: clamp(2rem, 3.9vw, 3rem);
    line-height: 1.12;
    font-weight: 800;
    text-wrap: balance;
}

.hero__content p {
    max-width: 600px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.98rem;
    line-height: 1.5;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero__actions .button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 376px;
    min-height: 72px;
    padding: 0.9rem 1.6rem 0.9rem 4.9rem;
    border-radius: 22px;
    border: 1px solid rgba(38, 94, 102, 0.08);
    background: #ffffff;
    color: var(--primary);
    font-size: 1.08rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(20, 53, 57, 0.14);
}

.hero__actions .button::before {
    content: "";
    position: absolute;
    left: 1.55rem;
    top: 50%;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
    background: url("../media/iconos/homeicons/solicitarCotuzacion.png") center / contain no-repeat;
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.9rem;
    list-style: none;
    padding: 0;
    margin: 1.6rem 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    font-size: 0.95rem;
}

.hero__stats li {
    position: relative;
    padding-left: 1.25rem;
}

.hero__stats li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72rem;
    width: 0.36rem;
    height: 0.36rem;
    border-radius: 50%;
    background: rgba(24, 55, 60, 0.82);
}

.hero__image-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 20px 40px rgba(17, 47, 51, 0.22);
    width: min(100%, 500px);
    margin-left: auto;
}

.hero__image-card img {
    width: 100%;
    height: auto;
    min-height: 290px;
    object-fit: cover;
}

.wave {
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 90px;
    background: url("../media/imagenes/about_image/curva_ariiba.png") center bottom / 100% 100% no-repeat;
    pointer-events: none;
    display: block;
    line-height: 0;
    font-size: 0;
}

.why-section {
    padding: 5.2rem 0 3.2rem;
    background: #ffffff;
}

.section-heading {
    text-align: center;
    margin-bottom: 2.6rem;
}

.section-heading h2 {
    margin: 0 0 0.55rem;
    color: #171717;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.15;
    font-weight: 700;
}

.section-heading p {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.3rem;
}

.benefit-card {
    min-height: 184px;
    padding: 1.4rem 1rem 1rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(38, 94, 102, 0.1);
    box-shadow: 0 14px 22px rgba(84, 186, 201, 0.26);
}

.benefit-card__icon {
    margin-bottom: 0.95rem;
    font-size: 2rem;
    line-height: 1;
}

.benefit-card h3 {
    margin: 0 0 0.65rem;
    color: #1a1a1a;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 600;
}

.benefit-card p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.45;
}

.services-section {
    position: relative;
    overflow: hidden;
    padding: 2.4rem 0 4.6rem;
    background: url("../media/imagenes/Home_image/BackgorundeServices.png") center / cover no-repeat;
}

.services-section__overlay {
    position: absolute;
    inset: 0;
    background: rgba(38, 94, 102, 0.78);
}

.services-section__content {
    position: relative;
    z-index: 1;
}

.section-heading--light h2,
.section-heading--light p {
    color: #eef9f6;
}

.section-heading--light h2 {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    line-height: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.8rem;
    margin-top: 2rem;
    justify-items: stretch;
}

.service-tile {
    position: relative;
    display: block;
    min-height: 182px;
    border-radius: 14px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(12, 31, 34, 0.42)),
        linear-gradient(135deg, #dfe8ea 0%, #ffffff 45%, #edf3f4 100%);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.12);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.service-tile:hover,
.service-tile:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 20px 34px rgba(0, 0, 0, 0.16);
}

.service-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.92;
}

.service-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(14, 35, 38, 0.08) 0%, rgba(14, 35, 38, 0.56) 100%);
}

.service-tile--electrico::before {
    background-image: url("../media/imagenes/Home_image/Electricidad.png");
}

.service-tile--tecnologico::before {
    background-image: url("../media/imagenes/Home_image/Tecnologico.png");
}

.service-tile--climatizacion::before {
    background-image: url("../media/imagenes/Home_image/climatización.png");
}

.service-tile--telecom::before {
    background-image: url("../media/imagenes/Home_image/telecomunicaciones.png");
}

.service-tile--radio::before {
    background-image: url("../media/imagenes/Home_image/Radio.png");
}

.service-tile__label {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    display: block;
    padding: 0.9rem 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #15363a;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.services-section__actions {
    display: flex;
    justify-content: center;
    margin-top: 1.8rem;
}

.services-section__actions .button {
    min-width: 220px;
    min-height: 54px;
    border-radius: 12px;
    padding: 0.9rem 1.4rem;
    font-size: 0.96rem;
    background: #ffffff;
    color: var(--primary-deep);
    box-shadow: 0 10px 22px rgba(10, 31, 34, 0.18);
}

.services-section__actions .button:hover,
.services-section__actions .button:focus-visible {
    background: #f3fbfc;
    color: var(--primary);
}

.about-highlight {
    padding: 4.8rem 0 4.2rem;
    background:
        radial-gradient(circle at left top, rgba(100, 176, 194, 0.12), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
}

.about-highlight__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 2.2rem;
    align-items: center;
}

.about-highlight__image {
    position: relative;
}

.about-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    transition: opacity 1s ease;
}

/* imagen 2 va encima de imagen 1 */
.about-img--2 {
    position: absolute;
    inset: 0;
    object-fit: cover;
    height: 100%;
    opacity: 0;
    animation: about-fade 20s infinite 10s;
}

.about-img--1 {
    animation: about-fade-reverse 20s infinite;
}

@keyframes about-fade {
    0%   { opacity: 0; }
    5%   { opacity: 0.85; }
    45%  { opacity: 0.85; }
    50%  { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes about-fade-reverse {
    0%   { opacity: 1; }
    45%  { opacity: 1; }
    50%  { opacity: 0; }
    95%  { opacity: 0; }
    100% { opacity: 1; }
}
.about-highlight__content h2 {
    margin: 0 0 1.2rem;
    color: #1a1a1a;
    font-size: clamp(2rem, 3.2vw, 3.3rem);
    line-height: 1.08;
    font-weight: 700;
}

.about-highlight__content p {
    margin: 0 0 1.1rem;
    color: #667085;
    font-size: 1rem;
    line-height: 1.6;
}

.about-highlight__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
    margin: 2rem 0 1rem;
}

.about-stat {
    padding: 1.2rem 1.3rem;
    background: #ffffff;
    border-radius: 16px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 14px 22px rgba(84, 186, 201, 0.24);
}

.about-stat strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--primary);
    font-size: 2rem;
    font-weight: 500;
}

.about-stat span {
    color: #6b7280;
    font-size: 0.9rem;
}

.about-highlight__actions {
    margin-top: 0.6rem;
}

.about-highlight__actions .button {
    min-width: 264px;
    min-height: 50px;
    border-radius: 12px;
    padding: 0.85rem 1.3rem;
    font-size: 0.96rem;
}


.carrusel {
    background: #ffffff;
    padding: 5rem ;
    overflow: hidden;
    width: 100%;
    margin: 6rem;
    margin: 0 0 20px 0
}

.carrusel__track-wrapper {
    overflow: hidden;
    width: 100%;
    /* bordes difuminados a los lados */
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

.carrusel__track {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: max-content;
    animation: carrusel-scroll 30s linear infinite;
}

.carrusel__track img {
    height: 55px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s, opacity 0.3s;
}

.carrusel__track img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes carrusel-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); } /* -50% porque las imágenes están duplicadas */
}

.testimonials-section {
    position: relative;
    overflow: hidden;
    padding: 5.6rem 0 4.8rem;
    padding-top: 9rem;
    background: url("../media/imagenes/Home_image/BackgorundeClientes.png") center / cover no-repeat;
}

.testimonials-section__curve {
    position: absolute;
    left: 0;
    top: -2px;
    width: 100%;
    height: 98px;
    background: url("../media/imagenes/Home_image/segundaCurva.png") center top / 100% 100% no-repeat;
    z-index: 1;
    pointer-events: none;
    display: block;
    line-height: 0;
    font-size: 0;
}

.testimonials-section__overlay {
    position: absolute;
    inset: 0;
    background: rgba(29, 57, 61, 0.86);
}

.testimonials-section__content {
    position: relative;
    z-index: 2;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}

.testimonial-card {
    padding: 1.4rem 1.35rem 1.25rem;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.12);
}

.testimonial-card__top {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-bottom: 0.8rem;
}

.testimonial-card__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-deep);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.testimonial-card__person {
    flex: 1;
    min-width: 0;
}

.testimonial-card__person h3 {
    margin: 0 0 0.15rem;
    color: #2b6b73;
    font-size: 1.02rem;
    line-height: 1.25;
}

.testimonial-card__person span {
    color: #7b8794;
    font-size: 0.82rem;
}

.testimonial-card__quote {
    color: #d7edf1;
    font-size: 3rem;
    line-height: 0.8;
}

.testimonial-card__rating {
    margin-bottom: 0.7rem;
    color: #ffbe0b;
    font-size: 1.2rem;
    letter-spacing: 0.08rem;
}

.testimonial-card p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.65;
}

.testimonial-card__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--primary-deep);
    color: #ffffff;
    font-size: 0.82rem;
}

.cta-section {
    padding: 4.8rem 0 5rem;
    background: #ffffff;
}

.cta-section__content {
    text-align: center;
}

.cta-section__content h2 {
    margin: 0 0 1rem;
    color: #171717;
    font-size: clamp(2.1rem, 3.2vw, 3.3rem);
    line-height: 1.15;
    font-weight: 500;
}

.cta-section__content p {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
}

.cta-section__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.cta-section__actions .button {
    min-width: 184px;
    min-height: 54px;
    border-radius: 12px;
    padding: 0.9rem 1.4rem;
    font-size: 0.98rem;
}

.cta-section__actions .button:first-child {
    background: var(--primary-deep);
    color: #ffffff;
}

.cta-section__actions .button:last-child {
    background: var(--primary);
    color: #ffffff;
}

.cta-section__actions .button:hover,
.cta-section__actions .button:focus-visible {
    filter: brightness(1.04);
}

@media (max-width: 768px) {
    .hero {
        padding: 2.8rem 0 5rem;
    }

    .hero__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero__content h1 {
        font-size: 2.05rem;
        overflow-wrap: normal;
        text-wrap: balance;
    }

    .hero__actions .button {
        width: 100%;
        min-width: 0;
        padding-left: 4.2rem;
    }

    .hero__image-card {
        width: min(100%, 420px);
        margin: 0 auto;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }

    .section-heading h2 {
        font-size: 2.4rem;
    }

    .about-highlight__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 2rem 0 4.5rem;
    }

    .hero__content h1 {
        font-size: 1.85rem;
        max-width: 100%;
    }

    .hero__content p {
        max-width: 100%;
        font-size: 0.95rem;
    }

    .hero__actions .button {
        min-width: 0;
        min-height: 60px;
        padding: 0.8rem 1.5rem 0.8rem 4rem;
        font-size: 1rem;
    }

    .hero__stats {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .wave {
        height: 70px;
        background-size: cover;
    }

    .why-section {
        padding: 3.5rem 0 2rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .benefit-card {
        padding: 1.5rem 1.2rem;
    }

    .benefit-card h3 {
        font-size: 1.1rem;
        margin: 0.8rem 0 0.6rem;
    }

    .benefit-card p {
        font-size: 0.9rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .service-tile {
        min-height: 140px;
    }

    .section-heading h2 {
        font-size: 2rem;
    }

    .section-heading p {
        font-size: 0.95rem;
    }

    .about-highlight {
        padding: 3rem 0 2.8rem;
    }

    .about-highlight__grid {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }

    .about-highlight__content h2 {
        font-size: 1.6rem;
    }

    .about-highlight__content p {
        font-size: 0.95rem;
    }

    .about-highlight__stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .about-highlight__actions .button {
        width: 100%;
        min-height: 50px;
    }

    .testimonials-section {
        padding: 3.5rem 0 3rem;
    }

    .testimonials-section__curve {
        height: 60px;
        background-size: cover;
        top: -2px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .testimonial-card {
        padding: 1.2rem;
    }

    .cta-section {
        padding: 3rem 0 3.2rem;
    }

    .cta-section__content h2 {
        font-size: 1.8rem;
        margin: 0 0 0.8rem;
    }

    .cta-section__content p {
        font-size: 0.95rem;
    }

    .cta-section__actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .cta-section__actions .button {
        width: 100%;
        max-width: none;
        min-height: 50px;
    }
}
