/* 1. Root & globals */
html {
  font-size: 16px; /* base font size */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 2. Body & typography */
body {
  font-family:
    "Noto Sans Hebrew", /* Hebrew-friendly */
    "Assistant",
    Arial,
    system-ui,
    sans-serif;
  font-size: 1rem;         /* 16px default */
  line-height: 1.5;
  color: #222;
  background: #fff;
  text-align: start;        /* respects LTR/RTL */
  padding-block: 1rem;
  min-height: 100vh;
}

/* 3. Layout containers */
header,
main,
footer {
  padding-inline-start: 1rem; /* start padding (right in RTL, left in LTR) */
  padding-inline-end: 1rem;   /* end padding */
  max-width: 65ch;             /* readable line length */
  margin-inline: auto;
}

/* 4. Headings */
h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem); /* fluid heading */
  margin-bottom: 0.5rem;
}

h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1rem;
}

/* 5. Paragraphs */
p {
  margin-bottom: 1rem;
}

/* 6. Buttons */
button {
  font-size: 1rem;
  padding: 0.75em 1.25em;    /* scales with font */
  border: none;
  border-radius: 0.5rem;
  background-color: #0078d4;
  color: white;
  cursor: pointer;
}

/* 7. RTL / Hebrew adjustments */
[dir="rtl"] .icon-arrow {
  transform: scaleX(-1);
}

/* 8. Footer */
footer {
  font-size: 0.875rem;
  color: #555;
  text-align: center;
  margin-top: 2rem;
}

/* 9. Media queries — larger screens */
@media (min-width: 768px) {
  body {
    font-size: 1.125rem;   /* slightly larger text */
  }

  main {
    display: flex;
    flex-direction: row;   /* side-by-side sections */
    gap: 2rem;
  }

  header, footer {
    padding-inline: 2rem;  /* more space on wide screens */
  }
}

@media (min-width: 1200px) {
  h1 {
    font-size: 3rem;       /* even bigger heading on desktop */
  }

  main {
    max-width: 80ch;       /* longer lines allowed */
  }
}
