/* ----------------------------------------------------
    RESET Y BASE
---------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Font principal inspirada en la imatge */
    font-family: 'Playfair Display', serif; 
}

body {
    /* CAMBIOS AQUÍ: Aplicamos un fondo con imagen/patrón */
    background: #d0d5ce; /* Color base y patrón */
    background-size: 200px; /* Ajusta el tamaño del patrón si es necesario */
    color: #5C6F5C; /* Color de texto base, un verd-gris suau */
    line-height: 1.6;
}
/* ----------------------------------------------------
    NAVEGACIÓ - SOLUCIÓ RESPONSIVE
---------------------------------------------------- */
.top-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 10px; /* Padding ajustat */
    background: rgba(255, 255, 255, 0.85); /* Fondo blanc semitransparent */
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Sombra suau */
    z-index: 1000;
    
    /* Centrem el div contenidor (nav-left) */
    display: flex; 
    justify-content: center;
}

.top-nav .nav-left {
    /* CONJUNT CLAU: Fa que els botons es posin en línia i s'emboliquin */
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    align-items: center;
    gap: 15px; /* Espaiat entre botons per a escriptori */
    max-width: 1000px;
}

.nav-btn {
    padding: 10px 20px;
    background: transparent; /* Fondo transparent */
    color: #5C6F5C; /* Text verd-gris */
    border: 1px solid #C8D6C8; /* Vora més suau */
    border-radius: 25px; /* Botons més arrodonits */
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Propietat afegida per a millor flexibilitat */
    flex-grow: 0;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: #E8F0E8; /* Fondo suau en passar el ratolí */
    border-color: #5C6F5C;
    color: #3A4A3A;
}

/* ----------------------------------------------------
    HERO (PORTADA) - CONTRAST CORREGIT
---------------------------------------------------- */
.hero {
    height: 100vh;
    /* NOTA: Aquesta URL s'ha d'ajustar a la vostra imatge. */
    background: url('../img/portada_opcio1.jpeg') center/cover no-repeat; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff; /* CANVI CLAU: Text blanc */
    padding-top: 80px; 
    position: relative; 
    overflow: hidden;
}

/* CAPA DE SUPERPOSICIÓ (OVERLAY) per millorar el contrast */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Color fosc semitransparent (negre al 35%) */
    background-color: rgba(0, 0, 0, 0.35); 
    z-index: 1; /* Just a sobre de la imatge de fons */
}

.hero-content {
    position: relative;
    z-index: 2; /* Assegura que el contingut estigui per sobre de la superposició */
    max-width: 90%;
    /* Ombra de text subtil per destacar */
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7); 
}

.main-title {
    font-family: 'Great Vibes', cursive; 
    font-size: 5rem; 
    color: #DCE6D9; /* Color molt clar, gairebé blanc */
    margin-bottom: 0.5rem;
    line-height: 1;
}

.sub-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #f0f0f0; /* Color gris clar */
    margin-top: 10px;
    margin-bottom: 40px;
    letter-spacing: 1.5px;
}

.hero p { 
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #fff; /* Text blanc */
    margin: 15px auto 40px auto;
    max-width: 600px;
    line-height: 1.5;
}


.leer-mas {
    padding: 12px 30px;
    background: #7A8D7A; 
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 30px; 
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.leer-mas:hover {
    background: #5C6F5C; 
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 90%;
    /* Espacio superior para que el contenido baje respecto al menú */
    padding-top: 60px; 
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4); 
    margin: 0 auto;
    text-align: center;
}

.titol-imatge {
    /* Uso de porcentajes para adaptabilidad */
    width: 100%;
    /* Tamaño máximo en pantallas grandes para que no píxele */
    max-width: 650px; 
    height: auto; /* Mantiene la proporción */
    margin-top: 20px;
    margin-bottom: 10px;
    /* Efecto de sombra para dar profundidad */
    filter: drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.15));
}

/* ----------------------------------------------------
    LOGO ENS CASAM - RESPONSIVE (AÑADIDO)
---------------------------------------------------- */
.logo-enscasem {
    /* Centrar la imagen dentro de la sección */
    display: block; 
    margin: 0px auto 40px auto; /* Separación superior 0, inferior 40px */
    
    /* CONTROL DE TAMAÑO EN ESCRITORIO */
    max-width: 650px; /* Tamaño máximo para escritorio */
    height: auto;
}

/* ----------------------------------------------------
    SECCIONS GENERALS (INFORMACIÓ, UBICACIÓ, REGISTRE)
---------------------------------------------------- */
.info,
.ubicacio,
.registre {
    padding: 80px 25px; 
    text-align: center;
    max-width: 900px; 
    margin: 0 auto 40px auto; /* Centrar y espaciado */
    background: #FFFFFF; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
    border-radius: 10px; 
}

.info h2,
.ubicacio h2,
.registre h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #4A6B4A;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px; 
}

.info h2::after,
.ubicacio h2::after,
.registre h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80px;
    height: 2px;
    background-color: #C8D6C8; 
}

.img-masia {
    /* Se adapta al 100% del contenedor del móvil */
    width: 100%;
    /* En ordenadores, limitamos el tamaño para que sea elegante */
    max-width: 800px; 
    height: auto; /* Evita que la imagen se vea "aplastada" */
    border-radius: 15px; /* Bordes redondeados */
    margin: 30px auto;
    display: block; /* Asegura que el centrado con margin: auto funcione */
    box-shadow: 0px 10px 20px rgba(0,0,0,0.1);
}

.info p,
.ubicacio p {
    font-size: 1.15rem;
    color: #6D7E6D;
    margin: 15px 0;
}

.info strong {
    color: #4A6B4A;
}

.maps-btn {
    display: inline-block;
    margin: 25px 0;
    padding: 12px 25px;
    background: #4A6B4A; 
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.maps-btn:hover {
    background: #3A4A3A; 
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ----------------------------------------------------
    UBICACIÓ ESPECÍFICA
---------------------------------------------------- */
.mapa-container {
    max-width: 700px; 
    margin: 40px auto;
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    border-radius: 15px; 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); 
}

.mapa-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; 
}

/* ----------------------------------------------------
    REGAL
---------------------------------------------------- */

.regal {
    padding: 60px 25px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.regal-contingut p {
    font-size: 1.1rem;
    color: #6D7E6D;
    max-width: 600px;
    margin: 0 auto 25px auto;
}

.iban-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #F9F7F2;
    padding: 15px 25px;
    border: 1px dashed #7A8D7A;
    border-radius: 8px;
    font-family: monospace; /* Font de codi per facilitar la lectura dels números */
    font-size: 1.1rem;
    color: #4A6B4A;
}

.copy-btn {
    background: #7A8D7A;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #5C6F5C;
}

/* ----------------------------------------------------
    FORMULARI DE BODA
---------------------------------------------------- */

/* Estil per al text principal per assegurar que el span es posi a sota */
.titol-formulari {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

/* Estil específic per al text entre parèntesis */
.subtitol-formulari {
    display: block;
    font-size: 1.4rem;
    font-weight: normal;
    color: #6D7E6D;
    margin-top: 5px;
    font-family: 'Playfair Display', serif;
    text-transform: none;
}

.data-limit {
    display: block;
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    color: #8A9A8A;
    margin-top: 4px;
    text-transform: none;
}

/* Contenidor */
.formulari {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 550px; 
    margin: auto;
}

/* Fieldsets */
.formulari fieldset {
    border: 1px solid #DCE6D9; 
    padding: 25px 20px; 
    margin-bottom: 25px;
    border-radius: 10px; 
    background: #FDFDFD; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); 
}

.formulari legend {
    padding: 0 10px;
    font-size: 1.2rem; 
    color: #4A6B4A; 
    font-weight: bold;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* Labels */
.formulari label {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #6D7E6D; 
    text-align: left; 
}

/* Inputs, selects, textareas */
.formulari input,
.formulari textarea,
.formulari select {
    margin-bottom: 20px; 
    padding: 14px; 
    border: 1px solid #C8D6C8; 
    border-radius: 8px; 
    background: #fff;
    font-size: 1rem;
    color: #5C6F5C; 
    transition: all 0.3s ease;
    width: 100%; 
}

/* Focus bonic */
.formulari input:focus,
.formulari textarea:focus,
.formulari select:focus {
    border-color: #7A8D7A; 
    box-shadow: 0 0 8px rgba(122, 141, 122, 0.3); 
    outline: none;
}

/* Textarea */
.formulari textarea {
    min-height: 120px; 
    resize: vertical;
}

/* Botó enviar */
.boto-enviar {
    padding: 15px;
    background: #4A6B4A; 
    color: #fff;
    border: none;
    border-radius: 30px; 
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.boto-enviar:hover {
    background: #3A4A3A; 
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.info-autocar {
    margin-top: 15px;
    padding: 15px;
    background-color: #f4f7f4; /* Un verd molt clar per diferenciar-ho */
    border-left: 3px solid #7A8D7A; /* Una línia vertical decorativa */
    border-radius: 5px;
    text-align: left;
}

.info-autocar p {
    font-size: 0.95rem;
    margin-bottom: 8px !important;
    color: #4A6B4A;
}

.info-autocar ul {
    list-style: none; /* Treiem els punts per un estil més net */
    padding-left: 0;
}

.info-autocar li {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #6D7E6D;
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.info-autocar li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #7A8D7A;
}


/* ----------------------------------------------------
    RESPONSIVE
---------------------------------------------------- */
@media (max-width: 768px) {
    /* Ajustes específicos para la navegación en móvil */
    .top-nav {
        /* Eliminem el padding superior/inferior per fer-la més compacta */
        padding: 10px 10px; 
    }
    
    .top-nav .nav-left {
        gap: 8px; /* Reduïm l'espaiat */
        padding: 0 5px; /* Petit padding per no tocar les vores */
    }
    
    .nav-btn {
        /* Fem els botons més petits i la font més petita */
        padding: 6px 8px;
        font-size: 0.8rem;
        /* Permetem que creixin/es redueixin una mica */
        flex-grow: 1; 
        flex-basis: auto; 
        min-width: 23%; /* 4 botons amb espaiat de 8px caben en 100% */
    }
    /* Logo de Ens Casem más pequeño */
    .logo-enscasem {
        /* Reducimos el tamaño máximo para que no sea demasiado grande en móvil */
        max-width: 90%; 
        /* Reducimos la separación inferior para compactar el contenido */
        margin-bottom: 25px; 
    }
    /* Resto de estilos responsive */
    .main-title {
        font-size: 3.5rem;
    }
    .sub-title {
        font-size: 1.2rem;
    }
    .hero p {
        font-size: 1.1rem;
        margin: 10px auto 30px auto;
    }
    .info h2,
    .ubicacio h2,
    .registre h2 {
        font-size: 2rem;
    }
    .info p,
    .ubicacio p {
        font-size: 1rem;
    }
    .formulari fieldset {
        padding: 20px 15px;
    }
    .formulari legend {
        font-size: 1rem;
    }
    .formulari input,
    .formulari textarea,
    .formulari select {
        padding: 10px;
        font-size: 0.9rem;
    }
    .boto-enviar {
        font-size: 1rem;
        padding: 12px;
    }
}

@media (min-width: 800px) {
    .main-title {
        font-size: 6rem; 
    }

    .sub-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    /* El título en móvil debe resaltar */
    .titol-imatge {
        max-width: 100%; 
        margin-top: 40px; 
    }
    
    .hero-content {
        padding-top: 80px;
    }

    /* La masía en móviles puede ocupar toda la anchura para mejor detalle */
    .img-masia {
        width: 100%;
        border-radius: 8px; /* Reducimos un poco el radio en pantallas pequeñas */
        margin: 20px auto;
    }
}