/* Additional custom styles for ComunicaClaro */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #1f2937;
  outline-offset: 2px;
}

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

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

/* Details/Summary styling */
details summary {
  list-style: none;
  position: relative;
  padding-right: 2rem;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: '+';
  position: absolute;
  right: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  transition: transform 0.3s ease;
}

details[open] summary::after {
  content: '−';
}

details summary:hover {
  background-color: #f9fafb;
}

/* Mobile menu transitions */
#mobile-menu {
  transition: opacity 0.3s ease;
}

#mobile-menu.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

/* Cookie banner animation */
#cookie-banner.show {
  display: block;
  animation: slideUp 0.5s ease;
}

/* Form input focus */
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #1f2937;
  outline-offset: 2px;
  border-color: #1f2937;
}

/* Button hover effects */
button,
a.button {
  transition: all 0.3s ease;
}

/* Card hover effects */
.hover\:shadow-md:hover {
  transform: translateY(-2px);
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* Image lazy loading blur effect */
img {
  transition: filter 0.3s ease;
}

img.loading {
  filter: blur(5px);
}

/* Sticky header shadow on scroll */
header.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Skip to main content link for accessibility */
.skip-to-main {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1rem;
  background-color: #1f2937;
  color: white;
  text-decoration: none;
}

.skip-to-main:focus {
  left: 50%;
  transform: translateX(-50%);
  top: 1rem;
}

/* Smooth transitions for all interactive elements */
a,
button,
input,
textarea,
select {
  transition: all 0.2s ease;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Print styles */
@media print {
  header,
  footer,
  #cookie-banner,
  #mobile-menu {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  a {
    text-decoration: underline;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}