/**
 * CGV Page Styles
 * Custom styles for legal page layout
 */

/* Section Scroll Margin */
.cgv-section {
  scroll-margin-top: 100px;
}

/* Active Navigation Link */
.cgv-nav a.active {
  background-color: #3b82f6;
  color: white;
}

/* Smooth Transitions for Nav Links */
.cgv-nav a {
  transition: all 0.2s ease;
}

.cgv-nav a:hover {
  transform: translateX(4px);
}

/* Prose Styling for Legal Content */
.prose {
  max-width: none;
}

.prose ul {
  list-style-type: none;
  padding-left: 0;
}

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

/* Print Styles */
@media print {
  /* Hide navigation and non-essential elements */
  aside,
  .bg-gradient-to-r,
  button,
  nav,
  .bg-indigo-50,
  .bg-yellow-50,
  .bg-red-50,
  .bg-blue-50,
  .bg-green-50 {
    display: none !important;
  }

  /* Adjust main content */
  main {
    max-width: 100%;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 1rem !important;
  }

  /* Remove shadows and decorative elements */
  .shadow-sm,
  .shadow-md,
  .shadow-lg,
  .shadow-xl,
  .shadow-2xl {
    box-shadow: none !important;
  }

  /* Simplify colors */
  .border-l-4,
  .border-b-2 {
    border-color: #000 !important;
  }

  /* Headers */
  h1, h2, h3, h4 {
    color: #000 !important;
    page-break-after: avoid;
  }

  /* Sections */
  .cgv-section {
    page-break-inside: avoid;
    margin-bottom: 2rem;
  }

  /* Remove background colors */
  .bg-gray-50,
  .bg-gray-100 {
    background-color: #fff !important;
  }

  /* Ensure text is black */
  * {
    color: #000 !important;
  }

  /* Add page numbers */
  @page {
    margin: 2cm;
  }

  /* Footer with page info */
  @page :first {
    @bottom-center {
      content: "Page 1";
    }
  }
}

/* Sticky Sidebar Behavior */
@media (min-width: 1024px) {
  aside {
    position: sticky;
    top: 6rem;
    align-self: flex-start;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }

  /* Custom scrollbar for sidebar */
  aside::-webkit-scrollbar {
    width: 6px;
  }

  aside::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
  }

  aside::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
  }

  aside::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
  }
}

/* Responsive Typography */
@media (max-width: 639px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .prose {
    font-size: 0.875rem;
  }
}

/* Enhanced Grid Layouts */
.grid > div {
  transition: transform 0.2s ease;
}

.grid > div:hover {
  transform: translateY(-2px);
}

/* CTA Button Enhancements */
a[href*="contact"],
a[href*="solicitar"] {
  transition: all 0.3s ease;
}

a[href*="contact"]:hover,
a[href*="solicitar"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Icon Enhancements */
.fas {
  transition: transform 0.2s ease;
}

h2:hover .fas,
h3:hover .fas,
h4:hover .fas {
  transform: scale(1.1);
}

/* Accessibility - Focus States */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Reduced Motion Support */
@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;
  }

  .cgv-nav a:hover {
    transform: none;
  }

  .grid > div:hover {
    transform: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
  .cgv-nav a {
    border: 2px solid transparent;
  }

  .cgv-nav a.active {
    border-color: #000;
  }

  .bg-gradient-to-r,
  .bg-gradient-to-br {
    background: #fff !important;
    border: 2px solid #000;
  }

  h1, h2, h3, h4 {
    color: #000 !important;
  }
}

/* Loading State for Smooth Experience */
body {
  opacity: 0;
  animation: fadeIn 0.3s ease-in forwards;
}

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

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

/* Enhanced Borders */
.border-l-4 {
  transition: border-color 0.2s ease;
}

.border-l-4:hover {
  border-left-width: 6px;
}

