/* =============================================================================
   ADTLAS LANDING PAGE FIXES CSS
   Fixes for common issues on the landing page
   ============================================================================= */

/* Cookie Consent Fixes */
.cookie-message {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    animation: slideUp 0.3s ease-out;
    border: 1px solid #e0e0e0;
    max-width: 500px;
    margin: 0 auto;
}

.cookie-message.show {
    display: block !important;
}

.cookie-message.hide {
    display: none !important;
}

.cookie-message img {
    width: 40px;
    height: 40px;
    float: left;
    margin-right: 15px;
    margin-top: 5px;
}

.cookie-message span {
    display: block;
    overflow: hidden;
}

.cookie-message p {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.cookie-message button {
    margin-right: 10px;
    padding: 8px 16px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-message button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

/* Form Fixes */
.form-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.form-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.form-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

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

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

/* Mobile Fixes */
@media (max-width: 768px) {
    .cookie-message {
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        max-width: none;
        margin: 0;
    }
    
    .cookie-message button {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Accessibility Fixes */
.keyboard-navigation *:focus {
    outline: 2px solid #007bff !important;
    outline-offset: 2px !important;
}

/* Touch Device Fixes */
.touch-device .btn:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Animation Fixes */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

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

/* Image Loading Fixes */
img[data-src] {
    background: #f8f9fa;
    min-height: 100px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f8f9fa"/><text x="50" y="50" text-anchor="middle" dy=".3em" font-family="Arial, sans-serif" font-size="14" fill="%23666">Loading...</text></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

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

/* Fix for flickering animations */
.lqd-imggrp-img-container {
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

/* Fix for modal overlay */
.lity-backdrop {
    backdrop-filter: blur(3px);
}

/* Fix for carousel indicators */
.carousel-dots {
    text-align: center;
    margin-top: 20px;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dots .dot.is-selected {
    background: #007bff;
}

/* Fix for sticky navigation */
.lqd-sticky-placeholder {
    display: none;
}

.lqd-sticky-placeholder.show {
    display: block;
}

/* Fix for accordion animations */
.accordion-collapse {
    transition: height 0.3s ease;
}

/* Fix for tab content */
.lqd-tabs-pane {
    min-height: 400px;
}

.lqd-tabs-pane img {
    max-width: 100%;
    height: auto;
}

/* Fix for particles background */
.ld-particles-container {
    pointer-events: none;
}

/* Fix for text rotation */
.txt-rotate-keywords {
    display: inline-block;
    min-width: 200px;
}

/* Fix for iconbox hover effects */
.iconbox:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

/* Fix for gradient backgrounds */
.ld-gradient-heading {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Print styles */
@media print {
    .cookie-message,
    .lqd-cc,
    .lqd-modal {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-message {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid;
    }
}

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