@font-face {
    font-family: 'AltMono';
    src: url("/media/AltMono.otf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'etw';
    src: url("/media/etw.ttf") format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* Apply global styling */
body, html {
    margin: 0;
    padding: 0;
    color: #fff;
    overflow: hidden;
}

.blogLand{
  width: 80%;
}

.title{
  display: block;
  position: absolute;
  width: 100%;
  height: 3vh;
  text-align: center;
  top: 4vh;

}


.blogList{
  display: flex;
  flex-direction: column;
  position : absolute;
  width: 20vw;
  height: 100vh;
  top: 15vh;
  right: 2vw;

}


.blogLister{
  padding-right: 25vw;
  border-bottom: solid white 2px;
}

.blogPage {
    display: flex;
    width: 80vw;
    min-height: 80vh;
    position: absolute;
    top: 14vh; /* Align with your navbar */
    left: 50%;
    transform: translateX(-50%);
    gap: 1rem;
}

.blogSidebar {
    width: 20%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1px);
    padding: 1rem;
    border-radius: 20px;
    height: fit-content;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
}

.filterSection {
    margin-bottom: 1rem;
}

.filterSection h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.filterSection select {
    width: 100%;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 5px;
    color: #fff;
}

.tagCloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.tag:hover, .tag.active {
    background: rgba(255, 255, 255, 0.2);
}

.blogContent {
    width: 80%;
}

.blogGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.postCard {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1px);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
}

.postCard:hover {
    transform: translateY(-5px);
}

.postImage {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.postImage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.postInfo {
    padding: 1rem;
}

.postMeta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #ccc;
}

.postTitle {
    margin-bottom: 1rem;
}

.postTitle a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
}

.postExcerpt {
    color: #ccc;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.postFooter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse;
}

.postTags {
    display: flex;
    gap: 0.5rem;
}

.readMore {
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.readMore:hover {
    transform: translateX(5px);
}

.postStats{
  display: flex;
    justify-content: space-around;
    width: 30%;
}

.statItem{
  display: flex;
  width: 15px;
  height: 15px;
}

.statItem img {
  margin-right: 5px;
}

.postDetailPage {
    position: absolute;
    top: 15%;
    width: 60%;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 20%);
    border-radius: 10px;
}

.coverImage {
    width: 100%;
    height: 20vh;
    overflow: hidden;
    margin-bottom: 1rem;
}

.coverImage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
}

.stats{
  position: fixed;
  width: 50px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  bottom: 20px;
  right: 20px;
}

.stats span{
  background-color: rgba(0, 0, 0, 0.4);
  padding: 5px;
  border-radius: 0 5px 5px 0;
  border-left: solid white 1px;
}

.backButton{
  position: fixed;
  background-color: transparent;
  border: none;
  left: 17vw;
  top: 16vh;
}

.backButton img{
  width: 35px;
}

.likeButton{
  background: transparent;
  border: none;
}

.likeButton img{
  width: 20px;
  height: 20px;
}

.commentSection h3{
  text-align: center;
}

.commentSection form{
  display: flex;
  flex-direction:column ;
  justify-content: space-around;
  align-items: center;

}

.commentForm{
  width: 50%;
  margin: 0 25%;
  border-radius: 10px;
}

.commentForm textarea {
  width: 100%;
  flex-basis: ;
  color: white;
  background-color: rgba(0, 0, 0, 0.4);
  border-collapse: collapse;
  border: none;
  padding: 0;
}

.commentForm button {
  width: 100%;
  height: 30px;
    color: white;
    border: none;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0 0 10px 10px;
    padding: 0;
    border-top: solid white 1px;
    cursor: pointer;
}

.postHeader h1{
  text-align: center;
  font-size: 1.8em;
}

.postContent{
  margin-bottom: 2%;
}

.postDetail{
  background-color: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
  max-height: calc(100vh - 20%);
}

.postFormPage {
    position: absolute;
    top: 14vh;
    width: 80%;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem;
}

.postForm {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1px);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
}

.formSection {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.titleSection input {
    width: 100%;
    font-size: 1.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 5px;
    color: #fff;
}

.metaSection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.formField {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.formField select {
    width: 100%;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 5px;
    color: #fff;
}

.imageUpload {
    position: relative;
    width: 100%;
    height: 200px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.imageUpload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview.has-image {
    opacity: 1;
}

.excerptSection textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 5px;
    color: #fff;
    resize: vertical;
}

.editorSection {
    margin-bottom: 1rem;
}

.formActions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.publishToggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buttons {
    display: flex;
    gap: 0.5rem;
}

.buttons button {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.saveButton {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
}

.publishButton {
    background: #474747;
    color: #fff;
}

.buttons button:hover {
    transform: translateY(-2px);
}

/* New Post Button */
.newPostBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 900;
}

.newPostBtn img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.newPostBtn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.newPostBtn:hover img {
    transform: rotate(90deg);
}

/* Modal Form Specific Styles */
.modal .postForm {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal .formGroup {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal label {
    color: #fff;
    font-size: 0.9rem;
}

.modal input[type="text"],
.modal input[type="file"],
.modal select,
.modal textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 0.8rem;
    color: #fff;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.modal input[type="text"]:focus,
.modal select:focus,
.modal textarea:focus {
    border-color: rgba(255, 255, 255, 0.5);
    outline: none;
}

.modal .imagePreview {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

.droptitle {
  margin-top:0 ;
}

.modal .imagePreview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal .dropZone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal .dropZone:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.modal .formActions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.modal .btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal .btnDraft {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal .btnPublish {
    background: #4CAF50;
    color: #fff;
}

.modal .btnDraft:hover,
.modal .btnPublish:hover {
    transform: translateY(-2px);
}

.loginPlaceHolder{
  position: absolute;
  bottom: 10px;
  width: 99%;
  text-align: center;
}

.loginPlaceHolder a{
  text-decoration: none;
  color: white;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 5px;
}













/* Mobile-specific styles */
@media (max-width: 768px) {
    .blogPage {
        flex-direction: column;
        width: 100%;
        padding: 1rem;
    }

    .blogSidebar {
        display: none;
        width: 100%;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .blogSidebar.active {
        display: block;
    }

    .sidebarToggle {
        display: none;
        position: fixed;
        top: 1rem;
        left: 1rem;
        background: rgba(0, 0, 0, 0.8);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        z-index: 1000;
    }

    .sidebarToggle img {
        width: 24px;
        height: 24px;
    }

    .blogContent {
        width: 100%;
    }

    .blogGrid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .postCard {
        margin-bottom: 1rem;
    }

    .postImage {
        height: 150px;
    }

    .postFooter {
        flex-direction: column;
        align-items: flex-start;
    }

    .postStats {
        justify-content: space-between;
        width: 100%;
    }

    .postTags {
        margin-top: 0.5rem;
    }

    .readMore {
        margin-top: 0.5rem;
    }

    .newPostBtn {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }

    .newPostBtn img {
        width: 20px;
        height: 20px;
    }
}










@media (max-width: 900px) {
    .blogPage {
        flex-direction: column;
        width: 90vw;
        height: 100vh;
        top: 0;
    }

    .blogSidebar, .blogContent {
        width: 100%;
    }

    .blogGrid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced navigation interactions */
html {
    scroll-behavior: smooth;
}

.section-nav a {
    transition: background-color 0.3s, transform 0.3s;
}

.section-nav a:hover,
.section-nav a.active {
    transform: translateY(-2px);
}

.section-link {
    transition: background-color 0.3s, transform 0.3s;
}

.section-link:hover {
    transform: translateY(-2px);
}
