/* ================================================
   apnaPR — Mobile Responsiveness Override
   Injected LAST so it overrides all page styles
   ================================================ */

/* ── GLOBAL RESETS ── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; }
body { overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }

/* ── HAMBURGER BUTTON (always defined, hidden on desktop) ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 1100;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* ── NAV CTA (hide on small screens) ── */
.nav-cta { display: inline-flex; }


/* ==================================================
   TABLET — up to 1024px
   ================================================== */
@media (max-width: 1024px) {

  /* Solutions page split grid → stack */
  .split-container {
    grid-template-columns: 1fr !important;
  }
  .sol-img-container {
    order: -1 !important;
    min-height: 350px;
  }

  /* Insights featured grid → stack */
  .featured-grid {
    grid-template-columns: 1fr !important;
  }

  /* Our Story grid overlay */
  .os-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}


/* ==================================================
   MOBILE BREAKPOINT — up to 768px
   ================================================== */
@media (max-width: 768px) {

  /* ── NAVBAR ── */
  .nav-links {
    display: none !important;
  }
  .nav-links.open {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 80px !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(5, 10, 20, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 8px 0 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 1000 !important;
    animation: mobileNavIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
  }
  @keyframes mobileNavIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .nav-links.open a {
    display: block !important;
    padding: 16px 28px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: #cbd5e1 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
  }
  .nav-links.open a:last-child {
    border-bottom: none !important;
  }
  .nav-links.open a:hover,
  .nav-links.open a.active {
    color: #fff !important;
    background: rgba(13, 110, 253, 0.1) !important;
    padding-left: 36px !important;
  }

  /* Show hamburger */
  .hamburger {
    display: flex !important;
  }

  /* Hide BOOK A DISCOVERY CALL CTA in nav */
  .nav-cta {
    display: none !important;
  }

  /* ── FOOTER ── */
  footer > div:first-child {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  footer > div:last-child {
    flex-direction: column !important;
    gap: 12px !important;
    text-align: center !important;
  }

  /* ── INDEX PAGE ── */
  /* Hero: single column, fit text */
  .ch1-hero {
    padding-left: 6vw !important;
    padding-right: 6vw !important;
    padding-top: 100px !important;
    min-height: 100svh !important;
    align-items: flex-start !important;
  }
  .ch1-content h1 {
    font-size: clamp(3rem, 12vw, 5rem) !important;
    line-height: 0.95 !important;
  }
  .ch1-actions {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }
  .ch1-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Chapter 2 split */
  .ch2-split {
    flex-direction: column !important;
    height: auto !important;
  }
  .ch2-text, .ch2-grid {
    width: 100% !important;
  }
  .ch2-text {
    padding: 48px 6vw !important;
  }
  .ch2-text h2 {
    font-size: clamp(2.5rem, 10vw, 4rem) !important;
  }
  .ch2-grid {
    height: 300px !important;
  }

  /* Chapter 3A */
  .ch3a-celeb {
    padding-left: 6vw !important;
    padding-right: 6vw !important;
  }
  .ch3a-content h2 {
    font-size: clamp(2.5rem, 10vw, 4rem) !important;
  }

  /* Chapter 3B stage cards */
  .ch3b-stages {
    flex-direction: column !important;
    height: auto !important;
    min-height: auto !important;
  }
  .ch3b-text, .ch3b-cards {
    width: 100% !important;
  }
  .ch3b-text {
    padding: 48px 6vw !important;
  }
  .ch3b-text h2 {
    font-size: clamp(2.5rem, 10vw, 4rem) !important;
  }
  .ch3b-cards {
    flex-direction: column !important;
  }
  .v-card {
    height: 280px !important;
  }

  /* Chapter 4 platforms */
  .ch4-split {
    flex-direction: column !important;
  }
  .ch4-left, .ch4-right {
    width: 100% !important;
    padding: 48px 6vw !important;
  }
  .platform-logos {
    flex-direction: column !important;
    gap: 32px !important;
  }

  /* Chapter 5 Network */
  .ch5-network {
    padding-left: 6vw !important;
    padding-right: 6vw !important;
  }
  .ch5-content h2 {
    font-size: clamp(2.5rem, 10vw, 4rem) !important;
  }

  /* Final CTA */
  .cta-bottom {
    padding: 64px 6vw !important;
  }
  .cta-content h2 {
    font-size: clamp(3rem, 12vw, 5rem) !important;
  }

  /* ── OUR STORY PAGE ── */
  .os-hero {
    padding-left: 6vw !important;
    padding-right: 6vw !important;
    padding-top: 100px !important;
    align-items: flex-start !important;
    min-height: 100svh !important;
  }
  .os-hero-content h1 {
    font-size: clamp(3rem, 12vw, 5rem) !important;
  }
  .os-split {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: auto !important;
    grid-template-columns: 1fr !important;
  }
  .os-split:nth-child(even) {
    flex-direction: column !important;
  }
  .os-split-img {
    width: 100% !important;
    height: 280px !important;
    min-height: 280px !important;
  }
  .os-split-text {
    width: 100% !important;
    padding: 48px 6vw !important;
  }
  .os-split-text h2 {
    font-size: clamp(2rem, 9vw, 3.5rem) !important;
  }
  .os-grid {
    grid-template-columns: 1fr !important;
  }
  .grid-item {
    height: 260px !important;
  }
  .os-map {
    flex-direction: column !important;
  }
  .os-map-text, .os-map-img {
    width: 100% !important;
  }
  .os-map-text {
    padding: 48px 6vw !important;
  }
  .os-map-text h2 {
    font-size: clamp(2.5rem, 10vw, 4rem) !important;
  }
  .os-map-img {
    min-height: 280px !important;
  }

  /* VISIBILITY WITHOUT LIMITS section */
  .visibility-section {
    flex-direction: column !important;
  }
  .visibility-text {
    width: 100% !important;
    padding: 48px 6vw !important;
    min-height: auto !important;
  }
  .visibility-text h2 {
    font-size: clamp(2.5rem, 10vw, 4rem) !important;
    line-height: 1.0 !important;
    white-space: normal !important;
    word-break: normal !important;
  }
  .visibility-grid {
    width: 100% !important;
    padding: 0 6px 6px !important;
  }

  .cta-bottom {
    padding: 64px 6vw !important;
    background-position: center right !important;
  }
  .cta-content h2 {
    font-size: clamp(2.5rem, 11vw, 5rem) !important;
  }

  /* ── SOLUTIONS PAGE ── */
  .sol-hero {
    padding: 100px 6vw 48px !important;
    min-height: auto !important;
    height: auto !important;
    padding-top: 120px !important;
  }
  .sol-hero h1 {
    font-size: clamp(3rem, 12vw, 5rem) !important;
    line-height: 0.95 !important;
  }
  .split-container {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .sol-content {
    padding: 48px 6vw !important;
    text-align: left !important;
  }
  .sol-content h2 {
    font-size: clamp(2.2rem, 9vw, 3.5rem) !important;
  }
  .sol-img-container {
    min-height: 280px !important;
    height: 280px !important;
    order: -1 !important;
  }
  .platforms-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 0 6vw !important;
  }
  .divider { display: none !important; }
  .platforms-section {
    padding: 64px 0 !important;
  }
  .isgl-section .container {
    padding: 0 6vw !important;
  }

  /* ── INSIGHTS PAGE ── */
  .insights-hero {
    padding-top: 100px !important;
    min-height: auto !important;
    padding-bottom: 48px !important;
  }
  .insights-hero-text {
    padding: 32px 6vw !important;
    max-width: 100% !important;
  }
  .insights-hero-text h1 {
    font-size: clamp(2.8rem, 11vw, 4.5rem) !important;
    line-height: 0.95 !important;
  }
  .featured-section {
    padding: 64px 6vw !important;
  }
  .featured-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .featured-content h2 {
    font-size: clamp(2rem, 8vw, 3rem) !important;
  }
  .latest-section {
    padding: 64px 6vw !important;
  }
  .latest-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .articles-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .cta-footer {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }
  .cta-footer-left {
    padding: 64px 6vw !important;
  }
  .cta-footer-left h2 {
    font-size: clamp(2.5rem, 10vw, 4rem) !important;
  }
  .cta-footer-right {
    min-height: 300px !important;
    padding: 48px 6vw !important;
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  .cta-footer-right p {
    font-size: 1.2rem !important;
    max-width: 100% !important;
  }

  /* ── CONTACT PAGE ── */
  .contact-info-section,
  .form-section,
  .contact-cta-section {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .contact-info-right {
    min-height: 300px !important;
  }
  .contact-info-left,
  .form-left,
  .form-right {
    width: 100% !important;
    padding: 48px 6vw !important;
  }
  .contact-info-left h2,
  .form-left h2 {
    font-size: clamp(2.5rem, 10vw, 4rem) !important;
    line-height: 1 !important;
  }
  .form-group {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .cta-footer-left h2 {
    font-size: clamp(2.5rem, 10vw, 4rem) !important;
    line-height: 1 !important;
  }

  /* ── FAQs PAGE ── */
  .faq-hero {
    flex-direction: column !important;
    min-height: auto !important;
    padding-top: 80px !important;
  }
  .faq-hero-text {
    padding: 48px 6vw !important;
    flex: unset !important;
  }
  .faq-hero-text h1 {
    font-size: clamp(2.8rem, 11vw, 4.5rem) !important;
  }
  .faq-hero-img {
    flex: unset !important;
    min-height: 280px !important;
    width: 100% !important;
  }
  .faq-section {
    padding: 64px 6vw !important;
  }
  .faq-item {
    grid-template-columns: 40px 1fr 32px !important;
    gap: 16px !important;
    padding: 24px 0 !important;
  }

  /* ── LEGAL PAGES ── */
  .legal-hero {
    height: auto !important;
    min-height: auto !important;
    padding: 120px 6vw 64px !important;
  }
  .legal-hero-content h1 {
    font-size: clamp(2.5rem, 10vw, 4rem) !important;
  }
  .legal-content-section {
    padding: 48px 0 !important;
  }
  .legal-container {
    padding: 0 6vw !important;
  }
}


/* ==================================================
   SMALL MOBILE — up to 480px
   ================================================== */
@media (max-width: 480px) {

  /* Global font scaling */
  html { font-size: 15px; }

  /* Tighter nav */
  #nav { padding: 0 16px !important; }

  /* Hero sections */
  .ch1-content h1,
  .os-hero-content h1 {
    font-size: clamp(2.8rem, 13vw, 4rem) !important;
  }
  .sol-hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.5rem) !important;
  }
  .insights-hero-text h1 {
    font-size: clamp(2.5rem, 12vw, 3.5rem) !important;
  }
  .faq-hero-text h1 {
    font-size: clamp(2.2rem, 11vw, 3rem) !important;
  }

  /* Cards */
  .v-card { height: 240px !important; }
  .grid-item { height: 220px !important; }
  .article-img { height: 180px !important; }
  .os-split-img,
  .os-map-img { min-height: 240px !important; height: 240px !important; }

  /* Chapter labels */
  .chapter-label { font-size: 0.7rem !important; }

  /* Buttons */
  .btn { font-size: 0.7rem !important; padding: 14px 20px !important; }

  /* Footer inline links bottom bar */
  footer > div:last-child {
    align-items: center !important;
  }
}
