/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================ 
   ✅ Readability Enhancements
   ============================ */

/* Paragraph and body refinement */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  word-spacing: 0.05em;
  letter-spacing: 0.02em;
}

/* Refined spacing for paragraphs */
p:not(.author-box p) {
  margin-bottom: 1.25em;
}

h1 {
  font-size: 1.5rem; /* ~24px */
  font-weight: bold;
  color: #111;
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.375rem; /* ~22px */
  font-weight: bold;
  color: #222;
  line-height: 1.35;
  margin-top: 1.4rem;
  margin-bottom: 0.7rem;
}

h3 {
  font-size: 1.25rem; /* ~20px */
  font-weight: bold;
  color: #333;
  line-height: 1.4;
  margin-top: 1.3rem;
  margin-bottom: 0.65rem;
}

h4 {
  font-size: 1.125rem; /* ~18px */
  font-weight: 600;
  color: #444;
  line-height: 1.45;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
}

h5 {
  font-size: 1rem; /* ~16px */
  font-weight: 600;
  color: #555;
  line-height: 1.5;
  margin-top: 1.1rem;
  margin-bottom: 0.55rem;
}

h6 {
  font-size: 0.9375rem; /* ~15px */
  font-weight: 600;
  color: #666;
  line-height: 1.55;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}


/* HR for section breaks */
hr {
  border: none;
  border-top: 2px solid #eee;
  margin: 2rem 0;
}

/* Improve figure caption styling */
figcaption {
  line-height: 1.5;
  text-align: center;
  font-size: 0.95em;
  opacity: 0.85;
  margin: 0.5em 0 1.5em;
}

/* Link hover softness */
a {
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

/* Removed max-width limiting layout */
article, section, .main-content {
  /* Removed max-width */
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Responsive typography tweak */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.7;
  }

  p {
    margin-bottom: 1em;
  }

  h1, h2, h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }
}


.content-area {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.main-content {
  flex: 3;
  padding: 20px;
}

.sidebar {
  flex: 1;
  padding: 20px;
  background: #f1f1f1;
  min-width: 250px;
}

@media (max-width: 768px) {
  .content-area {
    flex-direction: column;
  }

  .main-content,
  .sidebar {
    width: 100%;
  }
}

/* Post Styles */
.post {
  margin-bottom: 40px;
}
.post-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.post-meta {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 10px;
}
.post-thumbnail img {
  width: 100%;
  height: auto;
  margin-bottom: 15px;
}

/* Author Box Styling */
.author-box {
    display: flex; /* Enables a flexible box layout */
    align-items: center; /* Vertically aligns items in the center */
    gap: 20px; /* Adds space between the avatar and author info */
    background-color: #f9f9f9; /* Light background for the box */
    border: 1px solid #eee; /* Subtle border */
    border-radius: 8px; /* Slightly rounded corners */
    padding: 20px; /* Internal spacing */
    margin: 30px 0; /* Vertical margin for separation from other content */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Modern, readable font stack */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Soft shadow for depth */
}

/* Author Avatar */
.author-avatar {
    flex-shrink: 0; /* Prevents the avatar from shrinking */
}

.author-avatar img {
    border-radius: 50%; /* Makes the avatar perfectly round */
    display: block; /* Removes extra space below the image */
    width: 90px; /* Sets a fixed width for the avatar */
    height: 90px; /* Sets a fixed height for the avatar */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    border: 3px solid #007bff; /* Accent color border around the avatar */
}

/* Author Information */
.author-info {
    flex-grow: 1; /* Allows the info section to take up available space */
}

.author-info h4 {
    font-size: 1.1em; /* Slightly larger heading */
    color: #555; /* Softer color for the heading */
    margin-top: 0; /* Remove default top margin */
    margin-bottom: 5px; /* Space below the heading */
    text-transform: uppercase; /* Uppercase for a modern touch */
    letter-spacing: 0.5px; /* Slight letter spacing */
}

.author-info p {
    font-size: 1em; /* Standard paragraph font size */
    line-height: 1.6; /* Comfortable line spacing */
    color: #333; /* Darker color for readability */
    margin-bottom: 10px; /* Space between paragraphs */
}

.author-info p:last-of-type {
    margin-bottom: 0; /* No bottom margin for the last paragraph */
}

.author-info strong {
    color: #007bff; /* Emphasize author name with accent color */
    font-weight: 600; /* Slightly bolder than default bold */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .author-box {
        flex-direction: column; /* Stacks items vertically on smaller screens */
        text-align: center; /* Centers text */
        padding: 15px; /* Slightly less padding */
    }

    .author-avatar img {
        width: 70px; /* Smaller avatar on mobile */
        height: 70px;
        margin-bottom: 15px; /* Space between avatar and info */
    }

    .author-info h4 {
        margin-top: 10px; /* Add some top margin when stacked */
    }

    .author-info p {
        font-size: 0.95em; /* Slightly smaller text on mobile */
    }
}

@media (max-width: 480px) {
    .author-box {
        padding: 10px; /* Even less padding on very small screens */
    }

    .author-avatar img {
        width: 60px; /* Even smaller avatar */
        height: 60px;
    }
}

/* Footer */
.site-footer {
  background-color: #f8f8f8;
  color: #555;
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid #e2e2e2;
}

/* Buttons */
.btn {
  background-color: #0073aa;
  color: #fff;
  padding: 10px 20px;
  display: inline-block;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}
.btn:hover {
  background-color: #005077;
}

/* Social share */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.share-buttons li {
  margin: 0;
}

.share-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background-color: #eee;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  transition: background-color 0.3s ease;
  white-space: nowrap; /* Keeps icon+text together */
}

.share-buttons a:hover {
  background-color: #ddd;
}

.share-buttons i {
  font-size: 1rem;
}

/* Optional: Better spacing on small screens */
@media (max-width: 480px) {
  .share-buttons {
    justify-content: flex-start;
  }
}


/* Search Box */
.search-form input[type="search"] {
  padding: 8px;
  width: 70%;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.search-form input[type="submit"] {
  padding: 8px 12px;
  border: none;
  background: #0073aa;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.search-form input[type="submit"]:hover {
  background: #005077;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 10px;
}
.pagination a,
.pagination span {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #0073aa;
}
.pagination .current {
  background: #0073aa;
  color: #fff;
  font-weight: bold;
}

/* Widget Titles */
.widget-title {
  font-size: 1.2rem;
  border-bottom: 2px solid #0073aa;
  margin-bottom: 15px;
  padding-bottom: 5px;
}

/* 404 Page */
.error-404 {
  text-align: center;
  padding: 50px;
}
.error-404 h1 {
  font-size: 4rem;
  color: #0073aa;
}
.error-404 p {
  font-size: 1.2rem;
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .content-area {
    flex-direction: column;
  }
  .main-content, .sidebar {
    flex: 1 1 100%;
  }
  .related-post {
    flex: 1 1 100%;
  }
  .main-navigation ul {
    flex-direction: column;
    align-items: center;
  }
}

.related-posts {
  margin: 40px 0;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 12px;
}

.related-posts h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #333;
  font-weight: 600;
  border-left: 4px solid #0073aa;
  padding-left: 10px;
}

.related-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}

.related-item {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 10px;
}

.related-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 10px;
}

.related-item p {
  font-size: 0.95rem;
  font-weight: 500;
  color: #444;
  line-height: 1.4;
}

.related-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
  }
}

/* General Comment Section Container */
#comments {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Comment Title */
#comments .comments-title {
    font-size: 1.75rem;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

/* Each Comment */
.comment-list li {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    padding-top: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.comment-list li:last-child {
    border-bottom: none;
}

/* Avatar Styling */
.comment-list .avatar {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

/* Comment Content */
.comment-list .comment-content {
    flex: 1;
}

.comment-list .comment-author {
    font-weight: 600;
    color: #1f2937;
}

.comment-list .comment-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

/* Reply Link */
.comment-list .reply a {
    font-size: 0.875rem;
    color: #2563eb;
    transition: color 0.2s ease;
}

.comment-list .reply a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Closed Comments Notice */
.no-comments {
    font-style: italic;
    color: #9ca3af;
}

/* Comment Form Styling */
.comment-form-container {
    margin-top: 3rem;
}

.comment-form-container h3 {
    font-size: 1.5rem;
    color: #111827;
    margin-bottom: 1rem;
}

/* Form Fields */
.comment-form-container input[type="text"],
.comment-form-container input[type="email"],
.comment-form-container input[type="url"],
.comment-form-container textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.comment-form-container input:focus,
.comment-form-container textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

/* Submit Button */
.comment-form-container .form-submit input[type="submit"],
.comment-form-container .submit {
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-form-container .form-submit input[type="submit"]:hover,
.comment-form-container .submit:hover {
    background-color: #1d4ed8;
}

/* Responsive Design */
@media (max-width: 640px) {
    .comment-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-list .avatar {
        margin-bottom: 0.5rem;
    }
}

/* ========================
   General Reset & Layout
======================== */
.main-content {
  padding: 20px; /* Default for mobile */
  max-width: 1200px;
  margin: auto;
}

@media (min-width: 768px) {
  .main-content {
    padding: 50px;
  }
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* ========================
   Post Card Styling
======================== */
.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease-in-out;
}

.post-card:hover {
  transform: translateY(-3px);
}

.post-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================
   Post Content
======================== */
.post-info {
  padding: 15px;
}

.post-titlle {
  font-size: 1.4rem;
  margin-bottom: 10px;
  font-family: 'Segoe UI', sans-serif;
}

.post-titlle a {
  text-decoration: none;
  color: #333;
}

.post-titlle a:hover {
  color: #0073aa;
}

.post-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 12px;
}

.post-meta span {
  margin-right: 10px;
}

/* ========================
   Excerpt + Button
======================== */
.post-excerpt {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 15px;
}

.read-more-btn {
  display: inline-block;
  background-color: #0073aa;
  color: #fff;
  padding: 8px 14px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.read-more-btn:hover {
  background-color: #005177;
}

/* ========================
   Mobile View
======================== */
@media (max-width: 767px) {
  .post-grid {
    display: block;
  }

  .post-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
  }

  .post-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  overflow: hidden;
  border-radius: 6px;
  margin-right: 10px;
}

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

  .post-info {
    padding: 0;
    flex: 1;
  }

.post-titlle {
  font-size: 1rem;
  color: black; /* Sets the default link color to black */
}

/* To ensure it stays black on hover, visited, and active states: */
.post-titlle a:link,
.post-titlle a:visited,
.post-titlle a:hover,
.post-titlle a:active {
  color: black;
}

  /* In mobile view, hide meta/excerpt on homepage and archives ONLY */
body:is(.home, .archive, .search) .post-meta,
body:is(.home, .archive, .search) .post-excerpt,
body:is(.home, .archive, .search) .read-more-btn {
  display: none;
}
}

.custom-header { font-family: sans-serif; }
  .top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #000;
    color: white;
  }
  .menu-toggle, .search-toggle {
    font-size: 24px;
    cursor: pointer;
  }
  .site-logo { text-align: center; }
  .logo-img { height: 40px; width: auto; }
  .search-box {
    display: none;
    padding: 10px;
    background: #f9f9f9;
  }
  .search-box input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
  }
  
  .bottom-nav {
    overflow-x: auto;
    white-space: nowrap;
    background: #fff;
    border-top: 1px solid #ccc;
  }
  .bottom-nav .menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
  }
  .bottom-nav .menu-items li {
    display: inline-block;
  }
  .bottom-nav .menu-items li a {
    display: block;
    padding: 10px 6px;
    color: #000;
    text-decoration: none;
    font-weight: bold;
  }
  
/* ✅ Hide only on desktop (screen wider than 768px) */
@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }
}
  
/* ========== HAMBURGER (Mobile Only) ========== */
.menu-toggle {
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  display: block;
}

/* ========== SIDEBAR MENU (Mobile Only) ========== */
.sidebarr {
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100%;
  background: #333;
  color: white;
  padding: 20px;
  transition: left 0.3s ease;
  z-index: 9999;
}

.sidebarr.active {
  left: 0;
}

.close-sidebarr {
  font-size: 30px;
  text-align: right;
  cursor: pointer;
  margin-bottom: 20px;
}

.sidebarr-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebarr-menu li a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 10px 0;
}

/* ========== DESKTOP NAVIGATION (768px+) ========== */
.desktop-menu {
  display: none; /* hidden by default */
  background: #333;
}

@media (min-width: 768px) {
  .desktop-menu {
    display: block;
  }

  .desktop-nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 15px 0;
  }

  /* Top-level parent links */
  .desktop-nav-menu > li > a {
    display: inline-block;
    color: #fff;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    background-color: #2a2a2a;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
  }

  .desktop-nav-menu > li > a:hover {
    background-color: #444;
    color: #ffd700; /* optional: gold accent */
  }

  /* Show dropdown submenu on hover */
  .desktop-nav-menu li {
    position: relative;
  }

  .desktop-nav-menu li:hover > .sub-menu {
    display: block;
  }

  /* Dropdown menu styles */
  .desktop-nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #1f1f1f;
    border-radius: 6px;
    padding: 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 1000;
  }

  .desktop-nav-menu .sub-menu li {
    width: 100%;
  }

  .desktop-nav-menu .sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease, color 0.3s ease;
  }

  .desktop-nav-menu .sub-menu li a:hover {
    background: #333;
    color: #fff;
  }

  /* Optional caret */
  .desktop-nav-menu .menu-item-has-children > a::after {
    content: " ▼";
    font-size: 10px;
    margin-left: 6px;
    color: #999;
  }

  /* Hide sidebar and hamburger on desktop */
  .sidebarr,
  .menu-toggle {
    display: none;
  }
}

  figure {
  margin: 1.5em 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

figcaption {
  font-size: 0.95em;
  color: #555;
  margin-top: 0.5em;
  font-style: italic;
}

.breadcrumb {
  font-size: 0.9em;
  margin-bottom: 1.5em;
  color: #666;
}
.breadcrumb a {
  color: #0073aa;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
