/* ========================================
   MOBILE & TABLET RESPONSIVE OVERRIDES
   ======================================== */

/* This file contains specific overrides for mobile and tablet devices
   that need to supplement or override the main component styles */

/* ========================
   MOBILE NAVIGATION OVERRIDES
   ======================== */
@media (max-width: 1023px) {
  /* Ensure mobile menu has proper background and height */
  .nav.active {
    background: var(--color-primary) !important;
    border: var(--border-width) solid var(--color-border);
    height: calc(100vh - var(--header-height-mobile)) !important;
    min-height: calc(100vh - var(--header-height-mobile)) !important;
    max-height: calc(100vh - var(--header-height-mobile)) !important;
    top: var(--header-height-mobile) !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    position: fixed !important;
  }
  
  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
  }
  
  /* Mobile contact button */
  .mobile-contact {
    display: block;
  }
  
  .desktop-contact {
    display: none;
  }
}

/* ========================
   ABOUT SECTION IMPROVEMENTS
   ======================== */
@media (max-width: 1023px) {
  .badges-row {
    justify-content: center;
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  /* Logo section mobile */
  #logo.section {
    padding: var(--space-lg) 0;
  }
  
  .section-logo {
    max-width: 80%;
    height: auto;
  }
  
  /* About section mobile improvements */
  #about .badges-row {
    gap: var(--space-sm);
  }
  
  .badge-text {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-xs);
    min-width: auto;
  }
}

@media (max-width: 479px) {
  #logo.section {
    padding: var(--space-md) 0;
  }
  
  .section-logo {
    max-width: 70%;
  }
}

/* ========================
   CLIENT SECTION IMPROVEMENTS
   ======================== */
@media (max-width: 767px) {
  .client-logos {
    gap: var(--space-lg);
    margin-top: var(--space-xl);
  }
  
  .client-item {
    padding: var(--space-md);
  }
  
  .client-logo {
    max-height: 50px;
  }
}

@media (max-width: 479px) {
  .client-logos {
    gap: var(--space-md);
  }
  
  .client-logo {
    max-height: 40px;
  }
}

/* ========================
   ROLES SECTION IMPROVEMENTS
   ======================== */
@media (max-width: 1023px) {
  .roles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .roles-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    max-width: 500px;
    margin: var(--space-xl) auto 0;
  }
  
  .role-item {
    padding: var(--space-lg);
    min-height: 80px;
    font-size: var(--font-size-sm);
  }
}

@media (max-width: 479px) {
  .roles-grid {
    max-width: 100%;
    gap: var(--space-sm);
  }
  
  .role-item {
    padding: var(--space-md);
    min-height: 60px;
    font-size: var(--font-size-xs);
  }
}

/* ========================
   CONTACT FORM IMPROVEMENTS
   ======================== */
@media (max-width: 1023px) {
  .contact-form__wrapper {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 767px) {
  .contact-form {
    margin-bottom: var(--space-xl);
  }
  
  .form-group {
    margin-bottom: var(--space-md);
  }
  
  .form-control {
    padding: var(--space-sm);
    font-size: var(--font-size-sm);
  }
  
  textarea.form-control {
    min-height: 100px;
  }
}

@media (max-width: 479px) {
  .form-control {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
  }
  
  textarea.form-control {
    min-height: 80px;
  }
}

/* ========================
   MODAL IMPROVEMENTS
   ======================== */
@media (max-width: 767px) {
  .modal {
    padding: var(--space-md);
  }
  
  .modal-content {
    padding: var(--space-lg);
    border-radius: var(--border-radius-lg);
  }
  
  .modal .section-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-lg);
  }
  
  .modal .section-text {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
  }
}

@media (max-width: 479px) {
  .modal {
    padding: var(--space-sm);
  }
  
  .modal-content {
    padding: var(--space-md);
    border-radius: var(--border-radius-md);
  }
  
  .close-modal {
    width: 36px;
    height: 36px;
    font-size: var(--font-size-lg);
    top: var(--space-sm);
    right: var(--space-sm);
  }
}

/* ========================
   FOOTER IMPROVEMENTS
   ======================== */
@media (max-width: 1023px) {
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
}

@media (max-width: 767px) {
  .footer-top {
    padding: var(--space-2xl) 0;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }
  
  .footer-column {
    align-items: center;
  }
  
  .contact-info {
    align-items: center;
  }
  
  .phone-numbers {
    align-items: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-bottom .container {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
  
  .footer-legal {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
  }
}

@media (max-width: 479px) {
  .footer-top {
    padding: var(--space-xl) 0;
  }
  
  .footer-links {
    gap: var(--space-lg);
  }
  
  .footer-logo-img {
    max-height: 50px;
  }
  
  .social-links {
    gap: var(--space-sm);
    flex-wrap: wrap;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
  }
  
  .social-icon {
    width: 20px;
    height: 20px;
  }
  
  .consultation-btn {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-xs);
  }
  
  .calendly-icon {
    width: auto;
    height: 16px;
  }
}

/* ========================
   TYPOGRAPHY ADJUSTMENTS
   ======================== */
@media (max-width: 767px) {
  .section-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-lg);
  }
  
  .section-text {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-lg);
  }
}

@media (max-width: 479px) {
  .section-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-md);
  }
  
  .section-text {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-md);
  }
}

/* ========================
   TOUCH OPTIMIZATIONS
   ======================== */
@media (max-width: 767px) {
  /* Ensure all interactive elements meet touch target guidelines */
  .btn,
  .nav-link,
  .slider-nav-btn,
  .slider-dot,
  .close-modal,
  .social-link {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Improve button spacing on mobile */
  .btn {
    margin: var(--space-xs) 0;
  }
  
  /* Better link spacing in navigation */
  .nav-link {
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-xs) 0;
  }
}

/* ========================
   PERFORMANCE OPTIMIZATIONS
   ======================== */
@media (max-width: 767px) {
  /* Reduce animation complexity on mobile */
  .showcase-item:hover {
    transform: none;
  }
  
  .role-item:hover {
    transform: translateY(-2px);
  }
  
  .client-item:hover {
    transform: translateY(-2px);
  }
  
  /* Simplify hover effects */
  .btn:hover {
    transform: none;
  }
  
  .social-link:hover {
    transform: none;
  }
}

/* ========================
   ACCESSIBILITY IMPROVEMENTS
   ======================== */
@media (max-width: 767px) {
  /* Ensure focus indicators are visible on mobile */
  .btn:focus,
  .nav-link:focus,
  .form-control:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }
  
  /* Improve contrast for mobile viewing */
  .section-text {
    color: var(--color-text-primary);
  }
}

/* ========================
   REDUCED MOTION SUPPORT
   ======================== */
@media (prefers-reduced-motion: reduce) {
  .showcase-item,
  .role-item,
  .client-item,
  .btn,
  .social-link {
    transition: none;
  }
  
  .showcase-item:hover,
  .role-item:hover,
  .client-item:hover {
    transform: none;
  }
}

/* ========================
   HIGH CONTRAST SUPPORT
   ======================== */
@media (prefers-contrast: high) {
  .badge-text,
  .role-item,
  .btn {
    border-width: var(--border-width-thick);
  }
  
  .section-text {
    color: var(--color-text-primary);
  }
}