@media (min-width: 1440px) {
  html {
    font-size: 62.5%;
  }
}

@media (min-width: 992px) and (max-width: 1439.99px) {
  html {
    font-size: 0.66vw;
  }
}

@media (min-width: 992px) {
  .page-container {
    max-width: 139rem;
  }

  .main-content .row.g-4 {
    --bs-gutter-x: 2rem;
    --bs-gutter-y: 2rem;
  }

  .page-container > .row > .col-xl-9 {
    width: 76.5%;
  }

  .page-container > .row > .col-xl-3 {
    width: 23.5%;
  }
}

@media (max-width: 991.98px) {
  html {
    font-size: 55%;
  }

  /* ======= Menu Pre Styles Start ======= */
  .topbar {
    flex-wrap: wrap;
    padding: 1.25rem 0;
  }

  .main-nav {
    order: 3;
    width: fit-content;
    justify-content: flex-start;
    flex: 0 0 auto;
  }

  .main-nav .navbar-collapse {
    margin-top: 1rem;
    padding: 1rem;
    border: 0.0625rem solid var(--color-border);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1rem 2rem rgba(16, 23, 42, 0.08);
  }

  .main-nav .navbar-nav {
    gap: 1rem;
    align-items: flex-start !important;
  }

  .ads-card {
    min-height: 18rem;
  }

  .ads-card__label {
    transform: none;
    font-size: 2rem;
  }

  .language-switch .dropdown-menu {
    left: 50%;
  }

  /* ======= Menu Pre Styles end ======= */

  .main-nav .dropdown-menu,
  .language-switch .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    transform: none;
  }

  .main-nav .dropdown .dropdown-menu.show,
  .language-switch .dropdown-menu.show {
    display: block;
  }

  .page-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .category-list {
    justify-content: flex-start;
    padding: 0 4rem;
  }

  .company-card__title {
    font-size: 1.5rem;
    line-height: 1.5;
  }

  .article-item {
    flex-direction: column;
  }

  .article-item p {
    max-width: 100%;
  }

  .activity-diagram {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .activity-node-group::before,
  .activity-node-group::after {
    display: none;
  }

  .activity-node--left::after,
  .activity-node-group .activity-node::after,
  .activity-node--right::before,
  .activity-node-group .activity-node::before {
    display: none;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .activity-node {
    min-height: 2.5rem;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    line-height: 2.5rem;
  }

  .flow-img {
    width: 19rem;
    margin: 0 -0.5rem;
  }

  .detail-row {
    grid-template-columns: 14rem 1fr;
    gap: 1.5rem;
  }

  .section-flex-img {
    width: 18rem;
    height: 12rem;
  }

  .section-flex-right ul li {
    flex-direction: column;
    align-items: flex-start;
    line-height: 2rem;
    gap: 0.8rem;
  }

  .language-switch {
    margin-right: 0.6rem;
  }

  .btn-close {
    display: none;
  }

  /* ========= Main Nav ========== */

  .main-nav {
    width: auto;
    flex: 0 0 auto;
    position: static;
  }

  .navbar-toggler {
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 1.1rem;
    border: 0.1rem solid rgba(17, 17, 17, 0.12) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f4f6fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(216, 0, 39, 0.15) !important;
  }

  .menu-icon {
    width: 2.2rem;
    height: 1.5rem;
    position: relative;
    transform: rotate(0deg);
    transition: 0.5s ease-in-out;
    cursor: pointer;
  }

  .menu-icon span {
    display: block;
    position: absolute;
    height: 0.2rem;
    width: 100%;
    background: #111;
    border-radius: 0.2rem;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
  }

  .menu-icon span:nth-child(1) {
    top: 0rem;
  }

  .menu-icon span:nth-child(2) {
    top: 0.65rem;
  }

  .menu-icon span:nth-child(3) {
    top: 1.3rem;
  }

  .navbar-toggler[aria-expanded="true"] .menu-icon span:nth-child(1) {
    top: 0.65rem;
    transform: rotate(135deg);
  }

  .navbar-toggler[aria-expanded="true"] .menu-icon span:nth-child(2) {
    opacity: 0;
    left: -1rem;
  }

  .navbar-toggler[aria-expanded="true"] .menu-icon span:nth-child(3) {
    top: 0.65rem;
    transform: rotate(-135deg);
  }

  .main-nav .navbar-collapse {
    width: 100vw;
    height: calc(100dvh - 10rem);
    max-height: none;
    padding: 6.5rem 1.5rem 2rem 1.5rem;
    margin-top: 0;
    border-radius: 0;
    border: none;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    box-shadow: none;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(1.5rem);
    pointer-events: none;
    transition:
      opacity 0.3s ease,
      transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: fixed;
    top: 10rem;
    left: 0;
    z-index: 1301;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .main-nav .navbar-collapse.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav .navbar-nav {
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
  }

  .main-nav .nav-item {
    width: 100%;
  }

  .main-nav .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.95rem;
    border: 0.1rem solid rgba(17, 17, 17, 0.08);
    background: #ffffff;
    padding: 1.2rem 1.4rem !important;
    white-space: normal;
    line-height: 1.3;
    font-size: 1.35rem;
    box-shadow: 0 0.5rem 1rem rgba(16, 23, 42, 0.06);
  }

  .main-nav .nav-link.active,
  .main-nav .nav-link:hover,
  .main-nav .nav-link:focus {
    background: #fff5f7;
    border-color: rgba(216, 0, 39, 0.25);
  }

  .main-nav .navbar-nav .dropdown-toggle::after {
    transition: transform 0.3s ease;
  }

  .main-nav .navbar-nav .dropdown.mobile-open > .dropdown-toggle::after {
    transform: rotate(180deg);
  }

  .main-nav .navbar-nav .dropdown > .dropdown-menu {
    display: block !important;
    width: 100%;
    max-height: 0;
    margin-top: 0;
    padding: 0 0.75rem;
    border-radius: 1rem;
    border: 0 solid rgba(17, 17, 17, 0);
    background: #ffffff;
    box-shadow: none;
    overflow: hidden;
    opacity: 0;
    transform: none;
    visibility: hidden;
    pointer-events: none;
    transition:
      max-height 0.4s ease,
      opacity 0.25s ease,
      padding 0.25s ease,
      margin-top 0.25s ease,
      border-width 0.25s ease,
      visibility 0.4s ease;
  }

  .main-nav .navbar-nav .dropdown.mobile-open > .dropdown-menu {
    max-height: 40rem !important;
    opacity: 1;
    margin-top: 0.6rem;
    padding: 0.75rem;
    visibility: visible;
    pointer-events: auto;
    border: 0.1rem solid rgba(17, 17, 17, 0.08);
    transform: translateY(0) translateX(0);
  }

  .mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    font-size: 1.25rem;
  }

  .main-nav .dropdown-item {
    border-radius: 0.75rem;
    font-size: 1.25rem;
    padding: 0.75rem 0.8rem;
  }

  .topbar {
    align-items: center !important;
    position: relative;
    flex-wrap: nowrap;
    overflow: visible;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  .mt-lg-20 {
    margin-top: 2rem !important;
  }

  .card-shell,
  .company-card,
  .articles-card,
  .ads-card {
    border-radius: 1rem;
  }

  /* ========== Nav slider ========== */
  .breadcrumb-slider-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    margin-top: 2rem;
    border-radius: var(--radius-lg);
    position: relative;
  }

  .breadcrumb-slider {
    width: 100%;
    position: relative;
  }

  .breadcrumb-card {
    margin-top: 0;
  }

  .breadcrumb-card::-webkit-scrollbar {
    display: none;
    scrollbar-width: none;
  }

  /* arrows */
  .breadcrumb-nav, .menulinks-nav {
    display: none;
    position: absolute;
    z-index: 2;
    background: rgb(255, 255, 255, 0.8);
    border: 0.1rem solid #ddd;
    font-size: 1.7rem;
    padding: 0.6rem 1.1rem;
    cursor: pointer;
    border-radius: 10rem;
  }

  .menulinks-nav {
    display: block;
  }

  .breadcrumb-nav.prev, .menulinks-nav.prev {
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .breadcrumb-nav.next, .menulinks-nav.next {
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
  }
}

@media (max-width: 767.98px) {
  html {
    font-size: 2.3vw;
  }

  .brand img {
    width: 11.5rem;
  }

  .language-switch {
    margin-left: auto;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .company-info {
    padding: 1.25rem 1rem;
  }

  .search-card,
  .company-card__body {
    padding-left: 1.6rem;
    padding-right: 1.6rem;
  }

  .detail-row span {
    min-width: 100%;
    line-height: 1.5;
  }

  .detail-row {
    gap: 0.5rem;
    line-height: 1.6;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 0;
  }

  .site-footer {
    padding-top: 2.25rem;
  }

  .company-details {
    gap: 2rem;
  }

  .company-details .col-md-5 > a {
    margin: 0;
    padding: 0;
    text-align: center;
  }

  .company-details .col-md-5 {
    justify-content: center;
  }

  .article-item-inner {
    gap: 2rem;
  }

  .activity-diagram {
    flex-direction: column;
    gap: 5.2rem;
    padding: 2rem 0;
  }

  .flow-left {
    transform: rotate(90deg);
    width: 18rem;
  }

  .flow-right {
    transform: rotate(-270deg);
    width: 18rem;
  }

  .activity-node {
    min-height: 4rem;
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    line-height: 2.5rem;
  }

  .site-footer h4 {
    margin: 0 0 1rem;
  }

  .category-list {
    min-height: 6rem;
  }

  .topbar {
    min-height: 7rem;
  }

  .keywords-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .section-flex {
    gap: 2rem;
    flex-direction: column;
  }

  .autovici-img {
    width: 15rem;
  }

  .section-flex-img {
    width: 18rem;
    height: 7rem;
  }

  .section-flex-right ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .bmw-img2 {
    width: 6rem;
  }

  .section-flex-right.v2 ul {
    grid-template-columns: 1fr 1fr;
  }

  .pagination-bar {
    flex-direction: column;
    height: auto;
    padding: 1rem 2rem;
    gap: 0.6rem;
  }

  .popup-content {
    margin: 1rem auto;
    width: 95%;
  }

  .popup-slider {
    gap: 1rem;
  }

  .nav {
    font-size: 1.8rem;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
  }

  .main-nav .navbar-collapse {
    height: calc(100dvh - 7rem);
    top: 7rem;
  }

  .search-form .col-12.col-md-9:nth-child(3) {
    order: -1;
  }

  /* ========= breadcrumb ========== */
  /* MOBILE ONLY */
  .breadcrumb-nav, .menulinks-nav {
    display: block;
  }

  .breadcrumb-card,
  .breadcrumb-slider-wrap {
    padding: 0;
    width: calc(100% + 4rem);
    transform: translateX(-2rem);
    border-radius: 0;
    border: none;
    background: transparent;
  }

  .breadcrumb-slider-wrap {
    padding: 1.5rem 0 1.5rem;
    background: var(--color-surface-soft);
    border: 0.1rem solid var(--color-border);
  }

  .breadcrumb-slider-wrap.v2 {
    padding: 1.5rem 0 4rem;
  }

  .breadcrumb {
    padding: 0;
    gap: 1.2rem;
  }

  .breadcrumb-item:last-child {
    padding-right: 7rem;
  }

  .breadcrumb-item:first-child {
    padding-left: 7rem;
  }

  .imoniu-text {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 575.98px) {
  .topbar {
    gap: 1rem;
  }

  .language-btn {
    min-width: 4.75rem;
    min-height: 2.875rem;
    padding: 0.6rem 1rem;
  }

  .search-card {
    padding: 1rem;
  }

  .section-header {
    min-height: 5rem;
    padding: 1.25rem 1.6rem;
  }

  .btn-search,
  .btn-outline-search,
  .search-input {
    min-height: 5rem;
  }

  .category-list {
    width: calc(100% + 4rem);
    transform: translateX(-2rem);
    padding: 0 6rem;
  }
}

@media print {
  .site-header,
  .sidebar-stack,
  .site-footer,
  .print-btn,
  .search-card {
    display: none !important;
  }

  .main-content {
    padding: 0;
  }

  .company-card {
    border: 0;
  }
}
