/* Device-wide responsive hardening for the extracted WebTechx site. */
:root {
  --webtechx-gutter: clamp(1rem, 4vw, 5rem);
  --webtechx-safe-left: max(0px, env(safe-area-inset-left));
  --webtechx-safe-right: max(0px, env(safe-area-inset-right));
  --webtechx-safe-bottom: max(0px, env(safe-area-inset-bottom));
}

/* Place the desk exactly on the red-to-white section boundary. */
.process-section,
.process-cta {
  overflow: visible !important;
}

@media (min-width: 768px) {
  .process-cta-phone {
    top: auto !important;
    bottom: -4rem !important;
    transform: translateY(58%) !important;
  }

  .process-cta-phone img {
    display: block;
  }
}

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

body,
#app {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
}

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

main,
section,
header,
footer,
nav,
.flex,
.grid,
.flex > *,
.grid > * {
  min-width: 0;
}

main,
section,
header,
footer,
nav {
  max-width: 100%;
}

img,
picture,
svg,
canvas,
video,
iframe {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

iframe {
  border: 0;
}

h1,
h2,
h3,
h4,
p,
a,
button,
label {
  overflow-wrap: break-word;
}

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

textarea {
  resize: vertical;
}

header {
  padding-left: max(0.75rem, var(--webtechx-safe-left));
  padding-right: max(0.75rem, var(--webtechx-safe-right));
}

header nav {
  width: 100%;
  max-width: 100%;
}

/* Mobile navigation drawers should use the real dynamic viewport height. */
[class~="fixed"][class~="h-screen"][class~="right-0"] {
  height: 100dvh !important;
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Keep dialogs usable on small screens and when browser chrome is visible. */
[class~="fixed"][class*="inset-4"],
[class~="fixed"][class*="inset-8"],
[class~="fixed"][class*="inset-12"] {
  max-height: calc(100dvh - 2rem);
  overscroll-behavior: contain;
}

/* Keep the floating contact control inside notches and rounded screen corners. */
.fixed.bottom-6.right-6 {
  right: max(0.75rem, var(--webtechx-safe-right)) !important;
  bottom: max(0.75rem, var(--webtechx-safe-bottom)) !important;
}

@media (pointer: coarse) {
  button:not([class*="w-2"]):not([class*="w-8"]),
  a[role="button"],
  input[type="submit"] {
    min-height: 44px;
  }
}

@media (max-width: 1024px) {
  header {
    padding: 0.75rem max(1rem, var(--webtechx-safe-right)) 0;
  }

  header nav {
    padding: 0.7rem 1rem !important;
  }

  [class*="lg:-translate-x"],
  [class*="lg:translate-x"] {
    translate: none;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 15px;
  }

  main h1 {
    max-width: 100%;
    font-size: clamp(2rem, 10vw, 3.75rem) !important;
    line-height: 1.05 !important;
  }

  main h2 {
    max-width: 100%;
    font-size: clamp(1.75rem, 8vw, 3rem) !important;
    line-height: 1.12 !important;
  }

  main h3 {
    font-size: clamp(1.25rem, 6vw, 2rem) !important;
  }

  input,
  select,
  textarea {
    /* Prevent automatic zoom on iOS form focus. */
    font-size: 16px !important;
  }

  [class*="min-h-[650px]"],
  [class*="min-h-[700px]"] {
    min-height: auto !important;
  }

  [class*="h-[500px]"],
  [class*="h-[550px]"],
  [class*="h-[600px]"] {
    height: auto !important;
    min-height: 27rem;
  }

  [class*="max-w-[1600px]"],
  [class*="max-w-[1400px]"] {
    width: 100%;
  }

  [class*="min-w-[85vw]"] {
    min-width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem);
  }

  .fixed.bottom-6.right-6 img {
    width: 3.25rem !important;
    height: 3.25rem !important;
  }

  .fixed.bottom-6.right-6 span {
    margin-bottom: 0.35rem !important;
    padding: 0.25rem 0.7rem !important;
    font-size: 0.75rem !important;
  }
}

@media (max-width: 479px) {
  header {
    padding: 0.5rem 0.625rem 0;
  }

  header nav {
    padding: 0.6rem 0.75rem !important;
    border-radius: 1.5rem !important;
  }

  header nav button {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  [class*="px-20"],
  [class*="px-24"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  [class*="gap-16"],
  [class*="gap-20"] {
    gap: 2rem !important;
  }
}

/* Short landscape phones and tablets need compact chrome and usable heroes. */
@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  header {
    padding-top: 0.35rem;
  }

  header nav {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
  }

  main h1 {
    font-size: clamp(2rem, 7vw, 3.5rem) !important;
  }

  [class*="h-[45vh]"],
  [class*="h-[50vh]"],
  [class*="h-[65vh]"] {
    height: auto !important;
    min-height: 100dvh;
  }
}

@media (min-width: 1600px) {
  .max-w-7xl {
    max-width: 88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  header,
  .fixed.bottom-6.right-6 {
    display: none !important;
  }

  body {
    color: #111;
    background: #fff;
  }
}
/* Reviews and independent review-platform logos */
header nav {
  background: rgba(255, 255, 255, 0.97) !important;
}

.process-diagram-container {
  aspect-ratio: 16 / 6 !important;
  max-height: 560px;
}

.desktop-services-menu:focus-within .desktop-services-panel,
.desktop-services-menu.is-open .desktop-services-panel {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.desktop-services-menu.is-open .desktop-services-menu > button svg,
.desktop-services-menu.is-open > button svg {
  transform: rotate(180deg);
}

.desktop-services-menu > button {
  cursor: pointer;
}

.mobile-services-dropdown > summary {
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-services-dropdown > summary::-webkit-details-marker {
  display: none;
}

.mobile-services-dropdown .mobile-services-list {
  animation: webtechx-menu-open 180ms ease-out;
}

.mobile-services-dropdown[open] .mobile-services-chevron {
  transform: rotate(180deg);
}

@keyframes webtechx-menu-open {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.review-platforms {
  padding: 2.5rem 1rem;
}

.review-platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.review-platform-card {
  min-width: 0;
  height: 88px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.review-platform-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 150px;
  max-height: 42px;
  object-fit: contain;
}

.reviews-grid {
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem !important;
}

.reviews-row,
.reviews-track {
  display: contents !important;
}

.reviews-track {
  transform: none !important;
}

.reviews-track > :nth-child(n + 4) {
  display: none !important;
}

.review-card {
  min-width: 0 !important;
  width: 100%;
  height: 100%;
}

.reviews-native-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .review-platform-grid,
  .reviews-grid,
  .reviews-native-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  html,
  body,
  #app {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
  }

  header {
    width: 100vw !important;
    max-width: 100vw !important;
    padding-inline: 0.5rem !important;
  }

  header nav {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .home-hero-grid,
  .home-hero-grid > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .home-hero-title {
    max-width: 100%;
    font-size: clamp(2rem, 10.5vw, 2.75rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em !important;
    overflow-wrap: anywhere;
  }

  .home-services-kicker {
    max-width: 100%;
    font-size: 0.78rem !important;
    letter-spacing: 0.18em !important;
    line-height: 1.4 !important;
    white-space: normal;
  }

  .home-services-title {
    max-width: 100%;
    font-size: clamp(1.9rem, 9vw, 2.35rem) !important;
    line-height: 1.12 !important;
    overflow-wrap: anywhere;
  }

  .review-platforms {
    padding: 2rem 0.875rem;
  }

  .review-platform-grid {
    gap: 0.75rem;
  }

  .review-platform-card {
    height: 72px;
    padding: 1rem;
  }

  .review-platform-logo {
    max-width: 120px;
    max-height: 34px;
  }

  .reviews-grid,
  .reviews-native-grid {
    width: min(100% - 1.5rem, 520px);
    grid-template-columns: 1fr;
    gap: 1rem !important;
  }
}
