/* ========== پایه ========== */
* { margin:0; padding:0; box-sizing:border-box; font-family:'Vazirmatn',sans-serif; }

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  color: #fff;
  padding: 30px 20px 60px;
  overflow-x: hidden;
  transition: background 0.5s ease;
}

body.dark-mode {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========== دکمه تم ========== */
.theme-toggle {
  position: fixed;
  top: 20px; left: 20px;
  width: 45px; height: 45px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex; justify-content: center; align-items: center;
  z-index: 100;
  transition: 0.3s;
  color: #fff;
}
.theme-toggle:hover {
  transform: scale(1.1);
  background: rgba(255,255,255,0.3);
}

/* ========== حباب‌ها ========== */
.bubble {
  position: fixed;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  animation: floatBubble 20s infinite ease-in-out;
  pointer-events: none;
  z-index: 0;
}
body.dark-mode .bubble { background: rgba(255,255,255,0.05); }

.bubble:nth-child(2) { width: 80px;  height: 80px;  top: 10%; left: 10%; animation-delay: 0s; }
.bubble:nth-child(3) { width: 120px; height: 120px; top: 60%; left: 80%; animation-delay: 3s; }
.bubble:nth-child(4) { width: 60px;  height: 60px;  top: 80%; left: 20%; animation-delay: 6s; }
.bubble:nth-child(5) { width: 100px; height: 100px; top: 30%; left: 70%; animation-delay: 9s; }
.bubble:nth-child(6) { width: 50px;  height: 50px;  top: 50%; left: 40%; animation-delay: 12s; }

@keyframes floatBubble {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50%      { transform: translateY(-30px) scale(1.1); opacity: 0.6; }
}

/* ========== هدر ========== */
.museum-header {
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.back-btn {
  display: inline-block;
  margin-bottom: 18px;
  padding: 9px 20px;
  border-radius: 50px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: .88rem;
  transition: 0.3s;
}
.back-btn:hover {
  transform: translateX(-4px);
  background: rgba(255,255,255,0.3);
}

.museum-title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  background: linear-gradient(90deg, #fff, #ffd6ff, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineText 3s linear infinite;
}

@keyframes shineText { to { background-position: 200% center; } }

.museum-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
}

/* ========== فیلترها ========== */
.filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 22px;
  scrollbar-width: none;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.filters::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: #fff;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}
.filter-chip.active {
  background: rgba(255,255,255,0.95);
  color: #764ba2;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(255,255,255,0.25);
  transform: translateY(-2px);
}
body.dark-mode .filter-chip {
  background: rgba(0,0,0,0.3);
}
body.dark-mode .filter-chip.active {
  background: rgba(255,255,255,0.9);
  color: #1a1a2e;
}

/* ========== شبکه ========== */
.museum-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px)  { .museum-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .museum-grid { grid-template-columns: repeat(3, 1fr); } }

/* ========== کارت ========== */
.museum-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s;
  animation: fadeUp 0.6s ease both;
  color: #fff;
}
.museum-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255,255,255,0.22);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
body.dark-mode .museum-card {
  background: rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.1);
}
body.dark-mode .museum-card:hover {
  background: rgba(0,0,0,0.6);
}

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

/* ========== تصویر کارت ========== */
.card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg,
    var(--card-color, #6366f1) 0%,
    #ec4899 100%);
}
.card-image-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.3));
}
.card-image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.museum-card:hover .card-image img { transform: scale(1.1); }

.card-badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #764ba2;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
body.dark-mode .card-badge {
  background: rgba(0,0,0,0.7);
  color: #ffd6ff;
}

/* ========== متن کارت ========== */
.card-body { padding: 18px 18px 22px; }

.card-title {
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.card-location {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 10px;
}
.card-desc {
  font-size: 0.88rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.92);
  margin-bottom: 16px;
  min-height: 3.2em;
}

/* ========== دکمه تور ========== */
.tour-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--card-color, #6366f1), #ec4899);
  color: #fff;
  font-weight: 900;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 6px 18px -4px var(--card-color, #6366f1);
  transition: transform 0.25s, box-shadow 0.25s;
}
.tour-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -4px var(--card-color, #6366f1);
}
.tour-btn:active { transform: scale(0.97); }

.tour-icon {
  display: inline-block;
  transition: transform 0.6s ease;
}
.tour-btn:hover .tour-icon { transform: rotate(180deg); }

/* ========== ریسپانسیو ========== */
@media(max-width:600px) {
  body { padding: 20px 15px 50px; }
  .theme-toggle { top: 15px; left: 15px; width: 40px; height: 40px; font-size: 1.2rem; }
  .museum-subtitle { font-size: 0.9rem; }
  .card-body { padding: 16px 16px 18px; }
}
