:root {
  --bg-gradient: linear-gradient(to right, #fdf7f7, #fce4ce);
  --bg-card: #fef1eb;
  --accent-dark: #843c44;
  --accent-mid: #bf6359;
  --accent-light: #fce4ce;
  --text-main: #4a4a4a;
  --text-light: #fff;
  --shadow: rgba(0, 0, 0, 0.1);
}

* {
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg-card);
  color: var(--text-main);
}

.page-container {
  padding-bottom: 20px; /*footer height is 18px*/
}

.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  z-index: 1000;
  transform: translateX(0);
  transition: transform 0.3s ease;
  overflow-y: auto;
  background-color: var(--accent-mid);
  color: var(--accent-light);
  /* box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3); */
}

.nav-container.closed {
  transform: translateX(-100%);
}

.sidebar {
  background-color: var(--accent-light);
  color: var(--text-light);
  /* box-shadow: 2px 0 10px var(--shadow); */
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: var(--accent-mid);
  overflow-y: hidden;
  /* border-bottom: 1px solid #333;  */
}

.sidebar-header a {
  margin: 0;
  font-size: 18px;
  text-decoration: solid;
  color: var(--text-light);
}

.sidebar-header h2:hover {
  transform: scale(1.1);
  color: var(--bg-card);
}

.sidebar-close-button {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background-color: var(--accent-mid);
  color: var(--text-light);
  margin-bottom: 10px;
  /* box-shadow: 2px 0 10px var(--shadow); */
}

.sidebar-nav a {
  padding: 10px;
  text-decoration: none;
  border-radius: 8px;
  color: var(--text-light);
  background: transparent;
  transition: background-color 0.2s ease;
}

.sidebar-nav a:hover {
  background-color: var(--accent-mid);
}

.sidebar-open-button {
  position: fixed;
  top: 0;
  left: 10px;
  background: none;
  border: none;
  font-size: 24px;
  padding: 8px 8px;
  border-radius: 6px;
  z-index: 999;
  cursor: pointer;
  color: var(--accent-light);
  font-weight: bolder;
  /* box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); */
}

.sidebar-open-button:hover {
  transform: scale(1.2);
  color: var(--bg-card);
}

.main-content {
  margin-left: 240px; /* Matches sidebar width */
  padding-top: 0px; /* Matches header height */
  padding-bottom: 30px; /* To avoid footer overlap */
  min-height: 100vh;
  background: var(--gradient-soft);
  overflow-x: hidden;
  transition: margin-left 0.3s ease;
}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 998;
  padding: 0 60px;
  background-color: var(--accent-mid);
  color: var(--accent-light);
  box-shadow: 0 2px 8px var(--shadow);
  border-bottom: 1px solid #fff3;
}

.main-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

.main-header.scrolled {
  background-color: #fdfdfd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.blogs-page-link {
  position: absolute;
  right: 20px;
  cursor: pointer;
  color: var(--accent-light);
  /* transition: color 0.3s ease; */
  transition: transform 0.2s ease, color 0.3s ease;
}

.blogs-page-link i {
  color: var(--accent-light);
}

.blogs-page-link i:hover {
  /* color: #0077cc; */
  transform: scale(1.2) rotate(-5deg);
  color: var(--bg-card);
}

.blog-content section {
  display: none;
}

.blog-section {
  display: none;
  opacity: 0;
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 10px var(--shadow);
  background: var(--bg-card);
  transition: opacity 0.5s ease;
}

.blog-section.active-section {
  display: block;
  opacity: 1;
}

.section-heading {
  position: fixed;
  top: 60px;
  left: 240px;
  right: 0;
  display: flex;
  padding: 12px 16px;
  font-size: 24px;
  font-weight: bold;
  z-index: 2;
  overflow-y: hidden;
  background: var(--bg-card);
  color: var(--accent-dark);
}

.section-body {
  margin-right: 100px;
  position: fixed;
  top: 113px;
  min-height: 200px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

#sidebar a.active {
  background-color: var(--accent-mid);
  font-weight: bold;
}

.section-body p {
  margin-bottom: 16px;
  line-height: 1.6;
  font-size: 16px;
  text-align: justify;
  text-indent: 1.5em;
}

.section-body p a {
  color: var(--text-main);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.section-nav {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  gap: 10px;
  flex-direction: row;
  /* background-color: rgba(255, 255, 255, 0.8); */
  border-radius: 5px;
}

.nav-button {
  border: none;
  padding: 10px 20px;
  margin: 10px 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  min-width: 120px;
  background-color: var(--accent-mid);
  color: var(--text-light);
  box-shadow: 0 2px 6px var(--shadow);
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.nav-button:hover {
  background-color: var(--accent-dark);
  transform: scale(1.05);
}

.nav-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.img-container {
  margin: 20px auto;
  padding: 10px;
  border-radius: 12px;
  background-color: var(--bg-card);
  max-width: 600px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.img-container img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #ccc;
  display: block;
  margin: 0 auto 10px;
}

.img-container em {
  display: block;
  font-style: italic;
  color: #555;
  font-size: 14px;
  margin-top: 4px;
}

.hidden {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.reveal-button {
  padding: 10px 20px;
  font-size: 16px;
  margin: 20px auto;
  display: block;
  background-color: var(--accent-mid);
  color: var(--text-light);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 8px var(--shadow);
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.reveal-button:hover {
  background-color: var(--accent-dark);
  transform: scale(1.05);
}

.feedback-section {
  margin-top: 2rem;
  padding: 20px;
  background-color: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--shadow);
}

.feedback-section h3 {
  margin-bottom: 16px;
  color: var(--accent-dark);
  font-size: 20px;
  text-align: center;
}

.feedback-section form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-section input,
.feedback-section textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.feedback-section button {
  align-self: center;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-light);
  background-color: var(--accent-mid);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.feedback-section button:hover {
  background-color: var(--accent-dark);
  transform: scale(1.05);
}

.feedback-message {
  margin-top: 12px;
  text-align: center;
  color: green;
  font-style: italic;
}

.footer-note {
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  padding: 5px 0;
  z-index: 1001;
  overflow-x: hidden;
  background-color: var(--bg-card);
}

/* @media (min-width:769px){
    .sidebar-open-button{
        display: none;
    }
} */

@media screen and (max-width: 768px) {
  .nav-container {
    transform: translateX(-100%);
  }

  .nav-container.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .section-heading {
    width: 100%;
    height: 40px;
    left: 0;
    top: 50px;
  }

  .section-body {
    width: 100%;
    top: 103px;
    left: 0;
    right: 0;
    margin-right: 0%;
  }

  .section-body p {
    font-size: 15px;
  }

  .sidebar-nav a {
    padding: 11px;
  }
}

@media screen and (min-width: 769px) {
  .main-content {
    margin-left: 240px;
    transition: margin-left 0.3s ease;
  }
}

@media (max-width: 600px) {
  .main-header {
    height: 50px;
    padding: 0 40px;
  }
  .img-container {
    margin: 16px 10px;
    padding: 8px;
  }

  .img-container em {
    font-size: 12px;
  }
}

.section-body::-webkit-scrollbar {
  width: 8px;
}

.section-body::-webkit-scrollbar-thumb {
  background-color: #aaa;
  border-radius: 4px;
}
