/* CSA Endustri mobile-first responsive foundation.
   Loaded after page-specific styles on every public page. */

:root {
  --csa-page-gutter: clamp(16px, 4vw, 32px);
  --csa-touch-size: 44px;
}

html {
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  max-width: 100%;
  overflow-x: clip;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

.container,
.container-fluid,
.row,
.row > *,
[class*="col-"] {
  min-width: 0;
}

h1,
h2,
h3,
h4,
p,
li,
a,
button,
td,
th {
  overflow-wrap: anywhere;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

input,
select,
textarea {
  font-size: 16px;
}

.table-responsive,
.post-table-wrap,
.comparison-wrapper,
.page-content:has(> table),
.post-content:has(> table),
.product-description:has(> table) {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.table-responsive,
.post-table-wrap,
.comparison-wrapper {
  touch-action: pan-x pan-y;
}

.table-responsive table,
.post-table-wrap table,
.comparison-wrapper table {
  margin-bottom: 0;
}

.gallery-slides,
.home-testimonial-track,
.reviews-carousel,
.reviews-4-carousel,
.owl-stage {
  touch-action: pan-y;
}

.home-certificate-grid {
  touch-action: pan-x pan-y;
}

.gallery-indicators {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}

.product-description iframe,
.page-content iframe,
.post-content iframe,
.product-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto !important;
}

@media (max-width: 991.98px) {
  select.form-control,
  select.form-select,
  .form-select,
  .custom-select {
    min-height: var(--csa-touch-size);
  }

  .wsmobileheader .wsanimated-arrow {
    box-sizing: border-box;
    width: var(--csa-touch-size);
    height: var(--csa-touch-size);
    margin-top: 18px;
    margin-right: 6px;
    padding: 20px 31px 20px 9px;
  }

  html[dir="rtl"] .wsmobileheader .wsanimated-arrow {
    right: auto;
    left: 6px;
    margin-right: 0;
    margin-left: 0;
  }

  html[dir="rtl"] .wsmobileheader .smllogo {
    padding-right: 10px;
    padding-left: 58px;
  }

  .wsmenu > .wsmenu-list > li > a,
  .wsmenu > .wsmenu-list > li > .wsmenu-click {
    min-height: 52px;
  }

  .csa-language-nav-item {
    min-height: 58px;
    margin: 0 !important;
    padding: 8px 18px 14px;
  }

  .csa-language-switcher > button {
    min-width: 64px;
    min-height: var(--csa-touch-size);
  }

  .csa-language-menu a {
    min-height: var(--csa-touch-size);
    align-items: center;
  }

  .pt-btn,
  .btn,
  button[type="submit"],
  input[type="submit"] {
    min-height: var(--csa-touch-size);
  }

  .product-info {
    margin-top: 28px;
  }

  .downloads-section {
    padding: clamp(18px, 4vw, 26px);
  }

  .download-item .d-flex {
    align-items: flex-start !important;
    gap: 12px;
  }

  .comparison-table {
    min-width: 760px;
  }

  .owl-carousel .owl-nav button.owl-prev,
  .owl-carousel .owl-nav button.owl-next {
    min-width: var(--csa-touch-size);
    min-height: var(--csa-touch-size);
  }

  .owl-carousel .owl-dots .owl-dot {
    min-width: 36px;
    min-height: 36px;
    padding: 10px !important;
  }
}

@media (max-width: 767.98px) {
  .container,
  .container-sm,
  .container-fluid {
    --bs-gutter-x: 2rem;
  }

  .section-title,
  .post-header {
    max-width: 100%;
  }

  .section-title h1,
  .post-header h1,
  .product-header h1 {
    font-size: clamp(1.85rem, 8.5vw, 2.55rem) !important;
    line-height: 1.12;
  }

  .section-title h2,
  .page-content h2,
  .post-content h2,
  .product-description h2 {
    font-size: clamp(1.55rem, 7vw, 2.1rem) !important;
    line-height: 1.18;
  }

  .page-content,
  .post-content,
  .product-description,
  .reference-description {
    font-size: 1rem;
    line-height: 1.7;
  }

  .gallery-nav {
    width: var(--csa-touch-size);
    height: var(--csa-touch-size);
  }

  .gallery-prev {
    left: 10px;
  }

  .gallery-next {
    right: 10px;
  }

  .gallery-counter {
    right: 10px;
    bottom: 10px;
  }

  .gallery-indicator {
    flex: 0 0 68px;
    width: 68px;
    height: 54px;
  }

  .gallery-slide--portrait {
    height: min(70vh, 440px);
  }

  .gallery-slide--portrait img {
    max-height: min(70vh, 440px);
  }

  .product-actions .btn,
  .card-footer .btn,
  .downloads-section .col-md-6 {
    width: 100%;
  }

  .download-item {
    padding: 14px;
  }

  .download-item .text-end {
    flex: 0 0 auto;
  }

  .post-data-table {
    min-width: 1180px;
  }

  .footer .footer-info > p {
    max-width: none;
  }

  .footer a,
  .footer-project-link,
  .home-text-link {
    display: inline-flex;
    min-height: var(--csa-touch-size);
    align-items: center;
    padding-block: 8px;
  }

  .footer-socials a,
  .social-icons a,
  .contact-social-links a {
    min-width: var(--csa-touch-size);
    min-height: var(--csa-touch-size);
    align-items: center;
    justify-content: center;
  }

  .whatsapp-float,
  .whatsapp-button,
  [class*="whatsapp"] a {
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 374.98px) {
  .wsmobileheader .smllogo {
    gap: 4px;
    width: calc(100% - 58px);
    padding-left: 10px;
  }

  #header .wsmobileheader .smllogo > a:first-child img {
    height: 21px;
    max-height: 21px;
  }

  .wsmobileheader .smllogo > a:last-child img {
    max-height: 21px;
  }

  .section-title h1,
  .post-header h1,
  .product-header h1 {
    font-size: clamp(1.7rem, 8.2vw, 2.1rem) !important;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .container,
  .container-md,
  .container-lg {
    max-width: calc(100% - 48px);
  }

  .machine-group-card__body,
  .product-card .card-body {
    padding: clamp(18px, 2vw, 24px);
  }
}

@media (hover: none), (pointer: coarse) {
  .machine-group-card:hover,
  .product-card:hover,
  .download-item:hover,
  .link-item:hover {
    transform: none;
  }

  a,
  button,
  [role="button"] {
    -webkit-tap-highlight-color: rgba(36, 137, 238, .14);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
