/* blogstyle.css - Custom styles for the fancy blog page */

/* Layout & Container */
body {
    background: linear-gradient(135deg, #000000 0%, #18222c 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    transition: background-color 0.5s ease, color 0.5s ease;
  }
  
  .container {
    max-width: 960px;
    margin: auto;
    padding: 2rem;
    transition: all 0.3s ease-in-out;
  }
  
  /* Header */
  .blog-header {
    background: linear-gradient(120deg, rgb(32, 32, 144), rgb(0, 191, 255));
    padding: 2rem 0;
    text-align: center;
    transition: background 0.5s ease;
  }
  
  .site-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin: 0;
  }
  
  .site-subtitle {
    font-size: 1.2rem;
    color: #dcdcdc;
    margin-top: 0.5rem;
  }
  
  /* Banner */
  .blog-banner img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
  }
  
  .blog-banner img:hover {
    transform: scale(1.02);
  }
  
  /* Blog Post */
  .blog-post {
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
  }
  
  .post-title {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    transition: color 0.3s;
  }
  
  .post-meta {
    direction: ltr; /* Force left-to-right direction */
    text-align: left; /* Align text to the left */
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
  }
  
  .post-meta img.author-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
  }
  
  .post-meta .author-name {
    font-weight: bold;
    margin-right: 10px;
  }
  
  .post-meta .reading-time,
  .post-meta .post-date {
    margin-left: 10px;
    color: #777;
  }
  
  .author-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3498db;
  }
  
  .post-content p {
    text-align: justify;
    line-height: 1.7;
    margin-bottom: 1rem;
  }
  
  /* Related Articles */
  .related-articles {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #444;
    direction: ltr; /* Force left-to-right direction */
    text-align: left; /* Align text to the left */
  }
  
  .related-articles h3 {
    color: #3498db;
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    direction: ltr; /* Ensure the grid layout remains left-to-right */
  }
  
  .related-snap {
    background-color: #2b2b2b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
  }
  
  .related-snap:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
  }
  
  .related-snap img {
    width: 100%;
    height: 140px;
    object-fit: cover;
  }
  
  .related-snap-content {
    padding: 1rem;
  }
  
  .related-snap-title {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
  }
  
  .related-snap-meta {
    font-size: 0.72rem;
    color: #aaa;
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
  
  .related-snap-meta img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #00acee;
  }
  
  /* Prevent text underline in related articles */
  .related-articles a {
    text-decoration: none;
  }
  
  /* Set text color to white for thumbnails */

  /* Footer */
  .blog-footer {
    background-color  : linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    color: #777;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
  }
  .language-selector-container {
    text-align: center; /* Center the buttons */
    direction: ltr; /* Keep the direction left-to-right regardless of page direction */
    margin-bottom: 20px; /* Add spacing below the buttons */
  }

  /* Language Selector Buttons */
  .lang-btn {
    background-color: #007bff; /* Primary blue color */
    color: #fff; /* White text */
    border: none; /* Remove default border */
    border-radius: 5px; /* Rounded corners */
    padding: 10px 20px; /* Add padding for better appearance */
    margin: 0 5px; /* Add spacing between buttons */
    font-size: 16px; /* Increase font size */
    cursor: pointer; /* Change cursor to pointer for better UX */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth hover effect */
  }

  /* Hover Effect for Buttons */
  .lang-btn:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: scale(1.05); /* Slightly enlarge button on hover */
  }

  /* Active Button Style */
  .lang-btn.active {
    background-color: #28a745; /* Green color for active button */
    color: #fff; /* White text */
  }

  .back-button-container {
    margin: 20px 0;
    text-align: left; /* Align the button to the right */
  }
  
  .back-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
  }
  
  .back-button:hover {
    background-color: #0056b3;
  }

/* Responsive Design */

/* General Container Adjustments */
@media (max-width: 768px) {
  .container {
    padding: 1rem; /* Reduce padding for smaller screens */
  }

  .blog-header {
    padding: 1.5rem 0; /* Adjust header padding */
  }

  .site-title {
    font-size: 2rem; /* Reduce title font size */
  }

  .site-subtitle {
    font-size: 1rem; /* Reduce subtitle font size */
  }
}

/* Blog Banner */
@media (max-width: 768px) {
  .blog-banner img {
    border-radius: 12px; /* Slightly smaller border radius */
  }
}

/* Blog Post */
@media (max-width: 768px) {
  .blog-post {
    padding: 1.5rem; /* Reduce padding for smaller screens */
  }

  .post-title {
    font-size: 1.8rem; /* Adjust title font size */
  }

  .post-meta {
    flex-direction: column; /* Stack meta information vertically */
    align-items: flex-start; /* Align items to the start */
  }

  .post-meta img.author-img {
    margin-bottom: 10px; /* Add spacing below the avatar */
  }

  .post-meta .author-name,
  .post-meta .reading-time,
  .post-meta .post-date {
    margin-left: 0; /* Remove left margin */
  }
}

/* Related Articles */
@media (max-width: 768px) {
  .related-articles-grid {
    grid-template-columns: 1fr; /* Single column layout for smaller screens */
    gap: 1rem; /* Adjust gap between articles */
  }

  .related-snap img {
    height: 120px; /* Adjust thumbnail height */
  }

  .related-snap-title {
    font-size: 1rem; /* Adjust title font size */
  }

  .related-snap-meta {
    font-size: 0.8rem; /* Adjust meta font size */
  }
}

/* Related Articles - Responsive Design */
@media (max-width: 768px) {
  .related-articles-grid {
    grid-template-columns: 1fr; /* Single column layout for smaller screens */
    gap: 1rem; /* Adjust gap between articles */
  }

  .related-snap {
    flex-direction: column; /* Stack content vertically */
    text-align: center; /* Center-align content for smaller screens */
  }

  .related-snap img {
    height: auto; /* Allow images to scale naturally */
    max-width: 100%; /* Ensure images don't overflow */
    margin-bottom: 10px; /* Add spacing below images */
  }

  .related-snap-content {
    padding: 0.5rem; /* Reduce padding for smaller screens */
  }

  .related-snap-title {
    font-size: 1rem; /* Adjust title font size */
    margin-bottom: 0.5rem; /* Add spacing below the title */
  }

  .related-snap-meta {
    font-size: 0.85rem; /* Adjust meta font size */
    flex-direction: column; /* Stack meta information vertically */
    align-items: center; /* Center-align meta information */
    gap: 0.3rem; /* Add spacing between meta items */
  }

  .related-snap-meta img {
    margin-bottom: 5px; /* Add spacing below the avatar */
  }
}

/* Related Articles - Responsive Design */
@media (max-width: 768px) {
  .related-snap-meta {
    display: flex; /* Use flexbox for layout */
    flex-direction: row; /* Arrange items in a row */
    align-items: center; /* Vertically align items */
    justify-content: flex-start; /* Align items to the left */
    gap: 0.5rem; /* Add spacing between items */
    text-align: left; /* Ensure text is aligned to the left */
  }

  .related-snap-meta img {
    margin-bottom: 0; /* Remove bottom margin for the avatar */
  }
}

/* Language Selector */
@media (max-width: 768px) {
  .language-selector-container {
    margin-bottom: 15px; /* Adjust spacing below buttons */
  }

  .lang-btn {
    padding: 8px 15px; /* Adjust button padding */
    font-size: 14px; /* Adjust font size */
  }
}

/* Footer */
@media (max-width: 768px) {
  .blog-footer {
    font-size: 0.8rem; /* Adjust footer font size */
    padding: 1rem 0; /* Adjust footer padding */
  }
}