/* =============================== */
/* ESTILOS GENERALES */
/* =============================== */

/* Quitamos espacios por defecto */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Evita movimiento lateral raro */
html,
body {
    width: 100%;
    overflow-x: hidden;
}

/* Estilo general de toda la página */
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f4f4f4;
    color: #222;
}

/* =============================== */
/* ENCABEZADO */
/* =============================== */

/* Barra superior */
.encabezado {
    background-color: white;
    color: #111;
    display: flex;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 150px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    border-bottom: none;
}

/* Caja donde va el logo */
.caja-logo {
    background-color: white;
    width: 230px;
    min-height: 135px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

/* Imagen del logo */
.caja-logo img {
    width: 210px;
    height: auto;
    border: none;
}

/* Zona donde van los menús */
.zona-menu {
    width: 100%;
    padding: 18px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Menú pequeño superior */
.menu-superior {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

/* Links del menú superior */
.menu-superior a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

/* Efecto al pasar el mouse */
.menu-superior a:hover {
    color: #e60000;
}

/* Menú principal */
.menu-principal {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Contenedor de enlaces */
.menu {
    display: flex;
    gap: 30px;
}

/* Links del menú principal */
.menu a {
    color: #111;
    text-decoration: none;
    font-size: 25px;
    font-weight: bold;
    padding: 14px 10px;
}

/* Efecto al pasar el mouse */
.menu a:hover {
    color: #e60000;
}

/* Redes sociales arriba a la derecha */
.redes-header {
    position: absolute;
    top: 28px;
    right: 35px;
    display: flex;
    gap: 12px;
}

/* Botones de redes */
.redes-header a {
    background-color: #d90416;
    color: white;
    text-decoration: none;
    font-size: 15px;
    padding: 12px 18px;
    border-radius: 25px;
    font-weight: bold;
    transition: 0.3s;
}

/* Efecto de redes */
.redes-header a:hover {
    background-color: #ffcc00;
    color: #111;
    transform: translateY(-3px);
}

/* =============================== */
/* PORTADA PRINCIPAL */
/* =============================== */

/* Fondo principal con colores de construcción */
.portada {
    height: 82vh;
    min-height: 580px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, #ff8a00 0%, #ff2a00 35%, #d90416 70%);
}

/* Imagen cortada del lado derecho */
.imagen-portada {
    position: absolute;
    right: 0;
    top: 0;
    width: 47%;
    height: 100%;
    background-image: url("../img/portada.png");
    background-size: cover;
    background-position: center;
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
    animation: entrarDerecha 1.2s ease;
    z-index: 1;
}

/* Capa ligera sobre la portada */
.portada::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.08), rgba(0,0,0,0.12), rgba(0,0,0,0.2));
    z-index: 0;
}

/* Figura roja diagonal */
.figura-roja {
    position: absolute;
    left: 22%;
    top: 0;
    width: 28%;
    height: 100%;
    background-color: rgba(210, 0, 18, 0.55);
    transform: skewX(-25deg);
    animation: bajar 1s ease;
    z-index: 0;
}

/* Figura naranja diagonal */
.figura-naranja {
    position: absolute;
    left: -8%;
    top: 0;
    width: 28%;
    height: 100%;
    background-color: rgba(255, 185, 0, 0.35);
    transform: skewX(-25deg);
    animation: bajar 1.3s ease;
    z-index: 0;
}

/* Texto de la portada */
.contenido-portada {
    position: relative;
    z-index: 3;
    width: 58%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 7%;
    color: white;
}

/* Etiqueta de portada */
.etiqueta {
    background-color: #d90416;
    color: white;
    padding: 10px 18px;
    border-left: 6px solid #ffcc00;
    font-weight: bold;
    letter-spacing: 5px;
    font-size: 18px;
    width: fit-content;
    margin-bottom: 25px;
}

/* Título principal */
.contenido-portada h2 {
    font-size: 58px;
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 900;
    text-shadow: 4px 4px 0 #111;
    animation: aparecer 1s ease;
}

/* Texto debajo del título */
.texto-portada {
    font-size: 22px;
    max-width: 620px;
    margin: 25px 0;
    font-weight: bold;
    animation: aparecer 1.2s ease;
}

/* Botones de portada */
.botones-portada {
    display: flex;
    gap: 15px;
    animation: aparecer 1.4s ease;
}

/* Botón principal */
.boton {
    background-color: #e60000;
    color: white;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    width: fit-content;
    transition: 0.3s;
}

/* Efecto del botón */
.boton:hover {
    background-color: #ffcc00;
    color: #000;
    transform: translateY(-4px);
}

/* Botón blanco */
.boton-claro {
    background-color: white;
    color: #111;
}

/* =============================== */
/* TIPOS DE ANDAMIOS */
/* =============================== */

/* Sección completa */
.tipos-andamios {
    background: #f3f3f3;
    padding: 90px 6%;
}

/* Título de la sección */
.titulo-seccion {
    text-align: center;
    margin-bottom: 45px;
}

/* Texto pequeño del título */
.titulo-seccion p {
    color: #d90416;
    font-weight: bold;
    letter-spacing: 5px;
    font-size: 14px;
}

/* Título grande */
.titulo-seccion h2 {
    font-size: 44px;
    color: #111;
    margin-top: 8px;
    font-weight: 900;
}

/* Línea decorativa */
.titulo-seccion h2::after {
    content: "";
    display: block;
    width: 100px;
    height: 6px;
    background: linear-gradient(90deg, #ffcc00, #e60000);
    margin: 15px auto 0 auto;
    border-radius: 10px;
}

/* Contenedor de tarjetas */
.contenedor-andamios {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
    align-items: start;
}

/* Caja de cada andamio */
.caja-andamio {
    background: white;
    min-height: auto;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.16);
    transition: 0.4s;
    cursor: pointer;
}

/* Fondo superior degradado */
.caja-andamio::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 48%;
    background: linear-gradient(135deg, #ffcc00, #e60000);
    z-index: 0;
}

/* Imagen del andamio */
.caja-andamio img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 330px;
    object-fit: contain;
    padding: 28px;
    transition: 0.4s;
}

/* Caja blanca donde va la información principal */
.info-andamio {
    position: relative;
    z-index: 2;
    background-color: white;
    margin: -20px 22px 22px 22px;
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

/* Flecha circular */
.info-andamio span {
    background-color: #e60000;
    color: white;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 14px;
    transition: 0.3s;
}

/* Nombre del andamio */
.info-andamio h3 {
    color: #b00000;
    font-size: 25px;
    font-weight: 900;
    margin-bottom: 10px;
}

/* Descripción corta */
.info-andamio p {
    color: #222;
    font-size: 16px;
    line-height: 1.5;
}

/* Efecto al pasar el mouse */
.caja-andamio:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 55px rgba(0,0,0,0.25);
}

/* La imagen crece poquito */
.caja-andamio:hover img {
    transform: scale(1.1);
}

/* La flecha cambia de color */
.caja-andamio:hover .info-andamio span {
    background-color: #ffcc00;
    color: #111;
}

/* Cuando una caja está abierta */
.caja-andamio.activo {
    transform: translateY(-10px);
}

/* Información extra que aparece con click */
.info-extra {
    background-color: #111;
    color: white;
    margin: 0 22px 22px 22px;
    padding: 18px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.5;
    animation: aparecerInfo 0.3s ease;
}

/* Texto fuerte dentro de la info extra */
.info-extra strong {
    color: #ffcc00;
}

/* =============================== */
/* SECCIÓN NOSOTROS MODERNA */
/* =============================== */

/* Sección completa de quiénes somos */
.nosotros {
    background: linear-gradient(120deg, #111 0%, #1c1c1c 50%, #d90416 100%);
    color: white;
    padding: 90px 8%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 520px;
}

/* Figura diagonal decorativa */
.figura-nosotros {
    position: absolute;
    left: -10%;
    top: 0;
    width: 35%;
    height: 100%;
    background-color: rgba(255, 204, 0, 0.16);
    transform: skewX(-25deg);
    animation: bajar 1.2s ease;
}

/* Contenido del texto */
.contenido-nosotros {
    width: 58%;
    position: relative;
    z-index: 2;
    animation: aparecer 1s ease;
}

/* Etiqueta pequeña */
.etiqueta-nosotros {
    background-color: #d90416;
    color: white;
    padding: 10px 18px;
    border-left: 6px solid #ffcc00;
    font-weight: bold;
    letter-spacing: 4px;
    font-size: 14px;
    width: fit-content;
    margin-bottom: 18px;
}

/* Título principal */
.contenido-nosotros h2 {
    color: #ffcc00;
    font-size: 46px;
    font-weight: 900;
    margin-bottom: 22px;
    text-transform: uppercase;
    text-shadow: 3px 3px 0 #000;
}

/* Párrafos */
.contenido-nosotros p {
    font-size: 18px;
    line-height: 1.7;
    max-width: 780px;
    margin-bottom: 18px;
}

/* Contenedor de valores */
.valores-nosotros {
    display: flex;
    gap: 18px;
    margin-top: 30px;
}

/* Cada valor */
.valores-nosotros div {
    background-color: rgba(255,255,255,0.08);
    border-left: 5px solid #ffcc00;
    padding: 18px;
    border-radius: 12px;
    transition: 0.3s;
}

/* Efecto al pasar el mouse */
.valores-nosotros div:hover {
    background-color: rgba(255,204,0,0.18);
    transform: translateY(-6px);
}

/* Título de cada valor */
.valores-nosotros h3 {
    color: #ffcc00;
    font-size: 21px;
    margin-bottom: 8px;
}

/* Texto de cada valor */
.valores-nosotros span {
    font-size: 15px;
    line-height: 1.4;
}

/* Imagen lateral */
.imagen-nosotros {
    position: absolute;
    right: 0;
    top: 0;
    width: 38%;
    height: 100%;
    background-image: url("../img/nosotros.png");
    background-size: cover;
    background-position: center;
    clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
    opacity: 0.9;
    animation: entrarDerecha 1.2s ease;
}

/* Capa oscura sobre la imagen */
.imagen-nosotros::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.25);
}

/* =============================== */
/* CONTACTO */
/* =============================== */

.contacto {
    padding: 70px 8%;
    text-align: center;
    background-color: #ffcc00;
}

/* Título de contacto */
.contacto h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #111;
}

/* Línea debajo del contacto */
.contacto h2::after {
    content: "";
    display: block;
    width: 90px;
    height: 5px;
    background-color: #e60000;
    margin: 12px auto 0 auto;
}

/* Texto de contacto */
.contacto p {
    margin-bottom: 25px;
    font-size: 20px;
}

/* Botón secundario */
.secundario {
    background-color: #000;
    margin-left: 10px;
}

/* =============================== */
/* PIE DE PÁGINA */
/* =============================== */

footer {
    background-color: #000;
    color: white;
    text-align: center;
    padding: 20px;
}

/* =============================== */
/* ANIMACIONES */
/* =============================== */

/* Animación para aparecer elementos */
@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

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

/* Animación para la imagen de portada */
@keyframes entrarDerecha {
    from {
        transform: translateX(180px);
        opacity: 0;
    }

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

/* Animación para figuras diagonales */
@keyframes bajar {
    from {
        transform: translateY(-100px) skewX(-25deg);
        opacity: 0;
    }

    to {
        transform: translateY(0) skewX(-25deg);
        opacity: 1;
    }
}

/* Animación de información extra */
@keyframes aparecerInfo {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* =============================== */
/* GRUPOS DEL CATÁLOGO */
/* =============================== */

/* Separación entre cada grupo de productos */
.grupo-productos {
    margin-top: 70px;
}

/* El primer grupo queda un poco más cerca del título general */
.grupo-productos:first-of-type {
    margin-top: 50px;
}

/* Encabezado de cada grupo */
.encabezado-grupo {
    margin-bottom: 28px;
    text-align: left;
}

/* Título de cada grupo */
.encabezado-grupo h3 {
    font-size: 32px;
    color: #111;
    font-weight: 900;
    border-left: 8px solid #e60000;
    padding-left: 15px;
}

/* Descripción de cada grupo */
.encabezado-grupo p {
    font-size: 18px;
    color: #444;
    margin-top: 10px;
    max-width: 900px;
    line-height: 1.5;
}

/* =============================== */
/* DISEÑO PARA TABLET */
/* =============================== */

@media screen and (max-width: 1100px) {

    /* Header más flexible */
    .encabezado {
        min-height: 135px;
    }

    /* Logo más pequeño */
    .caja-logo {
        width: 200px;
        min-height: 125px;
    }

    .caja-logo img {
        width: 180px;
    }

    /* Menú más pequeño */
    .menu {
        gap: 18px;
    }

    .menu a {
        font-size: 18px;
        padding: 10px 6px;
    }

    /* Redes más pequeñas */
    .redes-header {
        top: 22px;
        right: 22px;
    }

    .redes-header a {
        font-size: 13px;
        padding: 10px 14px;
    }

    /* Título portada */
    .contenido-portada h2 {
        font-size: 46px;
    }

    /* Tarjetas en dos columnas */
    .contenedor-andamios {
        grid-template-columns: repeat(2, 1fr);
        align-items: start;
    }
}

/* =============================== */
/* DISEÑO PARA CELULAR */
/* =============================== */

@media screen and (max-width: 768px) {

    /* Header en columna */
    .encabezado {
        position: relative;
        flex-direction: column;
        min-height: auto;
        padding: 10px 0 15px 0;
    }

    /* Logo centrado */
    .caja-logo {
        width: 100%;
        min-height: 105px;
    }

    .caja-logo img {
        width: 145px;
        max-width: 50%;
    }

    /* Zona del menú */
    .zona-menu {
        width: 100%;
        padding: 0 14px;
    }

    /* Quitamos el menú superior en celular */
    .menu-superior {
        display: none;
    }

    /* Menú principal centrado */
    .menu-principal {
        width: 100%;
        justify-content: center;
    }

    /* Menú en dos columnas */
    .menu {
        width: 100%;
        max-width: 390px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
        margin: 0 auto;
    }

    /* Botones del menú */
    .menu a {
        background-color: #f2f2f2;
        color: #111;
        font-size: 14px;
        padding: 11px 8px;
        border-radius: 22px;
        text-align: center;
        line-height: 1.15;
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    }

    /* Efecto del menú en celular */
    .menu a:hover {
        background-color: #e60000;
        color: white;
    }

    /* Redes sociales debajo del menú */
    .redes-header {
        position: static;
        margin-top: 14px;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 9px;
    }

    /* Botones de redes compactos */
    .redes-header a {
        font-size: 12px;
        padding: 10px 13px;
        border-radius: 22px;
    }

    /* Portada adaptada a celular */
    .portada {
        height: auto;
        min-height: 620px;
    }

    /* Imagen de portada abajo */
    .imagen-portada {
        width: 100%;
        height: 42%;
        top: auto;
        bottom: 0;
        clip-path: none;
        opacity: 0.50;
        background-position: center;
    }

    /* Texto de portada */
    .contenido-portada {
        width: 100%;
        min-height: 400px;
        padding: 38px 22px;
        text-align: center;
        align-items: center;
        justify-content: center;
    }

    /* Etiqueta roja */
    .etiqueta {
        font-size: 11px;
        letter-spacing: 2px;
        padding: 8px 12px;
        margin-bottom: 18px;
    }

    /* Título de portada */
    .contenido-portada h2 {
        font-size: 34px;
        line-height: 1.12;
        text-shadow: 3px 3px 0 #111;
    }

    /* Texto de portada */
    .texto-portada {
        font-size: 16px;
        max-width: 100%;
        margin: 18px 0;
    }

    /* Botones de portada */
    .botones-portada {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    /* Botones generales */
    .boton {
        font-size: 13px;
        padding: 12px 18px;
    }

    /* Sección de andamios */
    .tipos-andamios {
        padding: 60px 6%;
    }

    /* Texto pequeño del título */
    .titulo-seccion p {
        font-size: 11px;
        letter-spacing: 3px;
    }

    /* Título grande */
    .titulo-seccion h2 {
        font-size: 34px;
    }

    /* Tarjetas una por una */
    .contenedor-andamios {
        grid-template-columns: 1fr;
        gap: 32px;
        align-items: start;
    }

    /* Cada tarjeta centrada */
    .caja-andamio {
        width: 100%;
        max-width: 380px;
        margin: 0 auto;
    }

    /* Imagen de cada andamio */
    .caja-andamio img {
        height: 300px;
        padding: 24px;
    }

    /* Cuadro blanco de información */
    .info-andamio {
        margin: -15px 18px 20px 18px;
        padding: 22px;
    }

    /* Nombre del andamio */
    .info-andamio h3 {
        font-size: 24px;
    }

    /* Descripción del andamio */
    .info-andamio p {
        font-size: 15px;
    }

    /* Información negra que aparece con click */
    .info-extra {
        margin: 0 18px 20px 18px;
        font-size: 14px;
    }

    /* Sección nosotros */
    .nosotros {
        padding: 60px 8%;
        text-align: center;
    }

    .nosotros h2 {
        font-size: 30px;
    }

    .nosotros p {
        font-size: 17px;
    }

    /* Contacto */
    .contacto {
        padding: 60px 8%;
    }

    .contacto .boton {
        display: block;
        margin: 10px auto;
    }

    /* Footer */
    footer {
        font-size: 14px;
    }

        /* Grupos del catálogo en celular */
    .grupo-productos {
        margin-top: 55px;
    }

    .grupo-productos:first-of-type {
        margin-top: 40px;
    }

    .encabezado-grupo {
        text-align: center;
        margin-bottom: 24px;
    }

    .encabezado-grupo h3 {
        font-size: 27px;
        border-left: none;
        padding-left: 0;
    }

    .encabezado-grupo p {
        font-size: 16px;
        margin-left: auto;
        margin-right: auto;
    }

        /* Sección nosotros en celular */
    .nosotros {
        flex-direction: column;
        padding: 65px 8%;
        text-align: center;
        min-height: auto;
    }

    .contenido-nosotros {
        width: 100%;
    }

    .etiqueta-nosotros {
        margin-left: auto;
        margin-right: auto;
        font-size: 12px;
        letter-spacing: 2px;
    }

    .contenido-nosotros h2 {
        font-size: 34px;
    }

    .contenido-nosotros p {
        font-size: 16px;
    }

    .valores-nosotros {
        flex-direction: column;
    }

    .valores-nosotros div {
        border-left: none;
        border-top: 5px solid #ffcc00;
    }

    .imagen-nosotros {
        position: relative;
        width: 100%;
        height: 260px;
        margin-top: 35px;
        clip-path: none;
        border-radius: 18px;
    }

    .figura-nosotros {
        width: 70%;
        opacity: 0.5;
    }

    
}




/* =============================== */
/* CORRECCIÓN REDES HEADER EN PC */
/* =============================== */

@media screen and (min-width: 901px) {

    /* El header acomoda logo, menú y redes sin encimarse */
    .encabezado {
        min-height: 135px;
        display: flex;
        align-items: center;
    }

    /* La zona del menú ahora se acomoda en fila */
    .zona-menu {
        width: 100%;
        padding: 18px 28px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }

    /* El menú ocupa el espacio disponible */
    .menu-principal {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Bajamos un poco el tamaño para que quepa bien */
    .menu {
        display: flex;
        align-items: center;
        gap: 24px;
        flex-wrap: wrap;
    }

    .menu a {
        font-size: 20px;
        padding: 10px 6px;
        white-space: nowrap;
    }

    /* Las redes ya no van flotando */
    .redes-header {
        position: static;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 19px;
        flex-wrap: wrap;
        max-width: 520px;
    }

    /* Botones de redes más compactos */
    .redes-header a {
        font-size: 13px;
        padding: 11px 15px;
        border-radius: 25px;
        white-space: nowrap;
    }
}