/* RESET I BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Raleway", sans-serif;
}

body {
    color: #555;
    line-height: 1.6;
}

/* CONTAINER */
.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* HEADER */
header {
    background: #1f3a5f;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-family: "Racing Sans One", sans-serif;
    font-weight: 400;
    font-style: normal;
    transition: opacity 0.2s ease;
    color: #fff;
    font-size: 2.5rem;
    text-decoration: none;
}


.logo:hover {
    opacity: 0.85;
}

/* NAV */
nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.05rem;
    margin-left: 5px;
}

nav a:hover,
nav a:focus {
    text-decoration: underline;
}

/* Mòbil: amples < 768px */
@media (max-width: 767px) {
    .header-content {
        flex-direction: column; /* logo a sobre, menú a sota */
        align-items: center;
        gap: 10px; /* espai entre logo i menú */
    }

    nav ul {
        flex-direction: row;    /* ítems un al costat de l'altre */
        gap: 15px;              /* espai entre cada ítem */
        justify-content: center; /* centrat dins del container */
        padding: 0;
        margin: 0;
    }

    nav li {
        list-style: none;       /* elimina punts */
    }

    nav a {
        font-size: 1.1rem;     /* opcional: text més gran per mòbil */
    }
}



/* HERO */
.hero {
    position: relative;
    background: url("/img/portada.jpg")
                center 65% / cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 160px 20px;
    min-height: 45vh;
}


.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.hero h2,
.hero p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* SECTIONS */
.section {
    padding: 60px 0;
}

.section-alt {
    background: rgba(31, 58, 95, 0.25);
}

.section h2 {
    margin-bottom: 20px;
    color: #1f3a5f;
    font-size: 2.1rem;
    font-weight: 700;
}

.section ul {
    margin-top: 15px;
    list-style: none;
}

.section ul li {
    margin-bottom: 8px;
}

/* NOSOTROS CON IMAGEN */
.nosotros-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.nosotros-image img {
    width: 100%;
    height: auto;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nosotros-content {
        grid-template-columns: 1fr;
    }

    .nosotros-image {
        order: -1;
    }
}


/* SERVICES */

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-width: 2fr; /* això no funciona directament, millor amb media query */
    gap: 20px;
}

/* Desktop: 2 columnes */
@media (min-width: 768px) {
    .services {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mòbil: 1 columna */
@media (max-width: 767px) {
    .services {
        grid-template-columns: 1fr;
    }
}

.service-box {
    background: #fff;
    padding: 20px;
    border-left: 5px solid #1f3a5f;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-box h3 {
	color: #1f3a5f;
    margin-bottom: 1rem;
}

.service-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.nosotros-image img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
}



/* CONTACTO */

#contacto {
    background:
        linear-gradient(rgba(31,58,95,0.85), rgba(31,58,95,0.85)),
        url("/img/fondo-contacto.jpg") center / cover no-repeat;
}

/* Lletres blanques */
#contacto h2,
#contacto p,
#contacto a {
    color: #fff;
}

.contact-info strong {
    margin-bottom: 0px;
    font-size: 1rem !important;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 1.5rem;
    line-height: 1.2;
}

.contact-info a {
    color: #1f3a5f;
    text-decoration: none;
}

/* CONTACT GRID */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    align-items: top;
}

/* MAP RESPONSIVE */
.map-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.map-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}


/* FOOTER */
footer {
    background: #1f3a5f;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    letter-spacing: 0.05rem;
}

footer a {
    color: #fff;
}

/* BANNER COOKIES */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1ABDCA;
    color: #fff;
    padding: 15px 20px;
    display: flex;              /* sempre visible com a flex */
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.95rem;
    gap: 10px;
    z-index: 9999;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.2);

    /* Animació suau */
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}

#cookie-banner.show {
    transform: translateY(0);  /* llisca cap amunt */
}

#cookie-banner a {
    color: #1f3a5f;
    text-decoration: underline;
}

#cookie-banner button {
    background: #1f3a5f;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #fff;
}

#cookie-banner button:hover {
    background: #1f3a5f;
}

/* Secció de Privacidad y Cookies específica */
#privacidad-cookies h3 {
    margin-top: 40px;    /* espai sobre el títol */
    margin-bottom: 15px; /* espai sota el títol */
    color: #1f3a5f;
    font-size: 1.6rem;
}

#privacidad-cookies h4 {
    margin-top: 30px;
    margin-bottom: 12px;
    color: #1f3a5f;
    font-size: 1.3rem;
}

#privacidad-cookies p,
#privacidad-cookies ul {
    margin-bottom: 15px; /* espai entre paràgrafs i llistes */
}

#privacidad-cookies ul li {
    margin-bottom: 8px; /* espai entre elements de la llista */
}




