/**
 * Credì Responsive Styles (Tablet & Mobile)
 */

/* ==========================================================================
   Tablet Styles (max-width: 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {
  :root {
    --section-spacing-y: 5rem;
    --section-spacing-x: 1.5rem;
  }

  /* Hero Section */
  .hero-card {
    padding: 6.5rem 2.5rem 0;
    min-height: 100%;
  }

  .hero-body {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-text-content {
    max-width: 100%;
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-description {
    max-width: 540px;
  }

  .hero-visual-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 300px;
  }

  .hero-phone-container {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    max-width: 450px;
  }

  .hero-availability-badge {
    right: 0%;
    top: auto;
    bottom: 10rem;
  }

  /* Why Credì Section */
  .why-section {
    padding-bottom: 0px;
  }

  .why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .why-text-col {
    max-width: 640px;
    margin: 0 auto;
  }

  .why-heading {
    text-align: center;
    margin-bottom: 2.5rem;
  }

  .why-phones-container {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    width: auto;
    overflow: hidden;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .phones-row {
    transform: none;
    margin: 0 auto;
    padding: 0 1rem;
  }

  /* Steps Section */
  .steps-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .step-card.step-3 {
    grid-column: span 2;
  }
}

/* ==========================================================================
   Mobile Landscape & Tablet Portrait (max-width: 860px)
   ========================================================================== */
@media screen and (max-width: 860px) {
  .navbar-nav,
  .navbar-actions .btn-cta-primary {
    display: none;
  }

  .hamburger-toggle {
    display: flex;
  }

  .navbar {
    height: 56px;
    padding: 0 1.25rem;
  }

  .navbar-brand img,
  .navbar-brand svg {
    height: 24px;
  }

  /* Legal Pages */
  .delete-data-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Mobile Styles (max-width: 767px)
   ========================================================================== */
@media screen and (max-width: 767px) {
  :root {
    --section-spacing-y: 4rem;
    --section-spacing-x: 1rem;
    --radius-xl: 24px;
    --radius-lg: 18px;
  }

  .header-wrapper {
    top: 1rem;
  }

  /* Hero Section */
  .hero-wrapper {
    padding: 0;
  }

  .hero-card {
    /* Fill the whole viewport (svh = stable height, ignores the mobile URL bar) */
    min-height: 100vh;
    min-height: 100svh;
    max-height: none;
    justify-content: flex-start;
    padding: 8.5rem 1.25rem 0;
    border-radius: 0;
    box-shadow: var(--shadow-lg);
  }

  .hero-heading {
    margin-bottom: 1.5rem;
  }

  .hero-description {
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 2rem;
  }

  .hero-body {
    flex: none;
    margin-bottom: 2.5rem;
  }

  /* Pushes the phone to the bottom edge of the hero, whatever the viewport height */
  .hero-visual-content {
    margin-top: auto;
    flex: none;
    min-height: 250px;
  }

  .hero-phone-container {
    max-width: 290px;
  }

  .hero-phone-img {
    display: block; /* remove inline-image gap so the hand touches the hero's bottom edge */
  }

  .hero-availability-badge {
    display: none;
  }

  .availability-icon {
    width: 28px;
    height: 28px;
  }

  .availability-title {
    font-size: 0.75rem;
  }

  .availability-sub {
    font-size: 0.6875rem;
  }

  /* Intro Section */
  .intro-section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .intro-paragraphs {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* Why Credì Section */
  .why-section {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 3.5rem;
  }

  .why-grid {
    padding-left: var(--section-spacing-x);
    padding-right: var(--section-spacing-x);
  }

  .why-features-list {
    gap: 1.75rem;
  }

  .feature-item {
    gap: 1rem;
  }

  .feature-icon-wrapper {
    width: 44px;
    height: 44px;
  }

  .feature-icon-wrapper img,
  .feature-icon-wrapper svg {
    width: 22px;
    height: 22px;
  }

  .feature-title {
    font-size: 1.05rem;
  }

  .feature-desc {
    font-size: 0.875rem;
  }

  .phones-row {
    gap: 1rem;
    scroll-snap-type: x mandatory;
    padding: 0.5rem;
    transform: rotate(-5deg);
  }

  .phone-mockup-frame {
    width: 200px;
    scroll-snap-align: center;
  }

  /* Steps Section */
  .steps-section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .steps-header {
    margin-bottom: 2.5rem;
  }

  .steps-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .step-card.step-3 {
    grid-column: span 1;
  }

  .step-card {
    min-height: auto;
    padding: 2rem 1.5rem;
  }

  .step-title {
    font-size: 1.25rem;
  }

  .step-desc {
    font-size: 0.875rem;
  }

  /* Footer CTA Section */
  .footer-cta-wrapper {
    padding-bottom: 2.5rem;
  }

  .cta-bg-texture {
    display: none;
  }

  .footer-cta-card {
    padding: 3.25rem 1.5rem;
    border-radius: var(--radius-xl);
  }

  .cta-desc {
    font-size: 0.9375rem;
    margin-bottom: 2rem;
  }

  .cta-download-buttons {
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
  }

  .download-badge-link {
    width: 100%;
    max-width: 200px;
  }

  .download-badge-link img,
  .download-badge-link svg {
    width: 100%;
    height: auto;
  }

  .cta-waves-bg {
    display: none;
  }

  /* Subfooter */
  .site-subfooter {
    padding: 2.5rem var(--section-spacing-x);
  }

  .subfooter-top {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .subfooter-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

/* ==========================================================================
   Small Mobile (max-width: 380px)
   ========================================================================== */
@media screen and (max-width: 380px) {
  .hero-card {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .step-card {
    padding: 1.75rem 1.25rem;
  }

  .phone-mockup-frame {
    width: 180px;
  }
}
