/* ==========================================================================
   1. VARIABLES I CONFIGURACIÓ GENERAL
   ========================================================================== */
:root {
    --color-primary: #1a1a1a;
    --color-accent: #a69177;
    --color-bg: #fdfdfd;
    --font-title: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 80px; 
}

body { 
    font-family: var(--font-body); 
    color: var(--color-primary); 
    background: var(--color-bg); 
    line-height: 1.6; 
}

.container { 
    padding: 100px 8%; 
}

/* ==========================================================================
   2. CAPÇALERA I NAVEGACIÓ (HEADER)
   ========================================================================== */
header {
    position: fixed; 
    top: 0; 
    width: 100%; 
    height: 80px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 0 5%; 
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(15px); 
    z-index: 1000;
}

.logo { 
    font-family: var(--font-title); 
    font-size: 1.4rem; 
    font-weight: 700; 
    text-decoration: none; 
    color: var(--color-primary); 
    letter-spacing: 2px; 
}

nav a { 
    text-decoration: none; 
    color: var(--color-primary); 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    margin-left: 30px; 
    font-weight: 600; 
    transition: 0.3s; 
    position: relative;
}

nav a:hover { 
    color: var(--color-accent); 
}

nav a.active { 
    color: var(--color-accent); 
    border-bottom: 2px solid var(--color-accent); 
    padding-bottom: 5px; 
}

.menu-toggle { 
    display: none; 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    color: var(--color-primary); 
    cursor: pointer; 
}

/* ==========================================================================
   3. TÍTOLS DE SECCIÓ (USUARI)
   ========================================================================== */
.section-header {
    margin-bottom: 60px;
    text-align: left;
}

.section-title {
    font-family: var(--font-title);
    font-size: 3.5rem;
    color: var(--color-primary);
    text-transform: capitalize;
    line-height: 1;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
    margin-top: 15px;
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
}

/* ==========================================================================
   4. SECCIÓ HERO (INICI)
   ========================================================================== */
.hero {
    height: 100vh; 
    display: flex; 
    align-items: center; 
    padding: 0 5%;
    background: linear-gradient(to right, #fff 40%, transparent 40%), 
                url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?q=80&w=2070'); 
    background-size: cover; 
    background-position: center;
}

.hero-content { 
    max-width: 500px; 
}

.hero-content h1 { 
    font-family: var(--font-title); 
    font-size: 4rem; 
    line-height: 1.1; 
    margin-bottom: 25px; 
}

.hero-content p { 
    font-size: 1.1rem; 
    color: #666; 
    margin-bottom: 30px; 
    font-weight: 300; 
}

.section-tag {
	display: block;
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.btn-download {
    display: inline-block; 
    padding: 20px 40px; 
    border: none; 
    cursor: pointer; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: white;
    text-decoration: none; 
    font-size: 0.8rem; 
    transition: background-color 0.3s ease; 
    margin-top: 20px; 
    background-color: #a69177; 
}

.btn-download:hover { 
    background-color: #8b765d; 
}
/* ==========================================================================
   5. SECCIÓ CONCEPTE
   ========================================================================== */
.concept-section {
    background: white;
}

.concept-container {
    max-width: 1000px;
    margin: 0 auto;
}

.concept-intro {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 60px;
}

.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: left;
}

.concept-item-title {
    font-family: var(--font-title);
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--color-accent);
}

.concept-item-text {
    font-size: 0.9rem;
    color: #666;
}

.concept-action {
    margin-top: 50px;
    text-align: center;
}

/* ==========================================================================
   6. SECCIÓ QUALITATS
   ========================================================================== */
.quality-block { 
    display: flex; 
    gap: 50px; 
    margin-bottom: 100px; 
    align-items: center; 
}

.quality-block:nth-child(even) { 
    flex-direction: row-reverse; 
}

.quality-img { 
    flex: 1; 
    height: 550px; 
    overflow: hidden; 
}

.quality-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 1s; 
}

.quality-img:hover img { 
    transform: scale(1.1); 
}

.quality-info { 
    flex: 1; 
    padding: 20px; 
}

.quality-info h3 { 
    font-family: var(--font-title); 
    font-size: 2.2rem; 
    margin-bottom: 20px; 
    border-bottom: 1px solid #ddd; 
    padding-bottom: 10px; 
}

.quality-info p { 
    margin-bottom: 20px; 
    font-weight: 300; 
}

.quality-list { 
    list-style: none; 
}

.quality-list li { 
    font-size: 0.9rem; 
    margin-bottom: 10px; 
    padding-left: 20px; 
    position: relative; 
    color: #555; 
}

.quality-list li::before { 
    content: '→'; 
    position: absolute; 
    left: 0; 
    color: var(--color-accent); 
    font-weight: bold; 
}

/* ==========================================================================
   7. SECCIÓ GALERIA
   ========================================================================== */
.gallery-container { 
    padding: 80px 0 0 0; 
    background: var(--color-bg); 
}

.gallery-header-wrapper {
    padding: 0 5% 40px 5%;
}

.gallery-grid { 
    display: flex; 
    flex-wrap: wrap; 
    width: 100%; 
}

.gallery-item { 
    flex-grow: 1; 
    flex-basis: 25%; 
    height: 350px; 
    overflow: hidden; 
    cursor: pointer; 
    border: 1px solid var(--color-bg); 
}

.gallery-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    transition: 0.6s ease; 
    filter: grayscale(0.2); 
}

.gallery-item:hover img { 
    filter: grayscale(0); 
    transform: scale(1.05); 
}

/* ==========================================================================
   8. DIVISORS (PARALLAX I FRASES)
   ========================================================================== */
.parallax-divider {
    height: 400px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax-divider::after { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.1); 
}

/* Imatges Parallax */
.divider-concept { background-image: url('https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?q=80&w=2000'); }
.divider-quality { background-image: url('https://images.unsplash.com/photo-1613545325278-f24b0cae1224?q=80&w=2000'); }
.divider-gallery { background-image: url('https://images.unsplash.com/photo-1600607687644-c7171b42498f?q=80&w=2000'); }

/* Frase Inspiracional */
.quote-divider-section {
    padding: 50px 0;
    text-align: center;
    background: white;
}

.quote-text {
    font-family: var(--font-title);
    font-style: italic;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: #888;
    text-transform: uppercase;
}

.divider-fade { 
    width: 33%; 
    height: 1px; 
    background: linear-gradient(to right, transparent, var(--color-accent), transparent); 
    margin: 30px auto; 
    opacity: 0.8; 
}

/* ==========================================================================
   9. SECCIÓ CONTACTE I FORMULARI
   ========================================================================== */
.contact-section { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    background: white; 
	
}

.contact-form { 
    padding: 50px 15% 50px 15%; 
    background: #f7f7f7; 
    color: var(--color-primary); 
}

.contact-map { 
    height: 100%; 
    min-height: 500px; 
    filter: grayscale(1) invert(0.9); 
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

input, textarea { 
    width: 100%; 
    background: transparent; 
    border: none; 
    border-bottom: 1px solid #ccc; 
    padding: 15px 0; 
    margin-bottom: 30px; 
    color: var(--color-primary); 
    font-family: inherit; 
    outline: none; 
}

.btn-send { 
    background-color: #a69177; 
    color: white; 
    transition: background-color 0.3s ease; 
    border: none; 
    padding: 20px 40px; 
    cursor: pointer; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
}

.btn-send:hover { 
    background-color: #8b765d; 
}

/* ==========================================================================
   10. PEU DE PÀGINA (FOOTER)
   ========================================================================== */
footer { 
    background: var(--color-primary); 
    color: #a69177; 
    text-align: center; 
    padding: 40px; 
    font-size: 0.7rem; 
    letter-spacing: 2px; 
}

.footer-copy { margin: 0; }
.footer-link-container { margin-top: 15px; }
.footer-pdf-link { color: #aaa; text-decoration: none; transition: 0.3s; }
.footer-pdf-link:hover { color: var(--color-accent); }

/* ==========================================================================
   11. ELEMENTS AUXILIARS (BOTÓ PUJAR)
   ========================================================================== */
#backToTop {
    display: none; 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    z-index: 999;
    border: none; 
    outline: none; 
    background-color: var(--color-accent); 
    color: white;
    cursor: pointer; 
    border-radius: 50%; 
    width: 50px; 
    height: 50px;
    font-size: 1.2rem; 
    transition: 0.3s; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#backToTop:hover { 
    background-color: #8b765d; 
    transform: translateY(-5px); 
}

/* ==========================================================================
   12. AJUSTOS RESPONSIVE (SMARTPHONES)
   ========================================================================== */
@media (max-width: 768px) {
    /* Layout General */
    .container { 
        padding: 80px 8% 60px 8%; 
    }

    /* Header i Menú Mòbil */
    .menu-toggle { 
        display: block; 
    }
    header nav {
        display: none; 
        position: absolute; 
        top: 80px; 
        left: 0; 
        width: 100%;
        background: white; 
        flex-direction: column; 
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }
    header nav.active { 
        display: flex; 
    }
    nav a { 
        margin: 15px 0; 
        font-size: 0.9rem; 
        text-align: center; 
    }

    /* Secció Hero en Mòbil */
    .hero {
        height: auto;
        min-height: 100vh; 
        background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), 
                    url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?q=80&w=2070');
        background-size: cover;
        background-position: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 120px 20px 60px 20px;
    }
    .hero-content { max-width: 100%; }
    .hero-content h1 { font-size: 2rem; line-height: 1.2; margin-bottom: 20px; }

    /* Títols de Secció en Mòbil */
    .section-header { text-align: center; margin-bottom: 40px; }
    .section-title { font-size: 2.5rem; }
    .section-title::after { margin: 15px auto 0; }
    .section-subtitle { font-size: 0.9rem; letter-spacing: 2px; }

    /* Qualitats en Mòbil */
    .quality-block { flex-direction: column !important; gap: 30px; }
    .quality-img { height: 300px; width: 100%; }

    /* Galeria en Mòbil */
    .gallery-header-wrapper { padding: 0 8% 30px 8%; text-align: center; }
    .gallery-item { flex-basis: 50%; height: 250px; }

    /* Parallax i Divisors en Mòbil */
    .parallax-divider { height: 250px; background-attachment: fixed; }
    .quote-divider-section { padding: 10px 0 10px 0; }
    .quote-text { font-size: 1rem; padding: 0 20px; }

    /* Contacte en Mòbil */
    .contact-section { grid-template-columns: 1fr; }
    .contact-form { padding: 40px 10%; }
    .contact-map { min-height: 400px; }
}

/* Ajust per a pantalles mitjanes */
@media (max-width: 1200px) and (min-width: 769px) {
    .gallery-item { flex-basis: 33.33%; }
}