/**
 * Pak Turk Global - Production Senior Responsive System
 * Breakpoints: 1280px, 1024px, 768px, 480px, 360px
 * Pixel-Perfect Mobile Ergonomics, Unified Card Padding & Balanced Typography
 */

/* ==========================================================================
   Desktop Large / Laptop (1280px and down)
   ========================================================================== */
@media (max-width: 1280px) {
  :root {
    --container-width: 1140px;
  }

  .process-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .footer-top {
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
    gap: 24px;
  }
}

/* ==========================================================================
   Tablets / Small Desktops (1024px and down)
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --container-width: 100%;
    --nav-height: 68px;
  }

  .section {
    padding-top: 2.75rem;
    padding-bottom: 2.75rem;
  }

  .section-sm {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
  }

  .hero {
    padding: 3rem 0 3.25rem 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-visual {
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
  }

  .hero-image-frame img {
    height: 320px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .industry-grid-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 22px 24px;
  }

  .stat-item:nth-child(2)::after {
    display: none;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  body.nav-open {
    overflow: hidden;
  }

  /* Mobile Navigation Trigger & Slide Drawer */
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #FFFFFF;
    border: 1px solid var(--color-slate-200);
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--color-slate-800);
  }

  .site-nav {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: #FFFFFF;
    border-top: 1px solid var(--color-slate-200);
    padding: 20px 16px 40px 16px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid var(--color-slate-100);
  }

  .nav-dropdown {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--color-slate-100);
    background-color: var(--color-slate-50);
    border-radius: var(--radius-sm);
    margin-top: 4px;
    margin-bottom: 6px;
    display: none;
    padding: 6px;
  }

  .nav-item.dropdown-active .nav-dropdown {
    display: block;
  }

  .dropdown-link {
    padding: 10px 12px;
  }

  .dropdown-title {
    font-size: 0.92rem;
    font-weight: 600;
  }

  .dropdown-desc {
    display: none !important;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .header-actions .btn-header-hire {
    display: none;
  }

  .mobile-only-action {
    display: block !important;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-slate-100);
  }
}

/* ==========================================================================
   Medium Screens / Narrow Two-Column Layouts (900px and down)
   ========================================================================== */
@media (max-width: 900px) {
  .btn-row-dual {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .btn-row-dual .btn {
    width: 100% !important;
    min-height: 48px;
    padding: 12px 20px;
    font-size: 0.95rem;
    white-space: normal;
  }

  .trades-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px !important;
  }
}

/* ==========================================================================
   Mobile Tablets & Large Phones (768px and down)
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .top-bar {
    display: none;
  }

  .section {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }

  .section-sm {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .section-header {
    margin-bottom: 1.5rem;
  }

  .section-header h2 {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .page-hero {
    padding: 2.25rem 0;
  }

  .page-hero h1 {
    font-size: 1.5rem;
    line-height: 1.22;
    margin-bottom: 0.5rem;
  }

  .page-hero .lead {
    font-size: 0.925rem;
    line-height: 1.5;
  }

  /* Universal Single-Column Layouts for Clean Vertical Rhythm */
  .grid-2,
  .grid-3,
  .grid-4,
  .mission-vision-grid,
  .gateway-grid,
  .industry-grid-compact {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .industry-filter-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px 14px !important;
    gap: 12px !important;
  }

  .industry-filter-tabs {
    gap: 6px !important;
  }

  .industry-filter-btn {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
  }

  .industry-search-wrap {
    max-width: 100% !important;
    width: 100% !important;
  }

  .industry-card-compact {
    padding: 20px 18px !important;
  }

  .mandate-card,
  .gateway-card {
    padding: 26px 20px !important;
    border-radius: 14px !important;
  }

  .mandate-icon-box,
  .gateway-icon-badge {
    width: 44px;
    height: 44px;
  }

  .mandate-title,
  .gateway-title {
    font-size: 1.18rem;
    line-height: 1.3;
  }

  .mandate-description,
  .gateway-desc {
    font-size: 0.88rem;
    margin-bottom: 16px;
  }

  .mandate-pillar-item,
  .gateway-bullets li {
    font-size: 0.825rem;
    gap: 10px;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Mobile Card Ergonomics - Never Squeeze Text */
  .card,
  .service-card,
  .industry-card,
  .form-card,
  .compliance-checklist-card,
  [style*="padding: 36px"],
  [style*="padding: 44px"],
  [style*="padding:36px"],
  [style*="padding:44px"] {
    padding: 22px 18px !important;
    border-radius: 14px !important;
  }

  .compliance-item {
    font-size: 0.85rem;
    gap: 10px;
  }

  .compliance-card-header h3 {
    font-size: 1.15rem;
  }

  .audience-card {
    padding: 0 !important;
    border-radius: 12px !important;
  }

  .audience-card-body {
    padding: 18px 16px !important;
  }

  .audience-card-media {
    height: 160px;
  }

  .card h3,
  .service-card h3,
  .audience-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
  }

  .card h3, .card h4,
  .service-card h3, .service-card h4,
  .process-step h3, .process-step h4 {
    font-size: 0.98rem;
    margin-bottom: 0.35rem;
  }

  .card p,
  .service-card p {
    font-size: 0.85rem;
    line-height: 1.55;
    margin-bottom: 0.75rem;
    text-align: left;
    text-justify: none;
    hyphens: none;
    -webkit-hyphens: none;
    word-spacing: normal;
  }

  p,
  .lead,
  .form-card p,
  .form-group p,
  .contact-channel-card p {
    text-align: left !important;
    text-justify: none !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-spacing: normal !important;
  }

  /* Mobile WhatsApp Dispatch Card */
  .whatsapp-dispatch-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 18px 16px !important;
    gap: 16px !important;
  }

  .whatsapp-dispatch-card .dispatch-content {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .whatsapp-dispatch-card .dispatch-icon {
    width: 40px !important;
    height: 40px !important;
    margin-top: 2px !important;
  }

  .whatsapp-dispatch-card .dispatch-icon svg {
    width: 22px !important;
    height: 22px !important;
  }

  .whatsapp-dispatch-card h3, .whatsapp-dispatch-card h4 {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
    text-align: left !important;
  }

  .whatsapp-dispatch-card p {
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
    text-align: left !important;
    text-justify: none !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-spacing: normal !important;
  }

  .whatsapp-dispatch-card .dispatch-btn {
    width: 100% !important;
    min-height: 48px !important;
    padding: 12px 18px !important;
    font-size: 0.95rem !important;
    justify-content: center !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  .lang-switcher-btn {
    padding: 6px 9px;
    font-size: 0.82rem;
    gap: 5px;
  }

  .lang-switcher-flag {
    font-size: 0.95rem;
  }

  .card .audience-features,
  .audience-card .audience-features {
    margin: 0.75rem 0 1rem 0;
  }

  .card .audience-features li,
  .audience-card .audience-features li {
    font-size: 0.825rem;
    gap: 8px;
    margin-bottom: 8px;
    line-height: 1.4;
  }

  /* Button Groups inside cards, dual rows & Mobile */
  .card .btn-group,
  .card > .btn,
  .card > a.btn {
    width: 100%;
    margin-top: 0.75rem;
  }

  .card .btn-group .btn {
    flex: 1 1 100%;
  }

  .btn-row-dual {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 1.25rem;
  }

  .btn-row-dual .btn {
    width: 100% !important;
    min-height: 48px;
    padding: 12px 20px;
    font-size: 0.95rem;
    white-space: normal;
  }

  /* Hero Mobile Refinements */
  .hero {
    padding: 2.25rem 0 2.5rem 0;
  }

  .hero h1 {
    font-size: 1.65rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
  }

  .hero .lead,
  .hero-lead {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    text-align: left;
    text-justify: none;
    hyphens: none;
    -webkit-hyphens: none;
    word-spacing: normal;
  }

  .hero-cta-group {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 1.25rem;
  }

  .hero-cta-group .btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  .hero-trust-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.78rem;
  }

  .hero-image-frame,
  .hero-image-frame[style],
  .hero-media-frame,
  .hero-media-frame[style] {
    height: auto !important;
  }

  .hero-image-frame img,
  .hero-media-frame img {
    height: 230px !important;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
  }

  .hero-float-card,
  .floating-metric-card {
    position: static;
    margin-top: 12px;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
  }

  .hero-float-card .icon-box {
    width: 36px;
    height: 36px;
  }

  .hero-float-card h3, .hero-float-card h4 {
    font-size: 0.88rem;
  }

  .hero-float-card p {
    font-size: 0.75rem;
  }

  /* Trades Grid Mobile */
  .trades-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .trade-item {
    padding: 10px 14px;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  /* Stat & Trust Strip */
  .stat-strip {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 12px;
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .stat-item {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-slate-100);
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .stat-title {
    font-size: 0.98rem;
    margin-bottom: 2px;
  }

  .stat-desc {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  /* Commitment & Transparency Section */
  .commitment-section {
    padding: 2.5rem 0 !important;
  }

  .commitment-badge {
    font-size: 0.72rem !important;
    padding: 5px 12px !important;
    margin-bottom: 0.85rem !important;
  }

  .commitment-heading {
    font-size: 1.35rem !important;
    line-height: 1.28 !important;
    margin-bottom: 0.75rem !important;
  }

  .commitment-text {
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
  }

  /* Testimonials Carousel Mobile Refinements */
  .testimonial-section {
    padding: 3rem 0 !important;
  }

  .testimonial-slide {
    padding: 26px 18px !important;
  }

  .testimonial-quote-text {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }

  .testimonial-footer {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }

  .testimonial-metric-pill {
    width: 100%;
    justify-content: center;
  }

  /* Form Grids on Mobile */
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-group label {
    font-size: 0.825rem;
    margin-bottom: 4px;
  }

  .form-control,
  .form-select {
    font-size: 16px; /* Prevents iOS auto-zoom shift */
    padding: 10px 12px;
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Form Submission Buttons on Mobile */
  .form-card button[type="submit"],
  .form-card .btn-lg,
  form button[type="submit"] {
    width: 100% !important;
    min-height: 50px !important;
    padding: 13px 20px !important;
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
    border-radius: var(--radius-md, 12px) !important;
    box-sizing: border-box !important;
    letter-spacing: -0.01em;
  }

  /* Contact Page Mobile Systems */
  .contact-layout-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    width: 100% !important;
  }

  .contact-channels-col,
  .contact-form-col {
    width: 100% !important;
    min-width: 0 !important;
  }

  .contact-main-heading {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.65rem !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .contact-lead-desc {
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
    margin-bottom: 1.25rem !important;
  }

  .contact-channel-card {
    padding: 18px 16px !important;
    margin-bottom: 14px !important;
    border-radius: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .contact-channel-header {
    gap: 12px !important;
    align-items: center !important;
  }

  .contact-channel-icon {
    width: 38px !important;
    height: 38px !important;
    flex-shrink: 0 !important;
  }

  .contact-channel-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  .contact-channel-card h3, .contact-channel-card h4 {
    font-size: 1.02rem !important;
    line-height: 1.3 !important;
  }

  .contact-channel-card p,
  .contact-channel-card address {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
    margin-top: 6px !important;
  }

  .contact-wa-action-btn {
    width: 100% !important;
    min-height: 48px !important;
    padding: 12px 14px !important;
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .contact-wa-direct-lines {
    font-size: 0.78rem !important;
    gap: 4px 6px !important;
    margin-top: 6px !important;
    line-height: 1.4 !important;
  }

  .contact-form-card {
    padding: 22px 16px !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .contact-form-card h3 {
    font-size: 1.2rem !important;
    line-height: 1.3 !important;
  }

  .contact-form-card p {
    font-size: 0.85rem !important;
    margin-bottom: 1.15rem !important;
  }

  .contact-consultation-card {
    padding: 28px 20px !important;
    border-radius: 14px !important;
    text-align: center !important;
    align-items: center !important;
  }

  .contact-consultation-card .section-badge {
    align-self: center !important;
    margin: 0 auto 12px auto !important;
    display: inline-flex !important;
    justify-content: center !important;
  }

  .contact-consultation-card h2 {
    font-size: 1.28rem !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
    text-align: center !important;
  }

  .contact-consultation-card p {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
    text-align: center !important;
  }

  .contact-consultation-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 0 !important;
  }

  /* Trades Grid & Worker Application Mobile Systems */
  .trades-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .trade-card {
    padding: 20px 18px !important;
  }

  .trade-filter-toolbar {
    gap: 12px !important;
    margin-bottom: 1.5rem !important;
  }

  .whatsapp-apply-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: left !important;
    padding: 18px 16px !important;
    gap: 14px !important;
  }

  .whatsapp-apply-banner .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .contact-consultation-actions .btn {
    width: 100% !important;
    min-height: 48px !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 12px 18px !important;
    font-size: 0.92rem !important;
    box-sizing: border-box !important;
  }

  /* Banner & CTA */
  .cta-banner {
    padding: 28px 18px;
    border-radius: 12px;
    text-align: center;
  }

  .cta-banner h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .cta-banner p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }

  .cta-banner .btn-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 1rem !important;
  }

  .cta-banner .btn {
    width: 100%;
    min-height: 46px;
  }

  /* Footer on Mobile */
  .site-footer {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-brand p {
    font-size: 0.825rem;
    line-height: 1.5;
  }

  .footer-col h3, .footer-col h4 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  .footer-links li a {
    font-size: 0.825rem;
    padding: 4px 0;
  }

  .footer-contact-list li {
    font-size: 0.825rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding-top: 1.25rem;
    margin-top: 1.75rem;
    font-size: 0.78rem;
  }

  .footer-bottom-links {
    justify-content: center;
    gap: 14px;
    font-size: 0.78rem;
  }

  /* WhatsApp Floating Mobile */
  .whatsapp-floating span {
    display: none;
  }

  .whatsapp-floating {
    padding: 12px;
    border-radius: 50%;
    bottom: 20px;
    right: 16px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  }

  .whatsapp-floating svg {
    margin: 0;
    width: 24px;
    height: 24px;
  }

  /* Operational parameters mobile stack */
  .operational-param-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   Small Mobile Phones (480px and down)
   ========================================================================== */
@media (max-width: 480px) {
  .brand-logo img {
    height: 36px;
  }

  .breadcrumb-list {
    padding: 3px 10px !important;
    font-size: 0.78rem !important;
    gap: 5px !important;
  }

  .header-actions .btn-sm {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .contact-channel-card {
    padding: 16px 14px !important;
  }

  .contact-wa-action-btn {
    font-size: 0.86rem !important;
    padding: 11px 10px !important;
  }

  .contact-main-heading {
    font-size: 1.25rem !important;
  }
}

/* ==========================================================================
   Small Mobile Phones (380px and down)
   ========================================================================== */
@media (max-width: 380px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1 {
    font-size: 1.45rem;
  }

  .page-hero h1 {
    font-size: 1.35rem;
  }

  .card,
  .service-card {
    padding: 16px 14px !important;
  }
}

/* ==========================================================================
   Reduced Motion Accessibility (WCAG 2.2)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Home Candidate Portal Pathways & Steps
   ========================================================================== */
@media (max-width: 991px) {
  .portal-steps-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

@media (max-width: 640px) {
  .home-employer-portal-section,
  .home-worker-portal-section {
    padding: 3.5rem 0 !important;
  }
  .portal-steps-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* ==========================================================================
   Services Premium Hub Responsive
   ========================================================================== */
@media (max-width: 991px) {
  .services-premium-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

@media (max-width: 640px) {
  .service-premium-media {
    height: 180px !important;
  }
  .service-premium-body {
    padding: 30px 20px 22px !important;
  }
}



/* ==========================================================================
   PAK TURK GLOBAL - COMPREHENSIVE RESPONSIVE & MOBILE UX SYSTEM
   Targeting: 320px, 360px, 375px, 390px, 412px, 430px, 768px, 1024px, 1280px+
   WCAG 2.2 AA/AAA Touch Target Compliance, Fluid Typography & Zero-Overflow
   ========================================================================== */

/* Universal Responsive Box Sizing & Overflow Guard */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  -webkit-text-size-adjust: 100%;
}

img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Fluid Typography Foundation (clamp) */
@media (max-width: 1024px) {
  h1 {
    font-size: clamp(1.75rem, 5vw + 0.5rem, 2.75rem) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    overflow-wrap: break-word !important;
  }

  h2 {
    font-size: clamp(1.35rem, 3.5vw + 0.4rem, 2.15rem) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.015em !important;
    overflow-wrap: break-word !important;
  }

  h3 {
    font-size: clamp(1.1rem, 2.2vw + 0.35rem, 1.45rem) !important;
    line-height: 1.3 !important;
    overflow-wrap: break-word !important;
  }

  h4 {
    font-size: clamp(0.98rem, 1.5vw + 0.3rem, 1.15rem) !important;
    line-height: 1.35 !important;
    overflow-wrap: break-word !important;
  }

  p, .lead {
    overflow-wrap: break-word !important;
  }
}

/* Touch Targets: WCAG 2.5.5 / 2.5.8 (Minimum 44px x 44px) */
@media (max-width: 1024px) {
  .mobile-nav-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation !important;
    border-radius: var(--radius-sm, 8px) !important;
  }

  .nav-link {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    padding: 12px 14px !important;
    touch-action: manipulation !important;
  }

  .dropdown-link {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    padding: 12px 14px !important;
    touch-action: manipulation !important;
  }

  .site-nav {
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  .site-nav .header-actions {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 1.5rem !important;
  }

  .site-nav .header-actions .btn {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
  }
}

/* Form Controls Mobile Ergonomics (Stop iOS Auto-Zoom Shift) */
@media (max-width: 768px) {
  .form-control,
  .form-select,
  .trade-search-input,
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important; /* Critical: Stops iOS Safari auto-zoom on focus */
    min-height: 48px !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
  }

  textarea {
    min-height: 110px !important;
    line-height: 1.5 !important;
  }

  .form-select {
    background-position: right 14px center !important;
    padding-right: 36px !important;
  }

  .form-check {
    min-height: 44px !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    padding: 6px 0 !important;
  }

  .form-check input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    accent-color: var(--color-brand-primary, #0C1E3C);
  }

  .form-check span {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
  }

  /* Full-width Stacked Button Groups */
  .hero-actions,
  .btn-group,
  .btn-row-dual,
  .contact-consultation-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 12px !important;
  }

  .hero-actions .btn,
  .btn-group .btn,
  .btn-row-dual .btn,
  .contact-consultation-actions .btn {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    padding: 12px 20px !important;
    box-sizing: border-box !important;
  }

  /* Floating elements convert to clean static stacking */
  .hero-float-card,
  .floating-metric-card {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 0 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  /* Trade & Industry Filters Touch Comfort */
  .trade-filter-pills,
  .industry-filter-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .trade-filter-btn,
  .industry-filter-btn {
    min-height: 44px !important;
    padding: 10px 16px !important;
    font-size: 0.88rem !important;
    touch-action: manipulation !important;
    flex-grow: 1 !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .trade-search-wrap,
  .industry-search-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Accordions Touch Height */
  .accordion-trigger,
  .accordion-header,
  .faq-question {
    min-height: 50px !important;
    padding: 14px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
  }

  /* Table Touch Scroll Support */
  .capabilities-table-scroll {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative !important;
    border-radius: 12px !important;
    scrollbar-width: thin !important;
  }

  .capabilities-table {
    min-width: 620px !important;
    width: 100% !important;
  }

  .capabilities-table th,
  .capabilities-table td {
    padding: 12px 14px !important;
    font-size: 0.85rem !important;
    white-space: normal !important;
  }

  .capabilities-table th {
    white-space: nowrap !important;
  }
}

/* Floating WhatsApp Safe Area & Position */
.whatsapp-floating {
  position: fixed !important;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  right: calc(16px + env(safe-area-inset-right, 0px)) !important;
  z-index: 990 !important;
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  border-radius: 50% !important;
  background-color: #25D366 !important;
  color: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45) !important;
  padding: 0 !important;
  touch-action: manipulation !important;
}

.whatsapp-floating svg {
  width: 32px !important;
  height: 32px !important;
  fill: #FFFFFF !important;
}

.whatsapp-floating span,
.whatsapp-floating .sr-only {
  display: none !important;
}

/* Small Smartphone Viewports (320px - 360px) */
@media (max-width: 360px) {
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .brand-logo img {
    height: 32px !important;
  }

  .card,
  .service-card,
  .trade-card,
  .contact-channel-card,
  .contact-form-card,
  .mandate-card,
  .gateway-card {
    padding: 14px 12px !important;
    border-radius: 10px !important;
  }

  .section {
    padding-top: 1.75rem !important;
    padding-bottom: 1.75rem !important;
  }

  .page-hero {
    padding: 1.75rem 0 !important;
  }

  .btn {
    padding: 10px 14px !important;
    font-size: 0.88rem !important;
    min-height: 44px !important;
  }

  .breadcrumb-list {
    padding: 3px 6px !important;
    font-size: 0.72rem !important;
    gap: 3px !important;
  }

  .section-badge {
    font-size: 0.72rem !important;
    padding: 4px 10px !important;
  }
}

/* Active Tap Feedback for Touch Devices */
@media (hover: none) and (pointer: coarse) {
  .btn:active,
  .trade-filter-btn:active,
  .industry-filter-btn:active,
  .mobile-nav-toggle:active {
    transform: scale(0.97) !important;
    transition: transform 0.08s ease !important;
  }
}
