/* Micro-interactions and Enhanced Styles */

/* Alpine.js x-cloak */
[x-cloak] {
    display: none !important;
}

/* Button Hover Effects with Scale */
.btn-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hover:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.btn-hover:active {
    transform: translateY(0) scale(0.98);
}

/* Card Shadow Hover Effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* HTMX Loading States */
.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-indicator {
    display: none;
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #18A5E3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Testimonial Card Gradients */
.testimonial-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.testimonial-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #18A5E3 0%, #0E7BAB 100%);
}

.testimonial-gradient:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

/* Breadcrumb Styles */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: #6b7280;
}

.breadcrumb-item:last-child {
    color: #18A5E3;
    font-weight: 600;
}

.breadcrumb-separator {
    color: #9ca3af;
    margin: 0 0.5rem;
}

/* Form Validation Styles */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #18A5E3;
    box-shadow: 0 0 0 3px rgba(24, 165, 227, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.form-input.success {
    border-color: #10b981;
}

.form-error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-input.error+.form-error-message {
    display: block;
}

/* Progress Indicator */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    z-index: -1;
}

.progress-step:first-child::before {
    left: 50%;
}

.progress-step:last-child::before {
    right: 50%;
}

.progress-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.progress-step.active .progress-step-circle {
    background: #18A5E3;
    color: white;
}

.progress-step.completed .progress-step-circle {
    background: #10b981;
    color: white;
}

/* GDPR-Compliant Cookie Consent Modal - Premium Design */
.cookie-consent {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%) scale(0.95);
    width: 450px;
    max-width: calc(100vw - 32px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 28px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.cookie-consent.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.cookie-container {
    padding: 32px;
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.cookie-logo img {
    height: 32px;
    width: auto;
}

.cookie-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.cookie-body p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 24px;
}

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    transition: background 0.3s ease;
}

.cookie-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.option-info {
    display: flex;
    flex-direction: column;
}

.option-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
}

.option-desc {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Custom Toggle Switch */
.option-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.option-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked+.toggle-slider {
    background-color: #18A5E3;
}

input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

.option-toggle.disabled .toggle-slider {
    background-color: #18A5E3;
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-links {
    margin-bottom: 24px;
}

.cookie-links a {
    font-size: 0.8125rem;
    color: #18A5E3;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(24, 165, 227, 0.3);
    transition: all 0.3s ease;
}

.cookie-links a:hover {
    border-bottom-color: #18A5E3;
}

.cookie-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-cookie {
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
}

.btn-primary {
    background: #18A5E3;
    color: white;
    grid-column: span 2;
}

.btn-primary:hover {
    background: #0E7BAB;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #1a1a1a;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-outline {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

@media (max-width: 640px) {
    .cookie-consent {
        top: auto;
        bottom: 0;
        left: 0;
        transform: translateY(100%);
        width: 100%;
        max-width: 100%;
        border-radius: 32px 32px 0 0;
    }

    .cookie-consent.show {
        transform: translateY(0);
    }

    .cookie-container {
        padding: 24px 20px 32px;
    }

    .cookie-footer {
        grid-template-columns: 1fr;
    }

    .btn-primary {
        grid-column: span 1;
        order: -1;
    }
}

/* Toast notification */
.toast {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Gallery Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Social Share Buttons */
.social-share-buttons {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.social-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: white;
}

.social-share-button:hover {
    transform: translateY(-3px);
}

.social-share-button.facebook {
    background: #1877f2;
}

.social-share-button.twitter {
    background: #1da1f2;
}

.social-share-button.linkedin {
    background: #0077b5;
}

.social-share-button.email {
    background: #6b7280;
}

/* Lazy Load Fade In */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Icon Animations */
.icon-pulse {
    animation: icon-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes icon-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.icon-spin {
    animation: icon-spin 1s linear infinite;
}

@keyframes icon-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Enhanced focus states for accessibility */
*:focus-visible {
    outline: 2px solid #18A5E3;
    outline-offset: 2px;
}

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

/* Parallax and hero styles moved to hero-styles.css for better organization */

/* Infinite Scroll Reviews */
.infinite-scroll-wrapper {
    width: 100%;
    position: relative;
}

.infinite-scroll-track {
    will-change: transform;
    transition: none;
}

.infinite-scroll-content {
    flex-shrink: 0;
}

.infinite-scroll-content>* {
    min-width: 350px;
    max-width: 450px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .infinite-scroll-content>* {
        min-width: 300px;
        max-width: 380px;
    }
}

/* Line Clamp Utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}