/* ====== GLOBAL STYLES ====== */
/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #000;
  --secondary-color: #333;
  --text-color: #333;
  --light-text: #666;
  --bg-color: #fff;
  --light-bg: #f9f9f9;
  --border-color: #eee;
  --accent-color: #000;
  --white: #fff;
  --black: #000;
  --transition: all 0.3s ease;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

/* Container for centered content */
.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
}

/* Responsive container widths */
@media (min-width: 640px) {
  .container {
    max-width: 640px;
    padding: 0 1.5rem;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
    padding: 0 2rem;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1400px;
  }
}

/* logo */

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 0; /* reduce top & bottom space */
  height: 7.5rem; /* ensures it wraps the image */
}

.logo {
  max-width: 100%;
  height: auto;
  width: 200px; /* increase image size as needed */
  display: block;
  
}

/* ====== BLOG TITLE SECTION ====== */
.blog-title {
  text-align: center;
  font-family: "Rubik", sans-serif;
  font-style: normal;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0.5rem 0;
  color: var(--black);
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .blog-title {
    font-size: 2rem;
    margin: 1.25rem 0;
  }
}

@media (min-width: 1024px) {
  .blog-title {
    font-size: 2.5rem;
    margin: 1.875rem 0;
  }
}

/* ====== NAVIGATION BAR ====== */
.navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem 0;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.navbar a {
  margin: 0.5rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  transition: var(--transition);
}

.navbar a:hover {
  color: var(--black);
}

@media (min-width: 768px) {
  .navbar a {
    margin: 0 1rem;
    font-size: 0.875rem;
  }
}
/* loading animation */

.loading-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
}

.loading-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--black);
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .loading-dot {
    width: 10px;
    height: 10px;
  }

  .loading-animation {
    gap: 6px;
  }
}

/* ====== POST DETAILS STYLES ====== */
.post-details {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.post-details h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--black);
  line-height: 1.2;
  font-weight: 700;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.post-meta em {
  font-style: normal;
  font-weight: 500;
}

.post-meta span {
  display: inline-flex;
  align-items: center;
}

.post-meta .separator {
  color: var(--light-text);
}

.post-details p {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  font-size: 1.1rem;
  line-height: 1.7;
}

.post-details strong {
  font-weight: 600;
}

.post-details img {
  width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.post-details small {
  color: var(--light-text);
  font-size: 0.875rem;
}

.post-details em {
  font-style: normal;
  color: var(--light-text);
}

.post-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 2rem 0;
  border: none;
}

/* ====== COMMENTS SECTION ====== */
.comments-section {
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.comments-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--black);
  font-weight: 600;
}

#commentsContainer {
  margin-bottom: 3rem;
}

.comment {
  background-color: var(--light-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.comment-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  align-items: center;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--black);
  font-size: 1.1rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.comment-author-name {
  display: inline;
  font-weight: 600;
  margin-right: 1rem;
}

.comment-date {
  color: var(--light-text);
  font-size: 0.875rem;
  margin-left: auto;
  padding-left: 1rem;
}

.comment-content {
  color: var(--text-color);
  line-height: 1.6;
  width: 100%;
  margin-top: 0.5rem;
}

/* Comment Form Styles */
#commentForm {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  background-color: var(--light-bg);
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
}

#commentForm h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--black);
}

#commentForm p {
  color: var(--light-text);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

#commentForm input,
#commentForm textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  background-color: var(--bg-color);
}

#commentForm textarea {
  min-height: 150px;
  resize: vertical;
  width: 100%;
  max-width: 100%;
}

#commentForm label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--black);
}

.form-row {
  display: flex;
  gap: 1.5rem;
  width: 100%;
}

.form-group {
  flex: 1;
  width: 100%;
}

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

.checkbox-group input {
  width: auto;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: normal;
}

#commentForm button[type="submit"] {
  background-color: var(--black);
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  align-self: flex-start;
}

#commentForm button[type="submit"]:hover {
  background-color: var(--secondary-color);
}

.required-field::after {
  content: "*";
  color: #ff0000;
  margin-left: 0.2rem;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }

  .post-details h1 {
    font-size: 2rem;
  }

  .comments-section h2 {
    font-size: 1.5rem;
  }

  #commentForm {
    padding: 1.5rem;
  }
}
/* ====== FOOTER STYLES ====== */
.footer {
  background-color: var(--black);
  color: var(--white);
  padding: 2rem 1rem 1.5rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 1.5rem;
  transition: opacity 0.3s;
}

.footer-nav a:hover {
  opacity: 0.8;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.newsletter {
  max-width: 100%;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}

.newsletter h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.25rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
}

.newsletter-button {
  background-color: var(--white);
  color: var(--black);
  border: none;
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.newsletter-button:hover {
  background-color: #ddd;
}

.copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .footer {
    padding: 3rem 1.5rem 1.5rem;
  }

  .footer-nav {
    margin-bottom: 2rem;
  }

  .footer-links {
    margin-bottom: 2rem;
  }

  .footer-links a {
    font-size: 0.9rem;
  }

  .newsletter {
    max-width: 30rem;
    margin-bottom: 2rem;
  }

  .newsletter h3 {
    font-size: 1.125rem;
  }

  .newsletter-form {
    flex-direction: row;
  }

  .newsletter-input {
    font-size: 0.875rem;
  }

  .newsletter-button {
    font-size: 0.875rem;
  }

  .copyright {
    font-size: 0.875rem;
  }
}

/* Post Loading Error */
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin: 2rem auto;
  max-width: 800px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.error-message {
  color: #dc3545;
  margin-bottom: 1.5rem;
}

.error-message__title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #343a40;
}

.error-message__subtitle {
  font-size: 1.2rem;
  color: #6c757d;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.error-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: #000000; /* Black background */
  color: #ffffff; /* White text */
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid #000000; /* Black border */
}

.back-link:hover {
  background-color: #ffffff; /* White background on hover */
  color: #000000; /* Black text on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-link i {
  margin-right: 8px;
}

/* back link */

.post-navigation {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #ccc;
}

.post-navigation .nav-link {
  color: #000; /* black text */
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s ease-in-out;
}

.post-navigation .nav-link:hover {
  text-decoration: underline;
  color: #333; /* slightly darker on hover */
}

/* Responsive for larger screens */
@media (min-width: 600px) {
  .post-navigation {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* end back link */

/* White variant for secondary actions */
.back-link--white {
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #000000;
}

.back-link--white:hover {
  background-color: #000000;
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .error-container {
    padding: 1.5rem;
    margin: 1rem;
  }

  .error-message__title {
    font-size: 1.5rem;
  }

  .error-message__subtitle {
    font-size: 1rem;
  }
}

/* Social Share Buttons */
.social-share {
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  opacity: 0.9;
}

.share-btn i {
  margin-right: 8px;
  font-size: 1rem;
}

.share-btn--facebook {
  background-color: #3b5998;
}

.share-btn--twitter {
  background-color: #1da1f2;
}

.share-btn--linkedin {
  background-color: #0077b5;
}

.share-btn--whatsapp {
  background-color: #25d366;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .social-share {
    gap: 0.8rem;
  }

  .share-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}
