/* ================================================================
   mobile.css — Comprehensive Mobile Responsiveness
   Creative Digital — All Pages
================================================================ */

/* ── Base Mobile Fixes ── */
* { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; height: auto; }

/* ── Nav hamburger animation ── */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Menu Drawer ── */
.ag-nav-links.mobile-open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 72px;
  left: 0; right: 0;
  background: #fff;
  padding: 1rem 1.5rem 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  z-index: 99;
  gap: 0;
  border-top: 1px solid #f1f5f9;
  animation: slideDown .25s cubic-bezier(.22,1,.36,1);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ag-nav-links.mobile-open a {
  padding: .85rem 0 !important;
  font-size: 1rem !important;
  border-bottom: 1px solid #f1f5f9;
  width: 100%;
}
.ag-nav-links.mobile-open a:last-child { border-bottom: none; }

/* ── Buttons full-width on small screens ── */
@media (max-width: 480px) {
  .btn-primary,
  .btn-secondary,
  .btn-blue { width: 100%; justify-content: center; }
  .hero-btns { flex-direction: column; }
  .cta-actions { flex-direction: column; width: 100%; }
  .cta-actions a, .cta-actions button { width: 100%; text-align: center; justify-content: center; }
}

/* ════════════════════════════════════════════════════════════
   768px — TABLET / LARGE MOBILE
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Agency Nav - show actions compactly */
  .ag-nav-actions .nav-btn-outline { display: none; }
  .ag-nav-actions .nav-btn-primary { font-size: .8rem; padding: .45rem .9rem; }

  /* Hero section */
  .hero-section { padding-top: 2rem; }
  .hero-inner { padding-top: 1.5rem; padding-bottom: 3rem; }
  .hero-title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .hero-sub { font-size: .95rem; margin-bottom: 1.5rem; }
  .hero-trust { gap: .75rem; }
  .trust-sep { display: none; }

  /* Stat bar */
  .stat-bar { grid-template-columns: 1fr 1fr; }
  .stat-item { border-bottom: 1px solid var(--border); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }
  .stat-num { font-size: 1.8rem; }

  /* Priser page cards */
  .pricing-grid {
    grid-template-columns: 1fr !important;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  .addons-grid { grid-template-columns: 1fr 1fr !important; }

  /* Tjänster tabs */
  .svc-tabs { flex-wrap: wrap; gap: .5rem; }
  .svc-tab { font-size: .8rem; padding: .45rem .8rem; }

  /* Portfolio page */
  .filter-bar { gap: .4rem; flex-wrap: wrap; justify-content: center; }
  .filter-btn { font-size: .8rem; padding: .4rem .85rem; }
  .portfolio-grid {
    grid-template-columns: 1fr !important;
  }
  .port-card { min-height: 280px; }

  /* Case study hero */
  .case-hero { height: 55vh; min-height: 360px; }
  .case-hero-title { font-size: clamp(1.6rem, 6vw, 2.4rem); }
  .case-hero-desc { font-size: .9rem; }
  .case-content { padding: 2.5rem 0; }
  .case-stats { grid-template-columns: 1fr 1fr; }
  .case-stat:nth-child(2) { border-right: none; }
  .case-stat:nth-child(3), .case-stat:nth-child(4) {
    border-top: 1px solid var(--border);
  }

  /* Contact page */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Om-oss / about */
  .about-grid {
    grid-template-columns: 1fr !important;
  }
  .team-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .values-grid {
    grid-template-columns: 1fr !important;
  }
  .timeline-grid {
    grid-template-columns: 1fr !important;
  }

  /* Shopify partner block */
  .shopify-partner-block { flex-direction: column; gap: 2rem; }
  .shopify-partner-img { min-width: unset; width: 100%; }
  .shopify-partner-text { min-width: unset; }

  /* Why us */
  .why-us-block { grid-template-columns: 1fr !important; gap: 2rem; }
  .why-us-imgs { height: 260px; }

  /* CTA section */
  .cta-inner { text-align: center; }
  .cta-inner .section-title { font-size: 1.6rem; }

  /* Footer */
  .ag-footer-main { padding: 3rem 1.25rem 1.5rem; }
  .ag-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 1.75rem; }

  /* Page hero */
  .page-hero { padding: 3rem 1.25rem 2.5rem; }

  /* Switch pills */
  .switch-pill { font-size: .72rem; padding: .5rem .9rem; }
  .switch-pill-home { bottom: 4.5rem; }

  /* AI pages */
  .ai-page-hero { padding: 5rem 1.25rem 2.5rem; }
  .ai-page-layout { grid-template-columns: 1fr; gap: 2rem; }
  .ai-page-sidebar { position: static; }
  .ai-feature-grid { grid-template-columns: 1fr; }
  .ai-sub-uc-grid { grid-template-columns: 1fr; }
  .ai-page-stats { grid-template-columns: 1fr 1fr; }

  /* Reviews */
  .reviews-grid { grid-template-columns: 1fr !important; }
  .review-platforms { gap: 1.5rem; flex-direction: column; }
  .review-platform-sep { width: 100%; height: 1px; }

  /* Process */
  .process-grid { grid-template-columns: 1fr !important; }

  /* Section padding reduction */
  .section-pad { padding: 3.5rem 0; }
  .section-pad-sm { padding: 2.5rem 0; }

  /* Prevent horizontal overflow */
  .hero-blob-1, .hero-blob-2 { display: none; }
  .hero-bg-grid { opacity: .4; }
}

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

  /* Typography */
  .section-title { font-size: clamp(1.5rem, 6vw, 2rem) !important; }
  .section-lead { font-size: .9rem; }

  /* Nav */
  .ag-nav { padding: 0 1rem; }
  .ag-nav-logo img { height: 38px; }
  .ag-nav-logo { font-size: 1.05rem; }

  /* Container */
  .container { padding: 0 1.1rem; }

  /* Addons */
  .addons-grid { grid-template-columns: 1fr !important; }

  /* Footer collapse */
  .ag-footer-grid { grid-template-columns: 1fr !important; }
  .footer-bottom-inner { flex-direction: column; text-align: center; gap: .5rem; }

  /* Team grid */
  .team-grid { grid-template-columns: 1fr !important; }

  /* Portfolio */
  .portfolio-grid { grid-template-columns: 1fr !important; }
  .port-card { height: 260px; }

  /* Case study */
  .case-hero { height: 50vh; min-height: 300px; }
  .case-hero-content { padding: 1.5rem 0; }
  .case-stats { grid-template-columns: 1fr 1fr; }
  .case-content { gap: 1.5rem; }
  .case-info-card { padding: 1.25rem; }

  /* Pricing */
  .pricing-amount { font-size: 2.2rem; }
  .pricing-features li { font-size: .83rem; }

  /* Process */
  .process-grid { grid-template-columns: 1fr !important; }
  .process-img { height: 200px; }

  /* AI pages */
  .ai-sub-wrap { padding: 0 1rem; }
  .ai-page-hero h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .ai-page-stats { grid-template-columns: 1fr 1fr; }
  .ai-page-stat { padding: 1.25rem .75rem; }
  .ai-page-stat-num { font-size: 1.5rem; }

  /* CTA buttons */
  .ai-page-cta-btns { flex-direction: column; align-items: center; }
  .ai-page-cta-btns a { width: 100%; max-width: 320px; text-align: center; }

  /* Hero buttons stacked */
  .ai-page-hero-btns { flex-direction: column; align-items: center; }
  .ai-page-hero-btns a { width: 100%; max-width: 320px; text-align: center; justify-content: center; }

  /* Section header */
  .section-header { flex-direction: column; align-items: flex-start; }

  /* Agency CTA */
  .cta-inner { flex-direction: column; }
  .cta-actions { flex-direction: column; width: 100%; }
  .cta-actions a { width: 100%; text-align: center; justify-content: center; }

  /* Partners */
  .partners-logos { gap: 1.25rem; }
  .partner-img { height: 40px; max-width: 110px; }

  /* i18n switcher padding from fixed pills */
  body { padding-bottom: 0; }
}

/* ════════════════════════════════════════════════════════════
   PORTFOLIO PAGE SPECIFIC — full width grid
════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  #portfolio-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (max-width: 600px) {
  #portfolio-grid {
    grid-template-columns: 1fr !important;
  }
  .filter-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: .5rem;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
}

/* ════════════════════════════════════════════════════════════
   CASE STUDY PAGES SPECIFIC
════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .case-hero-tags { gap: .35rem; }
  .case-hero-tag { font-size: .7rem; padding: .25rem .65rem; }
  .case-next-prev { flex-direction: column; gap: .5rem; }
  .case-nav-btn { width: 100%; }
  .case-info-row { flex-direction: row; }
  .case-info-row .value { font-size: .82rem; }
}

/* ════════════════════════════════════════════════════════════
   KONTAKT PAGE
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .contact-form-wrap { padding: 1.5rem !important; }
  .form-row { grid-template-columns: 1fr !important; }
}

/* ════════════════════════════════════════════════════════════
   i18n Language Switcher — avoid overlap with content
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #lang-switcher {
    bottom: 1rem !important;
    left: 1rem !important;
    right: auto !important;
    transform: none !important;
  }
}
