/* ==================== ROOT VARIABLES ==================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

:root {
  --bg-color: #f8f9fa;
  --card-bg: rgba(255, 255, 255, 0.7);
  --text-main: #2d3436;
  --text-muted: #636e72;
  --accent: #F05BFF;
  --accent-soft: rgba(240, 91, 255, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.8);
  --border-color: rgba(0,0,0,0.06);
  --shadow: 0 10px 30px rgba(0,0,0,0.06);
  --grid-color: rgba(240, 91, 255, 0.07);
  
  /* Additional vars for compatibility */
  --text-2: #636e72;
  --text-3: rgba(45, 52, 54, 0.5);
  --surface: rgba(255, 255, 255, 0.5);
  --surface-hover: rgba(255, 255, 255, 0.8);
  --border: rgba(0,0,0,0.1);
  --border-strong: rgba(0,0,0,0.15);
  --radius: 24px;
  --radius-pill: 100px;
  --primary: #F05BFF;
  --primary-glow: rgba(240, 91, 255, 0.3);
  --primary-dim: rgba(240, 91, 255, 0.12);
  --cyan: #00e5c8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0f0f12;
    --card-bg: rgba(30, 30, 35, 0.7);
    --text-main: #f5f5f7;
    --text-muted: #a1a1a6;
    --nav-bg: rgba(15, 15, 18, 0.85);
    --border-color: rgba(255,255,255,0.06);
    --shadow: 0 10px 40px rgba(0,0,0,0.3);
    --grid-color: rgba(240, 91, 255, 0.1);
    
    --text-2: #a1a1a6;
    --text-3: rgba(241, 245, 247, 0.4);
    --surface: rgba(30, 30, 35, 0.5);
    --surface-hover: rgba(40, 40, 45, 0.8);
    --border: rgba(255,255,255,0.1);
    --border-strong: rgba(255,255,255,0.2);
  }
}

/* ==================== RESET & BASE ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

.glass-grid {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background-image: 
      linear-gradient(var(--grid-color) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
  z-index: -1;
  pointer-events: none;
}

body::before {
  content: "";
  position: fixed;
  top: -15%; left: -10%;
  width: 45%; height: 45%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  z-index: -2;
  animation: blobDrift 20s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed;
  bottom: -10%; right: -5%;
  width: 35%; height: 35%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  z-index: -2;
  animation: blobDrift 25s ease-in-out infinite alternate-reverse;
}
@keyframes blobDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.1); }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 25px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* ==================== NAVBAR ==================== */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1100px;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 50px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: top 0.28s ease, padding 0.28s ease;
  position: fixed;
}

/* Dynamic Island inner pill */
.main-header::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
  width: min(760px, 70%);
  height: 56px;
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25), 0 2px 8px var(--primary-glow);
  pointer-events: none;
  z-index: 0;
  transition: transform 0.28s ease, box-shadow 0.28s ease, opacity 0.28s ease;
}

.main-header.scrolled { top: 10px; }

.logo { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  text-decoration: none;
  font-weight: 800;
}

.logo img { 
  max-height: 38px; 
  border-radius: 50%;
  object-fit: cover;
}

.logo-name { 
  font-weight: 800; 
  font-size: 1rem; 
  color: var(--text-main);
}

.header-right { 
  display: flex; 
  align-items: center; 
  gap: 10px;
}

/* Ensure header content sits above the inner pill */
.main-header > * { position: relative; z-index: 1; }

.main-header:hover::after { transform: translate(-50%, -50%) scale(1.02); box-shadow: 0 14px 48px rgba(0,0,0,0.35), 0 6px 20px var(--primary-glow); }

@media (max-width: 768px) {
  .main-header::after { width: calc(100% - 48px); height: 56px; }
  .main-header { padding: 10px 14px; }
}

.main-header .nav-list ul {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

/* --- Support for existing .navbar markup (apply island effect without editing HTML) --- */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 22px;
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1100px;
  z-index: 1000;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.navbar::before {
  /* subtle outline to match surrounding header style */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.02);
  pointer-events: none;
  z-index: 0;
}

.navbar::after {
  /* bigger, darker dynamic island */
  content: '';
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
  width: min(920px, 82%);
  height: 78px;
  border-radius: 44px;
  background: linear-gradient(180deg, rgba(20,20,22,0.9), rgba(20,20,22,0.85));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45), 0 6px 26px var(--primary-glow);
  pointer-events: none;
  z-index: 0;
}

.navbar > * { position: relative; z-index: 1; }
.navbar:hover::after { transform: translate(-50%, -50%) scale(1.01); box-shadow: 0 26px 64px rgba(0,0,0,0.6), 0 10px 36px var(--primary-glow); }

@media (max-width: 1100px) {
  .navbar::after { width: calc(100% - 140px); }
}

@media (max-width: 768px) {
  .navbar::after { width: calc(100% - 48px); height: 60px; }
  .navbar { padding: 12px 14px; top: 12px; }
}

/* --- Make the simple footer markup match the refined footer styles without HTML changes --- */
.footer {
  padding: 88px 0 40px;
  background: transparent;
}

.footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 36px;
}

.footer .footer-content p { margin: 0; color: var(--text-2); opacity: 0.95; font-size: 0.95rem; }
.footer .footer-links { display: flex; gap: 18px; align-items: center; }
.footer .footer-links a { color: var(--text-muted); opacity: 0.9; font-weight: 400; }
.footer .footer-links a:hover { color: var(--accent); opacity: 1; }

@media (max-width: 768px) {
  .footer .footer-content { flex-direction: column; text-align: center; gap: 12px; }
}

/* === Refine main-header container and nav styles (for .main-header used earlier) === */
.main-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.logo img { max-height: 40px; }

.main-header .nav-list ul li a {
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
}

.main-header .nav-list ul li a:hover { color: var(--accent); background: rgba(240,91,255,0.02); }

/* === Long card refinement === */
.long-card {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  overflow: hidden;
  width: 100%;
}

.long-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.long-card img.card-thumb {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 160px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.long-card.small-thumb img.card-thumb {
  width: 120px;
  height: 96px;
  flex: 0 0 120px;
}

.long-card h3 { font-size: 1.25rem; margin: 0; font-weight: 800; color: var(--text-main); }
.long-card p { margin: 0; color: var(--text-muted); font-weight: 300; line-height: 1.6; }
.long-card .meta { margin-top: 8px; color: var(--text-2); font-size: 0.9rem; }

.long-card--reverse { flex-direction: row-reverse; }

.long-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0,0,0,0.12), var(--shadow); border-color: rgba(240,91,255,0.12); }

@media (max-width: 900px) {
  .long-card { flex-direction: column; align-items: stretch; padding: 18px; }
  .long-card img.card-thumb { width: 100%; height: 220px; flex: 0 0 auto; }
  .long-card--reverse { flex-direction: column; }
}

.header-donate-btn {
  padding: 8px 18px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--accent), #d91e9d);
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(240,91,255,0.3);
}

.header-donate-btn:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 20px rgba(240,91,255,0.4);
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  outline: none;
}

.menu-btn span {
  width: 24px; 
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: 0.3s;
  transform-origin: center;
}

.menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Sidebar ─── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.sidebar-overlay.visible { 
  opacity: 1; 
  pointer-events: all; 
}

.sidebar {
  position: fixed;
  top: 0; right: -100%;
  width: 300px; 
  height: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  padding: 40px 32px;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.sidebar.open { 
  right: 0; 
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.sidebar-brand { 
  font-weight: 800; 
  font-size: 1.1rem; 
  color: var(--accent);
}

.close-menu-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  width: 36px; 
  height: 36px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.close-menu-btn:hover { 
  color: var(--text-main); 
  background: var(--accent-soft); 
  border-color: var(--accent);
}

.sidebar ul { 
  list-style: none; 
  flex: 1; 
}

.sidebar ul li {
  border-bottom: 1px solid var(--border-color);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.3s, transform 0.3s;
}

.sidebar.open ul li { 
  opacity: 1; 
  transform: translateX(0); 
}

.sidebar.open ul li:nth-child(1) { transition-delay: 0.05s; }
.sidebar.open ul li:nth-child(2) { transition-delay: 0.10s; }
.sidebar.open ul li:nth-child(3) { transition-delay: 0.15s; }
.sidebar.open ul li:nth-child(4) { transition-delay: 0.20s; }
.sidebar.open ul li:nth-child(5) { transition-delay: 0.25s; }
.sidebar.open ul li:nth-child(6) { transition-delay: 0.30s; }
.sidebar.open ul li:nth-child(7) { transition-delay: 0.35s; }

.sidebar ul li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  transition: all 0.25s;
}

.sidebar ul li a:hover { 
  color: var(--accent); 
  padding-left: 6px; 
}

.sidebar ul li a .nav-icon {
  width: 30px; 
  height: 30px;
  background: var(--accent-soft);
  border-radius: 8px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 13px;
  color: var(--accent);
  flex-shrink: 0;
  transition: 0.2s;
}

.sidebar ul li a:hover .nav-icon { 
  background: var(--accent); 
  color: white; 
}

.sidebar-footer {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.sidebar-footer a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ─── Hero ─── */
.hero {
  padding: 185px 0 100px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 10px;
  border-radius: 50px;
  border: 1px solid rgba(240, 91, 255, 0.25);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 28px;
  animation: fadeUp 0.7s ease both;
}

.hero-badge-dot {
  width: 6px; 
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.opensource-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px 5px 10px;
  border-radius: 50px;
  border: 1px solid rgba(88, 166, 255, 0.3);
  background: rgba(88, 166, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 600;
  color: #58a6ff;
  margin-bottom: 14px;
  text-decoration: none;
  transition: all 0.2s;
  animation: fadeUp 0.7s 0.05s ease both;
}

.opensource-badge:hover {
  background: rgba(88, 166, 255, 0.15);
  border-color: rgba(88, 166, 255, 0.5);
  transform: translateY(-2px);
}

.opensource-badge i { 
  font-size: 0.85rem; 
}

.hero-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 24px;
  animation: fadeUp 0.7s 0.1s ease both;
  color: var(--text-main);
}

.highlight {
  background: linear-gradient(135deg, var(--accent), #d91e9d, var(--accent));
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s ease-in-out infinite;
}

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

.hero p {
  max-width: 580px;
  margin: 0 auto 42px;
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 300;
  animation: fadeUp 0.7s 0.2s ease both;
}

.hero-buttons { 
  animation: fadeUp 0.7s 0.3s ease both;
}

.hero-trust {
  margin-top: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  animation: fadeUp 0.7s 0.45s ease both;
}

.hero-trust-item { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
}

.hero-trust-item i { 
  color: var(--accent); 
  font-size: 0.8rem; 
}

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

/* ==================== BUTTONS ==================== */
.btn {
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #d91e9d);
  color: white;
  box-shadow: 0 8px 24px rgba(240, 91, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(240, 91, 255, 0.4);
  filter: brightness(1.08);
}

.btn-secondary {
  border: 2px solid var(--border-strong);
  color: var(--text-main);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-github {
  border: 2px solid rgba(88,166,255,0.3);
  color: #58a6ff;
  background: rgba(88,166,255,0.07);
  backdrop-filter: blur(10px);
}

.btn-github:hover {
  background: rgba(88,166,255,0.14);
  border-color: rgba(88,166,255,0.5);
  transform: translateY(-2px);
}

/* ─── FOOTER ─── */
footer {
  padding: 88px 0 40px;
  border-top: 1px solid var(--border-color);
  margin-top: 80px;
  background: transparent;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 64px;
  text-align: left;
  margin-bottom: 56px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 25px;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand .footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.footer-brand .footer-logo-wrap img { 
  max-height: 40px; 
  border-radius: 8px;
  object-fit: cover;
  width: auto;
}

.footer-brand .footer-logo-wrap span { 
  font-weight: 800; 
  font-size: 1.1rem;
  color: var(--text-main);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 280px;
  margin-bottom: 28px;
  font-weight: 300;
  line-height: 1.7;
}

.footer-socials { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap; 
}

.social-icon {
  width: 44px; 
  height: 44px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex; 
  justify-content: center; 
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 16px;
  transition: all 0.25s;
}

.social-icon:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(240, 91, 255, 0.2);
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
  opacity: 0.8;
}

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

.footer-col ul li { 
  margin-bottom: 14px; 
}

.footer-col ul li a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.8;
  transition: all 0.2s;
}

.footer-col ul li a:hover { 
  opacity: 1; 
  color: var(--accent); 
  padding-left: 4px; 
}

.footer-bottom {
  padding-top: 36px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 25px;
  padding-right: 25px;
  text-align: center;
}

.footer-credit { 
  font-size: 0.9rem; 
  color: var(--text-2); 
  opacity: 0.9;
  font-weight: 300;
}

@media (prefers-color-scheme: dark) {
  footer { border-top-color: rgba(255,255,255,0.04); }
  .footer-bottom { border-top-color: rgba(255,255,255,0.03); }
  .footer-col ul li a { color: var(--text-2); }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  footer { padding: 64px 0 36px; }
}

/* ==================== NEWSLETTER SECTION ==================== */
.newsletter {
  max-width: 1100px;
  margin: 8rem auto;
  padding: 0 2rem;
}

.newsletter-inner {
  padding: 4rem;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.newsletter-inner::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(240, 91, 255, 0.1), transparent 70%);
  pointer-events: none;
}

.newsletter-content h2 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.newsletter-content h2 .highlight {
  background: linear-gradient(135deg, var(--accent), #d91e9d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.newsletter-content p {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.newsletter-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-social {
  padding: 0.75rem 1.4rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-social.whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  box-shadow: 0 8px 20px rgba(37,211,102,0.2);
}

.btn-social.whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(37,211,102,0.35);
}

.btn-social.discord {
  background: linear-gradient(135deg, #5865F2, #4752C4);
  color: white;
  box-shadow: 0 8px 20px rgba(88,101,242,0.2);
}

.btn-social.discord:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(88,101,242,0.35);
}

.newsletter-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-card {
  background: #fff;
  color: #111;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
  text-align: center;
  width: 100%;
  max-width: 300px;
}

.preview-badge {
  display: block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.preview-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.preview-text {
  text-align: left;
}

.preview-text strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  color: #111;
  font-weight: 700;
}

.preview-text small {
  color: #888;
  font-size: 0.8rem;
}

/* ==================== FEATURES SECTION ==================== */
.features {
  max-width: 1100px;
  margin: 8rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 36px 28px;
  border-radius: 28px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  backdrop-filter: blur(10px);
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow), 0 0 0 1px rgba(240,91,255,0.15);
  border-color: rgba(240, 91, 255, 0.2);
}

.feature-card:hover::before { 
  opacity: 1; 
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  display: inline-block;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 300;
  flex: 1;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
  line-height: 1.7;
}

.feature-card .btn {
  margin: 0;
  position: relative;
  z-index: 1;
  align-self: flex-start;
}

/* === LONG HORIZONTAL CARD === */
/* ==================== LONG CARD REFINEMENT (FIXED) ==================== */
.long-card {
  display: flex;
  gap: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  overflow: hidden;
  width: 90%;
  margin: 0 auto 20px auto; /* Centra la card nella pagina e aggiunge margine inferiore */
  box-sizing: border-box;    /* Previene bug di padding sul calcolo della larghezza */
}

.long-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1; /* Semplificato: occupa lo spazio rimanente */
}

/* Forziamo l'immagine a mantenere le proporzioni e a non schiacciarsi */
.long-card img.card-thumb {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0; /* Impedisce all'immagine di rimpicciolire se il testo è lungo */
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  background-color: rgba(255, 255, 255, 0.05); /* Sfondo visibile anche se l'immagine fallisce */
  display: block;
}

.long-card.small-thumb img.card-thumb {
  width: 120px;
  height: 96px;
}

.long-card h3 { 
  font-size: 1.25rem; 
  margin: 0; 
  font-weight: 800; 
  color: var(--text-main); 
}

.long-card p { 
  margin: 0; 
  color: var(--text-muted); 
  font-weight: 300; 
  line-height: 1.6; 
}

.long-card .meta { 
  margin-top: 8px; 
  color: var(--text-2); 
  font-size: 0.9rem; 
}

/* Gestione inversione speculare */
.long-card--reverse { 
  flex-direction: row-reverse; 
}

.long-card:hover { 
  transform: translateY(-6px); 
  box-shadow: 0 24px 60px rgba(0,0,0,0.12), var(--shadow); 
  border-color: rgba(240,91,255,0.12); 
}

/* Responsive design per dispositivi mobili */
@media (max-width: 900px) {
  .long-card { 
    flex-direction: column-reverse; /* Immagine sopra, testo sotto (poiché l'immagine nell'HTML è dopo il testo) */
    gap: 20px;                     /* Riduce lo spazio vuoto su mobile */
    align-items: stretch; 
    padding: 24px; 
    width: 100%;                   /* Sfrutta tutto lo spazio sui display piccoli */
  }
  
  .long-card img.card-thumb { 
    width: 100%; 
    height: 200px; 
  }
  
  /* Se la card è invertita su desktop, mantiene l'immagine in alto su mobile */
  .long-card--reverse { 
    flex-direction: column; 
  }
}


/* ─── Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible { 
  opacity: 1; 
  transform: translateY(0); 
}

/* ─── Two Columns ─── */
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  background: var(--card-bg);
  padding: 52px;
  border-radius: 36px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

.info-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}

.info-text { 
  text-align: left; 
  position: relative; 
  z-index: 1; 
}

.info-text h2 { 
  text-align: left; 
  margin-bottom: 16px;
  color: var(--text-main);
}

.info-text p { 
  color: var(--text-muted); 
  font-weight: 300; 
  margin-bottom: 28px; 
}

.stats-row { 
  display: flex; 
  gap: 32px; 
  margin-bottom: 24px; 
}

.stat-value { 
  font-size: 1.8rem; 
  font-weight: 800; 
  color: var(--accent); 
  line-height: 1; 
}

.stat-label { 
  font-size: 0.72rem; 
  color: var(--text-muted); 
  margin-top: 4px; 
  font-weight: 400; 
}

/* ─── Open Source Section ─── */
.opensource-section {
  background: var(--card-bg);
  border: 1px solid rgba(88,166,255,0.2);
  border-radius: 36px;
  padding: 52px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

.os-text h2 { 
  text-align: left; 
  margin-bottom: 16px;
  color: var(--text-main);
}

.os-text p { 
  color: var(--text-muted); 
  font-weight: 300; 
  margin-bottom: 24px; 
  line-height: 1.7; 
}

.os-stats { 
  display: flex; 
  gap: 28px; 
  margin-bottom: 28px; 
  flex-wrap: wrap; 
}

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

.os-stat-val { 
  font-size: 1.5rem; 
  font-weight: 800; 
  color: #58a6ff; 
}

.os-stat-lbl { 
  font-size: 0.7rem; 
  color: var(--text-muted); 
}

.os-code {
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  .os-code { background: rgba(88,166,255,0.04); }
}

.os-code .cmd-comment { color: #6a737d; }
.os-code .cmd-text { color: #58a6ff; }
.os-code .cmd-accent { color: var(--accent); }

/* ─── Donate Section ─── */
.donate-section-wrap {
  background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(88,166,255,0.05) 100%);
  border: 1px solid rgba(240,91,255,0.15);
  border-radius: 36px;
  padding: 56px 52px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.donate-section-wrap h2 { 
  margin-bottom: 14px; 
  position: relative;
  color: var(--text-main);
}

.donate-section-wrap > p { 
  color: var(--text-muted); 
  max-width: 520px; 
  margin: 0 auto 32px; 
  font-weight: 300; 
  position: relative; 
}

.donate-perks {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  position: relative;
}

.donate-perk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.donate-perk i { 
  color: var(--accent); 
}

.donate-cta-row { 
  display: flex; 
  gap: 12px; 
  justify-content: center; 
  flex-wrap: wrap; 
  position: relative; 
}

/* ─── Stay In ─── */
.stay-in-buttons { 
  display: flex; 
  gap: 12px; 
  margin-top: 28px; 
}

.stay-btn {
  flex: 1;
  padding: 13px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.25s;
}

.stay-btn:hover { 
  transform: translateY(-3px); 
  filter: brightness(1.1); 
}

.whatsapp { 
  background: linear-gradient(135deg, #25D366, #128C7E); 
  box-shadow: 0 8px 20px rgba(37,211,102,0.2); 
}

.discord  { 
  background: linear-gradient(135deg, #5865F2, #4752C4); 
  box-shadow: 0 8px 20px rgba(88,101,242,0.2); 
}

/* ==================== FOOTER ==================== */

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .newsletter-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 2rem;
  }
  
  .two-columns {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px;
    gap: 32px;
  }
  
  .info-text { 
    text-align: center; 
  }
  
  .info-text h2 { 
    text-align: center; 
  }
  
  .stats-row { 
    justify-content: center; 
  }
  
  .opensource-section { 
    grid-template-columns: 1fr; 
    text-align: center; 
    padding: 32px; 
    gap: 32px; 
  }
  
  .os-text h2 { 
    text-align: center; 
  }
  
  .os-stats { 
    justify-content: center; 
  }
}

@media (max-width: 768px) {
  .main-header { 
    top: 10px; 
    width: 94%; 
  }
  
  .hero { 
    padding-top: 145px; 
  }
  
  .stay-in-buttons { 
    flex-direction: column; 
  }
  
  .footer-grid { 
    grid-template-columns: 1fr 1fr; 
  }
  
  .footer-brand { 
    grid-column: span 2; 
    margin-bottom: 10px; 
  }
  
  .footer-bottom { 
    flex-direction: column; 
    text-align: center; 
  }
  
  .donate-section-wrap { 
    padding: 36px 24px; 
  }
  
  .header-donate-btn span { 
    display: none; 
  }
}