/* 
 * BRF Råstenen Mitt - Grundläggande stilar
 * Reset, typografi och grundläggande element
 */

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

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

/* HTML och body */
html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Main content area */
main {
  flex: 1;
}

/* Container */
.container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Typografi */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  margin-bottom: var(--spacing-md);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }
h5 { font-size: var(--font-size-h5); }
h6 { font-size: var(--font-size-h6); }

/* Paragraf och text */
p {
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

/* Länkar */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--secondary);
}

a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Listor */
ul, ol {
  padding-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.main-content ul {
  list-style: disc;
}

ul {
  list-style: none;
}

li {
  margin-bottom: var(--spacing-xs);
}

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

/* Responsiva bilder */
img[width] {
  max-width: 100%;
  height: auto;
}

/* Tabeller */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-md);
}

th, td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--neutral-300);
}

th {
  background-color: var(--background-alt);
  font-weight: 600;
  color: var(--primary);
}

/* Formulär */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Utility klasser */
.sr-only {
  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; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* Content sections */
.content-section {
  min-height: 65vh;
  padding: var(--spacing-xl) 0;
}

/* Print styles */
@media print {
  * {
    color: black !important;
    background: white !important;
    box-shadow: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  p, li {
    orphans: 3;
    widows: 3;
  }
  
  .no-print {
    display: none !important;
  }
}