:root {
    --primary: #43477e;
    --dark-primary: #17233d;
    --light-primary: #43477e;
    --details: #51aee6;
    
    --text: white;
    --dark-text: black;
}
.main {
    margin: 0 auto;
    max-width: auto; /* Set a specific max-width for better control */
}
.columns {
    display: flex;
    flex-wrap: wrap;
}
.column {
    flex: 1;
    margin-bottom: 20px;
}

.back-btn {
    color: var(--text);
    text-decoration: none;
}

.article {
    color: var(--text);
    display: flex;
    flex-direction: column;
    margin: 20px;
    text-decoration: none;
    width: 50%;
}

html[lang="ar"] .article {
    background-image: linear-gradient(290deg, var(--dark-primary) 0%, var(--primary) 60%, var(--details) 100%);
}

html[lang="en"] .article {
    background-image: linear-gradient(-290deg, var(--dark-primary) 0%, var(--primary) 60%, var(--details) 100%);
}

.article-title {
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1.5;
    font-weight: 500;
}
.article-content {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.5;
    text-transform: capitalize;
}
.article-info {
    font-size: 0.85em;
    justify-content: space-between;
    margin-top: 10px;
}

.article-tag {
    color: var(--details);
    font-size: 15px;
    opacity: 1 !important;
    background-color: none;
    border: 1px solid var(--details);
    border-radius: 5px;
    padding-top: 0;
    padding-bottom: 0;
    margin-right: 3px;
}

.article-authers {
    color: var(--text);
    text-decoration: none;
    text-transform: capitalize;
}

.article-auther {
    color: var(--details);
    text-decoration: none;
    text-transform: capitalize;
}

.article-image {
    background: var(--primary-ldark);
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.article-image img {
    display: block;
    object-fit: cover; /* Maintain aspect ratio for images */
    width: 100%;
    height: 100%;
    transition: transform 0.3s;
}

.article:hover img{
    transform: scale(1.1);
}

.article-image.is-16by9 {
    padding-top: 56.25%;
}
.article-body {
    flex: 1;
    padding: 20px;
}
@media (max-width: 767px) {
    .column {
      flex-basis: 100%;
      margin-bottom: 0px;
    }

    .article {
        margin: 0 10px 20px 10px; /* Adjust margins for better spacing */
    }
}

@media (max-width: 1000px) {
    .article {
        width: 95%;
    }
}

.underline-animation {
    color: var(--text) !important;
    display: inline-block;
    position: relative;
}
.underline-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--details);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}
.underline-animation:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
    color: var(--details);
}
/* Post page */
.post_main {
    color: var(--text);
    font-size: larger;
}
.post_title {
    font-weight: bold;
}
.post_snippet {
    opacity: 0.7;
}
.post_date {
    opacity: 0.7; 
}
.post_tag {
    color: var(--details) !important;
    border-right: 2px solid rgba(135, 128, 128, 0.5);
    padding-top: 0;
    padding-bottom: 0;
}

@media (min-width: 576px) {
    .post_info {
        padding-left: 15%;
        padding-right: 15%;
    }
}

.post_thumb {
    background: var(--dark-primary);
    position: relative;
    width: 100%;
    height: 40%;
    overflow: hidden;
}

@media (max-width: 800px) {
    .post_thumb {
        width: 100%;
        height: 20%;
        
    }
}

.post_thumb img {
    display: block;
    object-fit: cover; /* Maintain aspect ratio for images */
    width: 100%;
    height: 100%;
    transition: transform 0.3s;
}

.post_thumb:hover img{
    transform: scale(1.1);
}

.inline_code {
    color: var(--details);
}

.post_link {
    color: var(--details);
    text-decoration: none;
    display: block;
    opacity: 0.7;
}

.post_link:hover {
    opacity: 1;
}

/* Add line numbers to code block */
code {
    border-radius: 5px;
}
.hljs-ln-numbers {
    background-color: #2e2e2e;
}
.hljs-ln-code {
    padding-left: 10px !important;
}

@media (min-width:576px) {
    .dropdown-menu {
        display: block;
        opacity: 0;
        transition: all .2s
    }

    .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        opacity: 1
    }

    .dropdown .dropdown-toggle:active {
        pointer-events: none
    }
}

.dropdown:hover .dropdown-menu {
    background-color: var(--dark-primary)
}

.dropdown:hover .dropdown-toggle {
    color: var(--details) !important;
}

.dropdown-item {
    color: var(--text) !important
}

.dropdown-item:hover {
    background-color: var(--dark-primary) !important;
    color: var(--details) !important;
}

/* Post Content */
.post_body h1 {
    font-size: 2rem; /* Smaller h1 */
    margin-top: 1.5em;
    margin-bottom: 0.7em;
    line-height: 1.2;
}
  
.post_body h2 {
    font-size: 1.6rem;
    margin-top: 1.3em;
    margin-bottom: 0.6em;
}

.post_body h3 {
    font-size: 1.3rem;
    margin-top: 1.1em;
    margin-bottom: 0.5em;
}

.post_body h4,
.post_body h5,
.post_body h6 {
    font-size: 1.1rem;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

/* Paragraph styling */
.post_body p {
    margin-bottom: 1em;
}

/* List styling */
.post_body ul,
.post_body ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.post_body li {
    margin-bottom: 0.5em;
}

/* Block quotes */
.post_body blockquote {
    border-left: 4px solid #e7e7e7;
    padding-left: 1em;
    margin-left: 0;
    color: #666;
    font-style: italic;
}

/* Tables */
.post_body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.post_body th,
.post_body td {
    padding: 0.5em;
    border: 1px solid #ddd;
    text-align: left;
}

.post_body th {
    background-color: #f8f8f8;
    font-weight: bold;
}

/* Horizontal rule */
.post_body hr {
    border: 0;
    height: 1px;
    background: #e7e7e7;
    margin: 2em 0;
}
  
/* Responsive adjustments */
@media (max-width: 768px) {
    .post_body {
        padding: 15px;
    }

    .post_body h1 {
        font-size: 1.8rem;
    }

    .post_body h2 {
        font-size: 1.4rem;
    }

    .post_body h3 {
        font-size: 1.2rem;
    }
}