/* MyAdvice Grid System - Bootstrap-like responsive grid */

/* CSS Custom Properties */
:root {
  --global-content-width: 1390px;
  --ma-gutter-x: 1.5rem;
  --ma-gutter-y: 0;
}

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

/* Container */
.ma-container {
  width: 100%;
  padding-right: var(--ma-gutter-x);
  padding-left: var(--ma-gutter-x);
  margin-right: auto;
  margin-left: auto;
}

/* Container breakpoints */
@media (min-width: 576px) {
  .ma-container {
    max-width: 540px;
  }
}

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

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

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

@media (min-width: 1400px) {
  .ma-container {
    max-width: var(--global-content-width);
  }
}

/* Row */
.ma-row {
  display: flex;
  flex-wrap: wrap;
  margin-top: calc(var(--ma-gutter-y) * -1);
  margin-right: calc(var(--ma-gutter-x) * -.5);
  margin-left: calc(var(--ma-gutter-x) * -.5);
}

.ma-row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--ma-gutter-x) * .5);
  padding-left: calc(var(--ma-gutter-x) * .5);
  margin-top: var(--ma-gutter-y);
}

/* Alignment utilities */
.ma-align-items-start {
  align-items: flex-start !important;
}

.ma-align-items-center {
  align-items: center !important;
}

.ma-align-items-end {
  align-items: flex-end !important;
}

.ma-justify-content-start {
  justify-content: flex-start !important;
}

.ma-justify-content-center {
  justify-content: center !important;
}

.ma-justify-content-end {
  justify-content: flex-end !important;
}

.ma-justify-content-between {
  justify-content: space-between !important;
}

.ma-justify-content-around {
  justify-content: space-around !important;
}

/* Base column (auto-width) */
.ma-col {
  flex: 1 0 0%;
}

/* Fixed-width columns */
.ma-col-1 {
  flex: 0 0 auto;
  width: 8.3333333333%;
}

.ma-col-2 {
  flex: 0 0 auto;
  width: 16.6666666667%;
}

.ma-col-3 {
  flex: 0 0 auto;
  width: 25%;
}

.ma-col-4 {
  flex: 0 0 auto;
  width: 33.3333333333%;
}

.ma-col-5 {
  flex: 0 0 auto;
  width: 41.6666666667%;
}

.ma-col-6 {
  flex: 0 0 auto;
  width: 50%;
}

.ma-col-7 {
  flex: 0 0 auto;
  width: 58.3333333333%;
}

.ma-col-8 {
  flex: 0 0 auto;
  width: 66.6666666667%;
}

.ma-col-9 {
  flex: 0 0 auto;
  width: 75%;
}

.ma-col-10 {
  flex: 0 0 auto;
  width: 83.3333333333%;
}

.ma-col-11 {
  flex: 0 0 auto;
  width: 91.6666666667%;
}

.ma-col-12 {
  flex: 0 0 auto;
  width: 100%;
}

/* Extra small breakpoint (576px and up) */
@media (min-width: 576px) {
  .ma-col-sm-1 {
    flex: 0 0 auto;
    width: 8.3333333333%;
  }
  
  .ma-col-sm-2 {
    flex: 0 0 auto;
    width: 16.6666666667%;
  }
  
  .ma-col-sm-3 {
    flex: 0 0 auto;
    width: 25%;
  }
  
  .ma-col-sm-4 {
    flex: 0 0 auto;
    width: 33.3333333333%;
  }
  
  .ma-col-sm-5 {
    flex: 0 0 auto;
    width: 41.6666666667%;
  }
  
  .ma-col-sm-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  
  .ma-col-sm-7 {
    flex: 0 0 auto;
    width: 58.3333333333%;
  }
  
  .ma-col-sm-8 {
    flex: 0 0 auto;
    width: 66.6666666667%;
  }
  
  .ma-col-sm-9 {
    flex: 0 0 auto;
    width: 75%;
  }
  
  .ma-col-sm-10 {
    flex: 0 0 auto;
    width: 83.3333333333%;
  }
  
  .ma-col-sm-11 {
    flex: 0 0 auto;
    width: 91.6666666667%;
  }
  
  .ma-col-sm-12 {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* Medium breakpoint (768px and up) */
@media (min-width: 768px) {
  .ma-col-md-1 {
    flex: 0 0 auto;
    width: 8.3333333333%;
  }
  
  .ma-col-md-2 {
    flex: 0 0 auto;
    width: 16.6666666667%;
  }
  
  .ma-col-md-3 {
    flex: 0 0 auto;
    width: 25%;
  }
  
  .ma-col-md-4 {
    flex: 0 0 auto;
    width: 33.3333333333%;
  }
  
  .ma-col-md-5 {
    flex: 0 0 auto;
    width: 41.6666666667%;
  }
  
  .ma-col-md-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  
  .ma-col-md-7 {
    flex: 0 0 auto;
    width: 58.3333333333%;
  }
  
  .ma-col-md-8 {
    flex: 0 0 auto;
    width: 66.6666666667%;
  }
  
  .ma-col-md-9 {
    flex: 0 0 auto;
    width: 75%;
  }
  
  .ma-col-md-10 {
    flex: 0 0 auto;
    width: 83.3333333333%;
  }
  
  .ma-col-md-11 {
    flex: 0 0 auto;
    width: 91.6666666667%;
  }
  
  .ma-col-md-12 {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* Large breakpoint (992px and up) */
@media (min-width: 992px) {
  .ma-col-lg-1 {
    flex: 0 0 auto;
    width: 8.3333333333%;
  }
  
  .ma-col-lg-2 {
    flex: 0 0 auto;
    width: 16.6666666667%;
  }
  
  .ma-col-lg-3 {
    flex: 0 0 auto;
    width: 25%;
  }
  
  .ma-col-lg-4 {
    flex: 0 0 auto;
    width: 33.3333333333%;
  }
  
  .ma-col-lg-5 {
    flex: 0 0 auto;
    width: 41.6666666667%;
  }
  
  .ma-col-lg-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  
  .ma-col-lg-7 {
    flex: 0 0 auto;
    width: 58.3333333333%;
  }
  
  .ma-col-lg-8 {
    flex: 0 0 auto;
    width: 66.6666666667%;
  }
  
  .ma-col-lg-9 {
    flex: 0 0 auto;
    width: 75%;
  }
  
  .ma-col-lg-10 {
    flex: 0 0 auto;
    width: 83.3333333333%;
  }
  
  .ma-col-lg-11 {
    flex: 0 0 auto;
    width: 91.6666666667%;
  }
  
  .ma-col-lg-12 {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* Extra large breakpoint (1200px and up) */
@media (min-width: 1200px) {
  .ma-col-xl-1 {
    flex: 0 0 auto;
    width: 8.3333333333%;
  }
  
  .ma-col-xl-2 {
    flex: 0 0 auto;
    width: 16.6666666667%;
  }
  
  .ma-col-xl-3 {
    flex: 0 0 auto;
    width: 25%;
  }
  
  .ma-col-xl-4 {
    flex: 0 0 auto;
    width: 33.3333333333%;
  }
  
  .ma-col-xl-5 {
    flex: 0 0 auto;
    width: 41.6666666667%;
  }
  
  .ma-col-xl-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  
  .ma-col-xl-7 {
    flex: 0 0 auto;
    width: 58.3333333333%;
  }
  
  .ma-col-xl-8 {
    flex: 0 0 auto;
    width: 66.6666666667%;
  }
  
  .ma-col-xl-9 {
    flex: 0 0 auto;
    width: 75%;
  }
  
  .ma-col-xl-10 {
    flex: 0 0 auto;
    width: 83.3333333333%;
  }
  
  .ma-col-xl-11 {
    flex: 0 0 auto;
    width: 91.6666666667%;
  }
  
  .ma-col-xl-12 {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* Order utilities */
@media (min-width: 576px) {
  .ma-order-sm-1 {
    order: 1 !important;
  }
  
  .ma-order-sm-2 {
    order: 2 !important;
  }
  
  .ma-order-sm-3 {
    order: 3 !important;
  }
  
  .ma-order-sm-4 {
    order: 4 !important;
  }
  
  .ma-order-sm-5 {
    order: 5 !important;
  }
  
  .ma-order-sm-6 {
    order: 6 !important;
  }
}

@media (min-width: 768px) {
  .ma-order-md-1 {
    order: 1 !important;
  }
  
  .ma-order-md-2 {
    order: 2 !important;
  }
  
  .ma-order-md-3 {
    order: 3 !important;
  }
  
  .ma-order-md-4 {
    order: 4 !important;
  }
  
  .ma-order-md-5 {
    order: 5 !important;
  }
  
  .ma-order-md-6 {
    order: 6 !important;
  }
}

@media (min-width: 992px) {
  .ma-order-lg-1 {
    order: 1 !important;
  }
  
  .ma-order-lg-2 {
    order: 2 !important;
  }
  
  .ma-order-lg-3 {
    order: 3 !important;
  }
  
  .ma-order-lg-4 {
    order: 4 !important;
  }
  
  .ma-order-lg-5 {
    order: 5 !important;
  }
  
  .ma-order-lg-6 {
    order: 6 !important;
  }
}

/* Media Object */
.ma-media-object {
  display: flex;
  align-items: flex-start;
}

.ma-media-object-icon {
  margin-right: 1rem;
}

.ma-media-object-content {
  flex: 1;
}

.ma-media-object-content p {
  padding: 0;
  margin: 0;
}

/* Button Styles */
.ma-btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: .375rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: .25rem;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

/* Utility Classes */
.ma-d-flex {
  display: flex !important;
}

.ma-d-none {
  display: none !important;
}

.ma-d-block {
  display: block !important;
}

.ma-d-inline-block {
  display: inline-block !important;
}

.ma-align-center {
  align-items: center !important;
}

.ma-text-center {
  text-align: center !important;
}

.ma-text-left {
  text-align: left !important;
}

.ma-text-right {
  text-align: right !important;
}

/* Spacing utilities */
.ma-m-0 {
  margin: 0 !important;
}

.ma-mt-0 {
  margin-top: 0 !important;
}

.ma-mb-0 {
  margin-bottom: 0 !important;
}

.ma-ml-0 {
  margin-left: 0 !important;
}

.ma-mr-0 {
  margin-right: 0 !important;
}

.ma-p-0 {
  padding: 0 !important;
}

.ma-pt-0 {
  padding-top: 0 !important;
}

.ma-pb-0 {
  padding-bottom: 0 !important;
}

.ma-pl-0 {
  padding-left: 0 !important;
}

.ma-pr-0 {
  padding-right: 0 !important;
}

.ma-ml-auto {
  margin-left: auto !important;
}

.ma-mr-auto {
  margin-right: auto !important;
}

.ma-mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Responsive visibility */
@media (max-width: 575.98px) {
  .ma-d-xs-none {
    display: none !important;
  }
  
  .ma-d-xs-block {
    display: block !important;
  }
}

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

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

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

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