/* Mobile First Responsive Design */

/* Extra Small devices (phones, 320px and up) */
@media (max-width: 575.98px) {
  body, html {
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
  }
  
  .container, .navbar .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .row, [class*="col-"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  
  /* Navbar improvements */
  .navbar {
    height: 50px !important;
    min-height: 50px !important;
    padding: 0 8px !important;
  }
  
  .navbar .navbar-brand img {
    height: 35px !important;
    max-width: 120px !important;
  }
  
  .navbar-toggler {
    padding: 4px 8px !important;
    font-size: 0.9rem !important;
  }
  
  .navbar-nav {
    margin-top: 0.5rem !important;
    padding: 0.5rem 0 !important;
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 0 !important;
    font-size: 0.95rem !important;
  }
  
  /* Cards and content */
  .exchange-card, .about-card, .feature-card, .faq-card, .testimonial-card {
    border-radius: 12px !important;
    margin: 0 4px 12px 4px !important;
    width: calc(100% - 8px) !important;
    max-width: 100% !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  }
  
  .exchange-card {
    padding: 12px 8px 8px 8px !important;
  }
  
  .exchange-logo {
    max-width: 60px !important;
    margin-bottom: 8px !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .rebate-badge-full {
    width: 100% !important;
    margin: 0 auto 8px auto !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    padding: 6px 8px !important;
  }
  
  .about-card-img.bg {
    left: 0 !important;
    top: 8px !important;
    width: 50px !important;
    height: 50px !important;
  }
  
  .exchange-title, .exchange-info-label, .exchange-info-value {
    font-size: 0.9rem !important;
  }
  
  .tab-btn {
    font-size: 0.85rem !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    margin: 2px !important;
  }
  
  /* Hero section */
  .hero-title {
    font-size: 1.4rem !important;
    line-height: 1.3 !important;
  }
  
  .hero-desc {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
  }
  
  .hero-card {
    padding: 16px 12px !important;
    border-radius: 12px !important;
  }
  
  /* Stats section */
  .stats-icon-modern {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
  }
  
  .display-5 {
    font-size: 1.2rem !important;
  }
  
  /* Testimonials */
  .testimonial-item {
    min-width: 280px !important;
    max-width: 100% !important;
    padding: 16px 12px !important;
    border-radius: 12px !important;
  }
  
  .testimonial-arrow {
    width: 28px !important;
    height: 28px !important;
  }
  
  .testimonial-stars {
    font-size: 1.1rem !important;
  }
  
  .testimonial-quote {
    font-size: 0.9rem !important;
  }
  
  /* Footer */
  .footer {
    padding: 16px 8px !important;
    font-size: 0.85rem !important;
  }
  
  /* Buttons */
  .btn-lg {
    font-size: 0.9rem !important;
    padding: 8px 16px !important;
  }
  
  /* Spacing adjustments */
  .py-5, .py-4 {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }
  
  .px-5 {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  
  .row.g-4, .row.g-5 {
    --bs-gutter-x: 8px;
    --bs-gutter-y: 8px;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .container, .navbar .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  .navbar {
    height: 55px !important;
    min-height: 55px !important;
  }
  
  .navbar .navbar-brand img {
    height: 40px !important;
    max-width: 140px !important;
  }
  
  .exchange-card {
    padding: 16px 12px 12px 12px !important;
  }
  
  .exchange-logo {
    max-width: 70px !important;
  }
  
  .hero-title {
    font-size: 1.6rem !important;
  }
  
  .hero-desc {
    font-size: 1rem !important;
  }
  
  .testimonial-item {
    min-width: 320px !important;
    padding: 20px 16px !important;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .container, .navbar .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  
  .navbar {
    height: 60px !important;
    min-height: 60px !important;
  }
  
  .navbar .navbar-brand img {
    height: 45px !important;
    max-width: 160px !important;
  }
  
  .exchange-card {
    padding: 20px 16px 16px 16px !important;
  }
  
  .exchange-logo {
    max-width: 80px !important;
  }
  
  .hero-title {
    font-size: 1.8rem !important;
  }
  
  .hero-desc {
    font-size: 1.1rem !important;
  }
  
  .testimonial-item {
    min-width: 350px !important;
    padding: 24px 20px !important;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .container, .navbar .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  
  .navbar {
    height: 60px !important;
    min-height: 60px !important;
  }
  
  .navbar .navbar-brand img {
    height: 50px !important;
    max-width: 200px !important;
  }
  
  .exchange-card {
    padding: 24px 20px 20px 20px !important;
  }
  
  .exchange-logo {
    max-width: 90px !important;
  }
  
  .hero-title {
    font-size: 2.2rem !important;
  }
  
  .hero-desc {
    font-size: 1.2rem !important;
  }
  
  .testimonial-item {
    min-width: 380px !important;
    padding: 28px 24px !important;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .navbar .navbar-brand img {
    height: 75px !important;
    max-width: 270px !important;
  }
  
  .hero-title {
    font-size: 2.5rem !important;
  }
  
  .hero-desc {
    font-size: 1.3rem !important;
  }
  
  .testimonial-item {
    min-width: 400px !important;
    padding: 32px 28px !important;
  }
}

/* Specific fixes for very small screens */
@media (max-width: 375px) {
  .exchange-card {
    padding: 8px 6px 6px 6px !important;
    border-radius: 8px !important;
  }
  
  .exchange-logo {
    max-width: 50px !important;
    border-radius: 6px !important;
  }
  
  .rebate-badge-full {
    font-size: 0.8rem !important;
    padding: 4px 6px !important;
  }
  
  .exchange-title {
    font-size: 0.85rem !important;
  }
  
  .tab-btn {
    font-size: 0.75rem !important;
    padding: 3px 6px !important;
  }
  
  .hero-title {
    font-size: 1.2rem !important;
  }
  
  .hero-desc {
    font-size: 0.85rem !important;
  }
}

/* Landscape orientation fixes */
@media (max-width: 767.98px) and (orientation: landscape) {
  .navbar {
    height: 50px !important;
    min-height: 50px !important;
  }
  
  .navbar .navbar-brand img {
    height: 35px !important;
    max-width: 120px !important;
  }
  
  .hero-title {
    font-size: 1.3rem !important;
  }
  
  .py-5, .py-4 {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
}

/* Dropdown hover effect for desktop only */
@media (min-width: 992px) {
  .navbar .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0.5rem;
  }
  
  .navbar .dropdown-menu {
    transition: all 0.2s;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .exchange-card, .about-card, .feature-card, .faq-card, .testimonial-card {
    border: 2px solid #000 !important;
  }
  
  .btn {
    border: 2px solid currentColor !important;
  }
}

/* Print styles */
@media print {
  .navbar, .footer, .btn, .dropdown-menu {
    display: none !important;
  }
  
  .exchange-card, .about-card, .feature-card, .faq-card, .testimonial-card {
    box-shadow: none !important;
    border: 1px solid #000 !important;
    break-inside: avoid;
  }
}