/* ====================================================================
   SWIFTDEX COMPREHENSIVE MOBILE RESPONSIVENESS FIX
   Full mobile-first responsive overrides for 320px–1024px screens
   ==================================================================== */

/* ===== PHASE 1: TECHNICAL FOUNDATION ===== */

/* Text-size-adjust: Prevent iOS auto-zoom on form focus */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 320px design lock — no content clipping below 320px */
body {
  min-width: 320px;
}

/* ===== PHASE 1B: TAP TARGET COMPLIANCE ===== */
/* All interactive elements: minimum 48×48px (WCAG 2.5.8 Target Size) */
@media (max-width: 768px) {
  a, button, [role="button"], input[type="submit"], input[type="button"],
  .btn-primary, .btn-secondary, .btn-ghost, .btn-nav-cta,
  .portfolio-filter, .blog-cat-btn, .tc-btn,
  .faq-question, .accordion-header,
  select, input[type="checkbox"] + label, input[type="radio"] + label {
    min-height: 48px;
    min-width: 48px;
    line-height: 48px;
    display: inline-flex;
    align-items: center;
  }

  /* 8px spacing between adjacent tap targets */
  .nav-links a, .footer-links-col a, .social-links a {
    margin-bottom: 8px;
  }

  /* Primary CTAs: 56px+ height, full-width below 480px */
  .btn-primary, .btn-submit, .popup-submit, [class*="cta-btn"],
  .slide-ctas .btn-primary, .slide-ctas .btn-secondary,
  .cta-actions .btn-primary, .cta-actions .btn-secondary,
  .service-hero-ctas .btn-primary, .service-hero-ctas .btn-secondary {
    min-height: 56px !important;
    font-size: 1rem !important;
    border-radius: 14px !important;
    justify-content: center;
    text-align: center;
    padding: 14px 24px !important;
  }

  /* Slider dots / small indicators exception */
  .slider-dot, .tc-dot, .pagination-dot {
    min-width: 12px;
    min-height: 12px;
    line-height: normal;
    padding: 6px;
  }

  /* Footer links spacing for thumb targets */
  .footer-links-col ul li {
    padding: 6px 0;
  }
  .footer-links-col ul li a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 6px 0;
    line-height: 1.4;
  }

  /* Social icons: 44x44 minimum */
  .social-links a, .social-icon, [class*="social"] a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Below 480px: all primary CTAs go full-width */
@media (max-width: 480px) {
  .btn-primary, .btn-submit, .popup-submit, [class*="cta-btn"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ===== PHASE 2: CORE WEB VITALS PROTECTION ===== */

/* CLS prevention: Reserve space for images */
img {
  content-visibility: auto;
}

/* Font CLS protection: System font stack fallback matching x-height */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== PHASE 3: MOBILE NAVIGATION ===== */

/* Sticky header: max 60px height on mobile */
@media (max-width: 768px) {
  .navbar {
    max-height: 60px !important;
    padding: 8px 0 !important;
  }
  .navbar.scrolled {
    max-height: 56px !important;
  }
}

/* ===== PHASE 4: CONTENT & READABILITY ===== */

/* Body text: 16px minimum, proper line-height */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  p, li, td, th, dd, dt, blockquote {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* Paragraph width constraint for readability */
  .article-content p, .blog-article-content p, .post-content p,
  .service-deep-content p {
    max-width: 65ch;
  }
}

/* ===== PHASE 4B: FORM COMPLIANCE ===== */

/* Form fields: 56px height, 16px font (prevents iOS zoom) */
@media (max-width: 768px) {
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="url"], input[type="number"], input[type="password"],
  input[type="search"], input[type="date"],
  select, textarea {
    min-height: 56px !important;
    font-size: 16px !important;
    padding: 14px 16px !important;
    border-radius: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
  }

  /* Form rows: always stacked on mobile */
  .form-row, .stm-form-row, [class*="form-row"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  /* Form labels */
  label, .form-label {
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: block;
  }

  /* Inline validation error messages */
  .error-message, .field-error, [class*="error"], [class*="invalid"] {
    font-size: 14px !important;
    color: #ff4d6a !important;
    margin-top: 4px;
  }
}

/* ===== PHASE 4C: TABLES → RESPONSIVE ===== */

@media (max-width: 768px) {
  table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
    border-collapse: collapse;
  }

  /* Visual fade indicator for scrollable tables */
  [style*="overflow"] table,
  .table-responsive table {
    position: relative;
  }
}

/* ===== PHASE 5: CONVERSION OPTIMIZATION ===== */

/* Sticky bottom CTA bar for mobile */
.mobile-sticky-cta {
  display: none;
}

@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    max-height: 64px;
    background: linear-gradient(135deg, #060B18 0%, #0B1E3D 100%);
    border-top: 1px solid rgba(108, 99, 255, 0.3);
    z-index: 9990;
    padding: 8px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .mobile-sticky-cta .cta-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    color: #00d4ff;
    font-size: 1.2rem;
    text-decoration: none;
  }

  .mobile-sticky-cta .cta-main {
    flex: 1;
    min-height: 48px;
    background: linear-gradient(135deg, #6c63ff, #00d4ff);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    letter-spacing: 0.3px;
  }

  /* Prevent sticky bar from blocking content */
  body {
    padding-bottom: 72px !important;
  }

  /* Push chat widget above sticky bar */
  #sd-chat-launcher, #sd-chat-btn {
    bottom: 80px !important;
  }

  #sd-chat-panel {
    bottom: 148px !important;
  }

  /* Push back-to-top above sticky bar */
  .back-to-top {
    bottom: 80px !important;
  }
}

/* ===== PHASE 5B: CLICK-TO-CALL PROMINENCE ===== */

@media (max-width: 768px) {
  a[href^="tel:"] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    color: #00d4ff;
    font-weight: 600;
  }
}

/* ===== TOUCH OPTIMIZATION ===== */
@media (max-width: 768px) {
  /* Improve touch responsiveness */
  a, button, [role="button"] {
    touch-action: manipulation;
  }

  /* Remove hover effects that cause 300ms delay on mobile */
  * {
    -webkit-tap-highlight-color: rgba(108, 99, 255, 0.15);
  }
}

/* ===== GLOBAL MOBILE FIXES ===== */

/* Fix ALL figure elements with inline 40px margins */
@media (max-width: 768px) {
  figure {
    margin: 12px 0 !important;
  }
  figure img {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
  }
  figcaption {
    font-size: 0.78rem !important;
    padding: 0 4px;
  }
}

/* Prevent horizontal overflow on all pages */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .blog-post, .article-container, .post-container, .content-block {
    padding-top: 100px !important;
  }
  .popup-modal {
    padding: 30px 16px !important;
    width: 95% !important;
  }
  .navbar {
    background: #060B18 !important;
    border-bottom: none !important;
  }
  .navbar .btn-nav-cta {
    display: none !important;
  }
}

/* Fix images globally for mobile */
@media (max-width: 768px) {
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Fix any inline-styled image with fixed width/height */
  [style*="width:"] img,
  [style*="height:230px"] {
    height: auto !important;
  }
}

/* ===== CONTAINER PADDING on small screens ===== */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
}

/* ===== HERO SLIDER MOBILE ===== */
@media (max-width: 768px) {
  .hero-slider, .slide-content {
    min-height: 92vh;
  }
  .slide-inner {
    padding: 110px 0 90px;
  }
  .slide-title {
    font-size: clamp(1.8rem, 6vw, 2.8rem) !important;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
  }
  .slide-sub {
    font-size: 0.95rem;
    line-height: 1.65;
  }
  .slide-ctas {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
  }
  .slide-ctas .btn-primary,
  .slide-ctas .btn-secondary {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    text-align: center;
  }
  /* Stats: proper 2x2 grid so they don't overlap slider nav */
  .slide-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px 18px !important;
    flex-wrap: unset !important;
    margin-bottom: 65px;
  }
  .slide-stat {
    flex: none !important;
    text-align: left;
  }
  .slide-stat-num {
    font-size: 1.65rem;
  }
  .slide-badge {
    font-size: 10px;
    padding: 6px 14px;
    margin-bottom: 16px;
  }
  .slider-nav {
    bottom: 14px;
    gap: 8px;
  }
  .slider-arrow {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}

@media (max-width: 375px) {
  .slide-title {
    font-size: 1.6rem !important;
  }
  .slide-sub {
    font-size: 0.88rem;
  }
  .slide-stat-num {
    font-size: 1.4rem;
  }
}

/* ===== SOCIAL PROOF SECTION ===== */
@media (max-width: 768px) {
  .social-proof-section {
    padding: 50px 0 40px;
  }
  .sp-header {
    margin-bottom: 32px;
  }
  .sp-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem) !important;
  }
  .sp-subtitle {
    font-size: 0.9rem;
  }
  .sp-metrics-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 32px;
  }
  .sp-metric-card {
    padding: 20px 14px;
  }
  .sp-metric-num {
    font-size: clamp(1.6rem, 5vw, 2.2rem) !important;
  }
  .sp-metric-label {
    font-size: 0.68rem;
  }

  /* Logo review cards: stack vertically instead of side-by-side */
  .sp-logos-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .sp-logo-card {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto !important;
    padding: 20px 18px;
    gap: 12px 0;
  }
  .sp-logo-svg {
    grid-column: 1 !important;
    grid-row: 1 !important;
    height: 32px;
  }
  .sp-logo-result {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
  .sp-logo-review {
    grid-column: 1 !important;
    grid-row: 3 !important;
    border-left: none !important;
    padding-left: 0 !important;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.85rem;
    line-height: 1.55;
  }
  .sp-logo-glow {
    width: 140px;
    height: 140px;
  }

  /* CTA strip */
  .sp-cta-strip {
    flex-direction: column !important;
    text-align: center;
    align-items: center;
    padding: 20px 18px;
    gap: 16px;
  }
  .sp-cta-left {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .sp-cta-avatars {
    justify-content: center;
  }
  .sp-cta-avatars figure {
    margin: 0 !important;
    display: inline-block;
  }
  .sp-cta-avatars figure img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    margin-left: -8px;
  }
  .sp-cta-avatars figure:first-child img {
    margin-left: 0;
  }
  .sp-cta-avatars figure figcaption {
    display: none !important;
  }
  .sp-cta-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== SERVICES GRID ===== */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .service-card {
    padding: 28px 22px;
  }
  .service-card .service-title {
    font-size: 1.15rem !important;
  }
  .service-card .service-desc {
    font-size: 0.92rem !important;
  }
  .service-card .service-features li {
    font-size: 0.88rem !important;
  }
}

/* ===== PROCESS STEPS ===== */
@media (max-width: 768px) {
  .process-steps {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .process-step {
    padding: 28px 20px;
  }
  .process-number {
    font-size: 2.2rem;
  }
}

/* ===== ABOUT SECTION ===== */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }
  .about-visual {
    order: -1;
  }
  .about-img-wrap figure {
    margin: 0 !important;
  }
  .about-img {
    min-height: 280px;
    border-radius: 16px;
  }
  .about-img-badge {
    left: 12px !important;
    bottom: 16px !important;
  }
  .about-analytics-card {
    top: -12px !important;
    right: -8px !important;
    width: 140px !important;
  }
  .about-analytics-card figure {
    margin: 0 !important;
  }
  .about-pillars {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .about-lead {
    font-size: 1rem;
  }
  .about-body {
    font-size: 0.9rem;
  }
}

/* ===== PORTFOLIO ===== */
@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .portfolio-filters {
    gap: 8px;
    margin-bottom: 32px;
  }
  .portfolio-filter {
    padding: 8px 16px;
    font-size: 0.82rem;
  }
  .portfolio-card figure {
    margin: 0 !important;
  }
  .portfolio-card figure img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
  }
  .portfolio-info {
    padding: 18px;
  }
  .portfolio-results {
    gap: 10px;
  }
}

/* ===== METRICS BANNER ===== */
@media (max-width: 768px) {
  .metrics-content {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
  }
  .metric-num {
    font-size: 2.2rem;
  }
  .metrics-banner figure {
    margin: 0 !important;
  }
}
@media (max-width: 480px) {
  .metrics-content {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
  }
  .metric-num {
    font-size: 1.8rem;
  }
}

/* ===== TESTIMONIALS ===== */
/* Tablet: 2 cards side-by-side */
@media (min-width: 769px) and (max-width: 1023px) {
  .testimonial-card {
    min-width: calc(50% - 12px) !important;
    max-width: calc(50% - 12px) !important;
    padding: 28px 22px;
  }
}
/* Mobile: 1 card, full viewport width */
@media (max-width: 768px) {
  .testimonials-section {
    padding: 60px 0 50px;
  }
  .testimonials-slider {
    overflow: hidden !important;
  }
  .testimonials-track {
    gap: 16px !important;
  }
  .testimonial-card {
    min-width: calc(100vw - 48px) !important;
    max-width: calc(100vw - 48px) !important;
    padding: 24px 20px !important;
    flex-shrink: 0;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .testimonial-text {
    font-size: 0.9rem !important;
    line-height: 1.7 !important;
    white-space: normal !important;
  }
  .testimonial-author {
    gap: 10px;
  }
  .author-avatar {
    width: 42px !important;
    height: 42px !important;
  }
  .author-info strong {
    font-size: 0.85rem;
  }
  .author-info span {
    font-size: 0.72rem;
  }
  .testimonial-controls {
    margin-top: 28px;
  }
}
@media (max-width: 380px) {
  .testimonial-card {
    min-width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    padding: 20px 16px !important;
  }
  .testimonial-text {
    font-size: 0.85rem !important;
  }
}

/* ===== TEAM GRID ===== */
@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px;
  }
  .team-card {
    padding: 24px 16px;
  }
  .team-photo-wrap {
    width: 80px;
    height: 80px;
  }
  .team-name {
    font-size: 0.95rem;
  }
  .team-bio {
    font-size: 0.78rem;
    line-height: 1.5;
  }
}
@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ===== CTA SECTION ===== */
@media (max-width: 768px) {
  .cta-section {
    padding: 60px 0;
  }
  .cta-title {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
  }
  .cta-subtitle {
    font-size: 0.95rem;
  }
  .cta-actions {
    flex-direction: column !important;
    align-items: stretch;
  }
  .cta-actions .btn-primary,
  .cta-actions .btn-secondary {
    width: 100% !important;
    justify-content: center;
    min-height: 50px;
  }
  .cta-guarantee {
    gap: 12px;
    justify-content: center;
  }
}

/* ===== PRICING ===== */
@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
  }
  .pricing-card {
    padding: 32px 24px;
  }
  .pricing-card.popular {
    transform: none !important;
  }
  .pricing-card.popular:hover {
    transform: translateY(-6px) !important;
  }
  .pricing-amount {
    font-size: 3rem;
  }
  .pricing-value-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ===== COMPARISON TABLE ===== */
@media (max-width: 768px) {
  .comparison-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
    scrollbar-width: thin;
  }
  .comparison-table {
    min-width: 600px;
    font-size: 0.82rem;
  }
  .comparison-table th {
    padding: 14px 16px;
    font-size: 0.85rem;
  }
  .comparison-table td {
    padding: 12px 16px;
  }
}

/* ===== FAQ ===== */
@media (max-width: 768px) {
  .faq-grid {
    gap: 10px;
  }
  .faq-question {
    padding: 16px 18px;
    font-size: 0.92rem;
    gap: 12px;
  }
  .faq-answer {
    padding: 0 18px;
  }
  .faq-item.open .faq-answer {
    padding: 0 18px 18px;
  }
  .faq-answer p {
    font-size: 0.85rem;
  }
}

/* ===== CONTACT SECTION ===== */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  .contact-form {
    padding: 24px 18px;
    border-radius: 16px;
  }
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevents iOS zoom */
    padding: 14px 16px;
  }
  .btn-submit {
    min-height: 52px;
    font-size: 0.95rem;
  }
}

/* ===== FOOTER ===== */
@media (max-width: 768px) {
  .footer-top {
    padding: 50px 0;
  }
  .footer-top-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px;
  }
  .footer-brand {
    grid-column: span 2 !important;
  }
  .footer-tagline {
    max-width: 100%;
  }
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  .footer-legal a {
    font-size: 0.85rem;
  }
}
@media (max-width: 480px) {
  .footer-top-grid {
    grid-template-columns: 1fr !important;
  }
  .footer-brand {
    grid-column: span 1 !important;
  }
  .footer-links-col h4 {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
}

/* ===== CHAT WIDGET MOBILE ===== */
@media (max-width: 768px) {
  #sd-chat-panel {
    width: calc(100vw - 16px) !important;
    max-width: 400px;
    right: 8px !important;
    bottom: 80px !important;
    max-height: 75vh;
    border-radius: 20px;
  }
  #sd-chat-launcher {
    bottom: 16px;
    right: 16px;
  }
  #sd-chat-btn {
    width: 56px;
    height: 56px;
  }
  #sd-chat-messages {
    max-height: 280px;
  }
  #sd-chat-input {
    font-size: 16px; /* Prevents iOS zoom */
  }
}
@media (max-width: 420px) {
  #sd-chat-panel {
    width: calc(100vw - 8px) !important;
    right: 4px !important;
    bottom: 74px !important;
    border-radius: 16px;
    max-height: 70vh;
  }
}

/* ===== POPUP MODAL MOBILE ===== */
@media (max-width: 768px) {
  .popup-modal {
    padding: 28px 20px !important;
    width: 95% !important;
    max-width: 95% !important;
    border-radius: 18px;
  }
  .popup-head h3 {
    font-size: 1.3rem;
  }
  .popup-form input,
  .popup-form select,
  .popup-form textarea {
    font-size: 16px !important; /* Prevents iOS zoom */
    padding: 12px 16px;
  }
  .popup-submit {
    font-size: 15px;
    padding: 14px;
    min-height: 50px;
  }
}

/* ===== SUPPORT TICKET MODAL MOBILE ===== */
@media (max-width: 768px) {
  .stm-box {
    padding: 28px 18px 24px !important;
    border-radius: 18px;
    max-height: 85vh;
  }
  .stm-form-row {
    grid-template-columns: 1fr !important;
  }
  .stm-header h2 {
    font-size: 1.35rem;
  }
  .stm-field input,
  .stm-field select,
  .stm-field textarea {
    font-size: 16px; /* Prevents iOS zoom */
  }
}

/* ===== NAVBAR MOBILE ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 0;
  }
  .navbar.scrolled {
    padding: 10px 0;
    border-bottom: none !important;
  }
  .nav-container {
    padding: 0 16px;
  }
  .nav-links {
    display: none !important;
  }
  .nav-hamburger {
    display: flex !important;
  }
  .btn-nav-cta {
    display: none !important;
  }
  .logo-text {
    font-size: 1.2rem;
  }
  .logo-icon {
    width: 34px;
    height: 34px;
  }
  .nav-mega-dropdown {
    display: none !important;
  }
}

/* ===== BLOG PAGES ===== */
@media (max-width: 768px) {
  .blog-hero {
    padding: 120px 0 50px;
  }
  .blog-hero-title {
    font-size: clamp(1.6rem, 5vw, 2.5rem);
  }
  .blog-categories {
    flex-wrap: wrap;
    gap: 8px;
  }
  .blog-cat-btn {
    padding: 7px 16px;
    font-size: 0.8rem;
  }
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .blog-card {
    border-radius: 16px;
  }
  .blog-card:hover {
    transform: translateY(-6px) scale(1) !important;
  }
  .blog-card-body {
    padding: 18px;
  }
  .blog-card-title {
    font-size: 0.95rem;
  }
  .blog-card-excerpt {
    font-size: 0.82rem;
  }
  .featured-article {
    grid-template-columns: 1fr !important;
  }
  .featured-img-wrap {
    min-height: 220px !important;
  }
  .featured-info {
    padding: 24px 20px !important;
  }
  .featured-title {
    font-size: 1.2rem;
  }
}

/* ===== SERVICE PAGES ===== */
@media (max-width: 768px) {
  .service-page-hero {
    padding: 110px 0 60px;
  }
  .service-hero-h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem) !important;
    letter-spacing: -0.5px;
  }
  .service-hero-subtitle {
    font-size: 0.95rem;
  }
  .service-hero-badges {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hero-badge-item {
    font-size: 0.72rem;
    padding: 6px 12px;
  }
  .service-hero-ctas {
    flex-direction: column;
    gap: 12px;
  }
  .service-hero-ctas .btn-primary,
  .service-hero-ctas .btn-secondary {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    text-align: center;
  }
  .service-deep-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  .service-features-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .service-results-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }
  .srv-stat {
    padding: 24px 14px;
  }
  .srv-stat-num {
    font-size: 2rem;
  }
}
@media (max-width: 480px) {
  .service-results-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ===== REVIEWS PAGE ===== */
@media (max-width: 768px) {
  /* Ensure all review cards stack */
  .review-card,
  .testimonial-card {
    width: 100% !important;
    min-width: unset !important;
    box-sizing: border-box;
  }

  /* Review grids */
  .review-grid,
  .reviews-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Review text sizing */
  .review-text,
  .review-quote {
    font-size: 0.88rem;
    line-height: 1.65;
  }
}

/* ===== TRUSTED LOGOS ===== */
@media (max-width: 768px) {
  .trusted-section {
    padding: 40px 0;
  }
  .trusted-logos {
    gap: 12px 20px;
  }
  .trust-logo-svg {
    height: 28px;
  }
}
@media (max-width: 480px) {
  .trust-logo-svg {
    height: 24px;
  }
}

/* ===== TOOLS / TECH BADGES ===== */
@media (max-width: 768px) {
  .tools-section {
    padding: 40px 0;
  }
  .tools-grid {
    gap: 8px;
  }
  .tool-badge {
    padding: 8px 14px;
    font-size: 0.75rem;
  }
}

/* ===== BACK TO TOP ===== */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 80px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

/* ===== SECTION BADGES & HEADERS ===== */
@media (max-width: 768px) {
  .section-badge {
    font-size: 0.72rem;
    padding: 6px 14px;
    letter-spacing: 1.5px;
  }
  .section-header {
    margin: 0 auto 2.5rem;
  }
  .section-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem) !important;
    letter-spacing: -0.3px;
  }
  .section-subtitle {
    font-size: 0.92rem;
    line-height: 1.6;
  }
}

/* ===== MARQUEE ===== */
@media (max-width: 768px) {
  .marquee-section {
    padding: 12px 0;
  }
  .marquee-content {
    font-size: 0.8rem;
    gap: 20px;
  }
}

/* ===== PRELOADER ===== */
@media (max-width: 768px) {
  .preloader-logo {
    font-size: 2.2rem;
  }
  .preloader-bar {
    width: 200px;
  }
}

/* ===== CUSTOM CURSOR â€” DISABLE ON MOBILE ===== */
@media (max-width: 768px) {
  .cursor-dot, .cursor-ring {
    display: none !important;
  }
}

/* ===== ARTICLE CONTENT (Blog Posts) ===== */
@media (max-width: 768px) {
  .article-content,
  .blog-article-content,
  .post-content {
    padding: 0 4px;
  }
  .article-content img,
  .blog-article-content img,
  .post-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
  }
  .article-content h2,
  .blog-article-content h2 {
    font-size: 1.3rem;
    line-height: 1.2;
    word-wrap: break-word;
  }
  .article-content h3,
  .blog-article-content h3 {
    font-size: 1.1rem;
    line-height: 1.25;
  }
  .article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .article-content pre,
  .blog-article-content pre {
    max-width: 100%;
    overflow-x: auto;
    font-size: 0.8rem;
  }
  .article-content blockquote,
  .blog-article-content blockquote {
    padding: 16px;
    margin: 16px 0;
    font-size: 0.92rem;
  }
}

/* ===== MEGA MENU DROPDOWN â€” FORCE HIDDEN ON MOBILE ===== */
@media (max-width: 900px) {
  .nav-mega-dropdown {
    display: none !important;
  }
  .nav-link-arrow {
    display: none !important;
  }
}

/* ===== TOUCH-FRIENDLY TAP TARGETS ===== */
@media (max-width: 768px) {
  /* Ensure minimum 44px tap targets */
  a, button, .btn-primary, .btn-secondary, .btn-ghost,
  .portfolio-filter, .blog-cat-btn, .tc-btn,
  .slider-arrow, .slider-dot {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Exception for small dots */
  .slider-dot, .tc-dot {
    min-width: unset;
    min-height: unset;
  }
  
  /* Footer links need good spacing */
  .footer-links-col ul li {
    padding: 4px 0;
  }
  .footer-links-col ul li a {
    display: inline-block;
    padding: 4px 0;
    min-height: 36px;
    line-height: 28px;
  }
}

/* ===== IMAGES IN PORTFOLIO VISUALS ===== */
@media (max-width: 768px) {
  .portfolio-visual {
    height: auto !important;
  }
  .portfolio-visual figure {
    margin: 0 !important;
  }
  .portfolio-visual figure img {
    height: 200px !important;
    width: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
  .case-study-img {
    height: 200px !important;
    width: 100% !important;
  }
}

/* ===== INLINE STYLE OVERRIDES ===== */
@media (max-width: 768px) {
  /* Override any inline max-width or width that's too wide */
  [style*="max-width: 820px"],
  [style*="max-width:820px"] {
    max-width: 100% !important;
  }
  
  /* Fix inline grid columns */
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  
  [style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Fix inline positioned elements */
  [style*="position:absolute"][style*="bottom:16px"][style*="right:16px"] {
    bottom: 10px !important;
    right: 10px !important;
  }
}

/* ===== SCROLL BEHAVIOR ===== */
@media (max-width: 768px) {
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
}

/* ===== ABOUT PAGE SPECIFIC ===== */
@media (max-width: 768px) {
  /* Awards grid */
  .awards-grid,
  .award-cards,
  .recognition-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
}

/* ===== CONTACT PAGE SPECIFIC ===== */
@media (max-width: 768px) {
  .contact-section {
    padding: 40px 0;
  }
  .contact-info h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }
  .contact-items {
    gap: 18px;
  }
  .social-links {
    gap: 10px;
    flex-wrap: wrap;
  }
}

/* ===== PRICING PAGE SPECIFIC ===== */
@media (max-width: 768px) {
  .pricing-section {
    padding: 60px 0;
  }
}

/* ===== RESOURCES PAGE SPECIFIC ===== */
@media (max-width: 768px) {
  .resources-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
}

/* ===== 320px EXTRA SMALL DEVICES ===== */
@media (max-width: 360px) {
  .container {
    padding: 0 12px;
  }
  .slide-title {
    font-size: 1.5rem !important;
  }
  .slide-badge {
    font-size: 9px;
    padding: 5px 10px;
  }
  .sp-metric-card {
    padding: 16px 10px;
  }
  .service-card {
    padding: 22px 16px;
  }
  .testimonial-card {
    padding: 18px 14px;
  }
  .pricing-card {
    padding: 24px 18px;
  }
  .footer-links-col h4 {
    font-size: 0.8rem;
  }
  .btn-primary, .btn-secondary {
    padding: 12px 20px;
    font-size: 0.85rem;
  }
}

/* Hide testimonial dots for clean appearance */
.tc-dots { display: none !important; }

/* ===== GLOBAL INLINE GRID OVERRIDES (SERVICES/BLOGS) ===== */
@media (max-width: 900px) {
  /* Collapse legacy inline grids across 117+ pages */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns:2fr 1fr 1fr 1fr"],
  [style*="display:grid;grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:repeat(2,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Reset grid-column spans for nested elements inside now single-column layouts */
  [style*="grid-column:span"],
  [style*="grid-column: span"] {
    grid-column: 1 / -1 !important;
  }
}

/* ===== HERO STATS AND METRICS STRIP VISIBILITY FIX ===== */
@media (max-width: 768px) {
  .slide-stat-num {
    font-size: 1.7rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px;
  }
  .slide-stat-label {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  #metricsStrip > div > div:first-child {
    font-size: clamp(1.5rem, 4vw, 2rem) !important;
  }
  #metricsStrip > div > div:last-child {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px;
  }
  .slider-nav {
    display: none !important;
  }
  .slider-arrow {
    display: none !important;
  }
}