/* Cards Container */
.mt-cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

/* Individual Card */
.mt-card {
  background: #ffdbea;
  flex: 1 1 200px;
  margin: 10px;
  box-sizing: border-box;
  text-align: center;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 200px;
  max-width: 400px;
  border-left: 10px solid #b8004c;
  border-radius: 50px;
}

/* Card Icon */
.mt-card-icon {
  margin-bottom: 10px;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.mt-card-icon img {
  max-width: 80%;
  height: auto;
  border-radius: 50%;
}

/* Card Title */
.mt-card-title {
  font-size: 17px;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 20px;
  color: black;
  font-family: Tahoma;
}

/* Card Status */
.mt-card-status {
  font-size: 14px;
  color: #000000;
  margin-bottom: 10px;
  font-family: Tahoma;
}

/* Card Content */
.mt-card-content {
  font-size: 14px;
  font-family: Tahoma;
  color: #000000;
  margin-bottom: 10px;
  height: auto;
  overflow: auto;
}

/* Card Actions */
.mt-card-actions {
  margin-top: auto;
}

.mt-card-actions .button {
  margin: 5px 2px;
}

/* Toggle Switch Styles */
.mt-switch {
  margin-left: 10px;
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.mt-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.mt-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ff90bd;
  transition: 0.4s;
  border-radius: 20px; /* Rounded background */
}

.mt-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%; /* Rounded knob */
}

.mt-switch input:checked + .mt-slider {
  background-color: #b8004c;
}

.mt-switch input:focus + .mt-slider {
  box-shadow: 0 0 1px #b8004c;
}

.mt-switch input:checked + .mt-slider:before {
  transform: translateX(20px);
}

/* Rounded sliders */
.mt-slider.round {
  border-radius: 24px;
}

.mt-slider.round:before {
  border-radius: 50%;
}

/* Back Button Styles */
.wrap .button {
  background-color: #b8004c;
  border-radius: 20px;
  padding: 2px 15px;
  color: white;
  font-family: Tahoma;
  font-weight: 600;
  border-color: unset;
}

.wrap .button:hover {
  background-color: #fd0c6f;
  color: white;
  border-radius: 20px;
  padding: 2px 15px;
  font-family: Tahoma;
  font-weight: 600;
  border-color: unset;
}

/* Form Table Styles */
.form-table th {
  width: 150px;
}

/* Image Preview Styles */
#mt_category_icon_preview img,
#mt_subcategory_icon_preview img,
#mt_tool_icon_preview img,
#mt_intro_image_preview img {
  max-width: 100px;
  height: auto;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .mt-card {
    flex: 1 1 250px;
    max-width: 250px;
  }
}

@media (max-width: 992px) {
  .mt-card {
    flex: 1 1 300px;
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .mt-card {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 10px 0;
  }

  .mt-cards-container {
    justify-content: stretch;
  }
}

/* Introduction Page Styles */
.mt-intro-wrapper {
  text-align: left;
  padding: 40px 20px;
  background-color: #f9f9f9;
  border-left: 10px solid #b8004c;
  border-radius: 20px;
  margin-bottom: 30px;
  margin-top: 5vh;
}

.mt-intro-wrapper .mt-page-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 5vh;
  text-align: left;
}

.mt-intro-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 5px 3px 10px #888888 !important;
  padding-top: 85px;
  padding-bottom: 60px;
  padding-left: 60px;
  border-radius: 50px;
  border-left: 10px solid #b8004c;
  background-color: #ffeaf3;
  margin-bottom: 30px;
}

.mt-intro-image {
  margin-right: 20px;
}

.mt-intro-image img {
  max-width: 200px;
  height: auto;
}

.mt-intro-text {
  max-width: 83%;
  text-align: left;
}

.mt-intro-buttons {
  display: flex;
  gap: 20px;
}

.mt-intro-buttons .mt-button-settings,
.mt-intro-buttons .mt-button-categories {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 16px;
  font-family: Tahoma, sans-serif;
  border-radius: 20px;
  text-decoration: none;
  background-color: #b8004c;
  transition: background-color 0.3s ease;
  color: #ffffff;
}

.mt-intro-buttons .mt-button-settings:hover,
.mt-intro-buttons .mt-button-categories:hover {
  background-color: #fd0c6f;
}

/* Main Container */
#mt-main-container {
  display: flex;
  width: 100%;
  min-height: 600px;
  margin-top: 20px;
}

/* Categories Sidebar */
#mt-categories-sidebar {
  width: calc(15% - 1vw);
  background-color: #ffeaf3;
  padding: 20px;
  box-sizing: border-box;
  border-left: 10px solid #b8004c;
  border-radius: 50px;
  flex-shrink: 0;
}

#mt-categories-sidebar .mt-category {
  text-align: center;
  cursor: pointer;
  margin-bottom: 20%;
  padding: 20px;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

#mt-categories-sidebar .mt-category:hover {
  transform: scale(1.05);
}

#mt-categories-sidebar .mt-category .mt-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
}

#mt-categories-sidebar .mt-category .mt-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mt-categories-sidebar .mt-category .mt-name {
  font-weight: 700;
  font-family: Tahoma;
  font-size: 16px;
  color: #000000;
  line-height: 1.5;
  word-wrap: break-word;
}

/* Active Category */
.mt-category.active {
  background-color: #ffc2dc;
  border-radius: 30px;
  border-left: 8px solid #ff87ba;
}

/* Content Area */
#mt-content-area {
  flex-grow: 1;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto;
  position: relative;
}

/* Intro Section */
#mt-intro {
  text-align: center;
  margin: 20px 0;
}

.mt-intro-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.mt-intro-text {
  font-size: 17px;
  margin-bottom: 20px;
  font-family: Tahoma;
}

/* Subcategories Box */
#mt-subcategories-box {
  padding: 20px;
  box-sizing: border-box;
  position: relative;
}

#mt-subcategories-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

#mt-subcategories-menu .mt-subcategory {
  width: calc(30% - 5vw);
  text-align: center;
  cursor: pointer;
  position: relative;
  opacity: 0;
}

#mt-subcategories-menu .mt-subcategory .mt-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 5px;
  border-radius: 50%;
  overflow: hidden;
}

#mt-subcategories-menu .mt-subcategory .mt-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mt-subcategories-menu .mt-subcategory .mt-name {
  font-weight: 700;
  font-size: 14px;
  color: #000000;
  font-family: Tahoma;
}

/* Active Subcategory */
.mt-subcategory.active {
  background-color: #ffdfed;
  border-radius: 15px;
  padding: 10px 0;
  border-left: 8px solid #ff87ba;
}

/* Separator Border */
#mt-subcategories-box .separator {
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

/* Tools Menu */
#mt-tools-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 50px;
}

#mt-tools-menu .mt-tool {
  width: calc(10% - 1vw);
  text-align: center;
  cursor: pointer;
  opacity: 0;
  padding: 10px;
}

#mt-tools-menu .mt-tool .mt-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 5px;
  border-radius: 50%;
  overflow: hidden;
}

#mt-tools-menu .mt-tool .mt-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mt-tools-menu .mt-tool .mt-name {
  font-weight: 700;
  font-size: 12px;
  color: #000000;
  font-family: Tahoma;
}

/* Active Tool */
.mt-tool.active {
  background-color: #ffdfed;
  border-radius: 15px;
  padding: 10px 0;
  border-left: 8px solid #ff87ba;
}

/* No Tools Message */
.mt-no-tools-message {
  font-size: 16px;
  color: #777;
  text-align: center;
  margin-top: 20px;
}

/* Tool Content Area */
#mt-tool-content-area {
  margin-top: 20px;
  border-top: 1px solid #ddd;
  padding-top: 20px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  padding-bottom: 70px;
}

#mt-tool-content-area .mt-tool-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

#mt-tool-content-area .mt-tool-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 20px;
}

#mt-tool-content-area .mt-tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mt-tool-content-area .mt-tool-title {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  opacity: 0;
  font-family: Tahoma;
}

#mt-tool-content-area .mt-tool-content {
  margin-top: 20px;
  color: #000000;
  line-height: 1.6;
  font-family: Tahoma;
  font-size: 17px;
  opacity: 0;
}

#mt-tool-content-area .mt-tool-content img {
  max-width: 100%;
  height: auto;
}

/* Back Arrow Button Styles */
.mt-back-arrow.button {
  background-color: #b8004c;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  font-family: Tahoma;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 18px;
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  margin: 10px;
}

.mt-back-arrow.button.show {
  display: flex;
}

.mt-back-arrow.button:hover {
  background-color: #fd0c6f;
}

/* Up Arrow Button Styles */
.mt-up-arrow.button {
  background-color: #b8004c;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  font-family: Tahoma;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 18px;
  display: none;
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  margin: 10px;
}

.mt-up-arrow.button.show {
  display: flex;
}

.mt-up-arrow.button:hover {
  background-color: #fd0c6f;
}

/* Ensure mt-tool-content-area is positioned relative for absolute buttons */
#mt-tool-content-area {
  position: relative;
  padding-bottom: 70px;
}

/* Animations */
@keyframes popIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUpWithFade {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s forwards;
}

.animate-slide-in-up {
  animation: slideInUpWithFade 0.5s forwards;
}

.animate-pop-in {
  animation: popIn 0.5s forwards;
}

.mt-pop-in {
  animation: popIn 0.5s forwards;
}

.mt-subcategory,
.mt-tool {
  opacity: 0;
}

/* Ensure Font Awesome icons are properly sized */
.mt-back-arrow.button i,
.mt-up-arrow.button i {
  font-size: 20px;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  #mt-categories-sidebar {
    width: calc(20% - 1vw);
  }

  #mt-categories-sidebar .mt-category .mt-icon img {
    max-width: 100%;
    max-height: 100%;
  }

  #mt-categories-sidebar .mt-category .mt-name {
    font-size: 14px;
  }

  /* Adjust subcategories and tools */
  #mt-subcategories-menu .mt-subcategory {
    width: calc(25% - 5vw);
  }

  #mt-tools-menu .mt-tool {
    width: calc(12% - 1vw);
  }
}

@media (max-width: 1024px) {
  #mt-categories-sidebar {
    width: calc(25% - 1vw);
    padding: 15px;
  }

  #mt-categories-sidebar .mt-category {
    padding: 8px;
  }

  #mt-categories-sidebar .mt-category .mt-icon img {
    max-width: 100%;
    max-height: 100%;
  }

  #mt-categories-sidebar .mt-category .mt-name {
    font-size: 13px;
    word-wrap: break-word;
  }

  /* Adjust subcategories and tools */
  #mt-subcategories-menu .mt-subcategory {
    width: calc(33.333% - 5vw);
  }

  #mt-tools-menu .mt-tool {
    width: calc(15% - 1vw);
  }
}

@media (max-width: 768px) {
  .mt-intro-section {
    flex-direction: column;
    align-items: center;
    padding: 50px;
  }

  .mt-intro-image {
    margin-right: 0;
    margin-bottom: 20px;
  }

  .mt-intro-text {
    text-align: center;
    max-width: 100%;
  }

  /* Adjust categories sidebar */
  #mt-categories-sidebar {
    width: 100%;
    border-left: none;
    border-bottom: 1px solid #ddd;
    padding: 15px;
    border-radius: 50px;
    border-left: 10px solid #b8004c;
    box-shadow: 5px 3px 10px #888 !important;
    margin-bottom: 20px;
  }

  #mt-categories-sidebar .mt-category {
    margin-bottom: 10px;
    padding: 20px;
    width: 48%;
    display: inline-block;
    height: 100%;
    vertical-align: middle;
  }

  #mt-categories-sidebar .mt-category:nth-child(odd) {
    margin-right: 4%;
  }

  #mt-categories-sidebar .mt-category .mt-icon img {
    max-width: 100%;
    max-height: 100%;
  }

  #mt-categories-sidebar .mt-category .mt-name {
    font-size: 14px;
    word-wrap: break-word;
  }

  /* Adjust main container */
  #mt-main-container {
    margin-top: 20px;
    flex-direction: column;
  }

  /* Adjust subcategories and tools */
  #mt-subcategories-menu .mt-subcategory,
  #mt-tools-menu .mt-tool {
    width: calc(50% - 10px);
  }

  /* Adjust tool icons */
  #mt-tools-menu .mt-tool .mt-icon {
    width: 50px;
    height: 50px;
  }

  /* Adjust tool names */
  #mt-tools-menu .mt-tool .mt-name {
    font-size: 14px;
  }

  /* Adjust tool content area */
  #mt-tool-content-area .mt-tool-title {
    font-size: 20px;
  }

  #mt-tool-content-area .mt-tool-content {
    font-size: 15px;
  }

  /* Back Arrow Button Styles */
  .mt-back-arrow.button {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: 15px;
    margin: 0;
  }

  /* Up Arrow Button */
  .mt-up-arrow.button {
    width: 40px;
    height: 40px;
    font-size: 20px;
    bottom: 15px;
    right: 45%;
    margin: 0;
  }

  /* Ensure buttons have sufficient spacing */
  #mt-tool-content-area .mt-tool-header {
    margin-bottom: 40px;
  }

  #mt-tool-content-area .mt-tool-content {
    margin-bottom: 40px;
  }

  /* Adjust tool buttons */
  .mt-tool-button {
    width: 48%;
    margin-right: 4%;
    margin-bottom: 10px;
  }

  .mt-tool-button:nth-child(2n) {
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  #mt-categories-sidebar {
    padding: 15px;
  }

  #mt-categories-sidebar .mt-category .mt-icon img {
    max-width: 100%;
    max-height: 100%;
  }

  #mt-categories-sidebar .mt-category .mt-name {
    font-size: 12px;
  }

  #mt-subcategories-menu .mt-subcategory {
    width: 45%;
  }

  #mt-tools-menu .mt-tool {
    width: 45%;
  }

  .mt-intro-text {
    max-width: 100%;
  }

  .mt-intro-section {
    padding: 40px 20px;
  }

  .mt-intro-image img {
    max-width: 150px;
  }

  /* Increase categories sidebar height */
  #mt-categories-sidebar {
    min-height: 100px;
  }

  /* Ensure buttons take full width */
  .mt-category {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
  }

  .mt-category .mt-name {
    display: block;
    text-align: center;
    width: 100%;
  }

  /* Ensure tool content area padding */
  #mt-tool-content-area {
    padding-bottom: 80px;
  }

  /* Adjust tool buttons */
  .mt-tool-button {
    width: 48%;
    margin-right: 4%;
    margin-bottom: 10px;
  }

  .mt-tool-button:nth-child(2n) {
    margin-right: 0;
  }
}

/* Ensure Font Awesome icons are properly sized */
.mt-back-arrow.button i,
.mt-up-arrow.button i {
  font-size: 20px;
}

/* Add styles for tool buttons */
.mt-tool-buttons {
  margin-top: 20px;
}

.mt-tool-button {
  background: #b8004c;
  border-radius: 15px;
  border: none;
  padding: 0;
  cursor: pointer;
  outline-offset: 4px;
  text-decoration: none;
  display: inline-block;
  margin-right: 10px;
  margin-bottom: 10px;
}

.mt-tool-button .front {
  display: block;
  padding: 12px 42px;
  border-radius: 12px;
  font-size: 16px;
  background: #fd0c6f;
  color: #ffffff;
  font-family: Tahoma, sans-serif;
  font-weight: bold;
  transform: translateY(-6px);
  transition: transform 0.2s;
  text-align: center;
}

.mt-tool-button:active .front {
  transform: translateY(-2px);
}

.mt-tool-button:hover .front {
  background: #ff87ba;
}

.mt-tool-button:focus {
  outline: none;
}
