/* ---------- GLOBAL ---------- */
* {
    margin: 0px;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
    width: 100%;
    font-family: "Poppins", sans-serif;
    line-height: 1.6;
}


    img.documents { 
        width: 400px;         
        height: auto;     
        display: block;      
        margin: 20px auto;    
        border: 1px solid #ccc;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    @media (max-width: 768px) {
        img.documents {
            width: 90%;     
            margin: 10px auto;
        }
    }


.document {
    width: 400px;
    height: 500px;
    border: none;
    margin: 20px auto;
}


header {
    background-color: #427ed8;
    width: 100%;
    padding: 15px;
}
header, nav, aside, .ofertes article, .categories article, footer {
    margin: 5px;
    border-radius: 5px;
}



h1, h2 {
    color: white;
    width: 100%;
}

/* ---------- NAV ---------- */
nav {
    background-color: #2b4395;
    width: 100%;
    padding: 10px;
}

nav select {
    display: inline;
    background-color: white;
}

nav ul {
    display: none;
    gap: 20px;
}

nav ul li {
    list-style: none;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    display: inline-block;
}

nav ul li a:hover {
    background-color: #ec6053;
}

/* ---------- LAYOUT ---------- */
main, section {
    width: 100%;
    display: flex;
    flex-direction: column;
}

aside {
    width: 25%;
    background-color: #00d0ff;
    padding: 15px;
}

/* ---------- OFERTES ---------- */
.ofertes {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.ofertes article {
    background-color: #4000ff;
    width: 100%;
    color: white;
    padding: 10px;
}

/* ---------- CATEGORIES ---------- */
.categories {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
}

.categories article {
    background-color: #1eb16c;
    width: 47%;
    color: white;
    padding: 10px;
}

/* ---------- FOOTER ---------- */
footer {
    background-color: #427ed8;
    width: 100%;
    color: white;
    text-align: center;
    padding: 15px;
}

/* ---------- DESKTOP / TABLET ---------- */
@media screen and (min-width: 936px) {

    nav select {
        display: none;
    }

    nav ul {
        display: flex;
    }

    main {
        width: 70%;
    }

    aside {
        width: 25%;
        height: 300px;
    }

    .ofertes {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .ofertes article {
        width: 46%;
    }

    .categories article {
        width: 22%;
    }
}



.genially-iframe {
    width: 60%;              /* mida mitjana */
    max-width: 700px;        /* límit per evitar que sigui massa gran */
    height: auto;
    aspect-ratio: 16/9;      /* proporció correcta */
    border: 3px solid #427ed8; /* bordes del color del teu theme */
    border-radius: 8px;      /* cantonades suaus */
    margin: 20px 0;          /* separació vertical */
    display: block;          /* permet alineació */
    margin-left: 0;          /* alineat a l’esquerra */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 16px;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.15);
}

table th {
    background: #2E7D32; /* Verde más oscuro y accesible */
    color: #ffffff;
    padding: 12px;
    text-align: center;
}

table td {
    padding: 12px;
    border: 1px solid #ccc; /* Mejor contraste */
    vertical-align: top;
}

table tr:nth-child(even) td {
    background: #f3f3f3; /* Gris ligeramente más oscuro */
}

a, button {
    transition: all 0.3s ease;
}

/* Fix para el contador en el footer */
footer {
    display: flex;
    flex-direction: column; /* Alinea el texto y el contador uno bajo el otro */
    align-items: center;
}

.container-contador {
    margin-top: 10px;
    display: block !important;
    min-height: 40px; /* Evita que WAVE diga que está oculto */
}

.img-footer-contador {
    display: inline-block !important;
    visibility: visible !important;
    max-width: 200px;
    height: auto;
    border: none !important; /* Para que no herede el borde gris de tus otras imágenes */
    box-shadow: none !important; /* Para que no herede la sombra de img.documents */
}


