/*
  EquipB2B - style mobile / tablet
  Ten plik ładuje się dla ekranów do 1000px szerokości.
  Edytuj tutaj odstępy, układ i rozmiary widoczne na telefonach oraz mniejszych ekranach.
*/

@media (max-width: 1000px) {
  html {
    scroll-padding-top: 78px;
  }

  .container {
    width: min(100% - 32px, 1160px);
  }

  .site-header {
    background: rgba(6, 13, 25, 0.9);
  }

  .nav-wrap {
    min-height: 72px;
    gap: 14px;
  }

  .nav {
    display: none;
  }

  .site-header .btn-small {
    flex-shrink: 0;
    min-height: 42px;
    padding: 10px 16px;
    font-size: 0.88rem;
  }

  .hero-grid,
  .process-grid,
  .partners-wrap,
  .support-grid,
  .strip-grid,
  .feature-grid,
  .why-grid,
  .quote-choice-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 58px;
    padding-bottom: 28px;
  }

  .hero-grid,
  .process-grid,
  .partners-wrap,
  .support-grid {
    gap: 24px;
  }

  .support-grid {
    align-items: start;
  }

  .support-card {
    max-width: none;
    margin-left: 0;
  }

  .section-head,
  .quote-section-head {
    margin-bottom: 24px;
  }

  .hero-card,
  .support-card,
  .strip-card,
  .feature-card,
  .partner-card,
  .reason-card,
  .download-option,
  .quote-choice-card {
    border-radius: 22px;
  }

  .strip-grid,
  .feature-grid,
  .why-grid,
  .quote-choice-grid,
  .partner-grid,
  .timeline,
  .faq-page-grid,
  .faq-accordion {
    gap: 14px;
  }

  .btn,
  input,
  textarea,
  .tax-toggle-tab,
  .faq-item summary {
    min-height: 48px;
  }
}


@media (max-width: 860px) {
  .table-head,
  .table-row {
    grid-template-columns: minmax(0, 1fr) 82px minmax(160px, 1fr) 74px;
  }

  .tax-toggle-tab {
    min-width: 0;
    padding-inline: 10px;
    font-size: 0.88rem;
  }

  .quote-choice-card,
  .download-option,
  .quote-form {
    padding: 24px;
  }

  .process-grid h2,
  .section-head h2,
  .contact-section h2 {
    font-size: clamp(1.82rem, 7vw, 2.55rem);
  }
}


@media (max-width: 680px) {
  html {
    scroll-padding-top: 70px;
  }

  body {
    overflow-x: hidden;
  }

  .section {
    padding: 58px 0;
  }

  .container {
    width: min(100% - 24px, 1160px);
  }

  .nav-wrap {
    min-height: 66px;
  }

  .brand-logo {
    height: 30px;
  }

  .footer-logo {
    height: 38px;
    margin-inline: auto;
  }

  .site-header .btn-small {
    display: inline-flex;
    min-width: 94px;
    padding: 10px 14px;
    font-size: 0;
  }

  .site-header .btn-small::after {
    content: 'Wycena';
    font-size: 0.88rem;
    line-height: 1;
  }

  .hero {
    padding-top: 42px;
    padding-bottom: 20px;
  }

  .hero h1 {
    max-width: 10.8ch;
    font-size: clamp(2.1rem, 11vw, 2.78rem);
    line-height: 1.04;
  }

  .animated-hero-title {
    padding-bottom: 6px;
  }

  .hero-lead {
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-points {
    flex-direction: column;
    gap: 10px;
    margin: 18px 0 24px;
  }

  .hero-points span {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
  }

  .hero-actions,
  .faq-page-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hero-actions .btn,
  .faq-page-actions .btn,
  .contact-card .btn,
  .row-actions .btn {
    width: 100%;
  }

  .hero-card {
    padding: 22px;
  }

  .status-pill {
    white-space: normal;
    line-height: 1.35;
  }

  .check-list li,
  .quote-choice-list li,
  .number-list li {
    margin: 12px 0;
  }

  .split,
  .mini-metrics,
  .table-head,
  .table-row {
    grid-template-columns: 1fr;
  }

  .mini-metrics {
    gap: 10px;
  }

  .mini-metrics > div {
    padding: 14px;
  }

  .strip {
    padding-top: 34px;
  }

  .strip-card,
  .feature-card,
  .partner-card,
  .reason-card,
  .support-card {
    padding: 20px;
  }

  .timeline-item {
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 16px;
  }

  .timeline-item > span {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .quote-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .quote-card-meta {
    white-space: normal;
  }

  .table-head > span:nth-child(2),
  .table-head > span:nth-child(4) {
    display: none;
  }

  .table-head {
    display: none;
  }

  .table-row {
    gap: 12px;
    padding: 14px;
  }

  .row-actions,
  .contact-row,
  .footer-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .row-actions {
    margin-top: 16px;
  }

  .total-box {
    width: 100%;
    border-radius: 16px;
    text-align: center;
  }

  .tax-toggle-wrap {
    width: 100%;
  }

  .contact-section {
    padding-top: 46px;
  }

  .contact-row {
    min-height: 0;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
  }

  .contact-row strong {
    max-width: none;
    text-align: left;
    word-break: break-word;
  }

  .faq-item {
    padding: 0 16px;
    border-radius: 16px;
  }

  .faq-item summary {
    padding: 16px 30px 16px 0;
    line-height: 1.35;
  }

  .faq-item summary::after {
    top: 15px;
  }

  .faq-item p {
    line-height: 1.7;
  }

  .faq-page-actions {
    margin-top: 26px;
  }

  .form-modal {
    padding: 10px;
    align-items: flex-end;
  }

  .form-modal-dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 24px 24px 0 0;
  }

  .form-modal-close {
    top: 12px;
    width: 44px;
    height: 44px;
  }

  .form-anchor-head {
    padding-right: 46px;
  }

  .field {
    margin-bottom: 16px;
  }

  input,
  textarea {
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
  }

  .file-drop-zone {
    padding: 28px 16px;
  }

  .file-item {
    align-items: flex-start;
    padding: 12px;
  }

  .consent-check {
    gap: 12px;
    padding: 14px;
  }

  .site-footer {
    padding: 28px 0 32px;
    text-align: center;
  }

  .footer-wrap {
    align-items: center;
    gap: 14px;
  }

  .toast-notification {
    right: 12px;
    bottom: 12px;
    left: 12px;
    align-items: flex-start;
    padding: 14px 16px;
  }
}


@media (max-width: 640px) {
  .quote-choice-card,
  .download-option,
  .quote-form {
    padding: 20px;
    border-radius: 22px;
  }
}


@media (max-width: 420px) {
  .container {
    width: min(100% - 20px, 1160px);
  }

  .brand-logo {
    height: 27px;
  }

  .site-header .btn-small {
    min-width: 82px;
    padding-inline: 12px;
  }

  .hero h1 {
    font-size: clamp(1.92rem, 11.4vw, 2.38rem);
  }

  .section-head p,
  .hero-lead,
  .process-grid p,
  .form-anchor-head p {
    font-size: 0.98rem;
  }

  .strip-card,
  .feature-card,
  .partner-card,
  .reason-card,
  .support-card,
  .hero-card,
  .quote-choice-card,
  .download-option,
  .quote-form {
    padding: 18px;
  }

  .btn {
    padding-inline: 18px;
  }
}

/*
  POPRAWKA CSS-ONLY: menu mobilne + stopka
  Zmienia wyłącznie widok mobilny. Nie wymaga zmian w HTML, base.css ani JS.
*/
@media (max-width: 1000px) {
  .site-header {
    overflow: visible !important;
  }

  .site-header .nav-wrap {
    position: relative;
  }

  /* Usuwa mobilny przycisk "Wycena" bez ruszania desktopu. */
  .site-header .btn-small {
    display: none !important;
  }

  .site-header .btn-small::before,
  .site-header .btn-small::after {
    content: none !important;
    display: none !important;
  }

  /*
    WARIANT A: jeśli w HTML istnieje już <details class="mobile-menu">,
    pokazujemy je tylko na mobile i ukrywamy zwykłą nawigację.
  */
  .mobile-menu {
    display: none !important;
  }

  .nav-wrap:has(.mobile-menu) .mobile-menu {
    display: block !important;
    position: relative;
    z-index: 80;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .nav-wrap:has(.mobile-menu) .nav {
    display: none !important;
  }

  .mobile-menu-toggle {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    min-height: 44px;
    padding: 0 44px 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
  }

  .mobile-menu-toggle::-webkit-details-marker {
    display: none;
  }

  .mobile-menu-toggle::marker {
    content: '';
  }

  .mobile-menu-toggle::before {
    content: 'Menu';
  }

  .mobile-menu-text {
    display: none !important;
  }

  .mobile-menu-icon,
  .mobile-menu-toggle > span:not(.mobile-menu-text):not(.mobile-menu-icon) {
    position: absolute;
    right: 16px;
    width: 18px;
  }

  .mobile-menu-icon {
    top: 50%;
    display: inline-flex !important;
    flex-direction: column;
    gap: 4px;
    transform: translateY(-50%);
  }

  .mobile-menu-icon span,
  .mobile-menu-toggle > span:not(.mobile-menu-text):not(.mobile-menu-icon) {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .mobile-menu-toggle > span:not(.mobile-menu-text):not(.mobile-menu-icon):nth-of-type(1) {
    top: 15px;
  }

  .mobile-menu-toggle > span:not(.mobile-menu-text):not(.mobile-menu-icon):nth-of-type(2) {
    top: 21px;
  }

  .mobile-menu-toggle > span:not(.mobile-menu-text):not(.mobile-menu-icon):nth-of-type(3) {
    top: 27px;
  }

  .mobile-menu[open] .mobile-menu-icon span:nth-child(1),
  .mobile-menu[open] .mobile-menu-toggle > span:not(.mobile-menu-text):not(.mobile-menu-icon):nth-of-type(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .mobile-menu[open] .mobile-menu-icon span:nth-child(2),
  .mobile-menu[open] .mobile-menu-toggle > span:not(.mobile-menu-text):not(.mobile-menu-icon):nth-of-type(2) {
    opacity: 0;
  }

  .mobile-menu[open] .mobile-menu-icon span:nth-child(3),
  .mobile-menu[open] .mobile-menu-toggle > span:not(.mobile-menu-text):not(.mobile-menu-icon):nth-of-type(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 90;
    display: none;
    width: min(292px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: rgba(8, 18, 32, 0.98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
  }

  .mobile-menu[open] .mobile-menu-panel {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-menu-panel a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 700;
  }

  .mobile-menu-panel a:hover,
  .mobile-menu-panel a:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    color: var(--accent-2);
  }

  /*
    WARIANT B: jeśli HTML NIE ma details.mobile-menu,
    robimy rozwijane menu wyłącznie z istniejącej .nav.
    Otwieranie działa po tapnięciu/hover/focus na obszarze menu.
  */
  .site-header .nav {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 70;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 104px;
    max-height: 44px;
    min-height: 44px;
    gap: 0;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
    transform: translateY(-50%);
    transition:
      width 0.2s ease,
      max-height 0.22s ease,
      border-radius 0.2s ease,
      background-color 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.2s ease;
  }

  .site-header .nav::before {
    content: 'Menu ☰';
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    user-select: none;
  }

  .site-header .nav a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.25;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
  }

  .site-header .nav:hover,
  .site-header .nav:focus-within {
    top: calc(100% + 10px);
    right: 0;
    width: min(292px, calc(100vw - 24px));
    max-height: 520px;
    min-height: 0;
    padding: 10px;
    border-radius: 22px;
    background: rgba(8, 18, 32, 0.98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    transform: none;
  }

  .site-header .nav:hover::before,
  .site-header .nav:focus-within::before {
    justify-content: flex-start;
    min-height: 38px;
    padding: 0 12px 4px;
    color: var(--muted);
    content: 'Menu';
  }

  .site-header .nav:hover a,
  .site-header .nav:focus-within a {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .site-header .nav a:hover,
  .site-header .nav a:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    color: var(--accent-2);
  }

  /* Stopka tylko na mobile: logo i linki ustawione równo na środku. */
  .site-footer {
    text-align: center !important;
  }

  .site-footer .footer-wrap {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    text-align: center !important;
  }

  .site-footer .footer-company-info {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .site-footer .footer-logo {
    height: 38px;
    margin: 0 auto 2px !important;
  }

  .site-footer .footer-legal {
    width: 100% !important;
    text-align: center !important;
  }

  .site-footer .footer-legal p {
    text-align: center !important;
  }

  .site-footer .footer-legal p:first-child {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px 12px !important;
    margin-bottom: 10px !important;
  }

  .site-footer .footer-legal a {
    display: inline-flex !important;
    margin: 0 !important;
  }
}

@media (max-width: 420px) {
  .mobile-menu-toggle {
    min-width: 48px;
    width: 48px;
    padding: 0;
  }

  .mobile-menu-toggle::before {
    content: '';
  }

  .mobile-menu-icon,
  .mobile-menu-toggle > span:not(.mobile-menu-text):not(.mobile-menu-icon) {
    right: 15px;
  }

  .site-header .nav {
    width: 48px;
  }

  .site-header .nav::before {
    content: '☰';
    padding: 0;
    font-size: 1.2rem;
  }

  .site-header .nav:hover::before,
  .site-header .nav:focus-within::before {
    content: 'Menu';
    font-size: 0.9rem;
    padding: 0 12px 4px;
  }

  .site-footer .footer-logo {
    height: 36px;
  }
}
