/* =================================================================
   RESPONSIVE DESIGN CSS
   Professional responsive styles ordered by screen width (mobile-first)
   ================================================================= */

/* =================================================================
   BASE RESPONSIVE CONTAINERS
   ================================================================= */

/* Enhanced container responsive behavior */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* =================================================================
   EXTRA LARGE SCREENS (≥1280px) - LARGE DESKTOP
   ================================================================= */

@media (min-width: 1280px) {
  .support-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
  }
}

/* =================================================================
   LARGE SCREENS (≤1024px) - DESKTOP SPECIFIC
   ================================================================= */

@media (max-width: 1024px) {
  .projectsSwiper {
    padding: 30px 40px;
  }

  .projectsSwiper .swiper-button-next,
  .projectsSwiper .swiper-button-prev {
    width: 48px;
    height: 48px;
    margin-top: -24px;
  }
}

/* =================================================================
   LARGE SCREENS (≥1024px) - DESKTOP
   ================================================================= */

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

  .navbar__container {
    padding: 1rem 2rem;
  }

  .hero-section .container,
  .hero-section .hero-inner,
  .blog-section .container,
  .support-section .container,
  .projects-section .container {
    padding: 0 2rem;
  }

  .hero-stats {
    gap: 2rem;
  }

  .hero-stat {
    padding: 1.5rem;
  }

  .quick-action-btn {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .projectsSwiper .swiper-button-next,
  .projectsSwiper .swiper-button-prev {
    width: 48px;
    height: 48px;
    margin-top: -24px;
  }

  /* Responsive spacing utilities */
  .space-responsive {
    gap: 2rem;
  }

  .padding-responsive {
    padding: 2rem;
  }

  .margin-responsive {
    margin: 2rem;
  }
}

/* =================================================================
   MEDIUM SCREENS (≥768px) - TABLET AND UP
   ================================================================= */

@media (min-width: 768px) {
  .navbar__nav {
    display: flex;
  }

  .navbar__mobile-toggle {
    display: none;
  }

  .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
  }
}
/* =================================================================
   MEDIUM SCREENS (≤736px) - TABLET AND UP
   ================================================================= */

@media screen and (max-width : 736px) {

}
/* =================================================================
   MEDIUM SCREENS (≤768px) - TABLET SPECIFIC
   ================================================================= */

@media (max-width: 768px) {
  .navbar__container {
    padding: 1rem 1rem;
    gap: 1rem;
    width: 100%;
  }

  .projectsSwiper {
    padding: 20px 10px;
  }

  .projectsSwiper .swiper-button-next,
  .projectsSwiper .swiper-button-prev {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }

  .projectsSwiper .swiper-button-next:after,
  .projectsSwiper .swiper-button-prev:after {
    font-size: 14px;
  }
}

/* =================================================================
   MEDIUM-LARGE SCREENS (641px-1024px) - TABLET LANDSCAPE
   ================================================================= */

@media (min-width: 641px) and (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

  .navbar__container {
    padding: 1rem 1.5rem;
  }

  .hero-section .container,
  .hero-section .hero-inner,
  .blog-section .container,
  .support-section .container,
  .projects-section .container {
    padding: 0 1.5rem;
  }

  .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .support-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
}

/* =================================================================
   MEDIUM SCREENS (≥640px) - TABLET PORTRAIT
   ================================================================= */

@media (min-width: 640px) {
  .blog-search {
    flex-direction: row;
  }

  .blog-cta__form {
    flex-direction: row;
  }

  .support-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
  }

  .hero-actions {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }

  .hero-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
  }

  .hero-stat {
    padding: 1.25rem;
  }

  .quick-action-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    gap: 0.625rem;
  }

  /* Responsive text sizing */
  .text-responsive-sm {
    font-size: 1rem;
  }

  .text-responsive-base {
    font-size: 1.125rem;
  }

  .text-responsive-lg {
    font-size: 1.25rem;
  }

  /* Responsive spacing utilities */
  .space-responsive {
    gap: 1.5rem;
  }

  .padding-responsive {
    padding: 1.5rem;
  }

  .margin-responsive {
    margin: 1.5rem;
  }
}

/* =================================================================
   SMALL SCREENS (≤640px) - MOBILE FIRST BASE
   ================================================================= */

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    padding: 0 0.75rem;
  }

  .container-narrow {
    width: 100%;
    max-width: 100%;
    padding: 0 0.75rem;
  }

  .navbar__container {
    padding: 0.75rem 0.75rem;
    gap: 0.75rem;
    width: 100%;
  }

  .hero-section .container,
  .hero-section .hero-inner {
    gap: 1rem;
    width: 100%;
    padding: 0 0.75rem;
  }

  .hero-section .grid {
    grid-template-columns: 1fr;
  }

  .hero-actions-enhanced {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-actions-enhanced a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .hero-stats {
    width: 100%;
    margin: 0;
  }

  .hero-badge {
    margin: 0 auto;
  }

  .blog-section .container,
  .support-section .container,
  .projects-section .container {
    width: 100%;
    padding: 0 0.75rem;
  }

  .blog-grid,
  .support-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .blog-card,
  .support-card,
  .project-card {
    margin: 0;
    width: 100%;
  }

  .blog-search,
  .projects-search-container {
    width: 100%;
    margin: 0;
    padding: 0.75rem;
  }

  footer .container {
    width: 100%;
    padding: 0 0.75rem;
  }

  .modal .container {
    width: 100%;
    padding: 1rem;
  }

  .projectsSwiper .swiper-button-next,
  .projectsSwiper .swiper-button-prev {
    display: none;
  }

  .hero-orb,
  .hero-mesh,
  .hero-background,
  .hero-scroll {
    display: none;
  }

  /* Responsive text sizing */
  .text-responsive-sm {
    font-size: 0.875rem;
  }

  .text-responsive-base {
    font-size: 1rem;
  }

  .text-responsive-lg {
    font-size: 1.125rem;
  }

  /* Responsive spacing utilities */
  .space-responsive {
    gap: 0.75rem;
  }

  .padding-responsive {
    padding: 0.75rem;
  }

  .margin-responsive {
    margin: 0.75rem;
  }
}

/* =================================================================
   MEDIUM SMALL SCREENS (≥480px)
   ================================================================= */

@media (min-width: 480px) {
  .quick-action-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    gap: 0.5rem;
  }
}

/* =================================================================
   SMALL-MEDIUM SCREENS (≤480px) - ENHANCED MOBILE
   ================================================================= */

@media (max-width: 480px) {
  .gradient-text {
    line-height: 1.2;
    text-align: center;
  }

  .hero-subtitle {
    font-size: clamp(1.125rem, 3.5vw, 1.5rem);
    text-align: center;
  }

  .hero-description {
    font-size: 1rem;
    text-align: center;
  }

  .typing-container {
    justify-content: center;
    display: flex;
    align-items: center;
  }

  .quick-action-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.625rem;
    gap: 0.375rem;
  }
}

/* =================================================================
   MEDIUM MOBILE SCREENS (≤414px) - IPHONE PLUS/LARGE ANDROID
   ================================================================= */

@media screen and (max-width: 414px) {
  .container {
    width: 100%;
    padding: 0 0.75rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* HEADER - Optimized for 414px screens */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 68px;
    box-sizing: border-box;
  }

  .navbar__container {
    width: 100%;
    padding: 0.75rem 0.75rem;
    gap: 0.5rem;
    min-height: 68px;
    box-sizing: border-box;
    max-width: 100%;
    margin: 0;
  }

  .navbar__brand {
    font-size: 1.25rem;
    gap: 0.625rem;
  }

  .navbar__brand .float-element {
    font-size: 1.375rem;
  }

  .navbar__button {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-radius: 1rem;
  }

  .navbar__mobile-toggle {
    padding: 0.75rem;
    border-radius: 1rem;
  }

  .navbar__mobile-menu a {
    padding: 0.75rem 0;
    font-size: 1rem;
  }

  /* HERO SECTION - Enhanced for 414px */
  .hero-section {
    width: 100%;
    min-height: 100vh;
    padding-top: 78px;
    box-sizing: border-box;
    margin: 0;
  }

  .hero-section .container,
  .hero-section .hero-inner {
    width: 100%;
    max-width: 100%;
    gap: 1.25rem;
    padding: 0 0.75rem;
    margin: 0;
    box-sizing: border-box;
  }

  .hero-content {
    width: 100%;
    padding: 1.5rem 0;
    box-sizing: border-box;
  }

  .hero-badge {
    display: inline-flex;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
  }

  .hero-title,
  .gradient-text {
    font-size: clamp(2.25rem, 9vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 1.25rem;
  }

  .hero-subtitle {
    font-size: clamp(1.125rem, 5vw, 1.375rem);
    margin-bottom: 1.5rem;
    min-height: 3rem;
  }

  .hero-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
  }

  .hero-actions,
  .hero-actions-enhanced {
    gap: 0.75rem;
    margin-bottom: 2.5rem;
  }

  .hero-button,
  .hero-actions-enhanced a,
  .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 1.25rem;
  }

  .hero-stats {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 2rem 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hero-stat {
    padding: 1rem 0.75rem;
    border-radius: 1.25rem;
  }

  .hero-stat__number {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .hero-stat__label {
    font-size: 0.875rem;
  }

  /* Content sections */
  .blog-grid,
  .support-grid,
  .projects-grid {
    gap: 1.25rem;
  }

  .blog-card,
  .support-card,
  .project-card {
    padding: 1.25rem;
  }

  .blog-search,
  .projects-search-container {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .quick-action-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    gap: 0.5rem;
  }

  /* Show more decorative elements */
  .hero-orb {
    opacity: 0.4;
  }

  .hero-mesh {
    opacity: 0.6;
  }

  .hero-background {
    display: block;
    opacity: 0.3;
  }

  .hero-scroll {
    display: flex;
    bottom: 1rem;
  }
}

/* =================================================================
   SMALL MOBILE SCREENS (≤375px) - IPHONE SE/SMALL ANDROID
   ================================================================= */

@media screen and (max-width: 375px) {
  .container {
    width: 100%;
    padding: 0 0.625rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* HEADER - Optimized for 375px screens */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 64px;
    box-sizing: border-box;
  }

  .navbar__container {
    width: 100%;
    padding: 0.625rem 0.625rem;
    gap: 0.375rem;
    min-height: 64px;
    box-sizing: border-box;
    max-width: 100%;
    margin: 0;
  }

  .navbar__brand {
    font-size: 1.125rem;
    gap: 0.5rem;
  }

  .navbar__brand .float-element {
    font-size: 1.25rem;
  }

  .navbar__button {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 0.875rem;
  }

  .navbar__mobile-toggle {
    padding: 0.625rem;
    border-radius: 0.875rem;
  }

  .navbar__mobile-menu a {
    padding: 0.625rem 0;
    font-size: 0.9375rem;
  }

  /* HERO SECTION - Optimized for 375px */
  .hero-section {
    width: 100%;
    min-height: 100vh;
    padding-top: 74px;
    box-sizing: border-box;
    margin: 0;
  }

  .hero-section .container {
    width: 100%;
    max-width: 100%;
    gap: 1rem;
    padding: 0 0.625rem;
    margin: 0;
    box-sizing: border-box;
  }

  .hero-content {
    width: 100%;
    padding: 1.25rem 0;
    box-sizing: border-box;
  }

  .hero-badge {
    display: inline-flex;
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .hero-title,
  .gradient-text {
    font-size: clamp(2rem, 8.5vw, 2.5rem);
    line-height: 1.15;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: clamp(1rem, 4.5vw, 1.25rem);
    margin-bottom: 1.25rem;
    min-height: 2.5rem;
  }

  .hero-description {
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 2rem;
  }

  .hero-actions,
  .hero-actions-enhanced {
    gap: 0.625rem;
    margin-bottom: 2rem;
  }

  .hero-button,
  .hero-actions-enhanced a,
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    border-radius: 1.125rem;
  }

  .hero-stats {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
    margin: 1.5rem 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hero-stat {
    padding: 0.875rem 0.625rem;
    border-radius: 1.125rem;
  }

  .hero-stat__number {
    font-size: 1.75rem;
    margin-bottom: 0.375rem;
  }

  .hero-stat__label {
    font-size: 0.8125rem;
  }

  /* Content improvements */
  .blog-grid,
  .support-grid,
  .projects-grid {
    gap: 1rem;
  }

  .blog-card,
  .support-card,
  .project-card {
    padding: 1rem;
  }

  .blog-search,
  .projects-search-container {
    padding: 0.625rem;
    gap: 0.625rem;
  }

  .quick-action-btn {
    padding: 0.4375rem 0.625rem;
    font-size: 0.6875rem;
    gap: 0.375rem;
  }

  /* Show some decorative elements */
  .hero-orb {
    opacity: 0.3;
  }

  .hero-mesh {
    opacity: 0.5;
  }
}

/* =================================================================
   EXTRA SMALL SCREENS (≤320px) - VERY SMALL MOBILE
   ================================================================= */

@media screen and (max-width: 320px) {
  /* Ultra-compact mobile optimizations */
  .container {
    width: 100%;
    padding: 0 0.5rem;
    max-width: 100%;
  }

  /* HEADER - Ultra-compact navigation for 320px */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0;
    min-height: 60px;
    box-sizing: border-box;
  }

  .navbar__container {
    width: 100%;
    padding: 0.5rem 0.5rem;
    gap: 0.25rem;
    flex-wrap: wrap;
    min-height: 60px;
    align-items: center;
    box-sizing: border-box;
    max-width: 100%;
    margin: 0;
  }

  .navbar__brand {
    font-size: 1rem;
    gap: 0.375rem;
  }

  .navbar__brand .float-element {
    font-size: 1.125rem;
  }

  .navbar__nav {
    display: none;
  }

  .navbar__actions {
    gap: 0.25rem;
  }

  .navbar__button {
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    border-radius: 0.75rem;
  }

  .navbar__mobile-toggle {
    padding: 0.5rem;
    border-radius: 0.75rem;
  }

  .navbar__mobile-menu {
    padding: 0.5rem;
    margin-top: 0.5rem;
  }

  .navbar__mobile-menu a {
    padding: 0.5rem 0;
    font-size: 0.875rem;
  }

  /* HERO SECTION - Ultra-compact for 320px */
  .hero-section {
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    margin: 0;
  }

  .hero-section .container {
    width: 100%;
    max-width: 100%;
    gap: 0.75rem;
    padding: 0 0.5rem;
    margin: 0;
    box-sizing: border-box;
  }

  .hero-content {
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    box-sizing: border-box;
  }

  .hero-badge {
    display: none;
  }

  .hero-title,
  .gradient-text {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    line-height: 1.1;
    margin-bottom: 0.75rem;
    text-align: center;
  }

  .hero-subtitle {
    font-size: clamp(0.875rem, 4vw, 1.125rem);
    margin-bottom: 1rem;
    min-height: 2rem;
    text-align: center;
  }

  .hero-description {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    max-width: 100%;
    text-align: center;
  }

  .hero-actions,
  .hero-actions-enhanced {
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .hero-button,
  .hero-actions-enhanced a,
  .btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    text-align: center;
    justify-content: center;
    border-radius: 1rem;
  }

  .hero-stats {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin: 1rem 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hero-stat {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-radius: 1rem;
  }

  .hero-stat__number {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }

  .hero-stat__label {
    font-size: 0.75rem;
  }

  /* Content grids */
  .blog-grid,
  .support-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Cards */
  .blog-card,
  .support-card,
  .project-card {
    padding: 0.75rem;
    margin: 0;
  }

  /* Forms */
  .blog-search,
  .projects-search-container {
    padding: 0.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Footer */
  footer .container {
    padding: 0 0.5rem;
  }

  /* Typography */
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  h4 {
    font-size: 1rem;
  }

  /* Hide decorative elements */
  .hero-orb,
  .hero-mesh,
  .hero-background,
  .hero-scroll {
    display: none;
  }
}
