/* ============================================
   Voices of Contemporary Poland - Stylesheet
   Design System based on Figma designs
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
  /* Colors */
  --color-primary: #c10007;
  --color-primary-hover: #a10006;
  --color-text-heading: #101828;
  --color-text-body: #364153;
  --color-text-muted: #4a5565;
  --color-background: #ffffff;
  --color-background-alt: #f9fafb;
  --color-border: #e5e7eb;
  --color-border-input: #d1d5dc;
  --color-placeholder: rgba(10, 10, 10, 0.5);
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fee685;
  --color-warning-text: #973c00;
  --color-warning-icon-bg: #fef3c6;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes */
  --text-xs: 14px;
  --text-sm: 16px;
  --text-base: 18px;
  --text-lg: 24px;
  --text-xl: 30px;
  --text-2xl: 36px;
  --text-3xl: 60px;

  /* Line Heights */
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Border Radius */
  --radius-sm: 5px;
  --radius-md: 10px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0px 4px 8px 0px rgba(0, 0, 0, 0.15);
  --shadow-md: 0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -4px rgba(0, 0, 0, 0.1);

  /* Layout */
  --max-width: 1200px;
  --content-width: 768px;
  --header-height: 65px;
  --footer-height: 85px;

  /* Content Cards - Configurable appearance for overlaid content */
  --content-card-bg: rgba(255, 255, 255, 0.5);
  --content-card-blur: 10px;
  --content-card-border: 1px solid var(--color-border);
  --content-card-radius: var(--radius-md);
  --content-card-shadow: var(--shadow-md);
  --content-card-padding: var(--space-8);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-body);
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-heading);
  font-weight: 400;
  line-height: var(--leading-tight);
}

h1 {
  font-size: var(--text-2xl);
  letter-spacing: 0.37px;
}

h2 {
  font-size: var(--text-xl);
  letter-spacing: 0.4px;
}

h3 {
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.44px;
}

p {
  letter-spacing: -0.31px;
}

/* ============================================
   Header / Navigation
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--color-primary);
  border-bottom: none;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.9);
  padding: var(--space-2) 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
}

.nav-lang {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: white;
  background-color: transparent;
}

.nav-lang:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-lang svg {
  width: 16px;
  height: 16px;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: white;
  margin: 5px 0;
  transition: 0.3s;
}

/* ============================================
   Main Content
   ============================================ */
main {
  flex: 1;
  padding-top: var(--header-height);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

/* ============================================
   Hero Section (Home Page)
   ============================================ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
  max-width: var(--content-width);
  color: white;
}

.hero-title {
  font-size: clamp(28px, 5vw, 60px);
  font-weight: 700;
  color: white;
  text-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
  line-height: 1;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 500;
  text-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
}

.hero-description {
  font-size: clamp(14px, 2vw, 18px);
  line-height: var(--leading-relaxed);
  text-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
}

.hero-cta-text {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 600;
  text-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-family);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--leading-normal);
  letter-spacing: -0.31px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

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

.btn-secondary {
  background-color: white;
  color: var(--color-text-heading);
  border: 1px solid var(--color-border-input);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background-color: var(--color-background-alt);
}

.btn-lg {
  padding: var(--space-3) var(--space-8);
  min-height: 50px;
}

.btn svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   Page Sections
   ============================================ */
.page-section {
  padding: var(--space-12) var(--space-6);
}

.page-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.page-header-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-6);
}

.page-title {
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: var(--space-4);
}

.page-description {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--color-text-body);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* ============================================
   Full-Page Background Layout (shared)
   ============================================ */
.fullpage-bg {
  position: relative;
  min-height: calc(100vh - var(--header-height));
}

.fullpage-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.fullpage-bg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fullpage-bg-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
}

.fullpage-content {
  padding: var(--space-12) var(--space-6);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Content Card - Configurable via CSS variables */
.content-card {
  background-color: var(--content-card-bg);
  backdrop-filter: blur(var(--content-card-blur));
  -webkit-backdrop-filter: blur(var(--content-card-blur));
  border: var(--content-card-border);
  border-radius: var(--content-card-radius);
  box-shadow: var(--content-card-shadow);
  padding: var(--content-card-padding);
}

/* ============================================
   About Page
   ============================================ */
.about-page .fullpage-content {
  max-width: var(--content-width);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.about-section {
  text-align: center;
}

.about-section h2 {
  margin-bottom: var(--space-6);
}

.about-paragraph {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
  letter-spacing: -0.44px;
}

.about-paragraph:last-child {
  margin-bottom: 0;
}

.about-highlight {
  font-weight: 500;
  color: var(--color-text-heading);
}

/* ============================================
   Guidelines Page
   ============================================ */
.guidelines-page .fullpage-content {
  max-width: 896px;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.guidelines-header {
  text-align: center;
}

.guidelines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.guideline-card {
  background-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(var(--content-card-blur));
  -webkit-backdrop-filter: blur(var(--content-card-blur));
  border: var(--content-card-border);
  border-radius: var(--content-card-radius);
  padding: var(--space-6);
  box-shadow: var(--content-card-shadow);
}

.guideline-card h3 {
  margin-bottom: var(--space-3);
}

.guideline-card p {
  color: var(--color-text-body);
  line-height: var(--leading-relaxed);
}

/* ============================================
   Submit Page
   ============================================ */
.submit-page {
  position: relative;
  min-height: calc(100vh - var(--header-height));
}

.submit-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.submit-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.submit-content {
  padding: var(--space-12) var(--space-6);
  max-width: var(--content-width);
  margin: 0 auto;
}

.submit-header {
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  text-align: center;
  margin-bottom: var(--space-10);
  box-shadow: var(--shadow-md);
}

.submit-header h1 {
  margin-bottom: var(--space-4);
}

.submit-header p {
  font-size: var(--text-base);
  max-width: 600px;
  margin: 0 auto;
}

/* Form Styles */
.form-card {
  background-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-heading);
  margin-bottom: var(--space-2);
}

.form-hint {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--text-sm);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-md);
  background-color: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: var(--color-placeholder);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(193, 0, 7, 0.1);
}

/* File Upload Styles */
.file-upload {
  position: relative;
}

.file-upload-input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  top: 0;
  left: 0;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  border: 2px dashed var(--color-border-input);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  min-height: 92px;
}

.file-upload-label:hover {
  border-color: var(--color-primary);
  background-color: rgba(193, 0, 7, 0.02);
}

.file-upload-label.dragover {
  border-color: var(--color-primary);
  background-color: rgba(193, 0, 7, 0.05);
}

.file-upload-icon {
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
}

.file-upload-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.file-upload-info {
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background-color: var(--color-background-alt);
  border-radius: var(--radius-sm);
  margin-top: var(--space-2);
}

.file-upload-info.visible {
  display: flex;
}

.file-upload-name {
  flex: 1;
  font-size: var(--text-xs);
  color: var(--color-text-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-upload-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: var(--space-1);
}

.file-upload-remove:hover {
  color: var(--color-primary);
}

/* Progress Bar */
.progress-container {
  display: none;
  margin-top: var(--space-4);
}

.progress-container.visible {
  display: block;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  text-align: center;
}

/* Form Submit Button */
.form-submit {
  width: 100%;
  margin-top: var(--space-6);
}

/* Form Messages */
.form-message {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  display: none;
}

.form-message.visible {
  display: block;
}

.form-message.success {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.form-message.error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ============================================
   Stories Page
   ============================================ */
.stories-page .fullpage-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - var(--space-12) * 2);
}

.stories-card {
  background-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(var(--content-card-blur));
  -webkit-backdrop-filter: blur(var(--content-card-blur));
  border: var(--content-card-border);
  border-radius: var(--content-card-radius);
  box-shadow: var(--content-card-shadow);
  padding: var(--space-12) var(--space-10);
  text-align: center;
  max-width: 704px;
  width: 100%;
}

.stories-icon {
  width: 80px;
  height: 80px;
  background-color: var(--color-warning-icon-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
}

.stories-icon svg {
  width: 48px;
  height: 48px;
  color: var(--color-warning-text);
}

.stories-badge {
  display: inline-block;
  background-color: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-warning-text);
  margin-bottom: var(--space-6);
}

.stories-description {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  max-width: 550px;
  margin: 0 auto;
}

/* ============================================
   FAQ Page
   ============================================ */
.faq-page .fullpage-content {
  max-width: var(--content-width);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.faq-header {
  text-align: center;
}

.faq-card {
  background-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(var(--content-card-blur));
  -webkit-backdrop-filter: blur(var(--content-card-blur));
  border: var(--content-card-border);
  border-radius: var(--content-card-radius);
  padding: var(--content-card-padding);
  box-shadow: var(--content-card-shadow);
}

.faq-item {
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-8);
}

.faq-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
  margin-bottom: 0;
}

.faq-question {
  margin-bottom: var(--space-2);
}

.faq-answer {
  color: var(--color-text-body);
  line-height: var(--leading-relaxed);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background-color: var(--color-primary);
  border-top: none;
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.footer-text {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  :root {
    --text-3xl: 36px;
    --text-2xl: 28px;
    --text-xl: 24px;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-primary);
    flex-direction: column;
    padding: var(--space-4);
    border-bottom: none;
    gap: var(--space-4);
  }

  .nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .header {
    justify-content: space-between;
    padding: 0 var(--space-4);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-lg {
    width: 100%;
    max-width: 280px;
  }

  .guidelines-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stories-card {
    padding: var(--space-8) var(--space-6);
  }

  .fullpage-content {
    padding: var(--space-8) var(--space-4);
  }

  .content-card {
    padding: var(--space-6);
  }
}


/* ============================================
   Utility Classes
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.mt-4 {
  margin-top: var(--space-4);
}

.mb-4 {
  margin-bottom: var(--space-4);
}
