/* HERO SECTION */
.hero-cards {
    min-height: 70vh;
    width: 100%;
    padding: var(--section-padding);
    display: flex;
    align-items: center;
    position: relative;
}

.hero-cards--small {
    min-height: 50vh;
}

.hero-cards--defensas-metalica {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)), 
                url('../img/hero-defensas-metalicas.avif') 
                center / cover no-repeat fixed;
}

.hero-cards--pr-sistemas-contencion {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)), 
                url('../img/hero-pr-sistemas-contencion.avif') 
                bottom / cover no-repeat fixed;
}

.hero-cards--pintura {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)), 
                url('../img/hero-pintura.avif') 
                bottom / cover no-repeat fixed;
}

.hero-cards--pr-senalamiento-vial {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)), 
                url('../img/hero-pr-senalamiento-vial.avif') 
                center / cover no-repeat fixed;
}

.hero-cards--senalamiento-bajo {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)), 
                url('../img/hero-senalamiento-bajo.avif') 
                bottom / cover no-repeat fixed;
}

.hero-cards--muro-monolitico {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)), 
                url('../img/hero-muro-monolitico.avif') 
                bottom / cover no-repeat fixed;
}

.hero-cards--senalamiento-elevado {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)), 
                url('../img/hero-senalamiento-elevado.avif') 
                bottom / cover no-repeat fixed;
}

.hero-cards--reflejantes {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)), 
                url('../img/hero-reflejantes.avif') 
                bottom / cover no-repeat fixed;
}

.hero-cards--barrera-concreto {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)), 
                url('../img/hero-barrera-concreto.avif') 
                bottom / cover no-repeat fixed;
}

.hero-cards--secciones-extremas {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)), 
                url('../img/hero-secciones-extremas.avif') 
                bottom / cover no-repeat fixed;
}


.hero-cards-texts {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    color: var(--white);
}

.hero-cards-texts h1 {
    width: 100%;
    padding: 20px 0;
    position: relative;
    margin-bottom: 40px;
    color: inherit;
}

.hero-cards-texts h1::after{
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 2px;
    background: var(--primary-color);
}

.hero-cards-texts span {
    font-size: 1rem;
}

.hero-cards-texts p {
    width: 80%;
    font-family: var(--font-body);
    font-weight: 600;
}

/* BOTÓN REGRESAR */
.button-back {
    display: flex;
    width: auto;
    align-items: center;
    padding: 8px 20px 8px 15px ;
    background-color: var(--primary-color);
    color: var(--dark-color);
    font-weight: 600;
    text-decoration: none;
    margin: 0;
    position: absolute;
    top: 100px;
    left: 3%;
    border-radius: 0 8px 8px 0;
}

.button-back img {
    width: 25px;
    height: 25px;
    margin-right: 5px;
    transition: transform 0.4s ease;
}

.button-back:hover {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow);
    text-shadow: var(--shadow);
}

.button-back:hover img {
    transform: translateX(-5px);
}

/* PRODUCTS SECTION*/
.section-cards{
    padding: var(--section-padding);
}

/* Contenedor de las tarjetas */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px;
    position: relative;
}

/* Tarjeta Base */
.cards-container .card {
    flex: 1;
    min-width: 400px;
    max-width: 600px;
    padding: 20px;
    width: 100%;
    height: auto;
    background-color: var(--white);
    border-radius: 25px;
    box-shadow: var(--shadow); 
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card-content {
    position: relative;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
}

.card-content img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    background-color: var(--light-color);
}

.card-title {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 20px 15px 15px 25px;
    background-color: var(--white);
    border-radius: 20px 0 20px 0;
}

.card-title h2 {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1.2rem;
    padding: 0;
    margin: 0;
    transition: font-size 0.4s ease;
}


.card-description {
    margin: 20px 0;
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--dark-color);
}

.cards-container .card a {
    align-self: flex-end;
    margin-top: auto;
    font-size: 1rem;
    font-weight: 600;
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--primary-color);
    color: var(--dark-color);
    border-radius: 8px;
}

.cards-container .card a:hover {
    box-shadow: var(--shadow);
    color: var(--white);
    text-shadow: var(--shadow);
}

.card-content--right img {
    object-position: right;
}

/* SUBPRODUCTOS */

.cards-container .card--subproduct {
    background: var(--white);
    color: var(--text-color);
    border-radius: 12px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
    overflow: visible;
    position: relative;
    min-width: 500px;
    min-width: 400px;    
}

 .card--subproduct::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, transparent 70%);
    opacity: 0.1;
    border-radius: 0 12px 0 40px;
}

 .card--subproduct:hover {
    box-shadow: 0 2px 1px rgba(231, 180, 11, 0.2), -2px 2px 0 0 var(--primary-color);
    transform: translateY(-8px);
}

.card--subproduct .card-content {
    height: 400px;
}

.card--subproduct .card-content img {
    height: 100%;
    object-fit: fill;
}

.card--subproduct .card-content--contain img {
    object-fit: contain;
}

.card--subproduct:hover .card-content img {
    transform: scale(1.05);
}

.card-title--subproduct {
    color: var(--dark-color);
    position: absolute;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 0;
    transition: all 0.4s ease;
}

.card--subproduct:hover .card-title--subproduct h2 {
    font-size: 1rem;
}

.card--subproduct:hover .card-title--subproduct {
    position: absolute;
    top: 15px;
    bottom: auto;
    right: auto;
    left: 15px;
    width: auto;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--primary-color);
    border-top: none;
    border-left: none;
    padding: 12px 18px;
    border-radius: 0 0 8px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-description--subproduct {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    padding: 0 20px;
}

.card-description--subproduct span {
    font-weight: bold;
}


@media (min-width: 1800px) {
    .hero-cards .hero-cards-texts h1 {
        font-size: 3rem;
    }

    .hero-cards .hero-cards-texts p {
        font-size: 1.3rem;
    }

    .hero-cards-texts--margin {
        margin-top: 50px;
    }

}

@media (max-width: 1640px) {
    .hero-cards-texts--margin {
        margin-top: 80px;
    }
}

@media (max-width: 768px) {
    .hero-cards {
        padding: 80px 0;
    }

    .hero-cards-texts--margin {
        margin-top: 40px;
    }

    .hero-cards-texts h1 {
        font-size: 1.5rem;
    }

    .hero-cards-texts p {
        width: 100%;
        font-size: 1rem;
    }

    .button-back {
        top: 90px;
        left: 10px;
        padding: 4px 12px 4px 12px;
        font-size: 0.9rem;
    }

    .button-back img {
        width: 20px;
        height: 20px;
        margin-right: 4px;
    }

    .card-content {
        height: 280px;
    }

    .card-title--subproduct {
        padding: 30px 20px 20px 20px;
    }

    .cards-container .card--subproduct:hover .card-title--subproduct {
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .cards-container .card {
        min-width: 300px;
    }

    .button-back {
        display: none;
    }

    .hero-cards-texts--margin {
        margin-top: 0;
    }
}
