/* Mobile-First Responsive Design */
@media screen and (max-width: 768px) {
  :root {
    --header-height: 60px;
    --section-padding: 40px 0;
  }

  /* Typography */
  h1 {
    font-size: clamp(2rem, 5vw, 3rem) !important;
  }

  h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
  }

  h3 {
    font-size: clamp(1.2rem, 3.5vw, 2rem) !important;
  }

  p {
    font-size: clamp(1rem, 2.5vw, 1.1rem) !important;
  }

  /* Header & Navigation */
  .header {
    padding: 10px 0;
    height: var(--header-height);
  }

  .mobile-nav-toggle {
    display: block !important;
    font-size: 2rem;
    padding: 0.5rem;
    color: var(--color-text-primary);
  }

  .navmenu ul {
    background: var(--color-background-dark);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
  }

  /* Sections */
  section {
    padding: var(--section-padding);
    scroll-margin-top: var(--header-height);
  }

  /* Hero Section */
  .hero {
    min-height: 100vh;
    padding: 80px 0;
  }

  .hero .btn-group {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .hero .btn {
    width: 100%;
    text-align: center;
  }

  /* Team Section */
  .team-member {
    margin-bottom: 2rem;
  }

  .team-member .card-body {
    padding: 1rem;
  }

  .team-member .img-fluid {
    max-height: 300px;
    object-fit: cover;
  }

  /* Board Section */
  .board-member {
    margin-bottom: 2rem;
  }

  .board-member .member-img {
    margin: 0 auto;
    max-width: 200px;
  }

  /* Features Section */
  .features .image-stack {
    grid-template-columns: 1fr !important;
  }

  .features .stack-front,
  .features .stack-back {
    grid-column: 1 !important;
    grid-row: auto !important;
    margin: 1rem 0 !important;
  }

  /* Contact Section */
  .contact .info-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }

  .contact form {
    padding: 1.5rem;
  }

  /* Forms */
  input,
  textarea,
  select {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
  }

  /* Utilities */
  .d-mobile-none {
    display: none !important;
  }

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

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

  /* Touch Targets */
  .nav-link,
  .btn,
  .social-links a {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

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

  /* Improved Scrolling */
  .smooth-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* Modal Improvements */
  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-content {
    border-radius: 10px;
  }
}

/* Tablet Optimizations */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  :root {
    --section-padding: 50px 0;
  }

  .container {
    padding: 0 24px;
  }

  .team-member .img-fluid {
    max-height: 400px;
  }

  .features .image-stack {
    gap: 2rem;
  }
}

/* Landscape Mode Optimizations */
@media screen and (max-height: 480px) and (orientation: landscape) {
  .hero {
    min-height: 400px;
  }

  .modal-dialog {
    margin: 0.5rem auto;
  }
}

/* High-DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero img,
  .team-member img,
  .board-member img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}