/* ARM Solutions Custom CSS - UI/UX Improvements */

/* Global Styles */
:root {
  --primary-color: #0066cc;
  --primary-hover: #0055aa;
  --secondary-color: #333;
  --text-color: #444;
  --light-bg: #f8f9fa;
  --border-color: #ddd;
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for better keyboard navigation */
a:focus, button:focus, input:focus, textarea:focus, select:focus, .dropdown-item:focus {
  outline: 3px solid rgba(0, 102, 204, 0.5);
  outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px 15px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

/* Navigation Improvements */
#top-header-nav {
  padding: 15px 0;
}

.navbar-brand img {
  transition: var(--transition);
}

.navbar-brand:focus img {
  filter: brightness(1.2);
}

.nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  transition: var(--transition);
}

.nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary-color);
  transition: var(--transition);
  transform: translateX(-50%);
}

.nav-link:hover:after, .nav-link:focus:after, .nav-link.active:after {
  width: 80%;
}

/* Mobile Navigation Improvements */
@media (max-width: 991px) {
  #navbarToggler1 {
    background-color: rgba(0, 0, 0, 0.95);
    padding: 20px;
    border-radius: 5px;
    max-height: 80vh;
    overflow-y: auto;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
  }

  .navbar-nav .nav-item {
    margin: 10px 0;
    width: 100%;
    text-align: center;
  }

  .nav-link {
    padding: 12px 15px;
    display: block;
    width: 100%;
  }

  .dropdown-menu {
    background-color: rgba(51, 51, 51, 0.9);
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    position: static;
    float: none;
    border: none;
    box-shadow: none;
    margin-top: 0;
  }

  .dropdown-item {
    padding: 10px 15px;
    text-align: center;
  }

  .dropdown-submenu .dropdown-menu {
    margin-left: 0;
    padding-left: 20px;
    border-left: 2px solid var(--primary-color);
  }

  /* Improve touch targets for mobile */
  .nav-link, .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Form Improvements */
/* Contact Form Wrapper */
.form-wrapper {
  max-width: 600px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}

.form-control {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-feedback {
  display: none;
  font-size: 0.875rem;
  margin-top: 5px;
}

.form-control.is-valid {
  border-color: var(--success-color);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
  border-color: var(--error-color);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.valid-feedback {
  color: var(--success-color);
}

.invalid-feedback {
  color: var(--error-color);
}

.btn {
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading:after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Alert/Message Improvements */
.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  position: relative;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.2);
  color: var(--success-color);
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.2);
  color: var(--error-color);
}

.alert-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  border: 0;
  opacity: 0.5;
  transition: var(--transition);
}

.alert-close:hover {
  opacity: 1;
}

/* Footer Improvements */
.footer__top {
  padding: 60px 0;
}

.footer__bottom {
  padding: 30px 0;
}

.sf-social {
  display: flex;
  gap: 15px;
  padding: 0;
  list-style: none;
}

.sf-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transition: var(--transition);
}

.sf-social a:hover, .sf-social a:focus {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

/* Responsive Improvements */
@media (max-width: 768px) {
  .banner__content h1 {
    font-size: 2.5rem !important;
  }

  .banner__content span {
    font-size: 1.8rem !important;
  }

  .footer__top-form, .column-right {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  .banner__content h1 {
    font-size: 2rem !important;
  }

  .banner__content span {
    font-size: 1.5rem !important;
  }

  .btn {
    width: 100%;
  }
}

/* Animation Improvements */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-in-out;
}

@keyframes slideInRight {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
  box-shadow: var(--box-shadow);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover, .back-to-top:focus {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
}
