/* ========= VARIABLES ========= */
:root {
    --blanco: #ffffff;
    --fondo-claro: #f4f4f4;
    --texto-principal: #333333;
    --gris-medio: #cccccc;
    --color-principal: #003366;
    --color-acento: #ff6600;
    --color-footer: #111111;
    --color-footer-fondo: #7e7b7b;
}

/* ========= RESETEO ========= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--fondo-claro);
    color: var(--texto-principal);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 2rem 0;
}

.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

hr {
    border: 0;
    height: 1px;
    background: var(--gris-medio);
    margin: 2rem 0;
}

button {
    background-color: var(--color-acento);
    color: var(--blanco);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

/* ========= HEADER ========= */
header#header {
    background-color: var(--blanco);
    color: var(--texto-principal);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header#header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1200px;
    margin: auto;
}

header#header img {
    height: 50px;
    width: auto;
}

header#header h1 {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

header#header nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

header#header nav a {
    color: var(--color-principal);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

header#header nav a:hover {
    color: var(--color-acento);
}

/* Responsive: móvil */
@media (max-width: 768px) {
    header#header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    header#header nav ul {
        flex-direction: column;
        width: 100%;
        margin-top: 0.5rem;
    }

    header#header nav a {
        padding: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
}

/* ========= HERO ========= */
#hero {
    position: relative;
    overflow: hidden;
    height: 85vh;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;

    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);

    border-radius: 0;
    color: #fff;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
    color: white;
}

.carousel-caption p {
    font-size: 1.7rem;
    font-weight: 400;
}




.carousel button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: var(--blanco);
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 2;
}

.carousel .prev {
    left: 10px;
}

.carousel .next {
    right: 10px;
}


/* ========= SECCIONES ========= */
section {
    padding: 80px 0;
}

section h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--color-principal);
    text-align: center;
}

/* ========= PRODUCTES I SERVEIS ========= */
#expositor {
    background: var(--fondo-blanco);
}

#productes,
#serveis {
    text-align: center;
    padding: 4rem 1rem;
}

#serveis {
    background-color: var(--fondo-claro);
}

.intro-text {
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--texto-principal);
    line-height: 1.6;
}

/* ===== Cards ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--blanco);
    border-radius: 0px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    color: var(--color-principal);
}

.card-content p {
    color: var(--texto-principal);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== Extra Blocks ===== */
.extra {
    margin-top: 3rem;
    background: var(--fondo-claro);
    padding: 2rem;
    text-align: left;
    border-radius: 8px;
}

.extra h3 {
    color: var(--color-principal);
    margin-bottom: 1rem;
}

.extra ul {
    list-style: none;
    padding: 0;
}

.extra li {
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}


/* ========= CONTACTO ========= */
.contact-container {
    padding: 50px 0;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
    text-align: left;
}

.contact-text,
.contact-form {
    flex: 1;
    min-width: 280px;
}

.contact-text h3 {
    margin-bottom: 15px;
}

.contact-text ul {
    list-style: none;
    padding: 0;
}

.contact-text ul li {
    margin-bottom: 8px;
}

.contact-text a {
    text-decoration: none;
    color: #007bff;
}

.contact-text a:hover {
    text-decoration: underline;
}


/* ========= FORMULARIO ========= */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: auto;
}

form input,
form textarea {
    padding: 0.8rem;
    border: 1px solid var(--gris-medio);
    border-radius: 0px;
    font-size: 1rem;
    width: 100%;
}

form button {
    border: none;
    cursor: pointer;
}

.contacte-horari {
    flex: 1 1 50px;
    background: var(--fondo-claro);
    padding: 1rem;
    border-left: 4px solid var(--color-acento);
}

.contacte-horari h3 {
    margin-bottom: 1rem;
}

.contacte-horari ul {
    list-style: none;
    padding: 0;
}

.contacte-horari li {
    margin-bottom: 0.5rem;
}

/* ========= MARQUES ========= */
#marques {
    background-color: var(--fondo-claro);
    padding: 4rem 1rem;
    text-align: center;
}

#marques h2 {
    margin-bottom: 1rem;
    color: var(--color-principal);
}

#marques p {
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: var(--texto-principal);
}

#marques .logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

#marques .logos img {
    max-height: 70px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

#marques .logos img:hover {
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* ========= FOOTER ========= */
/* Footer */
.site-footer {
    background-color: var(--color-footer);
    color: var(--blanco);
    font-size: 0.9rem;
    line-height: 1.5;
}

.site-footer img {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
}

.site-footer a {
    color: var(--blanco);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--color-acento);
}

.footer-top {
    padding: 3rem 0;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: auto;
}

.footer-col {
    flex: 1 1 220px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-acento);
}

.footer-col p {
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.contact-list li {
    margin-bottom: 0.5rem;
}

.social-icons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--blanco);
    color: var(--color-principal);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--color-acento);
    color: var(--blanco);
}

.footer-bottom {
    background-color: black;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.8rem;
}


/* ========= BOTÓN IR ARRIBA ========= */
#btn-up {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-principal);
    color: var(--blanco);
    border: none;
    border-radius: 50%;
    padding: 0.8rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    /* se mostrará con JS */
    transition: background 0.3s ease;
}

#btn-up:hover {
    background: var(--color-acento);
}

/* ========= ANIMACIONES ========= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========= RESPONSIVE ========= */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    nav ul {
        flex-direction: column;
    }

    .hero h2 {
        font-size: 2rem;
    }
}