:root {
    --primary: #800020; /* Color bordeus inspirat en el logo */
    --secondary: #d97706; /* Color taronja/fosc inspirat en el logo */
    --dark: #1f1f1f;
    --light: #fdfbf7;
    --gray: #71717a;
    --accent-bg: #f4efe6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

h1, h2, h3, .logo-text {
    font-family: 'Playfair Display', serif;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container img {
    height: 35px;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    margin-left: 2rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--secondary);
}

/* Hero Section amb Slider de Fons net */
.hero {
    height: 90vh;
    background: center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 1rem;
    margin-top: 70px;
    transition: background-image 1s ease-in-out;
    position: relative;
}

.hero-content {
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.btn {
    background-color: var(--secondary);
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn:hover {
    background-color: #b45309;
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 6rem 10%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 400px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Contact & Form Section amb Efecte Dinàmic */
.contact-section {
    background-color: var(--accent-bg);
    position: relative;
    overflow: hidden;
}

#contact-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.contact-content-wrapper {
    position: relative;
    z-index: 2;
}

.contact-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid #e4e4e7;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
}

.whatsapp-btn {
    background-color: #25d366;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.whatsapp-btn:hover {
    background-color: #1ebd5b;
}

/* Footer de 2 files i 3 columnes */
footer {
    background-color: var(--dark);
    color: #a1a1aa;
    padding: 4rem 10% 2rem 10%;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.footer-col h4 a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    font-size: 0.85rem;
    color: #71717a;
}

.footer-bottom a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Estils per al Carrusel amb Fletxes */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s, border-color 0.3s;
    z-index: 10;
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: white;
    transform: translateY(-50%) scale(1.05);
}

/* Responsiu per a pantalles petites */
@media (max-width: 768px) {
    nav { display: none; }
    .contact-container { padding: 1.5rem; }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .prev-btn { left: 15px; }
    .next-btn { right: 15px; }
}
/* --- BANNER DE COOKIES --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #111;
    color: #fff;
    padding: 20px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    display: none; /* Controlat per JS */
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media(min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-text p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #ddd;
    margin: 0;
}

.cookie-text a {
    color: #d97706;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.cookie-btn.accept {
    background-color: #d97706;
    color: #fff;
}
.cookie-btn.accept:hover {
    background-color: #b45309;
}

.cookie-btn.save {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}
.cookie-btn.save:hover {
    background-color: #444;
}

.cookie-btn.reject {
    background-color: transparent;
    color: #aaa;
    border: 1px solid #555;
}
.cookie-btn.reject:hover {
    color: #fff;
    border-color: #fff;
}

/* --- ICONA FLOTANT DE COOKIES (MINIMITZAT) --- */
#cookie-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #111;
    color: #d97706;
    border: 2px solid #d97706;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: none; /* S'activa per JS si ja s'ha triat opció */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s, background-color 0.2s, color 0.2s;
}

#cookie-icon:hover {
    transform: scale(1.1);
    background-color: #d97706;
    color: #fff;
}

#cookie-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
/* --- MODAL DE CONFIGURACIÓ DE COOKIES --- */
#cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cookie-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 8px;
    overflow-y: auto;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    position: relative;
    color: #333;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #111;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #6b7280;
}

.cookie-category-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cookie-category-item h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #111;
}

.cookie-category-item p {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Switch (Interruptors) */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1; transition: .3s; border-radius: 24px;
}
.slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white; transition: .3s; border-radius: 50%;
}
input:checked + .slider { background-color: #d97706; }
input:checked + .slider:before { transform: translateX(20px); }

.badge-required {
    font-size: 0.75rem;
    color: #374151;
    background: #e5e7eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.modal-footer {
    margin-top: 20px;
    text-align: right;
}

.btn-save-modal {
    background-color: #d97706;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}
.btn-save-modal:hover { background-color: #b45309; }