/* 
 * Mezi4stěny - Brutalist/Street Minimal Design
 * Mobile-first, accessibility-focused
 */

:root {
  /* Colors - simple, honest palette */
  --black: #1a1a1a;
  --white: #fafafa;
  --gray: #666;
  --light-gray: #e8e8e8;
  --accent: #e63946; /* compassionate red */
  --accent-hover: #c92a35;
  --accent-soft: rgba(230, 57, 70, 0.1);
  --text: #2a2a2a;
  --bg: #f5f5f5;
  
  /* Typography */
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  
  /* Max widths */
  --content-width: 120ch;
  --wide-width: 1600px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: 100px; /* Sticky header compensation */
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.4rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-sm);
  max-width: var(--content-width);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

a:hover {
  border-bottom-color: var(--accent);
}

strong {
  font-weight: 700;
}

/* Layout */
.container {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

@media (min-width: 1200px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

.content {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* Header */
header {
  background: var(--white);
  color: var(--text);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--light-gray);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  background: var(--black);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

header.scrolled nav a,
header.scrolled .logo {
  color: var(--white);
}

header.scrolled nav a:hover {
  color: var(--accent);
}

/* Logo is swapped via JavaScript to preserve red house */

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  border: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.logo:hover {
  color: var(--accent);
  opacity: 0.8;
}

nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: center;
}

nav a {
  color: var(--text);
  border: none;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent);
}

.cta-header {
  background: var(--accent);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  border: none !important;
  transition: all 0.2s;
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.4);
}

.cta-header:hover {
  background: var(--accent-hover);
  color: var(--white) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.6), 0 0 25px rgba(230, 57, 70, 0.5);
}

/* Hero Section - Original (for subpages) */
.hero {
  background: linear-gradient(135deg, var(--black) 0%, #2a2a2a 100%);
  color: var(--white);
  padding: var(--space-xl) 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  max-width: 20ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.1;
  font-weight: 800;
}

.hero p {
  font-size: 1.25rem;
  color: #ccc;
  margin: 0 auto var(--space-md);
  max-width: 50ch;
}

/* Fullpage Hero with Background Image */
.hero-fullpage {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
}

/* Soft fade at the bottom of hero to blend into page background */
.hero-fullpage::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 160px; /* controls length of fade */
  background: linear-gradient(
    to bottom,
    rgba(245, 245, 245, 0) 0%,
    rgba(245, 245, 245, 0.65) 55%,
    var(--bg) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(26, 26, 26, 0.75) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3; /* above bottom fade */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  color: var(--white);
  padding: var(--space-md);
  width: 100%;
}

.hero-text {
  text-align: left;
  flex: 1 1 50%;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  font-weight: 800;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: 1.4rem;
  color: rgba(255,255,255,0.95);
  margin: 0 0 2.5rem;
  max-width: 45ch;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

/* Magnetic Button Effect */
.btn-magnetic {
  position: relative;
  display: inline-block;
  padding: 1.2rem 3rem;
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--accent) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  will-change: transform;
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4), 0 0 30px rgba(230, 57, 70, 0.3);
}

.btn-magnetic:hover {
  background: var(--accent-hover) !important;
  box-shadow: 0 12px 35px rgba(230, 57, 70, 0.6), 0 0 45px rgba(230, 57, 70, 0.5);
  color: var(--white) !important;
}

/* Material Icons helpers */
.material-icons.emoji-icon {
  vertical-align: -0.2em;
  font-size: 1.25em;
  margin-right: 0.2rem;
}

.card-icon.material-icons {
  font-size: 3rem;
  margin-right: 0;
  vertical-align: baseline;
}

.icon-check { color: #2ecc71; } /* Green for checks */
.icon-cross { color: var(--accent); } /* Red for crosses */

/* Donate Widget - Interactive QR Payment */
.donate-widget {
  flex: 0 0 auto;
}

.content .donate-widget {
  margin: 3rem auto;
}

.donate-widget-inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  background: #1a1a1a;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  overflow: hidden;
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.donate-qr-section {
  background: white;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donate-qr {
  width: 140px;
  height: 140px;
  border-radius: 8px;
}

.donate-info-section {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  flex: 1;
}

.donate-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.donate-amount-control {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.donate-amount-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.donate-slider {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.donate-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.donate-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.donate-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.donate-amount-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.donate-account {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.donate-account-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
}

.donate-account-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  width: fit-content;
}

.donate-account-row code {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.95rem;
  color: var(--white);
  font-weight: 600;
}

.copy-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.copy-btn:hover {
  color: var(--white);
}

.btn-card-donate {
  margin-top: 1rem;
  background: var(--white);
  color: var(--black) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  border: none;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-card-donate:hover {
  background: var(--light-gray);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  border-bottom: none;
}

.btn-card-donate .material-icons {
  font-size: 1.25rem;
}

/* Visibility helpers */
.mobile-only {
  display: none !important;
}

@media (max-width: 600px) {
  .donate-widget-inner {
    flex-direction: column;
  }
  
  .donate-qr-section {
    display: none !important; /* Hide QR on mobile as requested implicitly */
  }
  
  .mobile-only {
    display: flex !important;
  }
}
  justify-content: center;
  transition: color 0.2s ease;
}

.copy-btn:hover {
  color: var(--accent);
}

.copy-btn.copied {
  color: #4ade80;
}

.donate-fio {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 1024px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-text {
    text-align: center;
    flex: none;
  }
  
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 600px) {
  .donate-widget-inner {
    flex-direction: column;
    max-width: 320px;
  }
  
  .donate-qr-section {
    padding: 1rem;
  }
  
  .donate-qr {
    width: 120px;
    height: 120px;
  }
  
  .donate-info-section {
    text-align: center;
    align-items: center;
  }
  
  .donate-account-row {
    margin: 0 auto;
  }
}

/* Legacy Hero QR Payment Section - deprecated */
.hero-qr-payment {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.qr-code-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.qr-code {
  width: 180px;
  height: 180px;
  background: white;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.qr-info {
  text-align: left;
  max-width: 300px;
}

.qr-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.qr-account {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: rgba(255, 255, 255, 0.95);
}

.qr-account strong {
  color: var(--accent);
  font-weight: 700;
}

.qr-note {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
  margin: 0;
}

/* Cards/Projects */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  margin: var(--space-lg) 0;
}

/* Max 2 columns on desktop for better readability */
@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--white);
  border: none;
  border-left: 4px solid var(--accent);
  border-radius: 0;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(230, 57, 70, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

/* Scroll reveal – triggered via JS when entering viewport */
.card.is-visible {
  animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--reveal-delay, 0s);
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:hover {
  transform: translateY(-4px) !important;
  box-shadow: -6px 6px 0 rgba(230, 57, 70, 0.15);
  border-left-color: var(--accent-hover);
}

.card-image {
  display: none; /* Remove placeholder images */
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.9;
}

.card-content {
  padding: 0;
}

.card h3 {
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.card p {
  color: var(--gray);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 1rem;
}

.card-quote {
  font-style: italic;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  opacity: 0.85;
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  border: 2px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-size: 0.95rem;
}

.btn:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateX(4px);
  border-bottom: 2px solid var(--accent);
}

.btn-accent {
  background: var(--accent);
  border: none;
  font-size: 1.1rem;
  padding: 1rem 2rem;
  font-weight: 700;
  border-radius: 8px;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
}

/* Stats/Numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  text-align: center;
}

.stat {
  padding: var(--space-md);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  font-family: var(--font-sans);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  color: var(--gray);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Section */
section {
  padding: var(--space-lg) 0;
}

section.content {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-lg);
  font-size: 2.5rem;
  font-weight: 700;
}

/* Dark section variant */
.section-dark {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  color: var(--white);
  padding: 5rem 0;
}

.section-dark h2 {
  color: var(--white);
}

.section-dark p {
  color: #ccc;
}

/* Accent section variant */
.section-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #d63444 100%);
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
}

.section-accent h2 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.section-accent p {
  color: rgba(255,255,255,0.95);
}

/* Footer */
footer {
  background: var(--black);
  color: var(--white);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
}

footer a {
  color: var(--white);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer-section h4 {
  margin-bottom: var(--space-sm);
  color: var(--accent);
}

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

.footer-section li {
  margin-bottom: var(--space-xs);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid #333;
  color: var(--gray);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .qr-code-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .qr-info {
    text-align: center;
  }
  
  .qr-code {
    width: 160px;
    height: 160px;
  }
  
  .hero-fullpage {
    background-attachment: scroll; /* Fixed bg doesn't work well on mobile */
    min-height: 90vh;
  }
  
  .btn-magnetic {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }
  
  nav ul {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  nav a {
    font-size: 1.1rem;
  }
  
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Partner Logos */
.partner-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  align-items: center;
  justify-items: center;
}

.partner-logo {
  width: 100%;
  max-width: 140px;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
  filter: grayscale(0.2);
}

.partner-logo:hover {
  opacity: 1;
  transform: scale(1.05);
  filter: grayscale(0);
}

@media (max-width: 768px) {
  .partner-logos {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .partner-logo {
    max-width: 100px;
  }
}

/* Print */
@media print {
  header, footer, .cta-header {
    display: none;
  }
}
