/* ========================================
   Mobile Responsive Styles for All Screen Sizes
   ======================================== */

/* Extra Small Devices (Portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  /* Typography adjustments */
  h1 {
    font-size: 28px;
    line-height: 36px;
  }

  h2 {
    font-size: 22px;
    line-height: 30px;
  }

  h3 {
    font-size: 20px;
    line-height: 28px;
  }

  h4 {
    font-size: 16px;
    line-height: 24px;
  }

  body, p {
    font-size: 14px;
    line-height: 22px;
  }

  /* Header adjustments */
  .logo img {
    max-width: 120px;
    height: auto;
  }

  .top-info-box {
    flex-direction: column;
    text-align: center;
  }

  .top-info-box li {
    width: 100%;
    margin-bottom: 10px;
  }

  .info-box {
    padding: 10px;
  }

  .info-box-title {
    font-size: 12px;
  }

  .info-box-subtitle {
    font-size: 13px;
    word-break: break-word;
  }

  .header-get-a-quote {
    width: 100%;
    text-align: center;
  }

  .header-get-a-quote .btn {
    width: 100%;
    padding: 10px 15px;
  }

  /* Navigation */
  .navbar-collapse {
    background-color: #212121;
    padding: 15px;
  }

  .navbar-nav {
    width: 100%;
  }

  .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .dropdown-menu {
    background-color: #2c2c2c;
    border: none;
    position: static !important;
    transform: none !important;
    width: 100%;
  }

  .dropdown-menu li a {
    padding: 10px 20px;
    color: #fff !important;
    font-size: 14px;
  }

  /* Containers and layouts */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .row {
    margin-left: -10px;
    margin-right: -10px;
  }

  .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Buttons */
  .btn {
    font-size: 14px;
    padding: 10px 20px;
  }

  /* Images */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Sliders */
  .slider-content h2,
  .slide-item h2 {
    font-size: 24px !important;
    line-height: 32px !important;
  }

  .slider-content h3,
  .slide-item h3 {
    font-size: 18px !important;
  }

  .slider .btn {
    margin-top: 10px;
  }

  /* Cards and boxes */
  .card,
  .box {
    margin-bottom: 20px;
  }

  /* Footer */
  .footer-main,
  .footer-bottom {
    text-align: center;
  }

  .footer-widget {
    margin-bottom: 30px;
  }

  /* Forms */
  .form-control {
    font-size: 14px;
    padding: 10px;
  }

  /* Tables */
  table {
    font-size: 13px;
  }

  table td,
  table th {
    padding: 8px;
  }

  /* Spacing utilities */
  .mt-5, .my-5 {
    margin-top: 2rem !important;
  }

  .mb-5, .my-5 {
    margin-bottom: 2rem !important;
  }

  .pt-5, .py-5 {
    padding-top: 2rem !important;
  }

  .pb-5, .py-5 {
    padding-bottom: 2rem !important;
  }
}

/* Small Devices (Landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  h1 {
    font-size: 32px;
    line-height: 42px;
  }

  h2 {
    font-size: 24px;
    line-height: 32px;
  }

  .logo img {
    max-width: 150px;
    height: auto;
  }

  .top-info-box {
    justify-content: center;
    flex-wrap: wrap;
  }

  .top-info-box li {
    margin: 5px;
  }

  .navbar-collapse {
    background-color: #212121;
    padding: 15px;
  }

  .dropdown-menu {
    background-color: #2c2c2c;
    position: static !important;
  }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  h1 {
    font-size: 34px;
    line-height: 44px;
  }

  h2 {
    font-size: 26px;
    line-height: 34px;
  }

  .logo img {
    max-width: 180px;
    height: auto;
  }

  .top-info-box {
    justify-content: space-around;
  }

  .info-box-subtitle {
    font-size: 14px;
  }

  .navbar-nav {
    justify-content: center;
  }

  .nav-item {
    margin: 0 5px;
  }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }

  .top-info-box {
    justify-content: space-between;
  }
}

/* Extra Large Devices (Large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* ========================================
   Touch-Friendly Improvements
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .nav-link,
  .btn,
  a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Better dropdown experience on touch */
  .dropdown:hover .dropdown-menu {
    display: none;
  }

  .dropdown.show .dropdown-menu {
    display: block;
  }
}

/* ========================================
   Orientation Specific Styles
   ======================================== */
@media (orientation: landscape) and (max-height: 500px) {
  .header {
    min-height: auto;
  }

  .logo-area {
    padding: 10px 0;
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .navbar,
  .footer,
  .btn,
  .social-links {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a {
    text-decoration: underline;
  }

  img {
    max-width: 100% !important;
  }
}

/* ========================================
   High DPI Displays
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize images for retina displays */
  img {
    image-rendering: -webkit-optimize-contrast;
  }
}

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

/* ========================================
   Dark Mode Support (Optional)
   ======================================== */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles if needed in future */
}

/* ========================================
   Common Responsive Utilities
   ======================================== */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

@media (max-width: 767.98px) {
  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }

  .mobile-hide {
    display: none !important;
  }

  .mobile-text-center {
    text-align: center !important;
  }

  .mobile-full-width {
    width: 100% !important;
  }
}

/* Flexbox utilities for responsive layouts */
@media (max-width: 767.98px) {
  .flex-mobile-column {
    flex-direction: column !important;
  }

  .flex-mobile-center {
    justify-content: center !important;
    align-items: center !important;
  }
}

/* Overflow handling for mobile */
@media (max-width: 991.98px) {
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .overflow-mobile-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
