/*
* reset.css
* Modern reset for Tekrota Ahşap website
* A more comprehensive and modern CSS reset with improved accessibility
*/

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin and padding */
html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Remove list styles */
ul,
ol {
  list-style: none;
}

/* Make images and videos easier to work with */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto; /* Added for aspect ratio */
}

/* Preserve aspect ratio for embedded content */
iframe {
  border: 0;
  max-width: 100%;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Reset default anchor styling */
a {
  text-decoration: none;
  color: inherit;
}

/* Improve text rendering */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

/* Remove default button styling */
button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
}

/* Correct cursor for buttons */
button,
[type="button"],
[type="reset"],
[type="submit"] {
  cursor: pointer;
}

/* Remove fieldset styling */
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

/* Consistent form elements styling */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove webkit search input styling */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

/* Correct the inability to style clickable types in iOS and Safari */
button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

/* Reset textarea overflow */
textarea {
  overflow: auto;
  resize: vertical;
}

/* Prevent content from breaking layout */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  vertical-align: middle;
}

/* Accessibility improvements */
[aria-busy="true"] {
  cursor: progress;
}

[aria-controls] {
  cursor: pointer;
}

[aria-disabled="true"],
[disabled] {
  cursor: not-allowed;
}

/* Better focus styles */
:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Hide content visually but keep it accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Set default font-family */
body {
  font-family: var(--body-font, 'Montserrat', sans-serif);
}

/* Fix iOS tap highlight color */
a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

/* Fix for iOS input zoom */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select,
  textarea,
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="email"],
  input[type="tel"] {
    font-size: 16px;
  }
}