/* ==========================================================================
   FUNDACIÓ CIÈNCIA I ART (FCART) - Estils Globals Moderns
   ========================================================================== */

:root {
  --primary: #00519E;
  --primary-dark: #00376b;
  --primary-light: #eef5fc;
  --primary-subtle: #dbeafe;
  --accent: #d97706;
  --accent-light: #fef3c7;
  
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-dark: #0b1120;
  --bg-dark-surface: #131d31;
  
  --border: #e2e8f0;
  --border-focus: #93c5fd;
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 20px -2px rgba(0, 81, 158, 0.08), 0 2px 6px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 18px 36px -6px rgba(0, 81, 158, 0.12), 0 8px 16px -4px rgba(0,0,0,0.05);
  --shadow-hover: 0 20px 40px -10px rgba(0, 81, 158, 0.18), 0 10px 20px -5px rgba(0,0,0,0.06);
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --container-max: 1200px;
}

/* Reset bàsic */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-body);
  background-color: var(--bg-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   TOP BAR (Sense telèfon, només email, seu i selector idiomes)
   ========================================================================== */
.top-bar {
  background: var(--bg-dark);
  color: var(--text-light);
  font-size: 0.815rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  display: flex;
  gap: 20px;
  align-items: center;
}

.top-bar-left a {
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar-left a:hover {
  color: #ffffff;
}

.top-bar-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
}

.lang-switcher {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lang-btn {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s;
}

.lang-btn:hover {
  color: #ffffff;
}

.lang-btn.active {
  background: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   HEADER & NAVBAR (Únic logo amb text a sota)
   ========================================================================== */
header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

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

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-link img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
}

.nav-links > li {
  position: relative;
}

.nav-links a {
  color: #334155;
  font-weight: 600;
  font-size: 0.925rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 230px;
  padding: 8px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 110;
}

.nav-links > li:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  font-size: 0.885rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: #334155;
}

.dropdown-menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-header {
  background: var(--primary);
  color: #ffffff !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  margin-left: 10px;
  box-shadow: 0 2px 6px rgba(0, 81, 158, 0.25);
}

.btn-header:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 81, 158, 0.35);
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 14px;
  padding: 3px 8px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  user-select: none;
}

.lang-switcher .lang-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  line-height: 1;
  display: inline-block;
}

.lang-switcher a.lang-link:hover {
  color: var(--primary);
  background: rgba(0, 81, 158, 0.08);
}

.lang-switcher .lang-link.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 81, 158, 0.25);
  cursor: default;
}

.lang-switcher .lang-divider {
  color: var(--border);
  font-size: 0.7rem;
  font-weight: 400;
}

/* Mobile Drawer Language Switcher */
.mobile-lang-switcher {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 8px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
}

.mobile-lang-switcher .lang-link {
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-lang-switcher a.lang-link:hover {
  color: var(--primary);
  background: rgba(0, 81, 158, 0.08);
}

.mobile-lang-switcher .lang-link.active {
  color: #ffffff;
  background: var(--primary);
}

@media (max-width: 420px) {
  .header-inner .lang-switcher {
    display: none;
  }
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-main);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.mobile-nav-drawer.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 320px;
  height: 100%;
  background: #ffffff;
  padding: 24px;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  float: right;
  margin-bottom: 20px;
}

.mobile-nav-list {
  list-style: none;
  clear: both;
}

.mobile-nav-list li {
  border-bottom: 1px solid var(--border);
}

.mobile-nav-list a {
  display: block;
  padding: 12px 0;
  font-weight: 600;
  color: #334155;
}

.mobile-submenu {
  list-style: none;
  padding-left: 16px;
  padding-bottom: 8px;
}

.mobile-submenu a {
  padding: 6px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ==========================================================================
   PAGE HERO / BANNER (Paraigües per a subpàgines)
   ========================================================================== */
.page-hero {
  background: linear-gradient(135deg, #002e5a 0%, #00519E 65%, #0284c7 100%);
  color: #ffffff;
  padding: 60px 0 65px;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: #bae6fd;
  margin-bottom: 14px;
}

.breadcrumb a {
  color: #bae6fd;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.page-hero h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-hero p {
  font-size: 1.125rem;
  color: #e0f2fe;
  max-width: 720px;
  font-weight: 300;
  line-height: 1.6;
}

/* ==========================================================================
   COMMON CONTENT LAYOUTS
   ========================================================================== */
.main-content {
  padding: 70px 0 90px;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}

.section-eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.content-card h2, .content-card h3 {
  color: var(--text-main);
  margin-bottom: 16px;
}

.content-card p {
  color: var(--text-body);
  margin-bottom: 18px;
  font-size: 1.025rem;
}

.content-card p:last-child {
  margin-bottom: 0;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Patronat List */
.patronat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.patronat-item {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
}

.patronat-role {
  font-size: 0.775rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.patronat-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.patronat-extra {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Book Showcase Cards */
.book-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.book-cover-wrap {
  position: relative;
  width: 120px;
  min-width: 120px;
  height: 175px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: #f1f5f9;
  flex-shrink: 0;
  display: block;
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.book-cover-wrap:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 26px rgba(0, 81, 158, 0.28);
  border-color: var(--primary);
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.book-cover-wrap:hover .book-cover {
  transform: scale(1.12);
}

.zoom-badge {
  position: absolute;
  inset: 0;
  background: rgba(0, 35, 70, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.book-cover-wrap:hover .zoom-badge,
.poster-item:hover .zoom-badge {
  opacity: 1;
}

.zoom-badge svg {
  background: var(--primary);
  border-radius: 50%;
  padding: 8px;
  width: 36px;
  height: 36px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transform: scale(0.8);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.book-cover-wrap:hover .zoom-badge svg,
.poster-item:hover .zoom-badge svg {
  transform: scale(1);
}

.book-info h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.book-authors {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.book-desc {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 12px;
}

.book-meta {
  font-size: 0.825rem;
  color: var(--primary);
  font-weight: 600;
}

.book-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.book-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.825rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
}

.book-buy-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 81, 158, 0.25);
  color: #ffffff;
}

.book-buy-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--primary);
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
}

.book-buy-btn-outline:hover {
  background: var(--primary-light);
  border-color: #bfdbfe;
  color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Photo Gallery Wall with lightbox preview */
.gallery-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

/* MFA Web App Gallery */
.mfa-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  gap: 24px;
  margin-top: 20px;
}

.mfa-gallery .gallery-item {
  aspect-ratio: 9/10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: #0d2847;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: #e2e8f0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

/* Lightbox Modal amb Navegació (Fletxes, comptador i subtítol) */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.94);
  backdrop-filter: blur(10px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 24px;
  user-select: none;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 82vw;
  max-height: 85vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lightbox-info {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 14px;
}

.lightbox-counter {
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Fletxes de navegació lateral */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1010;
  backdrop-filter: blur(8px);
}

.lightbox-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 81, 158, 0.5);
}

.lightbox-prev {
  left: 28px;
}

.lightbox-next {
  right: 28px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1015;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 1);
  transform: scale(1.08);
}

@media (max-width: 768px) {
  .lightbox-nav {
    width: 44px;
    height: 44px;
  }
  .lightbox-prev {
    left: 12px;
  }
  .lightbox-next {
    right: 12px;
  }
  .lightbox-close {
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
  }
  .lightbox-content {
    max-width: 95vw;
  }
  .lightbox-content img {
    max-height: 70vh;
  }
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--primary);
  border-color: #bfdbfe;
}

.btn-secondary:hover {
  background: #dbeafe;
  color: var(--primary-dark);
}

.btn-white {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.btn-white:hover {
  background: #f0f9ff;
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: #ffffff;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
}

/* ==========================================================================
   FOOTER (Sense telèfon)
   ========================================================================== */
footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 70px 0 35px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand img {
  height: 48px;
  width: auto;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 340px;
}

.footer-col h5 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.3px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.885rem;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.footer-contact-item svg {
  min-width: 18px;
  color: #38bdf8;
  margin-top: 3px;
}

.footer-contact-item a {
  color: #ffffff;
  font-weight: 600;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.825rem;
  color: #64748b;
}

/* ==========================================================================
   FORM FEEDBACK GLOBAL
   ========================================================================== */
.form-feedback {
  display: none;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.5;
}
.form-feedback.success {
  display: block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.form-feedback.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #f87171;
}

/* ==========================================================================
   COOKIE CONSENT BANNER & MODAL (ESTIL INSTITUT DE L'ART)
   ========================================================================== */
.fcart-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: 18px 24px 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fcart-cookie-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
}

.fcart-cookie-content {
  max-width: 1100px;
  margin-bottom: 12px;
}

.fcart-cookie-text {
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.5;
  margin: 0;
}

.fcart-cookie-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fcart-cookie-btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
}

.fcart-cookie-btn-accept {
  background: #00b894;
}
.fcart-cookie-btn-accept:hover {
  background: #00a383;
}

.fcart-cookie-btn-reject {
  background: #b71540;
}
.fcart-cookie-btn-reject:hover {
  background: #961234;
}

.fcart-cookie-btn-config {
  background: #0984e3;
}
.fcart-cookie-btn-config:hover {
  background: #0873c4;
}

.fcart-cookie-btn-info {
  background: #00cec9;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.fcart-cookie-btn-info:hover {
  background: #00b5b0;
  color: #ffffff;
}

/* Modal de configuració de cookies */
.fcart-cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.fcart-cookie-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.fcart-cookie-modal {
  background: #ffffff;
  border-radius: 18px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 32px;
  position: relative;
}

.fcart-cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.fcart-cookie-modal-header h3 {
  font-size: 1.25rem;
  color: #0f172a;
  margin: 0;
}

.fcart-cookie-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}
.fcart-cookie-modal-close:hover {
  color: #0f172a;
}

.fcart-cookie-option {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
}

.fcart-cookie-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.fcart-cookie-option-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.fcart-cookie-badge-required {
  font-size: 0.75rem;
  background: #e2e8f0;
  color: #475569;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.fcart-cookie-option-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.fcart-cookie-modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 768px) {
  .fcart-cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 20px;
    bottom: 12px;
  }
  .fcart-cookie-actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  .fcart-cookie-btn {
    width: 100%;
    text-align: center;
  }
  .fcart-cookie-modal {
    padding: 22px 18px;
  }
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .nav-links, .btn-header {
    display: none;
  }
  .mobile-toggle {
    display: block;
    margin-left: auto;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .book-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .book-cover-wrap {
    width: 150px;
    height: 215px;
    margin: 0 auto 12px;
  }
  .book-cover {
    width: 100%;
    height: 100%;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .top-bar-location {
    display: none;
  }
}

