/* --------------------------
   Main Content & Images
--------------------------- */
body, article {
  max-width: 36rem;      /* keeps text readable */
  margin: 0 auto;         /* center on page */
  padding: 1rem;
  box-sizing: border-box;
  line-height: 1.75rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.25rem;
  color: rgba(75,85,99);
}

/* Make images responsive */
main img, article img {
  display: block;        /* removes inline spacing issues */
  max-width: 100%;       /* never exceed container width */
  height: auto;          /* keep aspect ratio */
  margin: 1rem auto;     /* add space around images, centered */
  border-radius: 4px;    /* subtle rounding */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* optional soft shadow */
  object-fit: contain;   /* ensures image fits without cropping */
}

/* ///////////////////// NAV BAR ///////////////////////*/

h2 a:link, h2 a:visited{
    color:#000;
    text-decoration: none;
}

.navbar{
    margin: 0 0 3rem 0;
}

.navbar ul{
    display: flex;
    list-style-type: none;
    margin: 1rem 0;
    padding: 0;
}

.navbar ul li{
    margin: 0 1.5rem 0 0;
}

.navbar ul li a:link, .navbar ul li a:visited{
    color: rgba(75,85,99);
    text-decoration: none;
}

/* ///////////////////// TOC ///////////////////////*/

.toc {
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc li {
  margin: 0.25rem 0;
}

.toc li a:link, .toc li a:visited{
    color: rgba(75,85,99);
    text-decoration: none;
}

.toc-level-3 {
  margin-left: 1rem;
}

.toc-level-4 {
  margin-left: 2rem;
}

/* ///////////////////// CONTENT ///////////////////////*/

.date {
    font-size: 1.125rem;
    color: rgba(75,85,99);
    margin: 2rem 0 0 0;
} 

h1 {
  font-size: 2.25rem;
  color: #000;
  font-weight: 700;
  line-height: 2.5rem;
  margin: 0.5rem 0 0 0;
}

h2{
  font-size: 2rem;
  color: #000;
  font-weight: 700;
  line-height: 2rem;
  margin: 2rem 0 0 0;
}

h3{
  font-size: 1.5rem;
  color: #000;
  font-weight: 700;
  line-height: 2rem;
  margin: 1rem 0 0 0;
}

p{
    margin: 1rem 0;
}

figure {
  margin: 1rem 0;
  text-align: center;
}

figure p, figure p img{
    margin: 0;
}

figcaption {
  font-size: 0.9rem;
  color: #666;
}

figcaption p{
    margin: 0.5rem 0;
}

a img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

ul{
    line-height: 1.25;
}

blockquote{
    margin: 0 2rem;
}

blockquote p:first-child {
    color: red;
    font-size: 1.5rem;
    font-weight: 700;
}

table {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

thead th {
  background: red;
  padding: 0.75rem 1rem;
}

/* Top-left corner */
thead th:first-child {
  border-top-left-radius: 12px;
}

/* Top-right corner */
thead th:last-child {
  border-top-right-radius: 12px;
}

td{
  border: 1px solid #ddd;
  padding: 8px;
}

tr:nth-child(even){background-color: #f2f2f2;}

tr:hover {background-color: #ddd;}

th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: red;
  color: white;
}

td{
    text-align: left;
}

/* ///////////////////// RESPONSIVE ///////////////////////*/

/* Small screens adjustment */
@media (max-width: 600px) {
  main, article {
    padding: 0.5rem;
  }
}

/* ///////////////////// FOOTER ///////////////////////*/

footer{
    text-align: left;
    margin: 3rem 0 5rem 0;
    padding: 1rem 1.5rem;
    background-color: aliceblue;
    border-radius: 10px;
}

/* ///////////////////// INDEX ///////////////////////*/

#category-filters{
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 1rem 0 0 0;
}

.label{
    margin: 0 1rem 0 0.6rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

#posts-list{
    padding: 0!important;
    margin: 0!important;
}

#posts-list li{
    margin: 1rem!important;
}
