/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Updated primary colors to deep blue theme */
  --primary: #0066ff;
  --primary-dark: #0052cc;
  --secondary: #003d99;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray: #64748b;
  --border: #e2e8f0;
  --radius: 0.5rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Updated top bar styles for white background */
.top-bar {
  background: white;
  /* Updated color to deep blue */
  color: #0066ff;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid #e2e8f0;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.social-icons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.social-icons a {
  /* Updated color to deep blue */
  color: #0066ff;
  font-size: 0.75rem;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icons a:hover {
  opacity: 0.8;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.phone-number {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Updated color to deep blue */
  color: #0066ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

.phone-number:hover {
  opacity: 0.9;
}

.search-btn {
  background: transparent;
  /* Updated border and color to deep blue */
  border: 1px solid #0066ff;
  color: #0066ff;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.3s;
  white-space: nowrap;
}

.search-btn:hover {
  /* Updated hover background to deep blue */
  background: #0066ff;
  color: white;
}

.search-input-wrapper {
  position: relative;
  display: none;
  align-items: center;
}

.search-input-wrapper.active {
  display: flex;
  animation: expandSearch 0.3s ease-out;
}

@keyframes expandSearch {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 250px;
    opacity: 1;
  }
}

.search-input-wrapper input {
  width: 250px;
  padding: 0.375rem 0.75rem;
  /* Updated border color to deep blue */
  border: 1px solid #0066ff;
  border-radius: 0.375rem;
  background: white;
  font-size: 0.875rem;
}

.search-input-wrapper input:focus {
  outline: none;
  /* Updated focus border and shadow to deep blue */
  border-color: #0066ff;
  box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.3);
}

/* Header Styles */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
  gap: 2rem;
}

.logo img {
  height: 40px;
  width: auto;
  flex-shrink: 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
  flex: 1;
  min-width: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  flex-shrink: 1;
}

.nav-menu a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
}

.nav-menu a.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

/* Improved mobile menu toggle button with better visibility and clickability */
.mobile-menu-toggle {
  display: none;
  background: var(--primary);
  border: 2px solid var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  z-index: 1002;
  position: relative;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
}

.user-menu-toggle:hover {
  border-color: var(--primary);
  background: var(--light);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  display: none;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--dark);
  transition: background 0.3s;
}

.user-dropdown a:hover {
  background: var(--light);
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  text-align: center;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  /* Updated shadow to deep blue */
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

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

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

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

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

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  /* Updated focus shadow to deep blue */
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-control:disabled {
  background: var(--light);
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
}

/* Alert Styles */
.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* Updated footer styles to match blue gradient design */
.site-footer {
  background: white;
  color: var(--dark);
  padding: 3rem 0 1rem;
  margin-top: 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--dark);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--primary);
}

.footer-logo {
  height: 40px;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--light);
  border-radius: 50%;
  transition: all 0.3s;
  color: var(--primary);
}

.social-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: var(--gray);
}

.contact-info i {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--gray);
}

/* Badge Styles for Technician Status */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

/* Improved responsive breakpoints */
@media (max-width: 1200px) {
  .nav-menu {
    gap: 1.25rem;
  }

  .nav-wrapper {
    gap: 1.5rem;
  }
}

@media (max-width: 1100px) {
  .nav-menu {
    gap: 1rem;
  }

  .nav-wrapper {
    gap: 1.25rem;
  }

  .nav-actions .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 1024px) {
  .nav-menu {
    gap: 0.875rem;
  }

  .nav-menu a {
    font-size: 0.9rem;
  }

  .nav-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* Improved mobile menu with better z-index and visibility */
@media (max-width: 968px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 1001;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-wrapper.show {
    display: flex !important;
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-menu {
    flex-direction: column;
    padding: 0;
    gap: 0;
    margin: 0;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--border);
  }

  .nav-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--dark);
    font-size: 1rem;
  }

  .nav-menu a:hover,
  .nav-menu a.active {
    background: var(--light);
    color: var(--primary);
  }

  .nav-menu a.active::after {
    display: none;
  }

  .nav-actions {
    flex-direction: column;
    padding: 1rem;
    gap: 0.75rem;
    border-top: 2px solid var(--border);
    margin: 0;
    width: 100%;
  }

  .nav-actions .btn {
    width: 100%;
    text-align: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .top-bar-content {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .phone-number {
    font-size: 0.875rem;
  }

  .search-input-wrapper.active {
    width: 180px;
  }
}

@media (max-width: 640px) {
  .top-bar-content {
    font-size: 0.75rem;
  }

  .social-icons {
    gap: 0.5rem;
  }

  .social-icons a {
    font-size: 0.7rem;
  }

  .phone-number {
    font-size: 0.8rem;
  }

  .search-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .search-input-wrapper.active {
    width: 150px;
  }
}
