@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

/* Custom styles */
:root {
  --primary-color: #3b82f6;
  --secondary-color: #10b981;
  --text-color: #1f2937;
  --background-color: #f3f4f6;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  padding-top: 80px; /* Adjust based on your header height */
  padding-bottom: 60px;
}

/* Header and navigation styles */
header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.scrolled {
  background-color: rgba(59, 130, 246, 0.9);
  backdrop-filter: blur(5px);
}

.nav-link {
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown styles */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  min-width: 200px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 0.375rem;
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-content.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--background-color);
}

/* Mobile menu styles */
.mobile-menu-button {
  background-color: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.mobile-menu-button:hover {
  color: var(--secondary-color);
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.mobile-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Dark mode styles */
body.dark-mode {
  background-color: #1a202c;
  color: #e2e8f0;
}

.dark-mode .nav-link {
  color: #e2e8f0;
}

.dark-mode .btn-primary {
  background-color: #4a5568;
  color: #e2e8f0;
}

.dark-mode .btn-primary:hover {
  background-color: #718096;
}

.dark-mode .dropdown-content {
  background-color: #2d3748;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

.dark-mode .dropdown-item {
  color: #e2e8f0;
}

.dark-mode .dropdown-item:hover {
  background-color: #4a5568;
}

/* Add more dark mode styles for other elements */
.dark-mode .card {
  background-color: #2d3748;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  color: #e2e8f0;
}

.dark-mode .card-header {
  background-color: #4a5568;
  border-bottom-color: #718096;
  color: #e2e8f0;
}

.dark-mode input[type="search"] {
  background-color: #4a5568;
  color: #e2e8f0;
}

.dark-mode input[type="search"]::placeholder {
  color: #a0aec0;
}

.dark-mode #back-to-top {
  background-color: #4a5568;
  color: #e2e8f0;
}

.dark-mode .service-card {
  background-color: #2d3748;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  color: #e2e8f0;
}

.dark-mode footer {
  background-color: #2d3748;
  color: #e2e8f0;
}

.dark-mode footer a {
  color: #e2e8f0;
}

.dark-mode footer a:hover {
  color: #10b981;
}

.dark-mode {
  color: #e2e8f0; /* or any other light color */
}

.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4, .dark-mode h5, .dark-mode h6 {
  color: #eee;
}

.dark-mode .tip {
  background-color: #1e293b;
  border-color: #3b82f6;
  color: #e2e8f0;
}

.dark-mode .example {
  background-color: #1e293b;
  border-color: #10b981;
  color: #e2e8f0;
}

.dark-mode .warning {
  background-color: #1e293b;
  border-color: #f87171;
  color: #e2e8f0;
}

.dark-mode tr {
  background-color: #1e293b;
  border-color: #334155;
}

.dark-mode td {
  color: #e2e8f0;
  border-color: #334155;
}

.dark-mode #search-input {
  background-color: #4a5568;
  color: #e2e8f0;
}

.dark-mode #search-input::placeholder {
  color: #a0aec0;
}

/* Highlight styles for dark mode */
.dark-mode .highlight {
  background-color: #4a5568;
  color: #e2e8f0;
}

.dark-mode #errorCodeSearch {
  background-color: #4a5568;
}
/* Search styles */
#search-form {
  position: relative;
}

#search-input {
  width: 200px;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border-radius: 9999px;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.875rem;
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Back to top button styles */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  padding: 10px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

#back-to-top:hover {
  opacity: 0.8;
}

/* Button styles */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.btn-secondary:hover {
  background-color: #ffffff;
  color: var(--primary-color);
}

/* Services section styles */
.service-card {
  background-color: #ffffff;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Contact form styles */
#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Footer styles */
footer {
  background-color: #1f2937;
  color: #ffffff;
}

footer a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--secondary-color);
}

/* Responsive design */
@media (max-width: 1023px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }
  
  .mobile-menu {
    display: none;
  }
  
  .mobile-menu.active {
    display: block;
  }
}

/* Accessibility improvements */
a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

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

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

p {
  margin-bottom: 1em;
}

/* Print styles */
@media print {
  .no-print {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }
}

/* Ensure footer stays at bottom */
#footer-placeholder {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

/* Clear floats */
body::after {
  content: "";
  display: block;
  clear: both;
}

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

/* Utility classes */
.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-x-4 > * + * {
  margin-left: 1rem;
}

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

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-fadeIn {
  animation: fadeIn 1s ease-out;
}

.animate-slideUp {
  animation: slideUp 0.5s ease-out;
}

/* Custom list styles */
.custom-list {
  padding-left: 1.5rem;
  list-style-position: outside;
}

.custom-list li {
  margin-bottom: 0.5rem;
}

.custom-list li::marker {
  color: var(--primary-color);
}

.custom-list .custom-list {
  margin-top: 0.5rem;
  margin-left: 1rem;
}

/* Collapsible section styles */
.collapsible-section {
  border: 1px solid var(--background-color);
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.collapsible-header {
  background-color: var(--background-color);
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collapsible-content {
  padding: 1rem;
  display: none;
}

.collapsible-content.active {
  display: block;
}

/* Error code search styles */
#errorCodeSearch::placeholder {
  color: #a0aec0;
}

#errorCodeSearch:focus::placeholder {
  color: #cbd5e0;
}

#searchButton {
  transition: all 0.3s ease;
}

#searchButton:hover {
  transform: translateY(-50%) scale(1.05);
}

/* Highlight style for search results */
.highlight {
  background-color: #fef08a;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  #errorCodeSearch {
    font-size: 16px;
    padding: 0.75rem 1rem;
  }

  #searchButton svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}
