/* ============================================
   Hoty GF — Responsive Design
   Mobile-First Breakpoints & Overflow Fixes
   ============================================ */

/* ---------- Mobile (default, < 640px) ---------- */

/* Global container and layout protection */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
}

/* Navigation */
.navbar-links {
  display: none;
}

.navbar-hamburger {
  display: flex;
}

.navbar-download.desktop-only {
  display: none;
}

.mobile-menu {
  display: flex;
}

/* Hero */
.hero {
  padding-top: 80px;
  min-height: auto;
  padding-bottom: var(--space-3xl);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.hero .container {
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  text-align: center;
  width: 100%;
  padding: 0 1.25rem;
}

.hero-content {
  order: 1;
  width: 100%;
  max-width: 100%;
}

.hero-visual {
  order: 2;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 10px 0;
}

.hero-description {
  margin: 0 auto var(--space-2xl);
  max-width: 100%;
}

.hero-buttons {
  justify-content: center;
  width: 100%;
}

.hero-buttons .btn {
  width: 100%;
  max-width: 320px;
}

.hero-stats {
  justify-content: center;
  gap: var(--space-xl);
  text-align: center;
  width: 100%;
}

.hero-stat {
  text-align: center;
}

.phone-mockup {
  width: min(260px, 85vw);
  height: 480px;
  border-radius: 34px;
}

.floating-card {
  display: none !important;
}

/* Download Section */
.download-grid {
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  text-align: center;
  width: 100%;
}

.download-content {
  width: 100%;
}

.download-content p {
  margin: 0 auto var(--space-2xl);
}

.download-buttons {
  justify-content: center;
  width: 100%;
}

.download-buttons .download-btn {
  width: 100%;
  max-width: 320px;
  justify-content: center;
}

.download-qr {
  display: none;
}

/* Features */
.features-grid {
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  width: 100%;
}

/* Showcase */
.showcase-grid {
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  text-align: center;
  width: 100%;
}

.showcase-grid.reverse {
  direction: ltr;
}

.showcase-visual {
  order: -1;
  width: 100%;
  overflow: hidden;
}

.showcase-content {
  width: 100%;
}

.showcase-feature-item {
  text-align: left;
}

/* Stats */
.stats-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  width: 100%;
}

.stat-card {
  padding: var(--space-lg) var(--space-md);
}

/* Testimonials */
.testimonials-track {
  width: 100%;
}

.testimonial-card {
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

/* Footer */
.footer-grid {
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  width: 100%;
  text-align: center;
}

.footer-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-brand .footer-logo {
  justify-content: center;
}

.footer-brand p {
  max-width: 100%;
}

.footer-column {
  text-align: center;
}

.footer-column ul {
  align-items: center;
}

.footer-column a {
  justify-content: center;
}

.footer-column a:hover {
  transform: none;
}

.footer-bottom {
  flex-direction: column;
  gap: var(--space-lg);
  text-align: center;
  width: 100%;
}

/* Screenshots */
.screenshots-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  width: 100%;
}

/* Why Choose Us */
.why-grid {
  grid-template-columns: 1fr;
  width: 100%;
}

.why-card:hover {
  transform: none;
}

/* Security */
.security-grid {
  grid-template-columns: 1fr;
  width: 100%;
}

/* Lightbox */
.lightbox-nav {
  width: 36px;
  height: 36px;
}

.lightbox-nav.prev { left: var(--space-sm); }
.lightbox-nav.next { right: var(--space-sm); }

/* UI Carousel */
.ui-carousel {
  padding: var(--space-lg) 1.25rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ui-card {
  width: 210px;
}

.ui-card-phone {
  width: 210px;
  height: 360px;
  border-radius: 24px;
}

/* Chat Preview */
.chat-preview-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.chat-preview {
  border-radius: var(--radius-xl);
  width: 100%;
}

.chat-body {
  padding: var(--space-md);
}

.chat-header {
  padding: var(--space-md);
}

/* Final CTA */
.final-cta {
  padding: var(--space-3xl) 0;
}

.final-cta .btn {
  width: 100%;
  max-width: 320px;
}

/* ---------- Tablet (640px+) ---------- */
@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .security-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .screenshots-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .phone-mockup {
    width: 260px;
    height: 520px;
  }

  .floating-card {
    display: flex !important;
    font-size: 0.75rem;
    padding: 8px 12px;
  }

  .floating-card .fc-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .hero-buttons .btn {
    width: auto;
  }

  .download-buttons .download-btn {
    width: auto;
  }

  .final-cta .btn {
    width: auto;
  }
}

/* ---------- Laptop (1024px+) ---------- */
@media (min-width: 1024px) {
  /* Navigation */
  .navbar-links {
    display: flex;
  }

  .navbar-hamburger {
    display: none;
  }

  .navbar-download.desktop-only {
    display: inline-flex;
  }

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

  /* Hero */
  .hero {
    min-height: 100vh;
    padding-top: 110px;
    padding-bottom: var(--space-4xl);
  }

  .hero .container {
    grid-template-columns: 1.1fr 0.9fr;
    text-align: left;
  }

  .hero-content {
    order: unset;
  }

  .hero-visual {
    order: unset;
    overflow: visible;
  }

  .hero-description {
    margin: 0 0 var(--space-2xl);
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .hero-stats {
    justify-content: flex-start;
  }

  .hero-stat {
    text-align: left;
  }

  .phone-mockup {
    width: 290px;
    height: 560px;
    border-radius: 42px;
  }

  .floating-card {
    display: flex !important;
    padding: 10px 16px;
    font-size: inherit;
  }

  .floating-card .fc-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  /* Download */
  .download-grid {
    grid-template-columns: 1fr auto;
    text-align: left;
  }

  .download-content p {
    margin: 0 0 var(--space-2xl);
  }

  .download-buttons {
    justify-content: flex-start;
  }

  .download-qr {
    display: block;
  }

  /* Features */
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Showcase */
  .showcase-grid {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }

  .showcase-visual {
    order: unset;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    text-align: left;
  }

  .footer-brand {
    text-align: left;
    align-items: flex-start;
  }

  .footer-brand .footer-logo {
    justify-content: flex-start;
  }

  .footer-column {
    text-align: left;
  }

  .footer-column ul {
    align-items: flex-start;
  }

  .footer-column a {
    justify-content: flex-start;
  }

  .footer-bottom {
    flex-direction: row;
    text-align: left;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .stat-card {
    padding: var(--space-2xl);
  }

  /* Testimonials */
  .testimonial-card {
    width: calc(33.333% - var(--space-xl));
    min-width: auto;
  }

  /* Screenshots */
  .screenshots-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  /* Why */
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* UI Carousel */
  .ui-carousel {
    padding: var(--space-xl) max(var(--container-padding), calc((100vw - var(--container-max)) / 2 + var(--container-padding)));
  }

  .ui-card {
    width: 250px;
  }

  .ui-card-phone {
    width: 250px;
    height: 440px;
    border-radius: 32px;
  }

  /* Chat Preview */
  .chat-preview-wrapper {
    max-width: 480px;
  }

  .chat-preview {
    border-radius: var(--radius-3xl);
  }

  .chat-body {
    padding: var(--space-xl);
  }

  .chat-header {
    padding: var(--space-lg) var(--space-xl);
  }

  /* Final CTA */
  .final-cta {
    padding: var(--space-5xl) 0;
  }
}

/* ---------- Desktop (1280px+) ---------- */
@media (min-width: 1280px) {
  .security-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Large Desktop (1536px+) ---------- */
@media (min-width: 1536px) {
  :root {
    --container-max: 1320px;
  }
}

/* ---------- Touch Device Optimizations ---------- */
@media (hover: none) and (pointer: coarse) {
  .feature-card:hover,
  .security-card:hover,
  .why-card:hover,
  .stat-card:hover,
  .testimonial-card:hover,
  .glass-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }

  .btn-primary:active {
    transform: scale(0.97);
  }

  .btn-secondary:active {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* ---------- Print ---------- */
@media print {
  .navbar,
  .mobile-menu,
  .back-to-top,
  .scroll-progress,
  .bg-particles,
  .floating-card {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    page-break-inside: avoid;
  }
}
