/* =============================================
   QUINTOS 2006 — ESTIL 2026  ✦  v2
   ============================================= */

:root {
  --primary:       #dc3545;
  --primary-dark:  #a71e2a;
  --primary-light: #ff6b78;
  --gold:          #f4c430;
  --gold-dark:     #d4a017;
  --dark:          #0d0d1a;
  --dark-2:        #1a1a2e;
  --glass-bg:      rgba(255, 255, 255, 0.94);
  --glass-border:  rgba(255, 255, 255, 0.50);
  --shadow-sm:     0 4px 16px rgba(0,0,0,0.14);
  --shadow-md:     0 10px 36px rgba(0,0,0,0.20);
  --shadow-lg:     0 22px 65px rgba(0,0,0,0.30);
  --radius:        22px;
  --ease:          cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--dark);
  margin: 0;
  overflow-x: hidden;
  color: var(--dark-2);
}

/* Scrollbar personalitzada */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--gold-dark));
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* =============================================
   HEADER
   ============================================= */
header {
  position: relative;
  background-image: url('../img/poble-ametlla.jpg');
  background-size: cover;
  background-position: center 60%;
  overflow: hidden;
  padding: 0;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(13,13,26,0.72) 0%,
    rgba(167,30,42,0.28) 50%,
    rgba(13,13,26,0.72) 100%
  );
  z-index: 1;
}

/* Línia animada inferior */
header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--gold), var(--primary), transparent);
  background-size: 300% 100%;
  animation: shimmerLine 4s linear infinite;
  z-index: 2;
}

@keyframes shimmerLine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

header .container {
  position: relative;
  z-index: 2;
  padding: 1.4rem 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

header .header-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.header-logo {
  max-width: 22rem;
  flex: 1;
  min-width: 0;
  object-fit: contain;
}

.header-escut {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.header-escut img {
  width: 6rem;
}

/* Subtítol del header */
.header-tagline {
  font-family: 'Barlow', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  text-align: center;
  margin-top: 0.5rem;
  animation: fadeInUp 1.2s ease-out 0.4s both;
}

.header-tagline span {
  color: var(--gold);
  font-weight: 800;
}

@keyframes fadeInUp {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* =============================================
   NAVEGACIÓ STICKY
   ============================================= */
nav.main-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(13, 13, 26, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(220, 53, 69, 0.30);
  box-shadow: 0 4px 32px rgba(0,0,0,0.45);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.8rem;
  align-items: center;
}

.nav-link {
  color: rgba(255,255,255,0.75);
  font-size: 0.80rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0.38rem 0.9rem;
  border-radius: 50px;
  transition: all 0.28s var(--ease);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link i { font-size: 0.72rem; opacity: 0.8; }

.nav-link:hover {
  color: white;
  background: rgba(220, 53, 69, 0.20);
  border-color: rgba(220, 53, 69, 0.45);
}

.nav-link.active {
  color: white;
  background: rgba(220, 53, 69, 0.28);
  border-color: rgba(220, 53, 69, 0.55);
}

/* =============================================
   MAIN
   ============================================= */
main {
  background-image: url('../img/fons-web.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}

main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13,13,26,0.50) 0%,
    rgba(13,13,26,0.15) 35%,
    rgba(13,13,26,0.15) 70%,
    rgba(13,13,26,0.50) 100%
  );
  pointer-events: none;
  z-index: 0;
}

main > section {
  position: relative;
  z-index: 1;
}

/* Orbes decoratives per a cada secció */
section::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

#novetats::before        { background: var(--primary);  top: -100px; left: -150px; }
#compte-enrere::before   { background: var(--gold);     top: -80px;  right: -150px; }
#sobre-nosaltres::before { background: var(--primary);  top: -80px;  right: -100px; }
#calendari::before       { background: var(--gold);     top: -100px; left: -150px; }
#contacte::before        { background: var(--primary);  top: -60px;  left: 50%; transform: translateX(-50%); }

/* =============================================
   GLASS CARDS — amb accent animat
   ============================================= */
.glass-effect {
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.7);
  border-radius: var(--radius);
  transition: transform 0.38s var(--ease), box-shadow 0.38s var(--ease);
}

/* Barra de degradat animada a la part superior */
.glass-effect::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold), var(--primary-light), var(--gold), var(--primary));
  background-size: 300% 100%;
  animation: shimmerBar 4s linear infinite;
  border-radius: var(--radius) var(--radius) 0 0;
  z-index: 1;
}

@keyframes shimmerBar {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.glass-effect:hover {
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.8);
  transform: translateY(-4px);
}

/* =============================================
   TÍTOLS DE SECCIONS — text degradat
   ============================================= */
.section-title {
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
  font-size: 3rem;
  background: linear-gradient(135deg, #ffffff 20%, var(--gold) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 3px 12px rgba(0,0,0,0.55));
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 3rem;
  text-align: center;
  display: block;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  margin: 0.7rem auto 0;
  width: 70px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 4px;
}

/* =============================================
   BOTONS
   ============================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.32s var(--ease);
  box-shadow: 0 6px 22px rgba(220,53,69,0.45);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.4px;
  border: none;
  cursor: pointer;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -130%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-primary:hover::after { left: 150%; }
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 38px rgba(220,53,69,0.58);
}
.btn-primary:active { transform: translateY(-1px); }

/* =============================================
   TARGETES DE CONTACTE
   ============================================= */
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #1a1a2e;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.32s var(--ease);
  cursor: pointer;
}

.contact-card:hover {
  background: rgba(220,53,69,0.08);
  border-color: rgba(220,53,69,0.35);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.contact-card .contact-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.contact-card:hover .contact-icon {
  transform: scale(1.12) rotate(-5deg);
}

.contact-card .contact-icon.ig {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: white;
  box-shadow: 0 6px 20px rgba(225,48,108,0.45);
}

.contact-card .contact-icon.mail {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  box-shadow: 0 6px 20px rgba(79,70,229,0.45);
}

.contact-card .contact-label { font-size: 1.1rem; font-weight: 700; }
.contact-card .contact-sub   { font-size: 0.82rem; color: #555; }

/* =============================================
   ICONA INFO
   ============================================= */
.info-icon {
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--ease);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.info-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.12) rotate(8deg);
  box-shadow: 0 6px 22px rgba(220,53,69,0.5);
}

/* =============================================
   CARRUSEL NOVETATS
   ============================================= */
.news-card          { opacity: 0; position: absolute; top: 0; left: 0; width: 100%; transition: opacity 0.5s ease-in-out; }
.news-card.active   { opacity: 1; position: relative; }
.news-image         { width: 100%; height: 260px; object-fit: contain; border-radius: 14px; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.news-logo          { width: 100%; max-width: 300px; height: 200px; object-fit: contain; border-radius: 10px; margin-bottom: 1.5rem; }

#novetats img.rounded-lg {
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
#novetats img.rounded-lg:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 55px rgba(0,0,0,0.28);
}

/* =============================================
   COMPTE ENRERE — flip animation
   ============================================= */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 8px 28px rgba(220,53,69,0.42); }
  50%       { box-shadow: 0 8px 50px rgba(220,53,69,0.80); }
}

@keyframes flipIn {
  0%   { transform: rotateX(90deg) scale(0.85); opacity: 0; }
  60%  { transform: rotateX(-12deg); }
  100% { transform: rotateX(0deg) scale(1); opacity: 1; }
}

.countdown-box {
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1.3rem 0.7rem;
  border-radius: 20px;
  text-align: center;
  min-width: 80px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  animation: pulse-glow 2.5s ease-in-out infinite;
  transition: transform 0.3s var(--ease);
}

.countdown-box::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% -10%, rgba(255,255,255,0.20), transparent 65%);
  pointer-events: none;
}

/* Línia divisòria central */
.countdown-box::before {
  content: '';
  position: absolute;
  left: 12%; right: 12%;
  top: 50%;
  height: 1px;
  background: rgba(255,255,255,0.18);
  z-index: 1;
}

.countdown-box:hover {
  transform: scale(1.10);
  animation-play-state: paused;
  box-shadow: 0 16px 48px rgba(220,53,69,0.70);
}

.countdown-number {
  font-family: 'Barlow', sans-serif;
  font-size: 3rem;
  line-height: 1;
  display: block;
  perspective: 300px;
}

.countdown-number.flip {
  animation: flipIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.countdown-label {
  font-size: 0.70rem;
  margin-top: 0.45rem;
  opacity: 0.88;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 600;
}

/* =============================================
   FOTO NOSALTRES — parallax suau
   ============================================= */
#sobre-nosaltres img.rounded-xl {
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
#sobre-nosaltres img.rounded-xl:hover {
  transform: scale(1.025) rotate(-0.5deg);
  box-shadow: 0 28px 70px rgba(0,0,0,0.30);
}

/* =============================================
   CALENDARI
   ============================================= */

.fc {
  font-family: 'Poppins', sans-serif !important;
}

#calendari .glass-effect {
  background: rgba(255,255,255,0.97) !important;
  padding: 1.5rem !important;
}

/* ── Toolbar ── */
.fc-toolbar {
  margin-bottom: 1.25rem !important;
  padding: 0.75rem 0.5rem !important;
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: 2px solid #f0f0f5 !important;
  border-radius: 0 !important;
  align-items: center !important;
}

.fc-toolbar-title {
  font-family: 'Barlow', sans-serif !important;
  font-weight: 800 !important;
  font-size: 1.5rem !important;
  color: #1a1a2e !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
}

.fc-toolbar-chunk { display: flex; align-items: center; gap: 6px; }

.fc-button,
.fc-button-primary {
  background: white !important;
  color: #444 !important;
  border: 1.5px solid #e0e0ea !important;
  border-radius: 10px !important;
  padding: 5px 14px !important;
  font-size: 0.80rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
  transition: all 0.20s var(--ease) !important;
  height: auto !important;
  width: auto !important;
}

.fc-prev-button,
.fc-next-button {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.fc-button:hover,
.fc-button-primary:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
  box-shadow: 0 3px 12px rgba(220,53,69,0.35) !important;
}

.fc-button:focus,
.fc-button-primary:focus {
  box-shadow: 0 0 0 3px rgba(220,53,69,0.25) !important;
}

.fc-today-button {
  background: rgba(220,53,69,0.08) !important;
  border-color: rgba(220,53,69,0.30) !important;
  color: var(--primary) !important;
}

/* ── Capçalera dies de la setmana ── */
.fc-col-header { border: none !important; }

.fc-col-header-cell {
  border: none !important;
  padding: 0 3px 8px !important;
  background: transparent !important;
}

.fc-col-header-cell-cushion {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: #888 !important;
  background: transparent !important;
  padding: 0.3rem 0.4rem !important;
  border-radius: 0 !important;
  display: block !important;
  text-align: center !important;
  text-decoration: none !important;
}

.fc-day-sat .fc-col-header-cell-cushion,
.fc-day-sun .fc-col-header-cell-cushion {
  color: var(--primary) !important;
}

/* ── Graella / cel·les ── */
.fc-scrollgrid,
.fc-scrollgrid-section > td,
.fc-scrollgrid table {
  border: none !important;
}

.fc-daygrid-day {
  padding: 3px !important;
  background: transparent !important;
  border: none !important;
}

.fc-daygrid-day-frame {
  background: white !important;
  border: 1px solid #ebebf2 !important;
  border-radius: 10px !important;
  min-height: 82px !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
  overflow: hidden !important;
}

.fc-daygrid-day:hover .fc-daygrid-day-frame {
  border-color: rgba(220,53,69,0.30) !important;
  box-shadow: 0 3px 12px rgba(220,53,69,0.08) !important;
}

/* Caps de setmana: fons lleugerament rosaci */
.fc-day-sat .fc-daygrid-day-frame,
.fc-day-sun .fc-daygrid-day-frame {
  background: #fff9f9 !important;
  border-color: #f5e8e8 !important;
}

/* Dies passats: lleugerament esvaïts */
.fc-day-past .fc-daygrid-day-frame {
  opacity: 0.72 !important;
}

/* ── Avui ── */
.fc-day-today .fc-daygrid-day-frame {
  background: #fff5f5 !important;
  border-color: rgba(220,53,69,0.40) !important;
  box-shadow: 0 0 0 1.5px rgba(220,53,69,0.25) !important;
}

.fc-day-today:hover .fc-daygrid-day-frame {
  box-shadow: 0 0 0 2px rgba(220,53,69,0.40), 0 4px 16px rgba(220,53,69,0.12) !important;
}

/* ── Número del dia ── */
.fc-daygrid-day-top { justify-content: flex-end !important; padding: 5px 6px 2px !important; }

.fc-daygrid-day-number {
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  color: #666 !important;
  text-shadow: none !important;
  line-height: 1 !important;
  padding: 0 !important;
  text-decoration: none !important;
  border-radius: 50% !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.fc-day-sat .fc-daygrid-day-number,
.fc-day-sun .fc-daygrid-day-number {
  color: var(--primary) !important;
}

.fc-day-today .fc-daygrid-day-number {
  background: var(--primary) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(220,53,69,0.40) !important;
}

/* ── Events ── */
.fc-daygrid-event-harness { margin: 0 4px 3px !important; }

.fc-daygrid-event {
  background: white !important;
  border: none !important;
  border-left: 3px solid var(--primary) !important;
  border-radius: 5px !important;
  color: #222 !important;
  padding: 1px 4px 1px 5px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 5px rgba(0,0,0,0.10) !important;
  transition: box-shadow 0.18s ease, transform 0.18s ease !important;
  overflow: hidden !important;
}

.fc-daygrid-event:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 12px rgba(220,53,69,0.20) !important;
}

/* ── "N més" link ── */
.fc-daygrid-more-link {
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
  padding: 2px 6px !important;
  border-radius: 50px !important;
  background: rgba(220,53,69,0.08) !important;
  transition: background 0.2s !important;
}

.fc-daygrid-more-link:hover {
  background: rgba(220,53,69,0.18) !important;
}

/* =============================================
   MODALS
   ============================================= */
.modal-content {
  background: white;
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.38);
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  animation: modalPop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-image {
  width: 100%; height: 300px;
  object-fit: contain;
  border-radius: 26px 26px 0 0;
  background: #f2f2f2;
}

@keyframes modalPop {
  0%   { transform: scale(0.86) translateY(32px); opacity: 0; }
  100% { transform: scale(1)    translateY(0);    opacity: 1; }
}

/* =============================================
   ESCUDO TEXT
   ============================================= */
.escut-text {
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 6px rgba(0,0,0,0.65);
  font-size: 0.77rem;
  text-align: center;
  margin-top: 0.3rem;
  font-weight: 500;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background-image: url('../img/fons-barra-inferior.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13,13,26,0.65);
}

.footer-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.5rem 2rem;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  transition: all 0.32s var(--ease);
  font-size: 1.4rem;
  color: white;
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-5px) scale(1.12);
  box-shadow: 0 10px 28px rgba(220,53,69,0.58);
}

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   BOTÓ SCROLL TO TOP
   ============================================= */
#scrollTopBtn {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(220,53,69,0.52);
  transition: all 0.35s var(--ease);
  opacity: 0; pointer-events: none;
  border: none; z-index: 999;
}

#scrollTopBtn.visible { opacity: 1; pointer-events: all; }

#scrollTopBtn:hover {
  transform: translateY(-5px) scale(1.08);
  box-shadow: 0 16px 40px rgba(220,53,69,0.65);
}

/* =============================================
   MODALS — z-index per damunt de la nav (200)
   ============================================= */
#eventModal,
#infoModal {
  z-index: 1000 !important;
}

/* =============================================
   ANIMACIÓ FADE IN GENÈRICA
   ============================================= */
.fade-in {
  animation: fadeIn 1s ease-out both;
}

@keyframes fadeIn {
  0%   { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* =============================================
   RESPONSIVE — TABLETS
   ============================================= */
@media (max-width: 768px) {
  .nav-inner { gap: 0.3rem 0.6rem; padding: 0.5rem 1rem; }
  .nav-link  { font-size: 0.71rem; padding: 0.3rem 0.65rem; }
  .section-title { font-size: 2.4rem; }
}

/* =============================================
   RESPONSIVE — MÒBILS
   ============================================= */
@media (max-width: 640px) {

  /* ── Header ── */
  header .container { padding: 0.75rem 0.875rem 0.6rem; }

  .header-row { gap: 0.4rem; }
  .header-logo {
    max-width: calc(100% - 100px);
    flex-shrink: 1;
  }
  .header-escut { min-width: 38px; }
  .header-escut img { width: 2.4rem !important; }
  .info-icon  { flex-shrink: 0; width: 36px; height: 36px; font-size: 0.85rem; }
  .header-tagline { font-size: 0.66rem; letter-spacing: 1px; margin-top: 0.4rem; }
  .escut-text { display: none; }

  /* ── Nav: scroll horitzontal en pantalles molt petites ── */
  .nav-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0.5rem 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-inner::-webkit-scrollbar { display: none; }
  .nav-link { font-size: 0.70rem; padding: 0.28rem 0.6rem; white-space: nowrap; }

  /* ── Seccions ── */
  .section-title { font-size: 1.9rem; letter-spacing: 1px; margin-bottom: 2rem; }
  .section-title::after { width: 50px; }
  .glass-effect { padding: 1.25rem !important; }
  section.py-16 { padding: 2.5rem 0; }
  section::before { width: 250px; height: 250px; }

  /* ── Compte enrere ── */
  .countdown-number { font-size: 2rem; }
  .countdown-box { padding: 0.9rem 0.35rem; min-width: 0; }

  /* ── Calendari ── */
  #calendari .glass-effect { padding: 0.75rem !important; }
  #calendar { padding: 0 !important; }
  .fc-toolbar { padding: 0.5rem 0.25rem !important; }
  .fc-toolbar-title { font-size: 1.1rem !important; letter-spacing: 0.3px !important; }
  .fc-prev-button, .fc-next-button { width: 30px !important; height: 30px !important; }
  .fc-today-button, .fc-dayGridMonth-button { font-size: 0.70rem !important; padding: 4px 9px !important; }
  .fc-daygrid-day-frame { min-height: 50px !important; border-radius: 6px !important; }
  .fc-daygrid-day { padding: 2px !important; }
  .fc-col-header-cell-cushion { font-size: 0.58rem !important; padding: 0.2rem !important; }
  .fc-daygrid-day-number { font-size: 0.64rem !important; width: 18px !important; height: 18px !important; }
  .fc-daygrid-event { padding: 1px 3px 1px 4px !important; border-radius: 4px !important; border-left-width: 2px !important; }
  .fc-daygrid-event-harness { margin: 0 2px 2px !important; }

  /* ── Modals ── */
  .modal-content { max-width: 92vw; border-radius: 20px; }
  .modal-image   { height: 200px; border-radius: 20px 20px 0 0; }

  main {
    background-attachment: scroll !important;
    background-position: center top !important;
  }

  #scrollTopBtn { bottom: 1.2rem; right: 1.2rem; width: 44px; height: 44px; font-size: 1rem; }
}
