/* ============================================
   UNIFIED LAYOUT SYSTEM - SINGLE SOURCE OF TRUTH
   ============================================ */

/* ============================================
   1. CONTAINER SYSTEM - TWO SIZES ONLY
   ============================================ */

/* Desktop: 900px container */
.container {
  max-width: 900px !important;
  margin: 0 auto !important;
  padding-left: 48px !important;
  padding-right: 48px !important;
  width: 100% !important;
}

.download-btn-appstore,
.download-btn-googleplay {
  min-width: 200px !important;
  padding: var(--space-4) var(--space-6) !important;
  border-radius: var(--radius-lg) !important;
  transition: all var(--transition-normal) !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: var(--font-weight-semibold) !important;
  position: relative !important;
  transform: translateY(0) !important;

  /* Same white background and grey styling for both */
  background: #ffffff !important;
  color: #333333 !important;
  border: 2px solid #d1d5db !important;
  box-shadow: 0 4px 0 #d1d5db !important;
}

.download-btn-appstore:hover:not(:active),
.download-btn-googleplay:hover:not(:active) {
  background: #f9fafb !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 0 #d1d5db !important;
  color: #333333 !important;
  border-color: #9ca3af !important;
}

.download-btn-appstore:active,
.download-btn-googleplay:active {
  transform: translateY(3px) !important;
  box-shadow: 0 1px 0 #d1d5db !important;
  color: #333333 !important;
}

/* Button content layout */
.download-btn-content {
  display: flex;
  align-items: center; /* vertically center icon + text block */
  justify-content: center;
  gap: var(--space-3); /* space between icon and text */
  text-align: left; /* or center if you prefer */
}

.download-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1; /* adjust as needed */
}

.download-btn-title {
  font-size: var(--font-size-xs) !important;
  font-weight: var(--font-weight-normal) !important;
  color: #666666 !important;
}

.download-btn-main {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important; /* Center the icon and text */
  gap: var(--space-3) !important; /* Reduced gap between icon and text */
  text-align: center !important;
}

.download-btn-main span {
  font-size: var(--font-size-lg) !important;
  font-weight: var(--font-weight-semibold) !important;
  color: #333333 !important;
}

/* App Store Icon - Apple colors */
.download-btn-appstore .download-btn-icon i {
  font-size: var(--font-size-2xl) !important;
  color: #000000 !important; /* Apple black */
  line-height: 1 !important;
}

/* Google Play Icon - Google colors */
.download-btn-googleplay .download-btn-icon i {
  font-size: var(--font-size-2xl) !important;
  background: linear-gradient(
    45deg,
    #ea4335,
    #fbbc05,
    #34a853,
    #4285f4
  ) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  line-height: 1 !important;
}

/* Mobile: 600px container - SINGLE BREAKPOINT AT 900px */
@media (max-width: 900px) {
  .container {
    max-width: 600px !important;
    margin: 0 auto !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
    width: 100% !important;
  }

  .download-btn-appstore,
  .download-btn-googleplay {
    min-width: 180px !important;
    padding: var(--space-3) var(--space-5) !important;
    margin: 0 !important;
  }

  .download-btn-title {
    font-size: 11px !important;
  }

  .download-btn-main span {
    font-size: var(--font-size-base) !important;
  }

  .download-btn-main i {
    font-size: var(--font-size-lg) !important;
    vertical-align: middle !important;
  }
}

/* ============================================
   2. HERO SECTION LAYOUT - FIXED
   ============================================ */

/* Desktop: Keep horizontal layout and show image */
.mobile-stack {
  /* Default: Bootstrap row behavior (horizontal) */
}

.mobile-order-first,
.mobile-hero-image,
.hero-phone {
  /* Default: Show on desktop */
}

.mobile-text-center {
  /* Default: Left-aligned on desktop */
}

@media (max-width: 900px) {
  /* HIDE desktop image container */
  .desktop-image-container {
    display: none !important;
  }

  /* SHOW mobile image container */
  .mobile-image-container {
    display: block !important;
    text-align: center !important;
    margin: var(--space-8) 0 !important;
  }

  /* KEEP LOGO VISIBLE AND CENTERED */
  .hero-logo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: center !important;
    margin-bottom: var(--space-6) !important;
  }

  .hero-logo img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 auto !important;
  }

  /* FORCE CENTER TEXT */
  .mobile-text-center {
    text-align: center !important;
  }

  /* FORCE VERTICAL LAYOUT */
  .mobile-stack {
    flex-direction: column !important;
  }

  /* OVERRIDE BOOTSTRAP COLUMNS - BOTH FULL WIDTH */
  .mobile-stack .col-lg-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* CENTER THE IMAGE */
  .mobile-hero-image,
  .right-image {
    text-align: center !important;
  }

  .hero-phone img {
    max-width: 50% !important;
    height: auto !important;
  }

  /* ADD PADDING TO BUTTON ON MOBILE */
  .hero-cta,
  .mobile-cta {
    padding-top: 24px !important; /* Add top padding */
    margin-top: var(--space-8) !important;
  }

  /* Or if you want to target the button itself */
  .btn-base,
  .mobile-btn-full {
    margin-top: 24px !important; /* Add top margin to button */
  }
}

/* Desktop: Hide mobile image, show desktop image */
@media (min-width: 901px) {
  /* HIDE mobile image container */
  .mobile-image-container {
    display: none !important;
  }

  /* SHOW desktop image container */
  .desktop-image-container {
    display: block !important;
  }

  /* FORCE HORIZONTAL LAYOUT ON DESKTOP */
  .mobile-stack {
    flex-direction: row !important;
  }

  /* RESTORE BOOTSTRAP COLUMNS ON DESKTOP */
  .mobile-stack .col-lg-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

/* ============================================
   3. FEATURE CARDS LAYOUT
   ============================================ */

/* Desktop: Grid layout */
.features-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: var(--space-6) !important;
}

/* Mobile: Single column */
@media (max-width: 900px) {
  .features-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--space-6) !important;
  }

  .feature-card {
    text-align: center !important;
  }

  /* FIXED: Center feature tags on mobile */
  .feature-tags,
  .mobile-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--space-2) !important;
    justify-content: center !important; /* Center the tags */
    align-items: center !important;
    margin-top: var(--space-4) !important;
  }

  .feature-tag {
    text-align: center !important;
    white-space: nowrap !important; /* Prevent text wrapping inside tags */
  }
}

/* ============================================
   4. REVIEWS SLIDER LAYOUT
   ============================================ */

/* Desktop: 3 cards visible */
.review-card {
  flex: 0 0 calc(50% - 16px) !important;
}

/* Mobile: 1 card visible */
@media (max-width: 900px) {
  .reviews-slider-container {
    padding: var(--space-2) 0 !important;
  }

  .reviews-slider {
    gap: 0 !important; /* Remove gap on mobile for proper centering */
  }

  .review-card {
    flex: 0 0 100% !important;
    box-sizing: border-box !important;
    opacity: 0.1 !important; /* Default: 10% opacity for inactive cards */
    transition: opacity 0.6s ease, transform 0.6s ease !important; /* Smooth transition */
    transform: scale(0.95) !important; /* Slightly smaller for inactive cards */
  }

  .review-card.active {
    opacity: 1 !important; /* 100% opacity for active card */
    transform: scale(1) !important; /* Full size for active card */
  }

  .review-author {
    justify-content: center !important;
    text-align: center !important;
    flex-direction: column !important;
    gap: var(--space-3) !important;
  }

  .review-rating {
    justify-content: center !important;
  }

  .review-card p {
    text-align: center !important;
  }

  /* FIXED: Mobile slider controls alignment */
  .slider-controls {
    display: flex !important;
    align-items: center !important; /* CENTER VERTICALLY */
    justify-content: center !important; /* CENTER HORIZONTALLY */
    margin-top: var(--space-8) !important;
    padding: var(--space-3) !important;
    min-height: 48px !important; /* Smaller on mobile */
    gap: var(--space-4) !important; /* Add gap between elements */
  }

  .slider-btn {
    font-size: var(--font-size-sm) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important; /* Prevent shrinking */
    margin: 0 !important; /* Remove any margins */
  }

  .slider-dots {
    display: flex !important;
    align-items: center !important; /* CENTER DOTS VERTICALLY */
    justify-content: center !important; /* CENTER DOTS HORIZONTALLY */
    height: 40px !important; /* Match mobile button height */
    gap: var(--space-2) !important;
    flex-shrink: 0 !important; /* Prevent shrinking */
    margin: 0 !important; /* Remove any margins */
    padding: 0 !important; /* Remove any padding */
  }

  .dot {
    width: 10px !important; /* Smaller dots on mobile */
    height: 10px !important;
    flex-shrink: 0 !important; /* Prevent individual dots from shrinking */
  }
}

/* ============================================
   5. FOOTER LAYOUT
   ============================================ */

/* Desktop: Horizontal download buttons */
.download-btn-container {
  display: flex !important;
  justify-content: center !important;
  /* gap: var(--space-6) !important; */
  flex-wrap: wrap !important;
}

.footer-links {
  display: flex !important;
  justify-content: center !important;
  gap: var(--space-8) !important;
  flex-wrap: wrap !important;
}

/* Mobile: Vertical stack */
@media (max-width: 900px) {
  .download-btn-container {
    flex-direction: column !important;
    align-items: center !important;
    gap: var(--space-1) !important;
  }

  .footer-links {
    flex-direction: column !important;
    gap: var(--space-4) !important;
  }

  /* ADD: Center footer logo on mobile */
  .footer-logo {
    text-align: center !important;
    display: block !important;
    margin: 0 auto var(--space-6) !important;
  }

  .footer-logo img {
    display: block !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  /* Center footer widget content */
  .footer-widget {
    text-align: center !important;
  }

  /* Center footer description text */
  .footer-description {
    text-align: center !important;
  }
}

/* ============================================
   6. TYPOGRAPHY ADJUSTMENTS
   ============================================ */

/* Mobile: Smaller text sizes */
@media (max-width: 900px) {
  .hero-title {
    font-size: 32px !important;
    line-height: 1.1 !important;
  }

  .hero-subtitle {
    font-size: 18px !important;
  }

  .heading-2 {
    font-size: 28px !important;
    line-height: 1.2 !important;
  }

  .text-large {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
}

/* ============================================
   7. SPACING ADJUSTMENTS
   ============================================ */

@media (max-width: 900px) {
  .section-base {
    padding: 48px 0 !important;
  }

  .section-hero {
    padding: 48px 0 64px !important;
  }

  .section-heading {
    margin-bottom: var(--space-8) !important;
  }
}

/* ============================================
   8. MOBILE TOUCH OPTIMIZATIONS
   ============================================ */

@media (max-width: 900px) {
  /* Touch targets */
  .slider-btn,
  .dot,
  .download-btn-standard {
    touch-action: manipulation !important;
  }

  /* Prevent zoom on input focus */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Button feedback */
  .btn-base:active,
  .slider-btn:active,

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden !important;
  }
}

/* ============================================
   FORCE OVERRIDE ALL CONFLICTS
   ============================================ */

/* CRITICAL: Override any other CSS files */
@media (max-width: 900px) {
  /* HIDE the desktop image container and its contents */
  .desktop-image-container,
  .desktop-image-container .hero-phone,
  .desktop-image-container .mobile-hero-image,
  .desktop-image-container .right-image {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  /* SHOW only the mobile image container */
  .mobile-image-container,
  .mobile-image-container .hero-phone,
  .mobile-image-container .mobile-hero-image,
  .mobile-image-container .right-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    left: auto !important;
  }

  /* EXPLICITLY KEEP LOGO VISIBLE AND CENTERED */
  .hero-logo,
  .hero-logo img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    left: auto !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* CENTER FOOTER LOGO ON MOBILE */
  .footer-logo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    left: auto !important;
    text-align: center !important;
    margin: 0 auto var(--space-6) !important;
  }

  .footer-logo img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    left: auto !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  /* Force single column for ALL hero layouts */
  .section-hero .container .row,
  .mobile-stack {
    flex-direction: column !important;
    align-items: center !important;
  }

  /* Force full width for both columns */
  .section-hero .col-lg-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
