
:root {
  --header-bg: url('images/header01.jpg');
  --site-bg: url("images/background2.png");
  --select-color: #794c4c;
  --link-color: #e6cccc;
  --bg-color: #000000;
  --bg-color2: #e6cccc;
  --text-color: #450000;
  --border-color: #450000;
  --post-header-color: #450000;
  --post-shadow-color: #21569760;
  --outline-color: #450000;
  --outline-color2: #000000;
}

* {
  box-sizing: border-box;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

::selection {
  background: var(--select-color);
  color: var(--border-color);
}



body {
  background: url("images/background2.png") repeat-y top center;
  background-size: 100% auto;
  margin: 0 auto;
  font-size: 14px;
  color: var(--text-color);
}

p { line-height: 1.5em; }

h1 {
    font-size: 1.5em;
    color: var(--post-header-color);
  
}

h4, h5, h6 {
  color: var(--border-color);
}

/* Layout */

#content {
  display: flex;
  max-width: 960px;
  margin: 0 auto;
}

main {
  flex: 1;
  order: 1;
  margin: 1em;
}

/* Header */
header {
  position: relative;
  height: 270px; /* חשוב! אחרת הכל קורס */
  overflow: hidden;
}

.bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;        
  height: auto;
   border: #450000;
   border: 5px solid;
   border-radius: 7px;
  z-index: 2;
}

.top-nav {
  position: absolute;
 bottom: 5px;
   right: 50%;
  transform: translateX(453px); 
  flex-direction: row-reverse;
  gap: 10px;
 z-index: 3;
}


nav {
height: 50px;
max-width: 930px;
margin: 0 auto;
line-height: 3rem;
padding-left: 0%;
display: flex;
flex-direction: row-reverse;
background: var(--bg-color2);
 border: 2px solid var(--border-color);
  border-radius: 7px;
  margin-bottom: 1em;
  margin-top: 1em;
}

.button {
  max-height: 40px;
  min-width: 100px;
  max-width: 200px;
  padding: 10px;
 font-weight: bold;
  background-color: var(--bg-color);
  text-decoration: none;
color: var(--bg-color2);
  border: 4px double var(--bg-color);
margin: 5px;
display: flex;
  align-items: center;    
  justify-content: center; 

}




nav> a:hover {
  color: var(--accent-color);
  background-color: var(--select-color);
  border: 4px double var(--outline-color);
}


#sidebar {
  width: 320px;
  flex-shrink: 0;
  order: 2;
  margin: 1em 2em 1em 0;
  padding-top: 15px;
  background-color: var(--bg-color2);
  color: var(--border-color);
  border-radius: 7px;
  direction: rtl;
  text-align: right;
  border: 2px solid var(--border-color);
  margin-bottom: 1em;
  box-shadow: var(--post-shadow-color) 5px 5px;
  height: fit-content;
  align-self: flex-start;
}

.small-box {
    margin: 20px;
  padding: 12px 15px;
  background: var(--bg-color);
  border: 4px double var(--bg-color2);
  border-radius: 7px;

  align-self: stretch;
  box-sizing: border-box;
}

#avatar {
  max-width: 250px;   
  margin: 20px auto 0 auto;    
  display: flex;
  justify-content: center;
}

#avatar img {
  width: 100%;      
  height: auto;
  display: block;
  border: 5px double #450000;
}


#bio {
  color: var(--bg-color2);
  margin: 20px;
  padding: .2em;
  background: var(--bg-color);
  border: 4px double var(--bg-color2);
  border-radius: 7px;
  font-size: small;
}

#bio p {
  margin: 1em;
}

/* Posts */

article {
  background-color: var(--bg-color2);
  padding: 1em;
  border: 2px solid var(--border-color);
  border-radius: 7px;
  margin-bottom: 1em;
  box-shadow: var(--post-shadow-color) 5px 5px;
 
}

article img {
  max-width: 100%;
}

article a {
  color: var(--bg-color);
  text-decoration: underline;
}

article > a:hover {
  color: var(--link-color);
  text-decoration: underline;
}

.page-header {
  font-size: 16px;
  text-align: center;
  border: 5px solid #450000;
  border-radius: 7px;
  direction: rtl;
}
.page-header h1 {
  font-size: 25px;
  margin-top: 10px;
}

.post {
  direction: rtl;
  text-align: right;
 
}

.post-header {
  color: var(--border-color);
  font-weight: bold;
  padding: .5rem 0;
  border-bottom: 4px double var(--outline-color);
}

.timestamp {
  font-size: smaller;
  float: right;
}

.special-title {
  color: #450000;
}


.post img {
  height: auto;
  display: block;
  margin: auto;
  border: 3px solid #450000;
  border-radius: 7px;
  margin-bottom: 10px;
}

/* Top post */
#top {
  border: #450000 solid 7px;
  border-radius: 7px;
}

#top h1 {
  color: #450000;
}

#top section {
  background-color: var(--bg-color2);
  padding: .2em 1em;
  width: fit-content;
  direction: rtl;
  text-align: right;
  color: #450000;
}

/* Read more */

details > summary {
  cursor: pointer;
}

.readmore summary {
  font-weight: bold;
  color: var(--border-color);
  list-style: none;
  margin-bottom: 10px;
}

.readmore summary a {
  text-decoration: underline;
}

.readmore summary::-webkit-details-marker {
  display: none;
}

.readmore[open] > summary {
  border-bottom: 2px dashed var(--bg-color);
  padding-bottom: .6em;
  margin-bottom: .6em;
}

.readmore a {
  font-weight: bold;
  color: var(--border-color);
  text-decoration: none;
}

.readmore a:hover {
  color: var(--select-color);
}

/* Comments */

.comments-section {
  background: var(--bg-color2);
  direction: rtl;
  text-align: right;
}

.comments-section h2 {
  color: var(--border-color);
  margin-bottom: 0;
}

.comments-note {
  font-size: 10px;
  margin-bottom: 1em;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 6px;
  border-radius: 7px;
  border: 1px solid var(--border-color);
  margin-bottom: 5px;
}

.comment-form textarea {
  min-height: 100px;
  resize: vertical;
}

.comment-form button {
  padding: 6px 12px;
  border: 4px solid var(--outline-color);
  background: var(--bg-color);
  color: #d9a5a5;
  cursor: pointer;
}

.comment-form button:hover {
  color: var(--accent-color);
  background-color: var(--select-color);
}

.checkbox-label {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.checkbox-label input {
  width: auto;
  margin: 0;
}

/* Comment list */

.comments-list {
  margin-top: 2em;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.comment {
  background: var(--bg-color2);
  border: 2px solid var(--border-color);
  border-radius: 7px;
  padding: 10px;
  margin-bottom: 20px;
}

.comment-header {
  font-weight: bold;
  margin-bottom: 5px;
}

.comment-date {
  font-size: 0.8em;
  margin-left: 10px;
}

.comment-body {
  line-height: 1.4em;
}

.comment-to {
  background: var(--bg-color2);
  border: 2px solid var(--border-color);
  border-radius: 7px;
  padding: 10px;
  margin-bottom: 20px;
  margin-right:100px;
}

/* Misc */

.center { text-align: center; }

.small-text {
  font-size: 11px;
}

.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

footer {
  text-align: center;
  font-size: small;
  padding: .5em;
  background: var(--bg-color2);
}
.only-picture {
  background: none;
  border: none;
  box-shadow: none;
}
.only-picture img{
   border: 3px solid #450000;
   border-radius: 7px;
    box-shadow: var(--post-shadow-color) 5px 5px;
}

.sidebar-header {
 text-align: center;
}

.sidebar-text {
  margin-right: 10px;
}
/* Mobile */

@media only screen and (max-width: 800px) {
  #content {
    flex-wrap: wrap;
  }

  #sidebar {
    width: 100%;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 0;
  }

  header {
    height: 180px;
  }

  .overlay {
    top: 40%;
    width: 80%;
    max-width: 300px;
  }

  .top-nav {
    direction: rtl;
    bottom: 5px;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center;
  }

  nav {
    height: auto;
    justify-content: center;
    padding: 5px;
  }

  .button {
    white-space: nowrap;
    width: auto;
    max-height: 30px;
    padding: 5px;
    font-size: 0.7em;
  }

  #bio {
    width: 50%;
  }

  #sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
  }
}