/* ==========================================================================
   Main Styles - Dětské centrum Liberec
   ========================================================================== */

:root {
  /* Colors */
  --primary: #993366;
  --primary-light: #cc6699;
  --primary-dark: #7a2952;
  --text-dark: #2d2d2d;
  --text-body: #4a4a4a;
  --text-muted: #6b6b6b;
  --bg-light: #fafafa;
  --bg-white: #ffffff;
  --border-color: #e8e8e8;
  
  /* Typography */
  --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Spacing */
  --container-max: 1200px;
  --section-padding: 80px;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main Content Container */
.main-content {
  min-height: calc(100vh - 76px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 1rem;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.375rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 1rem;
  /* Prevent single letter orphans at end of lines */
  overflow-wrap: break-word;
  word-break: normal; /* Changed from break-word - better for Czech language */
  /* Disable automatic hyphenation - words should move to next line instead of breaking */
  hyphens: none;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  /* Prevent orphaned words (minimum 2 words on last line) */
  orphans: 2;
  widows: 2;
  /* Modern CSS to prevent orphaned words - with fallback */
  text-wrap: pretty;
  /* Fallback for browsers that don't support text-wrap: pretty */
  word-spacing: normal;
  letter-spacing: normal;
}

/* Additional rule for all text content to prevent single letter orphans */
.hero__content p,
.about-section__content p,
.offer-card p,
.courses-section p,
.course-card p,
.hero__description,
.about-section__text,
.offer-card__text,
.course-card__text,
.course-card__subtitle {
  /* Force at least 2 characters on last line */
  text-wrap: pretty;
  overflow-wrap: break-word;
  word-break: normal; /* Better typography - only break when necessary */
  /* Disable automatic hyphenation - words should move to next line instead of breaking */
  hyphens: none;
  -webkit-hyphens: none;
  -moz-hyphens: none;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn--primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(153, 51, 102, 0.25);
}

.btn--primary:hover {
  background: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(153, 51, 102, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.btn--pill {
  border-radius: 999px;
}

/* Cards */
.card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* Responsive */
@media (max-width: 768px) {
  :root {
    --section-padding: 48px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  /* Prevent single letter orphans on mobile */
  p {
    word-break: normal; /* Better typography on mobile too */
    overflow-wrap: break-word;
    /* Disable automatic hyphenation - words should move to next line instead of breaking */
    hyphens: none;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    /* Better line breaking on small screens */
    line-height: 1.75;
    text-wrap: pretty;
  }
}

