/* ── ACCESSIBILITY ENHANCEMENTS ── */

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--blue, #0077C8);
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  transition: top 0.3s;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible for keyboard users */
*:focus-visible {
  outline: 2px solid var(--blue-light, #2E90DA);
  outline-offset: 2px;
}

/* Remove default focus for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Reduced motion */
@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;
  }
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast support */
@media (prefers-contrast: more) {
  .btn-primary {
    border: 2px solid currentColor;
  }
}

/* Remove underline from nav CTA */
.nav-cta,
.nav-cta:hover,
.nav-cta:focus {
  text-decoration: none !important;
}

/* ── MOBILE PERFORMANCE & USABILITY ── */

/* Minimum touch target size for links/buttons on mobile */
@media (max-width: 900px) {
  .mobile-menu a,
  .footer-links a,
  .nav-links a,
  .nav-dropdown-item,
  .btn-primary,
  .btn-ghost,
  .btn-outline {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Prevent iOS auto-zoom on form inputs */
input,
textarea,
select,
button {
  font-size: 16px;
}

/* Smooth horizontal scroll for carousels/tabs */
.apartments-carousel,
.apt-tabs-nav {
  -webkit-overflow-scrolling: touch;
}

/* Responsive images */
img {
  height: auto;
}

/* Better line length for readability */
p {
  max-width: 75ch;
}

/* Avoid text overflow */
body {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Stop the mobile browser from silently widening the layout viewport (and
   zooming the whole page out, shrinking every font + the hamburger icon)
   whenever some descendant briefly overflows horizontally — e.g. a
   scrollable tab bar or an off-screen reveal-animation element. Scoped to
   the root element only, so descendants that intentionally scroll
   horizontally (like .apt-nav) are unaffected. */
html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ── HAMBURGER: guarantee contrast against any hero background/video ── */
@media (max-width: 900px) {
  .hamburger {
    background: rgba(7,11,18,0.4) !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
  }
}

/* ── MOBILE NAV: visual hierarchy for the "Apartmani" submenu ── */
@media (max-width: 900px) {
  .mobile-menu-group {
    margin-top: 4px !important;
  }
  .mobile-menu-sub {
    font-size: 19px !important;
    padding: 8px 0 8px 26px !important;
    color: rgba(242,237,228,0.6) !important;
    position: relative;
  }
  .mobile-menu-sub::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 1px;
    background: rgba(51,153,232,0.55);
  }
  .mobile-menu-sub-last {
    margin-bottom: 8px !important;
  }
}

/* ── MOBILE READABILITY: enlarge small body-copy/description text ── */
@media (max-width: 640px) {
  .hero-sub,
  .section-desc,
  .feature-text,
  .tech-text,
  .apt-panel-tagline,
  .apt-card-desc,
  .amenity-desc,
  .contact-detail,
  .inv-text,
  .faq-q,
  .model-desc,
  .garage-desc,
  .mgmt-highlight,
  .mgmt-card-title,
  .franchise-intro,
  .apt-cta-sub,
  .sidebar-subtitle,
  .footer-desc,
  .form-card-sub,
  .contact-info-sub,
  .timeline-title,
  .timeline-desc,
  .why-text,
  .brand-check,
  .pog-desc,
  .pog-title,
  .other-apt-name {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }

  /* form fields were being re-shrunk below 16px by page-specific classes,
     which also defeats the iOS auto-zoom prevention rule above */
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px !important;
  }
}

/* Print styles */
@media print {
  nav, .mobile-menu, footer, .scroll-indicator, .ticker-wrap {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
}
