/**
 * global.css
 * Globalne style bazowe, reset CSS i ogólne ustawienia typografii.
 */

/* =========================================
   1. RESET & BOX SIZING
   ========================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =========================================
   2. BODY & BASE
   ========================================= */

html {
  font-size: 16px; /* Baza dla rem */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-main);
  background-color: var(--color-bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main:not(.bg-map-image) section:last-child {
  margin-bottom: var(--spacing-8);
}

@media (min-width: 768px) {
  main:not(.bg-map-image) section:last-child {
    margin-bottom: var(--spacing-16);
  }
}



/* =========================================
   3. TYPOGRAFIA (Typography)
   ========================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-4);
}

h1 {
  font-size: var(--font-size-4xl); /* Mobiles */
}

h2 {
  font-size: var(--font-size-3xl);
  text-transform: uppercase; /* Zgodnie z designem "BOHATEROWIE NA SZLAKU" */
  letter-spacing: var(--letter-spacing-wide);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

p {
  margin-bottom: var(--spacing-4);
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary-dark);
}

strong {
  font-weight: var(--font-weight-semibold);
}

/* Listy */
ul, ol {
  list-style-position: inside;
  margin-bottom: var(--spacing-4);
}

/* Obrazki */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================
   4. FORMULARZE (Basic Forms)
   ========================================= */

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

/* Global Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background-color: var(--color-gray-200); /* Matches the light gray background */
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--color-text-main);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  transition: all var(--transition-fast);
  outline: none;
  margin-bottom: var(--spacing-0); /* Margins handled by containers usually, but resetting for safety */
  -webkit-appearance: none; /* Remove default styling on iOS */
}

textarea {
  border-radius: var(--radius-3xl);
  min-height: 140px;
  max-height: 250px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  background-color: var(--color-white);
  border-color: var(--color-gray-300);
  box-shadow: 0 0 0 3px rgba(23, 54, 74, 0.1);
}

/* Opcjonalna klasa ograniczająca szerokość inputa */
.input-limit-width {
  max-width: 600px;
}

label {
  display: block;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-2);
  color: var(--color-primary);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-tight);
}

/* Placeholders */
::placeholder {
  color: var(--color-gray-500);
  opacity: 1;
}

/* =========================================
   5. RESPONSIVE TYPOGRAPHY
   ========================================= */

@media (min-width: 768px) {
  h1 {
    font-size: var(--font-size-5xl);
  }
}

/* =========================================
   6. FORMULARZE (Contact Form 7)
   ========================================= */

.submit-wrapper p {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
}
