/* 
 * Multi-Templates CSS Framework
 * A modular, opt-in CSS framework for multiple websites
 */

/* ====================================
   1. RESET & BASE STYLES
   ==================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Only apply reset when .mt-reset class is present on html or body */
.mt-reset {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  color: #333;
}

.mt-reset h1, .mt-reset h2, .mt-reset h3, .mt-reset h4, .mt-reset h5, .mt-reset h6,
.mt-reset p, .mt-reset ul, .mt-reset ol, .mt-reset dl, .mt-reset figure {
  margin: 0 0 1rem 0;
}

/* ====================================
   2. TYPOGRAPHY
   ==================================== */
.mt-typography h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.mt-typography h2 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
}

.mt-typography h3 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.mt-typography h4 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
}

.mt-typography h5 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.mt-typography h6 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.mt-typography p {
  margin-bottom: 1rem;
}

.mt-typography a {
  color: #0066cc;
  text-decoration: none;
}

.mt-typography a:hover {
  text-decoration: underline;
}

.mt-typography code {
  font-family: monospace;
  background-color: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}

/* ====================================
   3. UTILITY CLASSES
   ==================================== */

/* Spacing utilities */
.mt-m-0 { margin: 0 !important; }
.mt-m-1 { margin: 0.25rem !important; }
.mt-m-2 { margin: 0.5rem !important; }
.mt-m-3 { margin: 1rem !important; }
.mt-m-4 { margin: 1.5rem !important; }
.mt-m-5 { margin: 3rem !important; }

.mt-mx-auto { margin-left: auto !important; margin-right: auto !important; }
.mt-mt-0 { margin-top: 0 !important; }
.mt-mb-0 { margin-bottom: 0 !important; }
.mt-ml-0 { margin-left: 0 !important; }
.mt-mr-0 { margin-right: 0 !important; }

.mt-p-0 { padding: 0 !important; }
.mt-p-1 { padding: 0.25rem !important; }
.mt-p-2 { padding: 0.5rem !important; }
.mt-p-3 { padding: 1rem !important; }
.mt-p-4 { padding: 1.5rem !important; }
.mt-p-5 { padding: 3rem !important; }

/* Display utilities */
.mt-d-none { display: none !important; }
.mt-d-block { display: block !important; }
.mt-d-flex { display: flex !important; }
.mt-d-grid { display: grid !important; }
.mt-d-inline { display: inline !important; }
.mt-d-inline-block { display: inline-block !important; }

/* Flex utilities */
.mt-flex-row { flex-direction: row !important; }
.mt-flex-column { flex-direction: column !important; }
.mt-flex-wrap { flex-wrap: wrap !important; }
.mt-flex-nowrap { flex-wrap: nowrap !important; }
.mt-justify-start { justify-content: flex-start !important; }
.mt-justify-end { justify-content: flex-end !important; }
.mt-justify-center { justify-content: center !important; }
.mt-justify-between { justify-content: space-between !important; }
.mt-justify-around { justify-content: space-around !important; }
.mt-align-start { align-items: flex-start !important; }
.mt-align-end { align-items: flex-end !important; }
.mt-align-center { align-items: center !important; }
.mt-align-stretch { align-items: stretch !important; }

/* Grid utilities */
.mt-grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.mt-grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.mt-grid-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
.mt-grid-gap-1 { gap: 0.25rem !important; }
.mt-grid-gap-2 { gap: 0.5rem !important; }
.mt-grid-gap-3 { gap: 1rem !important; }
.mt-grid-gap-4 { gap: 1.5rem !important; }

/* Text utilities */
.mt-text-left { text-align: left !important; }
.mt-text-center { text-align: center !important; }
.mt-text-right { text-align: right !important; }
.mt-text-uppercase { text-transform: uppercase !important; }
.mt-text-lowercase { text-transform: lowercase !important; }
.mt-text-capitalize { text-transform: capitalize !important; }
.mt-fw-normal { font-weight: 400 !important; }
.mt-fw-bold { font-weight: 700 !important; }
.mt-fs-small { font-size: 0.875rem !important; }
.mt-fs-large { font-size: 1.25rem !important; }

/* Color utilities */
.mt-text-primary { color: #0066cc !important; }
.mt-text-secondary { color: #6c757d !important; }
.mt-text-success { color: #28a745 !important; }
.mt-text-danger { color: #dc3545 !important; }
.mt-text-warning { color: #ffc107 !important; }
.mt-text-info { color: #17a2b8 !important; }
.mt-text-light { color: #f8f9fa !important; }
.mt-text-dark { color: #343a40 !important; }

.mt-bg-primary { background-color: #0066cc !important; }
.mt-bg-secondary { background-color: #6c757d !important; }
.mt-bg-success { background-color: #28a745 !important; }
.mt-bg-danger { background-color: #dc3545 !important; }
.mt-bg-warning { background-color: #ffc107 !important; }
.mt-bg-info { background-color: #17a2b8 !important; }
.mt-bg-light { background-color: #f8f9fa !important; }
.mt-bg-dark { background-color: #343a40 !important; }

/* ====================================
   4. COMPONENTS
   ==================================== */

/* Container */
.mt-container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .mt-container {
    max-width: 540px;
  }
}

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

@media (min-width: 992px) {
  .mt-container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .mt-container {
    max-width: 1140px;
  }
}

/* Button */
.mt-btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
}

.mt-btn:hover, .mt-btn:focus {
  text-decoration: none;
}

.mt-btn:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.mt-btn-primary {
  color: #fff;
  background-color: #0066cc;
  border-color: #0066cc;
}

.mt-btn-primary:hover {
  color: #fff;
  background-color: #0056b3;
  border-color: #004fa6;
}

.mt-btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.mt-btn-secondary:hover {
  color: #fff;
  background-color: #5a6268;
  border-color: #545b62;
}

.mt-btn-success {
  color: #fff;
  background-color: #28a745;
  border-color: #28a745;
}

.mt-btn-success:hover {
  color: #fff;
  background-color: #218838;
  border-color: #1e7e34;
}

.mt-btn-danger {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}

.mt-btn-danger:hover {
  color: #fff;
  background-color: #c82333;
  border-color: #bd2130;
}

.mt-btn-outline {
  background-color: transparent;
}

.mt-btn-outline-primary {
  color: #0066cc;
  border-color: #0066cc;
}

.mt-btn-outline-primary:hover {
  color: #fff;
  background-color: #0066cc;
}

.mt-btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.2rem;
}

.mt-btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  line-height: 1.5;
  border-radius: 0.3rem;
}

/* Card */
.mt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
}

.mt-card-header {
  padding: 0.75rem 1.25rem;
  margin-bottom: 0;
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.mt-card-body {
  flex: 1 1 auto;
  padding: 1.25rem;
}

.mt-card-title {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.mt-card-text:last-child {
  margin-bottom: 0;
}

.mt-card-footer {
  padding: 0.75rem 1.25rem;
  background-color: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* Navbar */
.mt-navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

.mt-navbar-brand {
  display: inline-block;
  padding-top: 0.3125rem;
  padding-bottom: 0.3125rem;
  margin-right: 1rem;
  font-size: 1.25rem;
  line-height: inherit;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}

.mt-navbar-nav {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.mt-navbar-nav .mt-nav-item {
  padding: 0.5rem;
}

.mt-navbar-nav .mt-nav-link {
  display: block;
  padding: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.mt-navbar-toggler {
  padding: 0.25rem 0.75rem;
  font-size: 1.25rem;
  line-height: 1;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  cursor: pointer;
}

.mt-navbar-collapse {
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}

@media (max-width: 767.98px) {
  .mt-navbar-collapse {
    display: none;
  }
  
  .mt-navbar-collapse.mt-show {
    display: block;
  }
  
  .mt-navbar-nav {
    margin-top: 0.5rem;
  }
}

@media (min-width: 768px) {
  .mt-navbar-nav {
    flex-direction: row;
  }
  
  .mt-navbar-toggler {
    display: none;
  }
  
  .mt-navbar-collapse {
    display: flex !important;
  }
}

/* Modal */
.mt-modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
  display: none;
}

.mt-modal.mt-show {
  display: block;
}

.mt-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  opacity: 0.5;
}

.mt-modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
  max-width: 500px;
  margin: 1.75rem auto;
}

.mt-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  outline: 0;
}

.mt-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: 0.3rem;
  border-top-right-radius: 0.3rem;
}

.mt-modal-title {
  margin-bottom: 0;
  line-height: 1.5;
}

.mt-modal-close {
  padding: 1rem;
  margin: -1rem -1rem -1rem auto;
  background-color: transparent;
  border: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: 0.5;
  cursor: pointer;
}

.mt-modal-close:hover {
  opacity: 0.75;
}

.mt-modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.mt-modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
  border-bottom-right-radius: 0.3rem;
  border-bottom-left-radius: 0.3rem;
}

/* Accordion */
.mt-accordion {
  width: 100%;
}

.mt-accordion-item {
  border: 1px solid rgba(0, 0, 0, 0.125);
  margin-bottom: -1px;
}

.mt-accordion-header {
  margin-bottom: 0;
}

.mt-accordion-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  color: #212529;
  text-align: left;
  background-color: #fff;
  border: 0;
  border-radius: 0;
  overflow-anchor: none;
  cursor: pointer;
}

.mt-accordion-button:not(.mt-collapsed) {
  background-color: rgba(0, 0, 0, 0.03);
}

.mt-accordion-button::after {
  content: "+";
  margin-left: auto;
  width: 1.25rem;
  height: 1.25rem;
  text-align: center;
  line-height: 1.25rem;
}

.mt-accordion-button:not(.mt-collapsed)::after {
  content: "-";
}

.mt-accordion-collapse {
  display: none;
}

.mt-accordion-collapse.mt-show {
  display: block;
}

.mt-accordion-body {
  padding: 1rem 1.25rem;
}

/* Tabs */
.mt-tabs {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
  border-bottom: 1px solid #dee2e6;
}

.mt-tab-item {
  margin-bottom: -1px;
}

.mt-tab-link {
  display: block;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
  text-decoration: none;
  cursor: pointer;
}

.mt-tab-link:hover, .mt-tab-link:focus {
  border-color: #e9ecef #e9ecef #dee2e6;
}

.mt-tab-link.mt-active {
  color: #495057;
  background-color: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}

.mt-tab-content {
  margin-top: 0.5rem;
}

.mt-tab-pane {
  display: none;
}

.mt-tab-pane.mt-active {
  display: block;
}

/* ====================================
   5. THEMES
   ==================================== */

/* Light Theme (default) */
.mt-theme-light {
  color: #212529;
  background-color: #fff;
}

/* Dark Theme */
.mt-theme-dark {
  color: #f8f9fa;
  background-color: #343a40;
}

.mt-theme-dark .mt-card {
  background-color: #454d55;
  border-color: #212529;
}

.mt-theme-dark .mt-card-header,
.mt-theme-dark .mt-card-footer {
  background-color: rgba(0, 0, 0, 0.2);
  border-color: #212529;
}

.mt-theme-dark .mt-btn-outline-primary {
  color: #8bb9fe;
  border-color: #8bb9fe;
}

.mt-theme-dark .mt-modal-content {
  background-color: #454d55;
  border-color: #212529;
}

.mt-theme-dark .mt-modal-header,
.mt-theme-dark .mt-modal-footer {
  border-color: #212529;
}

.mt-theme-dark .mt-accordion-button {
  color: #f8f9fa;
  background-color: #454d55;
}

.mt-theme-dark .mt-accordion-button:not(.mt-collapsed) {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Minimal Theme */
.mt-theme-minimal {
  color: #212529;
  background-color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.mt-theme-minimal .mt-card {
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mt-theme-minimal .mt-btn {
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 400;
}

.mt-theme-minimal .mt-navbar {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mt-theme-minimal .mt-modal-content {
  border: none;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.mt-theme-minimal .mt-accordion-item {
  border: none;
  border-bottom: 1px solid #dee2e6;
}

.mt-theme-minimal .mt-tab-link {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.mt-theme-minimal .mt-tab-link.mt-active {
  border-bottom: 2px solid #0066cc;
}

/* ====================================
   6. RESPONSIVE UTILITIES
   ==================================== */

/* Hide on different screen sizes */
@media (max-width: 575.98px) {
  .mt-d-none-xs {
    display: none !important;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .mt-d-none-sm {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .mt-d-none-md {
    display: none !important;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .mt-d-none-lg {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  .mt-d-none-xl {
    display: none !important;
  }
}

/* Responsive columns */
.mt-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.mt-col {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

@media (min-width: 576px) {
  .mt-col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .mt-col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  
  .mt-col-sm-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

@media (min-width: 768px) {
  .mt-col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .mt-col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  
  .mt-col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

@media (min-width: 992px) {
  .mt-col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .mt-col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  
  .mt-col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}
