/* ===== Mobile fixes for pprfnk.tech ===== */

/* Container: add padding on small screens */
@media (max-width: 767px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
  }
}

/* Header: prevent overflow */
@media (max-width: 575px) {
  body > header {
    margin-top: 16px;
  }
  body > header .top-navbar {
    padding-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  body > header .top-navbar .logo h1 {
    font-size: 14px;
  }
  body > header .top-navbar__right {
    gap: 8px;
  }
  body > header .navbar .navbar-nav {
    grid-template-columns: 1fr 1fr;
    height: auto;
  }
  body > header .navbar .nav-item .nav-link {
    position: static;
    padding: 12px 8px;
    font-size: 13px;
  }
}

/* Grid cards: single column on mobile */
@media (max-width: 575px) {
  body > main section > ul.grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  body > main section > ul.grid li a figure figcaption {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px;
  }
  body > main section > ul.grid li a figure figcaption .price {
    text-align: left;
  }
}

/* Section titles: smaller on mobile */
@media (max-width: 575px) {
  body > main section > h2 {
    font-size: 18px;
    padding-bottom: 24px;
  }
  body > main section > h2::before {
    height: 24px;
  }
}

/* Modal project: fix overflow on mobile */
@media (max-width: 575px) {
  .modal--project .modal-body header {
    margin-left: -16px;
    width: calc(100% + 32px);
  }
  .modal--project .modal-body header .sub-header {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
  }
  .modal--project .modal-body header .sub-header .btn {
    min-width: auto;
    width: 100%;
  }
  .modal--project .modal-body header .sub-header .price {
    text-align: center;
    font-size: 28px;
  }
  .modal--project .modal-body section.type-1 {
    margin-left: -16px;
    width: calc(100% + 32px);
    padding: 24px 16px;
  }
  .modal--project .modal-body section.reviews ul {
    column-count: 1;
  }
  .modal .modal-dialog {
    margin: 8px;
  }
  .modal .modal-content {
    border-radius: 8px;
  }
}

/* Footer: stack on mobile */
@media (max-width: 575px) {
  footer > div {
    gap: 12px;
    font-size: 11px;
  }
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
}
