/* ==========================================================================
   Malta Event Guide - Shared Stylesheet
   Centralized common styles to reduce duplication across templates.
   ========================================================================== */

:root {
  --bg: #f8fafc;
  --card-bg: #fff;
  --text: #1e293b;
  --primary: #FF385C;
  --muted: #64748b;
  --border: #e2e8f0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  margin: 0;
  color: var(--text);
  padding-bottom: 50px;
}

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

/* Navigation */
.nav {
  background: #0f172a;
  padding: 15px 24px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav a {
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav .back {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-left: auto;
}

/* Buttons */
.btn {
  margin-top: auto;
  align-self: center;
  display: block;
  width: fit-content;
  min-width: 160px;
  padding: 14px 28px;
  background: #0f172a;
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: 0.3s;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn:hover {
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(255, 56, 92, 0.3);
  transform: translateY(-2px);
}

.qf-btn {
  padding: 8px 18px;
  border-radius: 25px;
  border: 2px solid var(--border);
  background: white;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: 0.2s;
}

.qf-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

.card-media {
  height: 200px;
  position: relative;
  background: #eee;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

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

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.source-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  color: #0f172a;
}

.location {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.description {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Date Badges */
.date-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 10;
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 50px;
}

.date-month {
  background: var(--primary);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.date-day {
  color: #333;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 2px 8px 4px;
  white-space: nowrap;
}

/* Misc */
.hidden {
  display: none;
}

.past-event {
  filter: grayscale(100%);
  opacity: 0.6;
}

.past-event:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Filter bar */
.filter-bar {
  max-width: 1200px;
  margin: 0 auto 25px;
  padding: 0 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar select {
  padding: 10px 16px;
  border-radius: 25px;
  border: 1px solid var(--border);
  background: white;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

.filter-bar select:focus {
  outline: none;
  border-color: var(--primary);
}

.reset-btn {
  padding: 10px 18px;
  border-radius: 25px;
  border: 1px solid var(--border);
  background: white;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s;
}

.reset-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
  border-color: var(--primary);
}

.filter-count {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Quick filters */
.quick-filters {
  max-width: 1200px;
  margin: 0 auto 15px;
  padding: 0 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Footer */
footer a {
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 750px) {
  .quick-filters {
    justify-content: center;
  }
}

/* ==========================================================================
   Additional Components (Newsletter, Forms, etc.)
   ========================================================================== */

/* Newsletter signup block (used on homepage and other pages) */
.newsletter-box {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  border-radius: 20px;
  padding: 35px;
  text-align: center;
  color: white;
}

.newsletter-box h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 800;
}

.newsletter-box p {
  color: #b0bec5;
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid #334155;
  background: #1e293b;
  color: white;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--primary);
}

.newsletter-form button {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: white;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
  flex-shrink: 0;
}

.newsletter-form button:hover {
  background: #e11d48;
}

.newsletter-msg {
  margin-top: 10px;
  font-size: 0.85rem;
  display: none;
}

/* General form inputs */
input[type="email"],
input[type="text"],
textarea {
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.95rem;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Related content sections (used on event pages and guides) */
.related { max-width:960px; margin:40px auto; padding:0 20px; }
.related h2 { font-size:1.2rem; margin-bottom:15px; }

.related-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:15px; }
.rel-card { background:white; border-radius:12px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,0.06); transition:transform 0.2s; text-decoration:none; color:var(--text); }
.rel-card:hover { transform:translateY(-3px); box-shadow:0 8px 20px rgba(0,0,0,0.1); }
.rel-img { height:110px; background:#eee; overflow:hidden; }
.rel-img img { width:100%; height:100%; object-fit:cover; }
.rel-info { padding:10px; }
.rel-info .ttl { font-weight:700; font-size:0.82rem; margin-bottom:3px; display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.rel-info .dt { color:#94a3b8; font-size:0.72rem; }

/* Guide call-to-action and related guides */
.guide-cta { background:linear-gradient(135deg,#0f172a 0%,#1e3a5f 100%); border-radius:16px; padding:30px; text-align:center; color:white; margin:40px 0; }
.guide-cta h3 { margin:0 0 8px; font-size:1.2rem; }
.guide-cta p { color:#b0bec5; font-size:0.9rem; margin:0 0 16px; }
.guide-cta a { display:inline-block; background:var(--primary); color:white; padding:12px 28px; border-radius:12px; font-weight:700; text-decoration:none; }

.related-guides { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; margin:40px 0; }
.related-guides a { background:white; border-radius:12px; padding:20px; text-decoration:none; color:var(--text); box-shadow:0 2px 10px rgba(0,0,0,0.06); transition:0.2s; }
.related-guides a:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,0.1); }
.related-guides a .rg-title { font-weight:700; font-size:0.95rem; margin-bottom:6px; }
.related-guides a .rg-desc { font-size:0.8rem; color:#64748b; }

/* Separator used in event grids */
.separator { grid-column:1/-1; display:flex; align-items:center; justify-content:center; margin:50px 0 30px; color:#94a3b8; font-weight:800; letter-spacing:2px; text-transform:uppercase; font-size:0.9rem; }
.separator::before,.separator::after { content:""; flex:1; border-bottom:2px solid #e2e8f0; margin:0 20px; }

/* Expired label on past events */
.expired-label { position:absolute; top:50%;left:50%; transform:translate(-50%,-50%); background:rgba(0,0,0,0.8); color:white; padding:5px 15px; font-weight:800; text-transform:uppercase; border-radius:4px; z-index:20; letter-spacing:1px; font-size:0.9rem; border:1px solid white; }

/* Fallback letter avatars */
.fallback { width:100%;height:100%; display:flex;align-items:center;justify-content:center; color:white; font-size:4rem; font-weight:800; text-shadow:0 2px 10px rgba(0,0,0,0.2); }

/* Homepage specific small elements */
.event-count { text-align:center; color:#94a3b8; font-size:0.9rem; margin-bottom:20px; }
.card-media-link { display:contents; text-decoration:none; cursor:pointer; }
.recurring-tag { display:inline-block; background:#dbeafe; color:#1d4ed8; font-size:0.75rem; font-weight:600; padding:3px 10px; border-radius:20px; margin-bottom:8px; }
.multi-date-tag { display:inline-block; background:#fef3c7; color:#92400e; font-size:0.75rem; font-weight:600; padding:3px 10px; border-radius:20px; margin-bottom:8px; }
.date-range-text { font-size:0.8rem; color:#0f172a; margin-bottom:0.5rem; font-weight:500; }

/* Admin-specific note: Admin now uses /admin.css (completely separate dark theme) */
