* {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Karla', sans-serif;
}

#header {
    background-color: black;
    border-bottom: none 1px;
    padding-top: 0.5rem;
    font-size: .8rem;
    position: relative;
}

#header a {
    color: #ffc106;
    margin-left: 30px;
    text-decoration: none;
}

#header .enlaces {
    display: flex;
    margin-left: 270px;
}

#sama {
    display: flex;
    justify-content: space-evenly;
    margin-top: 30px;
}

#buscador {
    display: flex;
    margin-right: 10px;
}

#buscador img {
    width: 25px;
}

#usuario {
    margin-right: 8px;
}


.img-info {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    width: 100%;
}

#simon,
#efapel,
#sanitarios {
    border-top: 1px solid #ffc106;
    text-align: center;
}

#efapel {
    margin-left: 50px;
    margin-right: 50px;
}

#simon img,
#efapel img,
#sanitarios img {
    width: 383px;
    height: 215px;
    margin-top: 15px;
    max-width: 100%;
}

#footer {
    background-color: black;
    position: relative;
    margin-top: 5%;
    width: 100%;
    height: auto;
}

#info-footer {
    display: flex;
    justify-content: center;
}

#footer p {
    color: #ffc106;
}

#footer a {
    text-decoration: none;
    color: #ffc106;
    font-size: .88rem;
}

#info {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.nosotros {
    color: #ffc106;
    margin-right: 100px;
    line-height: 25px;
}

.categorias {
    color: #ffc106;
}

.contacto {
    color: #ffc106;
    margin-left: 100px;
    font-size: .88rem;
}

.titulo {
    border-bottom: 1px solid #ffc106;
    line-height: 50px;
    width: 300px;
    font-size: .9rem;
    font-weight: bold;
}

.nombre {
    line-height: 25px;
}

.ubicacion {
    display: flex;
}

#info-ubicacion {
    line-height: 20px;
    margin-left: 5px;
}

.telefono {
    display: flex;
    border-top: 1px solid #ffc106;
    border-bottom: 1px solid #ffc106;
    line-height: 30px;
    margin-top: 5px;
}

.castelldefels {
    margin-left: 10px;
}

.begues {
    margin-left: 5px;
}

.correo {
    line-height: 30px;
    display: flex;
}

.correo a {
    margin-left: 10px;
}

.footer-empresa {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.empresa {
    display: flex;
    flex-direction: column;
}

.redes {
    display: flex;
    justify-content: center;
    margin: 5px;
}

#facebook {
    margin-right: 10px;
}

#instagram {
    margin-left: 10px;
}

#proveedores {
    border-top: 1px solid #ffc106;
    border-bottom: 1px solid #ffc106;
    margin-top: 50px;
    margin-bottom: 50px;
    margin-left: 310px;
    margin-right: 310px;
}

#imagenes {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    margin-top: 30px;
    margin-bottom: 30px;
    pointer-events: auto;
    display: flex;
}


#imagenes img {
    display: inline-block;
    animation: scroll 180s infinite linear;
    animation-play-state: running;
    margin-left: 50px;
    pointer-events: auto;

}

.news-section {
    background-color: #ffc106;
    padding: 30px 0;
}

.news-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

#news-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}


.news-item {
    width: 300px;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background: #fff;
    text-align: center;
    border: 1px solid #ddd;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
    overflow: hidden;
}

.news-item:hover {
    transform: scale(1.02);
}

.news-item p {
    font-size: 14px;
    color: #555;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
}


.news-item img {
    width: 100%;
    /* La imagen ocupará todo el ancho del contenedor */
    height: 180px;
    /* Altura fija para todas las imágenes */
    object-fit: cover;
    /* Ajusta la imagen sin distorsionarla */
    border-radius: 5px;
}

.news-item h3 {
    font-size: 18px;
    margin-top: 10px;
}

.news-item p {
    font-size: 14px;
    color: #555;
}

.news-item a {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background: #ffc106;
    color: black;
    text-decoration: none;
    border-radius: 5px;
}

.news-item a:hover {
    background: #c79500;
}

.news-item button {
    width: 100%;
    background: white;
    color: red;
    padding: 12px;
    font-size: 16px;
    border: 2px solid red;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: bold;
    margin-top: 10px;
}

/* 🔵 Efecto Hover para el botón */
.news-item button:hover {
    background: red;
    color: white;
}


.news-section #store{
    max-width: 600px;
    margin: 20px auto;
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Estilo general para inputs y textarea */
.news-section form input[type="text"],
.news-section form textarea,
.news-section form input[type="url"],
.news-section form input[type="file"] {
    font-size: 14px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fafafa;
}

/* Focus */
.news-section form input:focus,
.news-section form textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 6px rgba(0, 123, 255, 0.3);
    outline: none;
}

/* Área de texto */
.news-section form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Estilo para el botón */
.news-section form #publicar[type="submit"] {
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    color: black;
    background-color: #ffc106;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.news-section form #publicar[type="submit"]:hover {
    background-color: #ffc106;
}

/* Input file personalizado opcional */
.news-section form input[type="file"] {
    background-color: #f0f0f0;
    cursor: pointer;
}



@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-100% * 196));
    }
}

/* 🔴 Modo Edición: Detener la animación y mostrar todas las imágenes */
#proveedores.editing #imagenes {
    white-space: normal;
    /* Permite que las imágenes se muestren en varias líneas */
    overflow: visible;
    /* Asegura que se vean todas las imágenes */
    display: flex;
    /* Hace que las imágenes se alineen correctamente */
    flex-wrap: wrap;
    /* Permite que las imágenes pasen a la siguiente línea si es necesario */
    justify-content: center;
    /* Centra las imágenes */
}

#proveedores.editing #imagenes img {
    animation: none;
    /* Desactiva la animación */
    margin: 10px;
    /* Añade un pequeño margen entre imágenes */
}



#abrirBuscador {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-contenido {  
    background-color: #fff;
    margin: 20% auto;
    padding: 20px;
    border-radius: 5px;
    width: 60%;
    position: relative;
}

.modal-contenido input[type="text"] {
    width: 98%;
    height: 40px;
    font-size: 16px;
    padding: 10px;
}

.modal-cerrar {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

.hover-shadow:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

div h1{
    text-align: center;
    margin-bottom: 30px;
}

.brand-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.brand-card {
    width: 260px;
    height: 120px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.brand-logo {
    width: 200px;
    max-height: 100px;
    margin-top: 10px;
}

.brand-name {
    font-weight: 500;
    font-size: 1rem;
    color: #333;
    margin: 0;
}

.brand-card-link {
    text-decoration: none;
    color: inherit;
}






@media only screen and (max-width: 768px) {
    #image-list {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        /* Reduce tamaño mínimo de columnas */
    }

    #header {
        padding-top: 0.3rem;
    }

    #header a {
        margin-left: 10px;
    }

    #header .enlaces {
        margin-left: 10px;
    }

    #sama {
        margin-top: 20px;
    }

    #buscador img {
        width: 20px;
    }

    .img-info {
        flex-direction: column;
    }

    #simon,
    #efapel,
    #sanitarios {
        border-top: 1px solid #ffc106;
        margin-left: 50px;
        margin-right: 50px;
    }

    #simon img,
    #efapel img,
    #sanitarios img {
        height: 240px;
    }

    #info {
        flex-direction: column;
    }

    .nosotros,
    .categorias,
    .contacto {
        margin: 0;
        text-align: center;
    }

    .desplegable {
        width: 100%;
        cursor: pointer;
        color: #ffc106;
        text-decoration: underline;
        font-size: .88rem;
    }

    .nav-submenu {
        display: none;
    }

    #info {
        display: none;
    }

    .categorias {
        display: block;
    }

    .nav-submenu {
        display: block;
    }

    .desplegable::after {
        content: '▼';
        margin-left: 5px;
        transition: transform 0.2s;
        transform: rotate(180deg);
    }

    #proveedores {
        margin: 0;
        border-top: 1px solid #ffc106;
        border-bottom: 1px solid #ffc106;
        margin-top: 30px;
        margin-left: 50px;
        margin-right: 50px;
    }

    #imagenes {
        overflow: hidden;
        white-space: nowrap;
        margin-bottom: 30px;
        z-index: -1;
    }

    #imagenes img {
        display: inline-block;
        animation: scroll 180s infinite linear;
        animation-play-state: running;
        margin-left: 10px;
    }

    body.nav-active {
        overflow: hidden;
    }

    #nav {
        display: none;
        position: fixed;
        background-color: black;
        height: 100%;
        width: 30%;
        top: 0;
        left: 0;
        padding: 20px;
        z-index: 999;
    }

    #nav.active {
        display: block;
    }

    #menu-icon {
        display: block;
        font-size: 24px;
        cursor: pointer;
    }

    .nav>li {
        display: block;
        margin-bottom: 10px;
    }

    #nav a {
        color: #fff;
    }

    #nav a:hover {
        color: #ffc106;
    }

    .close-icon {
        display: block;
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 24px;
        cursor: pointer;
        color: #fff;
    }
}

@media (min-width: 769px) {
    #image-list {
        gap: 10px;
        /* Reduce el espacio entre imágenes */
    }

    #header {
        padding-top: 0.3rem;
    }

    #header a {
        margin-left: 10px;
    }

    #header .enlaces {
        margin-left: 10px;
    }

    #sama {
        margin-top: 20px;
    }

    .nosotros,
    .categorias {
        margin-left: 10px;
    }

    .desplegable {
        width: 100%;
        font-size: .88rem;
    }

    #footer {
        position: absolute;
    }

    .cookies {
        margin-left: 95px;
        width: 83%;
    }

    .politica-cookies {
        margin-left: 95px;
        width: 83%;
    }
}