/* Vorza Fitness — Mobile / responsive fixes
   Breakpoints: 991.98 (tablet), 767.98 (mobile), 575.98 (small) */

/* ---------- Global safety ---------- */
html {
  overflow-x: hidden;
  max-width: 100%;
}

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

.container,
.container-fluid,
.section,
.page-hero {
  max-width: 100%;
}

[class*="col-"] {
  min-width: 0;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  max-width: 100%;
}

@media (min-width: 768px) {
  .table-responsive table {
    min-width: 520px;
  }
}

.map-embed {
  min-height: 260px;
  max-width: 100%;
}

/* Prevent iOS input zoom */
@media (max-width: 991.98px) {
  .form-as .form-control,
  .form-as .form-select,
  input.form-control,
  select.form-select,
  textarea.form-control {
    font-size: 16px !important;
  }

  /* Fixed backgrounds hurt mobile performance / cause jump */
  body,
  .home-landing {
    background-attachment: scroll !important;
  }

  .section,
  .home-landing .section.hp-section {
    padding-top: clamp(2.5rem, 8vw, 3.75rem);
    padding-bottom: clamp(2.5rem, 8vw, 3.75rem);
    overflow-x: hidden;
    max-width: 100%;
  }

  .section-title {
    font-size: clamp(1.85rem, 7vw, 2.6rem) !important;
    word-break: break-word;
  }

  .page-hero {
    padding: 3rem 0 2rem;
  }
  .page-hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

/* ---------- Navbar / header ---------- */
@media (max-width: 991.98px) {
  :root {
    --header-h: 72px;
  }

  .brand-logo {
    height: 42px !important;
    max-width: min(160px, 46vw) !important;
  }
  .site-footer .brand-logo {
    height: 52px !important;
    max-width: 180px !important;
  }

  .navbar-toggler {
    border: 1px solid rgba(255, 87, 34, 0.35);
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
  }
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 87, 34, 0.25);
  }

  .navbar-collapse {
    background: rgba(10, 11, 9, 0.98) !important;
    padding: 0.85rem 1rem 1.15rem !important;
    margin-top: 0.65rem !important;
    border: 1px solid rgba(255, 87, 34, 0.22) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55) !important;
    max-height: min(78vh, 640px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .navbar-nav {
    gap: 0.15rem;
  }
  .nav-link {
    padding: 0.75rem 0.85rem !important;
    font-size: 1rem !important;
    border-radius: 10px;
  }
  .nav-link.active {
    background: rgba(255, 87, 34, 0.1);
  }
  .nav-link.active::after {
    display: none !important;
  }

  .navbar-nav .btn-as,
  .nav-item .btn-as {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.35rem;
  }

  .dropdown-menu {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding-left: 0.75rem;
  }
  .dropdown-item {
    color: rgba(245, 246, 242, 0.85) !important;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
  }
  .dropdown-item:hover,
  .dropdown-item:focus {
    background: rgba(255, 87, 34, 0.12) !important;
    color: #FF8A65 !important;
  }
}

/* ---------- Announcement ---------- */
@media (max-width: 575.98px) {
  .announcement-bar-inner {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0.65rem 2.1rem 0.65rem 0.75rem !important;
    gap: 0.35rem !important;
    text-align: left !important;
  }
  .announcement-bar-text {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  .announcement-bar-link {
    white-space: normal !important;
    display: inline;
  }
}

/* ---------- Hero ---------- */
@media (max-width: 767.98px) {
  .hero,
  .hero-premium,
  .hero-carousel-section .hero-slide {
    min-height: 100svh;
  }
  .hero-content {
    padding: calc(var(--header-h) + 1.25rem) 0 5rem !important;
  }
  .hero-copy {
    max-width: 100% !important;
  }
  .hero-title {
    max-width: none !important;
    font-size: clamp(1.9rem, 9vw, 2.75rem) !important;
    line-height: 1.12 !important;
  }
  .hero-desc {
    font-size: 0.98rem !important;
    max-width: 100% !important;
  }
  .hero-cta {
    flex-direction: column !important;
    width: 100%;
  }
  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100% !important;
    justify-content: center;
  }
  .hero-trust {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem !important;
  }
}

/* ---------- Homepage sections ---------- */
@media (max-width: 991.98px) {
  .home-landing .hp-split,
  .home-landing .hp-split.is-flip {
    flex-direction: column !important;
  }
  .home-landing .hp-about-media {
    margin-bottom: 1.25rem;
  }
  .home-landing .hp-about-media__main {
    max-height: 420px;
    aspect-ratio: 4 / 5;
  }
  .home-landing .hp-about-media {
    overflow: hidden;
  }

  .home-landing .hp-about-media__float {
    right: 4% !important;
    bottom: -2% !important;
    width: min(40%, 150px) !important;
  }
  .home-landing .hp-bg-orb {
    opacity: 0.22;
    width: min(280px, 70vw);
    height: min(280px, 70vw);
  }
}

@media (max-width: 767.98px) {
  .home-landing .hp-stats-strip {
    padding: 1.75rem 0;
  }
  .home-landing .hp-stat-item {
    padding: 1rem 0.6rem !important;
  }
  .home-landing .hp-stat-value {
    font-size: clamp(1.6rem, 7vw, 2.1rem) !important;
  }
  .home-landing .hp-stat-label {
    font-size: 0.72rem !important;
    letter-spacing: 0.03em;
  }

  .home-landing .hp-cta-banner__inner {
    padding: 1.35rem !important;
    max-width: 100%;
  }
  .home-landing .hp-cta-banner .btn-as,
  .home-landing .hp-cta-banner .btn-as-outline {
    width: 100%;
    text-align: center;
  }

  .home-landing .hp-service-card__media {
    height: 140px;
  }
  .home-landing .hp-feature-card__media {
    height: 120px;
  }

  .home-landing .hp-blog-list {
    flex-direction: column !important;
  }
  .home-landing .hp-blog-list .hp-blog-thumb {
    width: 100% !important;
  }
  .home-landing .hp-blog-thumb img {
    min-height: 160px;
    width: 100%;
    object-fit: cover;
  }

  .home-landing .hp-faq-side {
    min-height: 260px !important;
    margin-bottom: 1.25rem;
  }
  .home-landing .hp-faq-side img {
    min-height: 260px !important;
  }

  .home-landing .gallery-masonry {
    column-count: 1 !important;
  }
  .home-landing .gallery-grid.hp-gallery-grid,
  .home-landing .hp-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
  }
  .home-landing .hp-gallery-item {
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
    border-radius: 12px;
  }
  .home-landing .hp-gallery-label {
    font-size: 0.72rem;
    padding: 0.55rem 0.65rem;
  }
  .home-landing .gallery-carousel-img {
    height: min(48vh, 320px) !important;
  }

  .trainer-card .trainer-info h3 {
    font-size: 1.15rem;
  }
  .home-landing .hp-trainer-list-photo {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 575.98px) {
  .home-landing .hp-about-media__float {
    display: none !important;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .plan-card,
  .home-landing .hp-plan-card {
    padding: 1.25rem 1.1rem !important;
    box-sizing: border-box;
  }

  .plan-features li {
    word-break: break-word;
  }
  .plan-price {
    font-size: 2.2rem !important;
  }

  .float-btns {
    right: 0.75rem !important;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)) !important;
    gap: 0.45rem !important;
  }
  .float-btn {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.05rem !important;
  }

  .toast-container-as {
    left: 0.75rem;
    right: 0.75rem;
    top: auto;
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .offer-popup-modal .modal-dialog {
    margin: 0.75rem;
  }
}

/* ---------- Tables / cards ---------- */
@media (max-width: 767.98px) {
  .table-responsive table,
  .table-responsive .schedule-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 0.65rem 0.45rem;
    font-size: 0.82rem;
    word-break: break-word;
    white-space: normal;
    vertical-align: top;
  }

  .schedule-table th:nth-child(1),
  .schedule-table td:nth-child(1) {
    width: 28%;
  }

  .schedule-table th:nth-child(2),
  .schedule-table td:nth-child(2) {
    width: 24%;
  }

  .schedule-table th:nth-child(3),
  .schedule-table td:nth-child(3) {
    width: 48%;
  }

  .plan-compare-table th,
  .plan-compare-table td {
    font-size: 0.78rem;
    padding: 0.55rem 0.4rem;
  }

  /* Horizontal slide reveals expand scroll width on small screens */
  .reveal-slide-left,
  .reveal-slide-right {
    transform: translateY(28px) !important;
  }

  .home-landing .reveal-slide-left,
  .home-landing .reveal-slide-right,
  .home-landing .scroll-left,
  .home-landing .scroll-right {
    transform: translateY(28px) !important;
  }

  .section-carousel,
  .section-carousel .carousel,
  .section-carousel .carousel-inner {
    overflow: hidden;
    max-width: 100%;
  }

  .plan-card,
  .home-landing .hp-plan-card,
  .home-landing .hp-feature-card,
  .home-landing .glass-card {
    max-width: 100%;
  }

  .home-landing .hp-bg-orb {
    display: none;
  }
  .site-footer {
    padding: 3rem 0 5.5rem;
    text-align: left;
  }
  .footer-bottom {
    text-align: center;
  }
  .social-links {
    margin-bottom: 1rem;
  }
}

/* ---------- Safe area (notched phones) ---------- */
@supports (padding: max(0px)) {
  .site-header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}
