:root {
  --color-primary: #6f6af8;
  --color-primary-light: hsl(242, 91%, 69%, 18%);
  --color-primary-variant: #5854c7;
  --color-red: #da0f3f;
  --color-red-light: hsl(346, 87%, 46%, 15%);
  --color-green: #00c476;
  --color-green-light: hsl(156, 100%, 38%, 15%);
  --color-gray-900: #1e1e66;
  --color-gray-700: #2d2b7c;
  --color-gray-300: rgba(242, 242, 254, 0.3);
  --color-gray-200: rgba(242, 242, 254, 0.7);
  --color-white: #222; /* Change to dark text for contrast */
  --color-bg: #FFF8E1; /* Light saffron */

  --transition: all 300ms ease;

  --container-width-lg: 74%;
  --container-width-md: 88%;
  --form-width: 40%;

  --card-border-radius-1: 0.3rem;
  --card-border-radius-2: 0.5rem;
  --card-border-radius-3: 0.8rem;
  --card-border-radius-4: 2rem;
  --card-border-radius-5: 5rem;
}

/* START GENERAL */

* {
  margin: 0;
  padding: 0;
  outline: 0;
  border: 0;
  appearance: 0;
  list-style: none;
  text-decoration: none;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  color: #222; /* Dark text for contrast */
  overflow-x: hidden;
  background: #fff; /* White background */
  font-size: 0.9rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: var(--container-width-lg);
  max-width: 1800px;
  margin-inline: auto;
  margin-top: 0 !important;
  padding-top: 100px !important;
  flex: 1;
}

section {
  margin-top: 3rem;
  width: 100vw;
}

h1,
h2,
h3,
h4,
h5 {
  color: #222; /* Dark text for contrast */
  line-height: 1.3;
}

/* add to posts on index if there are no featured posts */
.section__extra-margin {
  margin-top: 7rem;
}

h1 {
  font-size: 3rem;
  margin: 1rem 0;
}
h2 {
  font-size: 1.7rem;
  margin: 1rem 0;
}
h3 {
  font-size: 1.1rem;
  margin: 0.8rem 0 0.5rem;
}
h4 {
  font-style: 1rem;
}

a {
  color: #0066cc; /* Bright blue */
  text-decoration: underline; /* Underlined links */
}

a:hover {
  color: #004499; /* Darker blue on hover */
  text-decoration: none;
}

/* Universal link styling for blog - this should catch ALL links */
.blog-post a,
.blog-post a:link,
.blog-post a:visited,
.blog-post a:hover,
.blog-post a:active,
.blog-post * a,
.blog-post * a:link,
.blog-post * a:visited,
.blog-post * a:hover,
.blog-post * a:active,
.post-content a,
.post-content a:link,
.post-content a:visited,
.post-content a:hover,
.post-content a:active,
.post-content * a,
.post-content * a:link,
.post-content * a:visited,
.post-content * a:hover,
.post-content * a:active,
article a,
article a:link,
article a:visited,
article a:hover,
article a:active,
article * a,
article * a:link,
article * a:visited,
article * a:hover,
article * a:active,
/* Universal link styling - catch ALL links on the page */
a[href],
a[href]:link,
a[href]:visited,
a[href]:hover,
a[href]:active {
  color: #0066cc !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  display: inline !important;
}

/* Override universal link styling for navigation links */
nav a[href],
nav a[href]:link,
nav a[href]:visited,
nav a[href]:hover,
nav a[href]:active,
.nav__items a[href],
.nav__items a[href]:link,
.nav__items a[href]:visited,
.nav__items a[href]:hover,
.nav__items a[href]:active {
  color: #fff !important;
  text-decoration: none !important;
}

.blog-post a:hover,
.blog-post * a:hover,
.post-content a:hover,
.post-content * a:hover,
article a:hover,
article * a:hover {
  color: #004499 !important;
  text-decoration: none !important;
  background-color: rgba(0, 102, 204, 0.1) !important;
}

/* Force all links in blog posts to be styled correctly */
.blog-post a,
.blog-post a:link,
.blog-post a:visited,
.blog-post a:hover,
.blog-post a:active,
article a,
article a:link,
article a:visited,
article a:hover,
article a:active,
.blog-post * a,
.blog-post * a:link,
.blog-post * a:visited,
.blog-post * a:hover,
.blog-post * a:active,
article * a,
article * a:link,
article * a:visited,
article * a:hover,
article * a:active,
.post-content a,
.post-content a:link,
.post-content a:visited,
.post-content a:hover,
.post-content a:active,
.post-content * a,
.post-content * a:link,
.post-content * a:visited,
.post-content * a:hover,
.post-content * a:active {
  color: #0066cc !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.blog-post a:hover,
article a:hover,
.blog-post * a:hover,
article * a:hover,
.post-content a:hover,
.post-content * a:hover {
  color: #004499 !important;
  text-decoration: none !important;
  background-color: rgba(0, 102, 204, 0.1) !important;
}

/* Ensure all links in post content are properly styled */
.post__content a,
.singlepost__container a,
.blog-content a,
.post-content a,
.blog-post a,
.comment-content a,
.singlepost__container .post__content a,
.singlepost__container .blog-content a,
.singlepost__container .post-content a,
.singlepost__container .blog-post a,
.singlepost__container .comment-content a,
.post__content a:link,
.singlepost__container a:link,
.blog-content a:link,
.post-content a:link,
.blog-post a:link,
.comment-content a:link,
.blog-post .post-content a,
.blog-post .post-content a:link,
.blog-post .post-content a:visited,
.blog-post .post-content a:hover,
.blog-post .post-content a:active,
.post-content a,
.post-content a:link,
.post-content a:visited,
.post-content a:hover,
.post-content a:active {
  color: #0066cc !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  display: inline !important;
}

.post__content a:hover,
.singlepost__container a:hover,
.blog-content a:hover,
.post-content a:hover,
.blog-post a:hover,
.comment-content a:hover,
.singlepost__container .post__content a:hover,
.singlepost__container .blog-content a:hover,
.singlepost__container .post-content a:hover,
.singlepost__container .blog-post a:hover,
.singlepost__container .comment-content a:hover,
.blog-post .post-content a:hover,
.post-content a:hover {
  color: #004499 !important;
  text-decoration: none !important;
  background-color: rgba(0, 102, 204, 0.1) !important;
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
  height: 100%;
}
/* END */

/* START NAV */

nav {
  background: var(--color-primary);
  width: 100vw;
  height: 4.5rem;
  position: fixed;
  top: 0;
  z-index: 10;
  box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.2);
}

nav button {
  display: none;
}

.nav__container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.avatar {
  width: 2.5rem;
  /* aspect-ratio: 1/1; */
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 0.3rem solid var(--color-bg);
}

.nav__logo {
  font-weight: 600;
  font-size: 1.2rem;
}

.nav__items {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.nav__profile {
  position: relative;
  cursor: pointer;
}

.nav__profile ul {
  position: absolute;
  top: 140%;
  right: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3rem 3rem rgba(0, 0, 0, 0.4);
  visibility: hidden;
  opacity: 0;
  transition: var(--transition);
}

/* show nav ul when nav profile is hovered over */

.nav__profile:hover > ul {
  visibility: visible;
  opacity: 1;
}

.nav__profile ul li a {
  padding: 1rem;
  display: block;
  width: 100%;
  background: var(--color-gray-900);
}

.nav__profile ul li:last-child a {
  background: var(--color-red);
  color: var(--color-bg);
}
.nav__container {
  display: flex;
  align-items: center;
  justify-content: space-between; /* This aligns logo/name left, menu right */
  width: 100%;
  padding: 0 24px;
  box-sizing: border-box;
}

.nav__logo {
  display: flex;
  align-items: center;
  font-size: 1.5em;
  font-weight: bold;
  color: #222;
  text-decoration: none;
  gap: 0.5em;
  /* No need for flex: 1 here, as space-between handles alignment */
}

.nav__items {
  display: flex;
  gap: 1em;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  /* No need for margin-left: auto, as space-between handles it */
}

nav .nav__items a {
  color: #fff !important;
  font-weight: 500;
  padding: 0.5em 1em;
  border-radius: 4px;
  transition: background 0.2s;
}

/* Force white color for navigation links with maximum specificity */
body nav .nav__items a {
  color: #fff !important;
}

body nav .nav__items li a {
  color: #fff !important;
}

nav ul.nav__items li a {
  color: #fff !important;
}

/* Override any conflicting link styles */
nav a {
  color: #fff !important;
}

/* Admin button overrides for desktop */
.btn,
.btn-primary,
.btn-success,
.btn-danger,
.btn-secondary,
.btn-add,
.btn-edit,
.btn-delete,
.btn-submit,
.btn-cancel,
.btn-back,
.btn-approve,
.btn-preview,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-warning,
.btn-outline-danger,
.btn-sm,
.btn-close {
  color: #fff !important;
}

/* Additional button overrides to handle inline styles in admin files */
.btn-edit,
.btn-delete,
.btn-add,
.btn-submit,
.btn-cancel,
.btn-approve,
.btn-back {
  color: #fff !important;
}

/* Force white color for all button elements */
button.btn,
a.btn,
input[type="submit"].btn,
button[class*="btn-"],
a[class*="btn-"] {
  color: #fff !important;
}
nav .nav__items a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
}


/* END NAV */

/* START CATEGORY BUTTON */

.category__button {
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--card-border-radius-2);
  font-weight: 600;
  font-size: 600;
  font-size: 0.8rem;
  text-align: center;
}

/* END CATEGORY BUTTON */

/* START GENERAL POST */

.post__thumbnail {
  border-radius: var(--card-border-radius-5) 0;
  border: 1rem solid var(--color-gray-900);
  overflow: hidden;
  margin-bottom: 1.6rem;
}

.post:hover .post__thumbnail img {
  filter: saturate(0);
  transition: filter 500ms ease;
}

.post__author {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}

.post__author-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--card-border-radius-3);
  overflow: hidden;
}

/* END GENERAL POST */

/* START FEATURED */

.featured {
  margin-top: 8rem;
}

.featured__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.featured .post__thumbnail {
  height: fit-content;
}

/* END FEATURED */

/* START POSTS */

.posts__container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  margin-bottom: 4rem;
}
/* END POSTS */

/* START CATEGORY BUTTONS */
.category__buttons {
  padding: 4rem 0;
  border-top: 2px solid var(--color-gray-900);
  border-bottom: 2px solid var(--color-gray-900);
}

.category__buttons-container {
  width: fit-content;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
/* END CATEGORY BUTTONS */

/* START CATEGORY FOOTER */
footer {
  background: var(--color-gray-900);
  padding: 1rem 0 0;
  box-shadow: inset 0 1.5rem 1.5rem rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.footer__socials {
  margin-inline: auto;
  width: fit-content;
  margin-bottom: 0.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 0.2rem 0;
}

.footer__socials a {
  background: var(--color-bg);
  border-radius: 50%;
  height: 2.3rem;
  width: 2.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__socials a:hover {
  background: var(--color-white);
  color: var(--color-bg);
}

.footer__container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

footer li {
  padding: 0.4rem 0;
}

footer h4 {
  color: var(--color-white);
  margin-bottom: 0.6rem;
}

footer ul a {
  opacity: 0.75;
}
footer ul a:hover {
  letter-spacing: 0.1rem;
  opacity: 1;
  transition: var(--transition);
   
}

.footer__copyright {
  text-align: center;
  padding: 0.2rem 0;
  border-top: 2px solid var(--color-bg);
  margin-top: 0.2rem;
  background: #fff;
  color: #000;
}
/* END CATEGORY FOOTER */

/* START CATEGORY SEARCH */
.search__bar {
  margin-top: 7rem;
}

.search__bar-container {
  position: relative;
  width: 30rem;
  background: var(--color-gray-900);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 0.6rem 1rem;
  border-radius: var(--card-border-radius-2);
  color: var(--color-gray-300);
}
.search__bar-container > div {
  width: 100%;
  display: flex;
  align-items: center;
}

.search__bar input {
  background: transparent;
  margin-left: 0.7rem;
  padding: 0.5rem 0;
  width: 100%;
  color: var(--color-white);
}

.search__bar input::placeholder {
  color: var(--color-gray-200);
}

/* START CATEGORY BUTTON */
.btn {
  display: inline-block;
  width: fit-content;
  padding: 0.6rem 1.2rem;
  background-color: var(--color-primary);
  border-radius: var(--card-border-radius-2);
  cursor: pointer;
  transition: var(--transition);
  color: var(--color-white);
}

.btn.sm {
  padding: 0.3rem;
  font-size: 0.8rem;
}
.btn.danger {
  background-color: red;
}
.btn:hover {
  background: var(--color-white);
  color: var(--color-bg);
}

/* END CATEGORY BUTTON */

/* START DASHBOARD */
.dashboard {
  margin-top: 6rem;
  padding: 2rem;
}

.sidebar__toggle {
  display: none;
}

.dashboard__container {
  display: grid;
  grid-template-columns: 14rem auto;
  gap: 2rem;
  background: var(--color-gray-900);
  padding: 2rem;
  margin-bottom: 5rem;
  border-radius: 2rem;
}
.dashboard aside a {
  color: var(--color-white);
  background: var(--color-primary);
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.6rem;
}
.dashboard aside ul li:not(:last-child) a {
  border-bottom: 1px solid var(--color-gray-700);
}
.dashboard aside a:hover {
  background: var(--color-gray-700);
}
.dashboard aside a.active {
  background-color: var(--color-gray-700);
}
.dashboard aside ul li:not(:last-child):not(:first-child) a {
  border-bottom: 1px solid var(--color-gray-700);
}

.dashboard aside ul li:first-child a {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.dashboard main table th:first-child {
  border-top-left-radius: 10px;
}

.dashboard main table th:last-child {
  border-top-right-radius: 10px;
}

.dashboard aside ul li:last-child a {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
.dashboard main {
  margin-left: 1.5rem;
}
.dashboard main h2 {
  margin: 0 0 2rem 0;
  line-height: 1;
}
.dashboard main table {
  width: 100%;
  text-align: left;
}
.dashboard main table th {
  background: var(--color-gray-700);
  padding: 0.8rem;
  color: var(--color-white);
}
.dashboard main table td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.dashboard main table tr:hover {
  background-color: var(--color-bg);
  color: var(--color-white);
  cursor: default;
  transition: var(--transition);
}

/* END DASHBOARD */

/* START SINGLE POST */
.singlepost {
  margin: 6rem 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.singlepost__container {
  width: 45%;
  background: var(--color-gray-900);
  padding: 3rem 4rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  border-radius: var(--card-border-radius-4);
}
.singlepost__container h2 {
  margin-top: 0;
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--color-primary);
  text-align: center;
}
.singlepost__author {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.post__author-info h5 {
  margin: 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-500);
}
.post__author-info small {
  font-size: 0.9rem;
  color: var(--color-gray-500);
  text-align: center;
}
.singlepost__thumbnail img {
  max-width: 100%;
  height: auto;
  border-radius: var(--card-border-radius-4);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  margin: 2rem 0;
}
.singlepost__container p {
  margin-top: 1rem;
  line-height: 1.8;
  font-size: 1.1rem;
  color: var(--color-gray-100);
  text-align: justify;
}
/* END SINGLE POST */

/* END CATEGORY SEARCH */

/* START CATEGORY POSTS */
.category__title {
  height: 11rem;
  margin-top: 4.5rem;
  background: var(--color-gray-900);
  display: grid;
  place-items: center;
}
/* END CATEGORY POSTS */

/* START EMPTY PAGES */
.empty__page {
  height: 70vh;
  text-align: center;
  display: grid;
  place-content: center;
}
/* END EMPTY PAGES */

/* START GENERAL FORM */
.form__section {
  display: grid;
  place-items: center;
  height: 100vh;
  margin: 5rem 0;
}
.form__section-container {
  width: var(--form-width);
}

.alert__message {
  padding: 0.8rem 1.4rem;
  margin-bottom: 1rem;
  border-radius: var(--card-border-radius-2);
}

.alert__message.error {
  background: var(--color-red-light);
  color: var(--color-red);
}

.alert__message.success {
  background: var(--color-green-light);
  color: var(--color-green);
}

.alert__message.lg {
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form__control {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form__control.inline {
  flex-direction: row;
  align-items: center;
}

.form__section small {
  margin-top: 1rem;
  display: block;
}

.form__section small a {
  color: var(--color-primary);
  margin-left: 1rem;
}

/* START GENERAL DASHBAORD */

/* END GENERAL DASHBAORD */

input,
textarea,
select {
  padding: 0.8rem 1.4rem;
  background-color: #fff !important;
  border-radius: var(--card-border-radius-2);
  resize: none;
  color: #222 !important;
  border: 1px solid #ccc;
}

/* END GENERAL FORM */

/* START  MEDIA QUERIES (Medium-Sized Devices) */
@media screen and (max-width: 1024px) {
  /* START  GENERAL STYLES */
  .container {
    width: var(--container-width-md);
  }
  h2 {
    font-size: 1.6rem;
  }
  h3 {
    font-size: 1.2rem;
  }
  h5 {
    font-size: 0.8rem;
  }
  /* END  GENERAL STYLES */

  /* START  NAV STYLES */
  nav button {
    display: inline-block;
    font-size: 1.5rem;
    background: transparent;
    color: var(--color-white);
    cursor: pointer;
  }

  nav button#close__nav-btn {
    display: none;
  }
  .nav__container {
    position: relative;
  }
  .nav__items {
    display: none;
    position: absolute;
    flex-direction: column;
    top: 100%;
    right: 0;
    width: 12rem;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
  }

  .nav__items li {
    width: 100%;
    height: 4.5rem;
    display: flex;
    align-items: center;
    box-shadow: -2rem 3rem 7rem rgba(0, 0, 0, 0.7);
    background: var(--color-gray-900);
    border-top: 1px solid var(--color-bg);
    opacity: 0;

    animation: animateDropdown 400ms 0s ease forwards;
    transform-origin: top;
  }

  .nav__items li:nth-child(2) {
    animation-delay: 150ms;
  }
  .nav__items li:nth-child(3) {
    animation-delay: 250ms;
  }
  .nav__items li:nth-child(4) {
    animation-delay: 350ms;
  }
  .nav__items li:nth-child(5) {
    animation-delay: 450ms;
  }
  .nav__items li:nth-child(6) {
    animation-delay: 550ms;
  }

  /* Nav dropodwn animations */
  @keyframes animateDropdown {
    0% {
      transform: rotateX(90deg);
    }
    100% {
      transform: rotateX(0deg);
      opacity: 1;
    }
  }

  .nav__items a {
    border-radius: 0;
    width: 100%;
    height: 100%;
    background: var(--color-gray-900);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    color: #fff !important;
  }

  /* Force white color for mobile navigation links */
  body .nav__items a {
    color: #fff !important;
  }

  body nav .nav__items a {
    color: #fff !important;
  }

  body nav .nav__items li a {
    color: #fff !important;
  }

  /* Override universal link styling for mobile navigation links */
  nav a[href],
  nav a[href]:link,
  nav a[href]:visited,
  nav a[href]:hover,
  nav a[href]:active,
  .nav__items a[href],
  .nav__items a[href]:link,
  .nav__items a[href]:visited,
  .nav__items a[href]:hover,
  .nav__items a[href]:active {
    color: #fff !important;
    text-decoration: none !important;
  }

  /* Admin button overrides for mobile */
  .btn,
  .btn-primary,
  .btn-success,
  .btn-danger,
  .btn-secondary,
  .btn-add,
  .btn-edit,
  .btn-delete,
  .btn-submit,
  .btn-cancel,
  .btn-back,
  .btn-approve,
  .btn-preview,
  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-outline-warning,
  .btn-outline-danger,
  .btn-sm,
  .btn-close {
    color: #fff !important;
  }

  /* Additional button overrides to handle inline styles in admin files */
  .btn-edit,
  .btn-delete,
  .btn-add,
  .btn-submit,
  .btn-cancel,
  .btn-approve,
  .btn-back {
    color: #fff !important;
  }

  /* Force white color for all button elements */
  button.btn,
  a.btn,
  input[type="submit"].btn,
  button[class*="btn-"],
  a[class*="btn-"] {
    color: #fff !important;
  }

  .nav__profile {
    background: var(--color-gray-900);
  }

  .nav__profile ul {
    top: 100%;
    width: 100%;
  }
  .nav__profile ul li a {
    padding: 0 2rem;
    display: block;
    width: 100%;
    text-align: left;
    align-self: center;
    display: flex;
  }

  .nav__profile .avatar {
    margin-left: 2rem;
  }

  .featured__container {
    gap: 3rem;
  }

  .posts__container {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .footer__container {
    grid-template-columns: 1fr 1fr;
  }


/* The subnavigation menu */
.subnav {
  float: left;
  overflow: hidden;
}

/* Subnav button */
.subnav .subnavbtn {
  font-size: 16px;
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
}

/* Add a red background color to navigation links on hover */
.nav a:hover, .subnav:hover .subnavbtn {
  background-color: red;
}

/* Style the subnav content - positioned absolute */
.subnav-content {
  display: none;
  position: absolute;
  left: 0;
  background-color: red;
  width: 100%;
  z-index: 1;
}

/* Style the subnav links */
.subnav-content a {
  float: left;
  color: white;
  text-decoration: none;
}

/* Add a grey background color on hover */
.subnav-content a:hover {
  background-color: #eee;
  color: black;
}

/* When you move the mouse over the subnav container, open the subnav content */
.subnav:hover .subnav-content {
  display: block;
}
  /* START  BLOG */
  .search__bar-container {
    width: 60%;
  }
  /* END  BLOG */

  /* START  GENERAL FORM */
  .form__section-container {
    padding: 3rem;
  }
  /* END  GENERAL FORM */

  /* END  GENERAL STYLES */

  /* START DASHBOARD (Tablets)*/
  .dashboard__container {
    grid-template-columns: 4.5rem auto;
  }
  .dashboard aside {
  }
  .dashboard aside h5 {
    display: none;
  }
  .dashboard main table thead {
    display: none;
  }
  .dashboard main table tr {
    display: flex;
    flex-direction: column;
  }
  .dashboard main table tr:nth-child(even) {
    background: var(--color-gray-900);
  }

  .dashboard main table tr:hover td {
    background: transparent;
  }

  /* END DASHBOARD */

  .sidebar__toggle {
    display: none;
  }
  /* END  MEDIA QUERIES *(Medium-Sized Devices) */
}

/* START  MEDIA QUERIES (Small-Sized Devices) */

@media screen and (max-width: 600px) {
  section {
    margin-top: 2rem;
  }
  h1 {
    font-size: 2rem;
  }
  .featured {
    margin-top: 6rem;
  }
  .featured__container {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .posts__container {
    grid-template-columns: 1fr;
  }

  .category__buttons-container {
    grid-template-columns: 1fr 1fr;
  }
  .footer__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  /* START  BLOG */
  .search__bar-container {
    width: var(--container-width-md);
  }
  /* END  BLOG */

  /* START  SINGLE POST */
  .singlepost__container {
    background-color: transparent;
    padding: 0;
  }
  /* END  SINGLE POST */

  /* START  GENERAL FORM*/
  .form__section-container {
    padding: 0;
  }
  .form__section form a {
    padding-bottom: 2rem;
  }
  /* END  GENERAL FORM*/

  /* START  DASHBAORD*/
  .dashboard {
    margin-top: 5rem;
  }
  .dashboard__container {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .dashboard main {
    margin: 0;
  }
  .dashboard main h2 {
    margin-top: 1rem;
  }
  .dashboard aside {
    position: fixed;
    box-shadow: 2rem 0 4rem rgba(0, 0, 0, 0.4);
    left: 0;
    z-index: 2;
    height: 100vh;
    transition: var(--transition);
    background: var(--color-primary);
  }
  .singlepost__container{
    box-shadow: none;
  }

  .dashboard .sidebar__toggle {
    display: inline-block;
    background: var(--color-primary-variant);
    color: var(--color-white);
    position: fixed;
    right: 0;
    bottom: 4rem;
    z-index: 1;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50% 0 0 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: -1rem 0 2rem rgba(0, 0, 0, 0.4);
  }

  .dashboard aside a h5 {
    display: inline-block;
  }

    #hide_sidebar-btn {
    display: none;
  }
  /* END  DASHBAORD*/

  .team__container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.5rem !important;
  }
  .team__member {
    min-width: 0 !important;
    width: 90% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    text-align: center;
  }
}
/* END  MEDIA QUERIES (Small-Sized Devices) */

.news-sidebar {
  flex: 1;
  min-width: 280px;
  max-width: 340px;
  position: sticky;
  top: 30px;
  height: fit-content;
}

.news-ticker-container {
  background: #fff;
  border: 2px solid #0077b6;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin: 0 0 20px 0;
  font-family: 'Montserrat', sans-serif;
  padding-bottom: 10px;
}

.news-ticker-title {
  background: #0077b6;
  color: #fff;
  padding: 10px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 1px;
  border-bottom: 1px solid #0077b6;
  font-size: 18px;
}

.news-ticker-list {
  list-style: decimal inside;
  margin: 0;
  padding: 10px 20px 0 20px;
}

.news-ticker-list li {
  margin-bottom: 18px; /* space between news */
  font-size: 15px;
  line-height: 1.5;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 8px;
}

.news-ticker-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.team__container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
}

/* Google Translate dropdown as menu item, single line, black text, white background */
#google_translate_element {
  min-width: 160px;
  background: #fff;
  display: flex;
  align-items: center;
  height: 40px;
}

.nav__items li {
  display: flex;
  align-items: center;
}

.nav__items li span {
  color: #111;
  font-size: 15px;
  margin-right: 6px;
  white-space: nowrap;
  background: #fff;
  padding: 0 2px;
}

.goog-te-gadget {
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
  height: 32px !important;
  font-size: 0 !important;
}

.goog-te-gadget .goog-te-combo {
  font-size: 15px !important;
  padding: 2px 8px !important;
  height: 32px !important;
  border-radius: 4px !important;
  border: 1px solid #ccc !important;
  margin: 0 !important;
  background: #fff !important;
  color: #111 !important;
  min-width: 120px !important;
  cursor: pointer !important;
  appearance: auto !important;
}

.goog-te-gadget img {
  display: none !important;
}

/* Hide only the Google branding, not the dropdown arrow or select */
.goog-te-gadget span.goog-te-gadget-simple {
  display: none !important;
}

body .goog-te-banner-frame.skiptranslate {
  display: none !important;
}
body {
  top: 0px !important;
}

/* Sign-in form custom styles */
.signin-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.signin-form {
  width: 100%;
  max-width: 350px;
  background: #fff;
  padding: 2rem 2.5rem 1.5rem 2.5rem;
  border-radius: 0.7rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.signin-form label {
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.signin-input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  font-size: 1rem;
  border: 1px solid #d1d1d1;
  border-radius: 0.4rem;
  background: #f5f6fa;
  margin-bottom: 0.5rem;
  transition: border 0.2s;
}

.signin-input:focus {
  border: 1.5px solid var(--color-primary);
  outline: none;
}

.signin-btn {
  width: 100%;
  padding: 0.7rem 0;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
  margin-top: 0.5rem;
  box-shadow: 0 2px 8px rgba(111, 106, 248, 0.08);
  transition: background 0.2s, transform 0.2s;
}

.signin-btn:hover, .signin-btn:focus {
  background: var(--color-primary-variant);
  transform: translateY(-2px) scale(1.03);
}

.signin-container h2 {
  margin-bottom: 1.2rem;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 1px;
}

.signin-container p {
  margin-top: 1.2rem;
  font-size: 0.97rem;
  text-align: center;
}

.signin-container a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: underline;
}

/* Disclaimer Section Styling */
.disclaimer-section {
  background: #fff;
  border-top: 2px solid #495057;
  padding: 0.2rem 0;
  margin-top: 0.2rem;
  width: 100%;
  clear: both;
  position: relative;
  z-index: 2;
}

.disclaimer-text {
  font-size: 0.85rem;
  color: #000;
  line-height: 1.6;
  text-align: justify;
  margin: 0;
  padding: 0 1rem;
  max-width: 1200px;
  margin: 0 auto;
  font-weight: 400;
}

.disclaimer-text strong {
  color: #000;
  font-weight: 700;
}

/* Author Avatar Styling for Post Pages */
.author-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e9ecef;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.author-name {
  font-weight: 500;
  color: #495057;
}

/* Comment Avatar Styling */
.comment-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e9ecef;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.comment-info {
  display: flex;
  flex-direction: column;
}

.comment-author {
  font-weight: 500;
  color: #495057;
}

.comment-date {
  font-size: 0.8rem;
  color: #6c757d;
}

/* ===== ULTIMATE BUTTON OVERRIDES FOR ADMIN PAGES ===== */
/* These overrides must come at the end to override all inline styles */

/* Force white text on ALL button types in admin pages */
body .btn,
body .btn-primary,
body .btn-success,
body .btn-danger,
body .btn-secondary,
body .btn-add,
body .btn-edit,
body .btn-delete,
body .btn-submit,
body .btn-cancel,
body .btn-back,
body .btn-approve,
body .btn-preview,
body .btn-outline-primary,
body .btn-outline-secondary,
body .btn-outline-warning,
body .btn-outline-danger,
body .btn-sm,
body .btn-close {
  color: #fff !important;
}

/* Override specific button styles that might be set inline */
body .btn-edit {
  color: #fff !important;
  background: #007bff !important;
  border: none !important;
  font-weight: bold !important;
}

body .btn-delete {
  color: #fff !important;
  background: #dc3545 !important;
  border: none !important;
  font-weight: bold !important;
}

body .btn-add {
  color: #fff !important;
  background: var(--color-primary) !important;
  border: none !important;
}

body .btn-submit {
  color: #fff !important;
  background: var(--color-primary) !important;
  border: none !important;
}

body .btn-cancel {
  color: #fff !important;
  background: #6c757d !important;
  border: none !important;
}

body .btn-approve {
  color: #fff !important;
  background: var(--color-green) !important;
  border: none !important;
}

body .btn-back {
  color: #fff !important;
  background: #6c757d !important;
  border: none !important;
}

/* Force white color on all button elements regardless of class */
body button[class*="btn"],
body a[class*="btn"],
body input[type="submit"][class*="btn"] {
  color: #fff !important;
}

/* Additional specificity for admin pages */
body .container .btn,
body .container .btn-primary,
body .container .btn-success,
body .container .btn-danger,
body .container .btn-secondary,
body .container .btn-add,
body .container .btn-edit,
body .container .btn-delete,
body .container .btn-submit,
body .container .btn-cancel,
body .container .btn-back,
body .container .btn-approve,
body .container .btn-preview {
  color: #fff !important;
}

/* Override any hover states to maintain white text and proper backgrounds */
body .btn:hover,
body .btn-edit:hover,
body .btn-delete:hover,
body .btn-add:hover,
body .btn-submit:hover,
body .btn-cancel:hover,
body .btn-approve:hover,
body .btn-back:hover {
  color: #fff !important;
}

body .btn-edit:hover {
  background: #0056b3 !important;
  transform: translateY(-2px) !important;
}

body .btn-delete:hover {
  background: #c82333 !important;
  transform: translateY(-2px) !important;
}

body .btn-add:hover,
body .btn-submit:hover {
  background: var(--color-primary-variant) !important;
  transform: translateY(-2px) !important;
}

body .btn-cancel:hover,
body .btn-back:hover {
  background: #5a6268 !important;
  transform: translateY(-2px) !important;
}

body .btn-approve:hover {
  background: #00a362 !important;
  transform: translateY(-2px) !important;
}

/* Facebook Login Button Styling */
.btn-facebook {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    margin: 15px 0;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-facebook:hover {
    background: linear-gradient(135deg, #166fe5 0%, #0d5bb9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.btn-facebook:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(24, 119, 242, 0.3);
}

.btn-facebook::before {
    content: "📘";
    margin-right: 8px;
    font-size: 16px;
}

/* Facebook Login Button Container */
.facebook-login-container {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(24, 119, 242, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(24, 119, 242, 0.1);
}

/* Responsive Facebook Button */
@media (max-width: 768px) {
    .btn-facebook {
        padding: 14px 16px;
        font-size: 16px;
    }
}

/* Facebook Button Loading State */
.btn-facebook.loading {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-facebook.loading::after {
    content: "⏳";
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Additional blog improvements */
.blog-container {
    display: flex;
    gap: 2rem;
    padding-top: 5rem;
    margin-top: 1rem;
    flex: 1;
    min-height: calc(100vh - 200px);
}

.category-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    position: sticky;
    top: 5rem;
    height: calc(100vh - 6rem);
    overflow-y: auto;
}

.category-header {
    background: var(--color-primary);
    color: white;
    padding: 1rem;
    font-weight: bold;
    text-align: center;
    font-size: 1.1rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

.blog-content {
    flex: 1;
    min-width: 0;
}

.blog-header {
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-section {
    margin-top: 1rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-options {
    display: flex;
    gap: 2rem;
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.search-input {
    display: flex;
    gap: 0.5rem;
}

.search-input input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    font-size: 1rem;
}

.search-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--color-primary-variant);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: #f0f0ff;
    color: var(--color-primary);
    padding-left: 1.5rem;
}

.category-link.active {
    background: var(--color-primary);
    color: white;
}

.category-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
    opacity: 0.8;
}

.post-count {
    margin-left: auto;
    font-size: 0.9rem;
    color: #666;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-preview {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.post-preview:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.author-name {
    font-weight: 500;
    color: #333;
}

.post-title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.post-title a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--color-primary-variant);
}

.post-excerpt {
    color: #444;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta i {
    color: var(--color-primary);
}

.read-more {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.read-more:hover {
    transform: translateX(5px);
    color: var(--color-primary-variant);
}

/* Responsive design */
@media (max-width: 1024px) {
    .blog-container {
        flex-direction: column;
        min-height: auto;
    }

    .category-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }

    .search-options {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-input {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .post-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .post-preview {
        padding: 1.5rem;
    }
    
    .blog-header {
        padding: 1rem;
    }
}
