/* Custom styles for Valtheran website */

:root {
    --color-primary: #16a34a;
    --color-secondary: #64748b;
    --color-accent: #dc2626;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

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

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

.btn-primary:hover {
    background-color: #15803d;
    transform: translateY(-1px);
}

/* Form validation styles */
.form-error {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-success {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Animation for loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Mobile menu animation */
.mobile-menu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

.mobile-menu.show {
    max-height: 300px;
}

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

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

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

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

/* Custom checkbox and radio styles */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--color-primary);
}

/* Responsive typography */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: #000;
    }
    
    p, li {
        orphans: 3;
        widows: 3;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #0f5132;
        --color-secondary: #495057;
        --color-accent: #842029;
    }
    
    .border-gray-200 {
        border-color: #000 !important;
    }
    
    .text-gray-600 {
        color: #000 !important;
    }
}

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

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here if needed */
}

/* Utility classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.gradient-primary {
    background: linear-gradient(135deg, var(--color-primary), #22c55e);
}

.border-gradient {
    border-image: linear-gradient(45deg, var(--color-primary), var(--color-secondary)) 1;
}

/* Cookie banner specific styles */
#cookie-banner {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

#cookie-modal {
    backdrop-filter: blur(5px);
}

/* Form specific styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
    outline: none;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

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

.table-responsive table {
    min-width: 600px;
}

/* Skip link for accessibility */
.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;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

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

/* Error and success messages */
.alert {
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}
/* Cookie banner visibility — independent of Tailwind */
#cookie-banner.hidden, #cookie-consent-banner.hidden { display: none !important; }
#cookie-banner:not(.hidden), #cookie-consent-banner:not(.hidden) { display: block !important; }
#cookie-modal.hidden { display: none !important; }
