/* =====================================================
   INDEX.HTML - MOBILE RESPONSIVE STYLES
   Preserves sticky scroll animations on mobile
   ===================================================== */

/* ── TABLET (1024px and below) ── */
@media (max-width: 1024px) {
  
  /* Hero Section */
  .hero-two-col {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 0 2rem;
  }

  .hero-text-col {
    text-align: center;
  }

  .hero-cta-row {
    justify-content: center;
  }

  .hero-stats-row {
    flex-wrap: wrap;
    gap: 2rem;
  }

  .hero-stats-row > div {
    flex: 0 0 calc(50% - 1rem);
    border-left: none !important;
    border-right: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center;
  }

  /* Problem Section */
  #problem .container {
    padding: 0 2rem;
  }

  /* Solution Section - Stack columns */
  .solution-layout {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
  }

  /* Services Section */
  .services-reference-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }

  /* Industries Section */
  .industries-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Process Section */
  .process-content-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Why RevaLabs - Comparison Table */
  .comparison-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Risk Calculator */
  .risk-calc-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* CTA Section */
  .cta-premium-content {
    padding: 3rem 2rem !important;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }
}

/* ── MOBILE (768px and below) ── */
@media (max-width: 768px) {
  
  /* Container padding */
  .container {
    padding: 0 1.5rem !important;
  }

  /* Section padding */
  section {
    padding: 4rem 0 !important;
  }

  /* Hero Section */
  #hero {
    min-height: auto;
    padding: calc(60px + 3rem) 1.5rem 3rem !important;
  }

  .hero-two-col {
    padding: 0 1rem;
  }

  .hero-headline {
    font-size: 2rem !important;
    line-height: 1.15 !important;
  }

  .hero-subheadline {
    font-size: 1rem !important;
  }

  .hero-badge {
    font-size: 0.75rem !important;
    padding: 0.4rem 0.8rem !important;
  }

  .hero-cta-row {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-row .btn-primary,
  .hero-cta-row .btn-ghost {
    width: 100%;
    text-align: center;
  }

  .hero-stats-row {
    gap: 1.5rem;
  }

  .hero-stats-row > div {
    flex: 0 0 100%;
    text-align: center;
    border-right: none !important;
    padding-right: 0 !important;
  }

  .hero-count {
    font-size: 2rem !important;
  }

  .hero-stat-label {
    font-size: 0.8125rem !important;
  }

  /* Frameworks Section - KEEP STICKY SCROLL ON MOBILE */
  .frameworks-premium-section {
    /* Keep the scroll height for mobile - same as desktop */
    height: 500vh !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .frameworks-sticky-container {
    /* Keep sticky positioning on mobile - same as desktop */
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .frameworks-premium-container {
    padding: 0 1.5rem !important;
    max-width: 100% !important;
  }

  .frameworks-header {
    padding: 0 1rem !important;
    max-width: 100% !important;
  }

  .frameworks-block {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 0 1rem !important;
    max-width: 100% !important;
  }

  .frameworks-block-reverse .frameworks-block-content {
    order: 2 !important;
  }

  .frameworks-block-reverse .frameworks-block-shield {
    order: 1 !important;
  }

  .frameworks-block-shield {
    min-height: 250px !important;
  }

  .shield-image {
    width: 200px !important;
    height: 200px !important;
  }

  .frameworks-block-title {
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  .framework-moon {
    width: 100px !important;
    height: 100px !important;
  }

  .frameworks-list li {
    font-size: 0.9375rem !important;
    padding: 12px 0 !important;
  }

  .list-number {
    font-size: 0.8125rem !important;
    min-width: 28px !important;
  }

  /* Compliance pill */
  .frameworks-compliance-pill {
    top: 30px !important;
  }
  
  /* Ensure all framework blocks are visible */
  .frameworks-block {
    display: grid !important;
  }
  
  /* Make sure content is centered */
  .frameworks-block-content {
    width: 100% !important;
  }
  
  .frameworks-block-shield {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Problem Section */
  .section-title {
    font-size: 2rem !important;
  }

  .section-lead {
    font-size: 1rem !important;
  }

  /* Solution Section */
  #solution {
    padding: 4rem 0 !important;
  }

  #solution .solution-layout > div:last-child {
    transform: translate(calc(130px - 4rem - 4.5rem), 10px);
  }

  #solution .solution-layout > div.fade-up::before {
    top: calc(-10% - 4.5rem);
  }

  #solution .stripe-card * {
    line-height: 1.1 !important;
  }

  .solution-layout {
    padding: 0 1rem !important;
  }

  /* Services Section */
  .services-reference-section {
    padding: 4rem 0 !important;
  }

  .services-reference-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .service-reference-card {
    padding: 1.5rem !important;
  }

  /* Industries Section */
  #industries {
    padding: 4rem 0 !important;
  }

  /* Process Section */
  .process-video-section {
    padding: 4rem 0 !important;
  }

  .process-step-card {
    padding: 1.5rem !important;
  }

  /* Why RevaLabs */
  #why-revalabs {
    padding: 4rem 0 !important;
  }

  .comparison-table {
    font-size: 0.875rem !important;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 0.5rem !important;
  }

  /* Risk Calculator */
  .risk-calc-premium-section {
    padding: 4rem 0 !important;
  }

  .risk-calc-container {
    padding: 0 1rem !important;
  }

  .risk-calc-content {
    padding: 2rem 1.5rem !important;
  }

  .risk-calc-title {
    font-size: 1.75rem !important;
  }

  .risk-calc-result-number {
    font-size: 2rem !important;
  }

  /* CTA Section */
  .cta-premium-section {
    padding: 4rem 0 !important;
  }

  .cta-premium-content {
    padding: 2.5rem 1.5rem !important;
  }

  .cta-premium-title {
    font-size: 1.75rem !important;
  }

  /* Footer */
  footer {
    padding: 3rem 0 1.5rem !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 1rem !important;
  }

  /* Buttons */
  .btn-primary,
  .btn-ghost {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9375rem !important;
  }

  /* Cards */
  .stripe-card {
    padding: 1.5rem !important;
  }

  /* Eyebrow Pills */
  .eyebrow-pill {
    font-size: 0.75rem !important;
    padding: 0.4rem 0.8rem !important;
  }
}

/* ── SMALL MOBILE (480px and below) ── */
@media (max-width: 480px) {
  
  /* Container */
  .container {
    padding: 0 1rem !important;
  }

  /* Hero */
  #hero {
    padding: calc(60px + 2rem) 1rem 2rem !important;
  }

  .hero-headline {
    font-size: 1.75rem !important;
  }

  .hero-subheadline {
    font-size: 0.9375rem !important;
  }

  .hero-count {
    font-size: 1.75rem !important;
  }

  /* Section titles */
  .section-title {
    font-size: 1.75rem !important;
  }

  .section-lead {
    font-size: 0.9375rem !important;
  }

  /* Frameworks - Maintain scroll on small mobile */
  .frameworks-premium-section {
    height: 500vh !important;
  }

  .frameworks-sticky-container {
    position: sticky !important;
    height: 100vh !important;
  }

  .framework-moon {
    width: 80px !important;
    height: 80px !important;
  }

  .shield-image {
    width: 180px !important;
    height: 180px !important;
  }

  .frameworks-block-title {
    font-size: 1.35rem !important;
  }

  .frameworks-list li {
    font-size: 0.875rem !important;
  }

  .frameworks-block {
    padding: 0 0.75rem !important;
  }

  .frameworks-premium-container {
    padding: 0 1rem !important;
  }

  /* Services */
  .service-reference-card {
    padding: 1.25rem !important;
  }

  /* Risk Calculator */
  .risk-calc-title {
    font-size: 1.5rem !important;
  }

  .risk-calc-result-number {
    font-size: 1.75rem !important;
  }

  /* CTA */
  .cta-premium-title {
    font-size: 1.5rem !important;
  }

  /* Buttons */
  .btn-primary,
  .btn-ghost {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.875rem !important;
  }
}

/* ── LANDSCAPE MOBILE (max-height: 500px) ── */
@media (max-height: 500px) and (orientation: landscape) {
  
  #hero {
    min-height: auto !important;
    padding: calc(60px + 2rem) 1.5rem 2rem !important;
  }

  .hero-stats-row {
    margin-top: 1.5rem !important;
  }

  /* Reduce frameworks section height in landscape */
  .frameworks-premium-section {
    height: 400vh !important;
  }

  .frameworks-sticky-container {
    height: 100vh !important;
  }
}

/* ── TOUCH DEVICE OPTIMIZATIONS ── */
@media (hover: none) and (pointer: coarse) {
  
  /* Increase tap targets */
  .btn-primary,
  .btn-ghost,
  a,
  button {
    min-height: 44px;
    min-width: 44px;
  }

  /* Simplify hover effects on touch devices */
  .stripe-card:hover {
    transform: none !important;
  }

  .btn-primary:hover,
  .btn-ghost:hover {
    transform: none !important;
  }

  /* Keep animations smooth on mobile */
  .hero-blob-1,
  .hero-blob-2,
  .hero-blob-3 {
    animation-duration: 12s !important;
  }
}

/* ── SPECIFIC COMPONENT FIXES ── */

/* Audit Report Card - Mobile */
@media (max-width: 768px) {
  #audit-scenario-wrap {
    min-height: auto !important;
  }

  .audit-row {
    font-size: 0.75rem !important;
  }
}

/* Framework Pills - Mobile Scroll */
@media (max-width: 768px) {
  .fw-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  .fw-pill {
    font-size: 0.8125rem !important;
    padding: 0.5rem 1rem !important;
  }
}

/* Video Backgrounds - Mobile */
@media (max-width: 768px) {
  .hero-video-bg,
  .process-fullwidth-bg video {
    object-fit: cover;
    min-height: 100%;
  }
}

/* Modal - Mobile */
@media (max-width: 768px) {
  #rl-modal {
    max-width: calc(100% - 2rem) !important;
    margin: 1rem;
  }

  #rl-modal form {
    padding: 1.5rem !important;
  }
}

/* Comparison Table - Mobile Scroll */
@media (max-width: 768px) {
  .comparison-table-wrapper {
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
  }

  .comparison-table {
    min-width: 600px;
  }
}

/* Stats Grid - Mobile */
@media (max-width: 768px) {
  [style*="display:grid"][style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  [style*="display:grid"][style*="grid-template-columns:repeat(2"] {
    grid-template-columns: 1fr !important;
  }
}

/* Ensure text remains readable on mobile */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  p {
    line-height: 1.7 !important;
  }

  h1, h2, h3, h4, h5, h6 {
    line-height: 1.2 !important;
  }
}
