@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900&display=swap');
:root{
  --color-1: #0f1016;
  --text-color: #f0f0f0;
  --accent-color: #006aff;
}
*{
  margin: 0;
  padding: 0;
}

html{
  font-size: 12pt;
  font-family: Poppins, Segoe UI, Tahoma, sans-serif;
}
nav{
  height: 60px;
  background-color: var(--color-1);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.links-container{
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
}
nav a{
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
}
nav a:hover{
  background-color: var(--accent-color);
}
nav .home-link{
  margin-right: auto;
}
nav svg{
  fill: var(--text-color);
}
#sidebar-active{
  display: none;
}
.open-sidebar-button, .close-sidebar-button{
  display: none;
}
@media(max-width: 450px){
  .links-container{
    flex-direction: column;
    align-items: flex-start;

    position: fixed;
    top: 0;
    right: -100%;
    z-index: 10;
    width: 200px;

    background-color: var(--color-1);
    box-shadow: -5px 0 5px rgba(0, 0, 0, 0.25);
    transition: 0.75s ease-out;
  }
  nav a{
    box-sizing: border-box;
    height: auto;
    width: 100%;
    padding: 20px 30px;
    justify-content: flex-start;
  }
  .open-sidebar-button, .close-sidebar-button{
    padding: 20px;
    display: block;
  }
  #sidebar-active:checked ~ .links-container{
    right: 0;
  }
  #sidebar-active:checked ~ #overlay{
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9;
  }
}

/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
/* General wrapper styling */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
/* Styling for the header */
header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    margin-bottom: 10px;
    font-size: 2.5em;
    color: #333;
}

/* Styling for the search bar */
#search-bar {
    width: 80%;
    max-width: 600px;
    padding: 10px 15px;
    margin: 0 auto;
    display: block;
    font-size: 1em;
    border: 2px solid #ccc;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s, background-color 0.3s;
}

#search-bar:focus {
    border-color: #007BFF;
    background-color: #e9f5ff;
}
/* Header Styles */
header {
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    color: #fff;
    text-align: center;
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
}

/* Main Content Styles */
main {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Post Styles */
.post {
    background: linear-gradient(to bottom, #ffffff, #f1f1f1);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.post img {
    width: 100%;
    border-radius: 8px;
}

.post h2 {
    margin-top: 1rem;
    font-size: 1.75rem;
    color: #333;
}

.post p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    max-height: 4.8rem; /* Limit to 3 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    transition: max-height 0.3s ease;
}

.post p.expanded {
    max-height: none;
}

.post a {
    display: inline-block;
    margin-top: 1rem;
    color: #2575fc;
    text-decoration: none;
    font-weight: bold;
}

.post a:hover {
    text-decoration: underline;
}

/* Adding Color to Post Text */
.post h2 {
    color: #6a11cb;
}

.post p {
    color: #444;
}
.toggle-button {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #2575fc;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
}

.toggle-button:hover {
    background-color: #1b5bbd;
}

.toggle-button:active {
    transform: scale(0.95);
}

.toggle-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.5);
}
/* Footer Styles */
footer {
    background: linear-gradient(45deg, #2575fc, #6a11cb);
    color: #fff;
    text-align: center;
    padding: 1.5rem 0;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    main {
        padding: 1rem;
        grid-template-columns: repeat(2, 1fr);
    }

    header {
        padding: 1rem 0;
    }

    footer {
        padding: 1rem 0;
    }

    .post {
        padding: 1rem;
    }

    .post h2 {
        font-size: 1.5rem;
    }

    .post p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.5rem;
        grid-template-columns: 1fr;
    }

    header {
        padding: 0.5rem 0;
    }

    footer {
        padding: 0.5rem 0;
    }

    .post {
        padding: 0.5rem;
    }

    .post h2 {
        font-size: 1.25rem;
    }

    .post p {
        font-size: 0.8rem;
    }
}
