/* American Technology Labs - Global Styles */
/* Enhances Tailwind CSS with custom components */

/* === FOCUS STYLES === */
:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* === SKIP TO CONTENT === */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: #171717;
  color: white;
  border-radius: 0 0 4px 4px;
  font-size: 0.875rem;
  transition: top 0.2s;
}
.skip-to-content:focus {
  top: 0;
}

/* === SMOOTH SCROLL === */
html {
  scroll-behavior: smooth;
}

/* === PRINT STYLES === */
@media print {
  nav, .fixed, #cookie-banner, #back-to-top { display: none !important; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}

/* === LOADING SKELETON === */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === FORM ENHANCEMENTS === */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
  border-color: #ef4444 !important;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: #22c55e !important;
}

/* === ANIMATED UNDERLINE FOR LINKS === */
.link-underline {
  position: relative;
  text-decoration: none;
}
.link-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background: currentColor;
  transition: width 0.3s ease;
}
.link-underline:hover::after {
  width: 100%;
}

/* === CARD HOVER LIFT === */
.card-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* === NOTIFICATION TOAST === */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.toast-error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

/* === RESPONSIVE VIDEO WRAPPER === */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* === UTILITY: VISUALLY HIDDEN (for screen readers) === */
.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;
}