/**
 * Estils principals per al lloc web de JoiOS
 * Aquest arxiu conté tots els estils bàsics del lloc web
 */

/* ===== Variables ===== */
:root {
    /* Colors */
    --color-primary: #5BB096;
    --color-secondary: #f4a261;
    --color-accent: #e76f51;
    --color-dark: #2a3d45;
    --color-light: #f8f9fa;
    --color-gray: #6c757d;
    --color-gray-light: #e9ecef;
    --color-white: #ffffff;
    --color-black: #212529;
    --color-turquoise: #a8dadc;
    --color-turquoise-light: #e3f2fd;
    
    /* Tipografia */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    
    /* Espais */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Ombres */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transicions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Arrodoniments */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

/* ===== Reset i Estils Bàsics ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

/* ===== Utilitats ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: var(--spacing-lg) 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-dark);
}

.section-subtitle {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark);
}

.section-turquoise {
    background-color: var(--color-turquoise-light);
}

/* Afegit: Classe per a fons gris clar */
.section-light-gray {
    background-color: #f5f5f5;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: var(--spacing-xs);
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.mb-4 {
    margin-bottom: var(--spacing-lg);
}

.mb-5 {
    margin-bottom: var(--spacing-xl);
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: var(--spacing-xs);
}

.mt-2 {
    margin-top: var(--spacing-sm);
}

.mt-3 {
    margin-top: var(--spacing-md);
}

.mt-4 {
    margin-top: var(--spacing-lg);
}

.mt-5 {
    margin-top: var(--spacing-xl);
}

/* ===== Botons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #5a7b63;
    color: var(--color-white);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: #e08c51;
    color: var(--color-white);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ===== Header i Navegació ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-family: var(--font-secondary);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin-left: 2rem;
}

.main-nav a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-dark);
    position: relative;
}

.main-nav a:hover {
    color: var(--color-primary);
}

.main-nav a.active {
    color: var(--color-primary);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-dark);
    margin: 5px 0;
    transition: all var(--transition-normal);
}

/* Animació del botó del menú mòbil quan està actiu */
.mobile-menu-toggle.toggle-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.toggle-active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.toggle-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    box-shadow: var(--shadow-md);
    z-index: 999;
    padding: 1rem 0;
    transform: translateY(-100%);
    transition: transform var(--transition-normal);
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu nav li {
    margin: 0;
}

.mobile-menu nav a {
    display: block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-dark);
    border-bottom: 1px solid var(--color-gray-light);
}

.mobile-menu nav a:hover,
.mobile-menu nav a.active {
    color: var(--color-primary);
    background-color: var(--color-gray-light);
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-color: var(--color-turquoise-light);
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 550px;
    position: relative;
    z-index: 2;
    padding: 2rem 0;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--color-dark);
}

.hero-subtitle {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--color-primary);
}

.hero-text {
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
    opacity: 0.2; /* Added opacity for all screen sizes */
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ===== Page Header ===== */
.page-header {
    padding: var(--spacing-lg) 0;
    margin-top: 80px;
    background-color: var(--color-turquoise-light);
    text-align: center;
}

.page-header .section-title {
    margin-bottom: var(--spacing-sm);
}

.page-header p {
    max-width: 700px;
    margin: 0 auto;
}

/* ===== Featured Section ===== */
.featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.featured-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.featured-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Gallery Section ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative; /* Necessari per posicionar l'icona overlay */
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform var(--transition-normal); /* Afegit per animar l'escala */
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: var(--color-white);
    opacity: 0;
    transition: opacity var(--transition-normal);
    display: flex; /* Afegit per centrar contingut */
    flex-direction: column; /* Afegit */
    align-items: center; /* Afegit */
    justify-content: center; /* Afegit */
    text-align: center; /* Afegit */
}

/* Afegit: Estil per a l'icona overlay */
.gallery-overlay-icon {
    font-size: 2rem; /* Mida de la icona */
    margin-bottom: 0.5rem; /* Espai sota la icona */
    opacity: 0; /* Amagat per defecte */
    transition: opacity var(--transition-normal) 0.1s; /* Transició retardada */
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Afegit: Efecte d'escala a la imatge en hover */
.gallery-item:hover img {
    transform: scale(1.05);
}

/* Afegit: Mostrar icona en hover */
.gallery-item:hover .gallery-overlay-icon {
    opacity: 1;
}

/* ===== Instagram Section ===== */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.instagram-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 1/1;
}

.instagram-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Darker overlay */
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    width: 100%;
    max-width: 1000px;
    max-height: 90vh; /* Limit height */
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden; /* Hide overflow */
    position: relative;
    display: flex; /* Use flex for inner layout */
    flex-direction: column; /* Stack image and details vertically on small screens */
    animation: fadeIn 0.3s ease forwards; /* Use existing fadeIn animation */
}

.lightbox-inner {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column */
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent inner content overflow */
}

.lightbox-image {
    position: relative; /* For loading indicator */
    background-color: var(--color-gray-light); /* Background while loading */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-height: 60vh; /* Limit image height on small screens */
}

.lightbox-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure image fits without distortion */
    transition: opacity var(--transition-fast); /* Smooth opacity transition */
}

.lightbox-details {
    padding: var(--spacing-md);
    overflow-y: auto; /* Allow scrolling for details if needed */
    position: relative; /* For close button positioning */
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: var(--radius-full);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-dark);
    transition: all var(--transition-fast);
    z-index: 15; /* Ensure it's above details */
}

.lightbox-close:hover {
    background: var(--color-white);
    color: var(--color-accent);
    transform: scale(1.1);
}

.lightbox-close svg {
    width: 20px;
    height: 20px;
}

.lightbox-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-dark);
}

.lightbox-materials {
    font-size: 0.9rem;
    color: var(--color-gray);
    margin-bottom: var(--spacing-sm);
    font-style: italic;
}

.lightbox-description {
    margin-bottom: var(--spacing-md);
    line-height: 1.7; /* Improved readability */
}

.lightbox-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

/* Navigation Buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
    box-shadow: var(--shadow-sm);
    color: var(--color-dark);
}

.lightbox-nav:hover {
    background: var(--color-white);
    box-shadow: var(--shadow-md);
    transform: translateY(-50%) scale(1.1);
    color: var(--color-primary);
}

.lightbox-prev {
    left: var(--spacing-sm);
}

.lightbox-next {
    right: var(--spacing-sm);
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
}

/* Loading Indicator */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1); /* Lighter border */
    border-radius: 50%;
    border-top-color: var(--color-primary); /* Use primary color for spinner */
    animation: spin 1s linear infinite;
    display: none; /* Hidden by default */
    z-index: 5; /* Below image but above background */
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive adjustments for lightbox */
@media (min-width: 768px) {
    .lightbox-content {
        flex-direction: row; /* Side-by-side layout */
        max-height: 80vh; /* Allow more height */
    }

    .lightbox-inner {
        grid-template-columns: 3fr 2fr; /* Adjust column ratio */
        height: 100%;
    }

    .lightbox-image {
        max-height: none; /* Remove max-height */
        height: 100%; /* Take full height of the grid cell */
    }

    .lightbox-details {
        height: 100%; /* Take full height */
        max-height: 80vh; /* Match content max-height */
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: var(--spacing-md);
    }

    .lightbox-next {
        right: var(--spacing-md);
    }
}

/* ===== Workshop Section ===== */
.workshop-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.workshop-tab {
    padding: 0.75rem 1.5rem;
    background-color: var(--color-gray-light);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.workshop-tab:hover {
    background-color: var(--color-turquoise-light);
}

.workshop-tab.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.workshop-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.workshop-content-item {
    display: none; /* Amagat per defecte */
}

.workshop-content-item.content-active {
    display: block; /* Mostrat quan té la classe activa */
}

.workshop-image-main {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.workshop-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.workshop-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.workshop-info-icon {
    color: var(--color-primary);
}

.workshop-includes {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.workshop-includes-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.workshop-includes-icon {
    color: var(--color-primary);
}

.workshop-form {
    margin-top: 0rem; /* Reduït el marge superior */
    padding: 2rem;
    background-color: var(--color-gray-light);
    border-radius: var(--radius-md);
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    /* align-items: center; Eliminat d'aquí */
}

/* Afegit: Modificador per centrar verticalment */
.about-content--centered {
    align-items: center; 
}

.about-text {
    text-align: justify;
}

.featured-text .section-subtitle {
    text-align: justify;
}

.featured-text p {
    text-align: justify;
}

.about-image {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.process-card {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.process-image {
    height: 200px;
}

.process-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.process-content {
    padding: 1.5rem;
}

.process-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

/* ===== Contact Section ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--color-turquoise-light);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.contact-icon {
    color: var(--color-primary);
}

.contact-item-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.contact-map {
    margin-top: 2rem;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.contact-map img {
    width: 100%;
    height: auto;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-primary);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--radius-sm); /* Vora més subtil */
    background-color: #fdfdfd; /* Fons lleugerament gris */
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast); /* Afegida transició per a l'ombra */
    padding: 0.85rem 1.1rem; /* Ajust de padding */
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); /* Ombra interior subtil */
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--color-accent);
}

.error-message {
    color: var(--color-accent);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.form-success {
    text-align: center;
    padding: 2rem;
}

.form-success-icon {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.form-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

/* ===== Legal Pages ===== */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content ul,
.legal-content ol {
    margin-bottom: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* ===== Footer ===== */
.site-footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-sm);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-col h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.footer-col p {
    color: var(--color-gray-light);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--color-gray-light);
}

.footer-col ul li a:hover {
    color: var(--color-white);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--color-white);
    transition: all var(--transition-normal);
}

.social-links a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-sm);
    text-align: center;
    color: var(--color-gray-light);
    font-size: 0.875rem;
}

/* Add specific overrides for lightbox on smaller screens */
@media (max-width: 767.98px) {
    .lightbox-content {
        /* Adjust max-height slightly if needed, e.g., max-height: 85vh; */
    }

    .lightbox-image {
         /* Keep max-height: 60vh; */
    }

    .lightbox-details {
        padding: var(--spacing-sm); /* Reduce padding slightly */
    }

    .lightbox-title {
        font-size: 1.5rem; /* Reduce title size */
        margin-bottom: var(--spacing-xs);
    }

    .lightbox-materials {
        font-size: 0.85rem; /* Reduce materials text size */
        margin-bottom: var(--spacing-sm);
    }

    .lightbox-description {
        font-size: 0.9rem; /* Reduce description size */
        line-height: 1.6;
        margin-bottom: var(--spacing-sm);
    }

    .lightbox-price {
        font-size: 1.1rem; /* Reduce price size */
        margin-bottom: var(--spacing-sm);
    }

    .lightbox-close {
        top: var(--spacing-xs);
        right: var(--spacing-xs);
        width: 32px; /* Slightly smaller */
        height: 32px; /* Slightly smaller */
    }
    .lightbox-close svg {
        width: 18px;
        height: 18px;
    }

    /* Adjust nav buttons to be lower and avoid close button */
    .lightbox-nav {
        /* Position relative to top, centered on the image area (max-height 60vh) */
        top: 30vh; 
        transform: translateY(-50%); /* Keep vertical centering relative to the new top */
        width: 36px; /* Slightly smaller */
        height: 36px; /* Slightly smaller */
    }
    .lightbox-nav svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-prev {
        left: var(--spacing-xs); /* Closer to edge */
    }

    .lightbox-next {
        right: var(--spacing-xs); /* Closer to edge */
    }
}


/* ===== Media Queries ===== */
@media (min-width: 576px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .featured,
    .about-content,
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .process-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lightbox-inner {
        grid-template-columns: 1fr 1fr;
    }
    
    .lightbox-image {
        height: auto;
    }
    
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero-image {
        width: 100%;
        height: 100%;
        opacity: 0.2; /* Re-added this line for mobile */
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        text-align: center;
        padding: 0 1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

/* ===== Animacions ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

.animate-slide-up {
    animation: slideUp 1s ease forwards;
}

/* ===== Banner de Cookies ===== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-md);
    z-index: 2000;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

#cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.cookie-text {
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.cookie-text p {
    margin-bottom: 0;
}

.cookie-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

#accept-cookies,
#reject-cookies {
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

#accept-cookies {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
}

#accept-cookies:hover {
    background-color: #5a7b63;
}

#reject-cookies {
    background-color: transparent;
    color: var(--color-white);
    border: 1px solid var(--color-white);
}

#reject-cookies:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
    }

    .cookie-text {
        margin-bottom: 0;
        text-align: left;
        max-width: 80%;
    }
}

/**
 * Responsive CSS - Estils responsives per al lloc web de JoiOS
 * Aquest arxiu conté els estils específics per a diferents mides de pantalla
 */

/* Dispositius petits (mòbils en mode vertical, menys de 576px) */
@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hero-buttons .btn {
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .footer-content {
        gap: 2rem;
    }
}

/* Dispositius petits a mitjans (mòbils en mode horitzontal, 576px i amunt) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .section-subtitle {
        font-size: 1.75rem;
    }
}

/* Dispositius mitjans (tauletes, 768px i amunt) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding: 0 2rem;
    }
    
    .featured, 
    .about-content,
    .contact-grid {
        gap: 2rem;
    }
    
    .workshop-details {
        gap: 2rem;
    }
    
    .process-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Dispositius grans (escriptoris, 992px i amunt) */
@media (min-width: 992px) {
    .container {
        padding: 0 2rem;
    }
    
    .featured, 
    .about-content,
    .workshop-details,
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .process-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .instagram-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Animacions només per a escriptori */
    .featured-image img,
    .gallery-item img,
    .instagram-item img {
        transition: transform 0.5s ease;
    }
    
    .featured-image:hover img,
    .gallery-item:hover img,
    .instagram-item:hover img {
        transform: scale(1.1);
    }
    
    .workshop-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .workshop-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
}

/* Dispositius molt grans (escriptoris grans, 1200px i amunt) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-content {
        max-width: 600px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Dispositius extremadament grans (pantalles molt grans, 1400px i amunt) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Orientació de la pantalla */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 6rem 0;
    }
}
