/* Custom CSS for NovaLunarium */

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

/* Custom focus styles */
.focus\:ring-primary:focus {
    --tw-ring-color: var(--color-primary);
}

/* Accordion animations */
.accordion-content {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-icon {
    transition: transform 0.3s ease-in-out;
}

.accordion-icon.rotated {
    transform: rotate(180deg);
}

/* Custom button hover effects */
.btn-primary {
    background-color: var(--color-primary);
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Form input focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* Loading animation for form submissions */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cookie banner animations */
#cookie-banner {
    transition: transform 0.3s ease-in-out;
}

#cookie-banner.hidden {
    transform: translateY(100%);
}

/* Table responsive styles */
.table-responsive {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .table-responsive table {
        min-width: 600px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Accessibility improvements */
.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;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .border-gray-200 {
        border-color: #000000;
    }
    
    .text-gray-600 {
        color: #000000;
    }
    
    .bg-gray-50 {
        background-color: #ffffff;
    }
}

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

/* Custom utility classes */
.text-balance {
    text-wrap: balance;
}

.container-prose {
    max-width: 65ch;
    margin: 0 auto;
}

/* Hero section background overlay */
.hero-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
}

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

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

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}