/* ========================================================================
   Eagle-IOT GPS - Optimized Responsive Styles
   Refined and modernized for all devices
   ======================================================================== */

/* General Container Fixes */
@media (min-width: 992px) {
  .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Scroll Top Position */
@media (max-width: 1366px) {
  .scroll-top {
    bottom: 20px;
    right: 20px;
    border-radius: 50% !important;
  }
}

/* Medium Devices (Tablets, 991px and down) */
@media (max-width: 991px) {
  :root {
    --section-padding: 60px 0;
  }

  .theme-title {
    margin: 0 0 40px 0;
    padding-top: 60px;
  }

  .theme-title p {
    width: 100%;
    font-size: 1.15rem;
    margin-top: 35px;
  }

  /* Header & Navigation */
  .theme-main-header .logo {
    width: auto;
    max-width: 180px;
  }

  .theme-main-header .logo img {
    height: 60px !important;
    width: auto !important;
  }

  .theme-main-menu .navbar-collapse {
    background: var(--navy);
    margin-top: 15px;
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
  }

  .theme-main-menu .navbar-nav>li>a {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .modern-dropdown {
    position: static !important;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(0, 0, 0, 0.2) !important;
    box-shadow: none !important;
    border: none !important;
    margin-left: 15px !important;
    min-width: none !important;
  }

  .dropdown.open .modern-dropdown {
    display: block;
  }
}

/* Small Devices (Landscape Phones & Tablets, 768px and down) */
@media (max-width: 768px) {
  .theme-main-header {
    padding: 15px 0;
    background: rgba(10, 25, 66, 0.9) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .theme-main-header.fixed {
    background: rgba(10, 25, 66, 0.98) !important;
    padding: 8px 0;
  }

  .navbar-header {
    min-height: auto !important;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .theme-main-header .logo {
    float: left !important;
    margin: 0;
  }

  .theme-main-header .logo img {
    height: 50px !important;
    width: auto !important;
    transition: all 0.3s ease;
  }

  .theme-main-header.fixed .logo img {
    height: 40px !important;
  }

  /* Force hamburger toggle to show and menu to collapse at 768px */
  .theme-main-menu .navbar-toggle {
    display: block !important;
    margin: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--white);
    font-size: 20px;
    transition: all 0.3s ease;
  }

  .theme-main-menu .navbar-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
  }

  .theme-main-menu .navbar-collapse.collapse {
    display: none !important;
  }

  .theme-main-menu .navbar-collapse.collapse.in {
    display: block !important;
  }

  /* Hero Section */
  .banner h1 {
    font-size: 32px;
  }

  .banner p {
    font-size: 18px;
    line-height: 1.4;
  }

  /* Platform Section */
  .page-middle-banner .opacity {
    padding: 30px 20px;
  }

  .page-middle-banner .opacity .platform {
    flex-direction: column;
    height: auto !important;
    text-align: center;
  }

  .page-middle-banner .opacity .image {
    display: block !important;
    /* Restore image */
    margin-bottom: 30px;
    width: 100%;
  }

  .page-middle-banner .opacity .image img {
    height: auto !important;
    /* Remove hardcoded height */
    max-width: 100%;
    margin: 0 auto !important;
  }

  .page-middle-banner .opacity a {
    width: 100%;
    justify-content: center;
    padding: 15px;
    font-size: 14px;
    margin-bottom: 10px;
  }

  /* License Section */
  .license-banner {
    padding: 60px 0;
  }

  .license-logos {
    gap: 25px;
  }

  .license-logos img {
    max-width: 120px;
  }

  .license-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
  }

  /* Partners Section */
  #partner-section {
    margin: 40px 0 0 0 !important;
  }

  /* Contact Section */
  #contact-section .send-message {
    padding: 30px 20px;
  }
}

/* Extra Small Devices (Portrait Phones, 575px and down) */
@media (max-width: 575px) {
  .banner h1 {
    font-size: 26px;
  }

  .theme-title h2 {
    font-size: 24px;
  }

  .license-logos img {
    max-width: 100px;
  }

  .btn-license {
    width: 100%;
    padding: 15px 20px;
  }

  #contact-section .contact-address-content .left-side ul li p {
    font-size: 1.1rem;
  }
}

/* Fix for specific hardcoded hacks in old CSS */
.opacity .row div img {
  height: auto !important;
  margin-left: 0 !important;
}