/* ========================================
   Responsive Styles - Mobile First
   ======================================== */
@media (min-width: 1600px) {
  .container {
    max-width: 1536px !important;
  }
  .container-fluid {
    max-width: 1905px !important;
  }
}

@media (min-width: 1200px) {
  .container.footer-container {
    max-width: 1232px !important;
  }
  .footer-menu {
    gap: 30px;
  }
  .footer-menu > * {
    min-width: 166px;
  }
  .inner-blog p{
  font-size: 18px;
  line-height: 1.9;
}
}

@media (max-width: 767.98px) {
  .annoucement-sidebar ul {
    border-right: none;
    padding-right: 0;
    padding-bottom: 0;
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .annoucement-sidebar ul li {
    font-size: 14px;
    padding: 6px 8px;
  }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
  /* Typography */
  body {
    font-size: 13px;
  }

  /* Navbar */
  .navbar-custom {
    padding: 0.75rem 1rem !important;
  }

  .logo {
    min-width: 120px !important;
    width: 120px !important;
  }

  .logo img {
    max-width: 100%;
    height: auto;
  }

  .inner-nav {
    flex-wrap: wrap;
  }

  .navbar-collapse {
    margin-top: 1rem;
  }

  .navbar-nav {
    gap: 0.5rem !important;
    margin: 0 !important;
  }

  .nav-item .nav-link {
    padding: 10px 12px !important;
    font-size: 14px;
  }

  .nav-item.active .nav-link {
    border-radius: 4px;
  }

  [title="Toggle Theme"] {
    padding: 8px;
    margin-top: 1rem;
  }

  [title="Toggle Theme"] svg {
    width: 20px;
    height: 20px;
  }

  /* Mobile dropdown behavior */
  .nav-dropdown-menu {
    position: static;
    margin-top: 0.5rem;
    margin-left: 1rem;
    box-shadow: none;
  }

  .nav-item.has-dropdown::after {
    display: none;
  }

  /* Footer */
  .footer {
    padding: 2rem 0 !important;
  }

  .footer-top-container {
    gap: 1.5rem !important;
  }

  .footer-brand {
    max-width: 100%;
    margin-bottom: 2rem;
  }

  .footer-brand .logo {
    margin-bottom: 1rem !important;
  }

  .footer-brand .d-flex {
    gap: 1rem !important;
  }

  .footer-brand img {
    max-width: 100%;
  }

  .footer-download-btn {
    width: 100% !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    margin-bottom: 2rem !important;
  }

  .footer-menu-heading {
    font-size: 16px !important;
    margin-bottom: 0.75rem !important;
  }

  .footer-menu ul li {
    margin-bottom: 0.5rem;
  }

  .footer-menu ul li a {
    font-size: 13px;
  }

  .footer-bottom {
    padding: 1rem !important;
  }

  .footer-bottom .container-fluid {
    padding: 1rem !important;
  }

  .footer-bottom p {
    font-size: 12px !important;
  }

  .footer-bottom .small {
    font-size: 11px !important;
  }

  /* Sticky header adjustment */
}

/* Small Devices (Landscape Phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  body {
    font-size: 14px;
  }

  .logo {
    min-width: 140px !important;
    width: 140px !important;
  }

  .navbar-nav {
    gap: 0.75rem !important;
  }

  .nav-item .nav-link {
    padding: 11px 14px !important;
  }

  .footer-download-btn {
    width: auto !important;
  }

  .footer-menu-heading {
    font-size: 17px;
  }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .logo {
    min-width: 150px !important;
    width: 150px !important;
  }

  .navbar-nav {
    gap: 1rem !important;
  }

  .footer-top-container {
    gap: 2.5rem !important;
  }

  .footer-brand {
    max-width: 100%;
  }

  .footer-bottom .container-fluid {
    padding: 2rem 3rem !important;
  }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) {
  .navbar-collapse {
    flex-grow: 1;
    justify-content: center;
  }

  .navbar-nav {
    gap: 1rem !important;
    overflow: visible;
  }

  .footer-top-container {
    gap: 4rem !important;
  }

  .footer-menu ul {
    gap: 6px;
  }

  [title="Toggle Theme"] {
    margin-left: auto;
  }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
  .navbar-nav {
    gap: 1.5rem !important;
  }

  .footer-bottom .container-fluid {
    padding: 2rem 4rem !important;
  }
}

/* Extra Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
  .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
  }

  .footer-top-container {
    gap: 90px !important;
  }
}

/* Landscape Orientation Fixes */
@media (max-height: 500px) and (orientation: landscape) {
  .navbar-collapse {
    max-height: 300px;
    overflow-y: auto;
  }
}

/* Print Styles */
@media print {
  header.sticky {
    position: relative !important;
  }

  .navbar-toggler,
  [title="Toggle Theme"] {
    display: none !important;
  }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo img,
  .footer-brand img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark Mode Specific Responsive Adjustments */
@media (max-width: 767.98px) {
  [data-theme="dark"] header.sticky {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  }

  [data-theme="light"] header.sticky {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
}

/* Hover Effects - Only on devices that support hover */
@media (hover: hover) and (pointer: fine) {
  .footer-download-btn:hover {
    background-color: var(--bg-secondary) !important;
    border-color: var(--color-blue);
    transform: translateY(-2px);
    transition: all 0.3s ease;
  }

  .nav-link:hover {
    color: var(--color-blue) !important;
    transition: color 0.2s ease;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .nav-link,
  .footer-menu ul li a,
  .footer-download-btn {
    display: flex;
    align-items: center;
  }

  .navbar-toggler {
    min-width: 44px;
  }

  [title="Toggle Theme"] {
    min-width: 44px;

    display: flex;
    align-items: center;
  }
}
@media (max-width: 480px) {
  .navbar-custom {
    padding-inline: 0 !important;
  }
}
