/* ==========================================================================
   🎨 Checkout Peak - Utility Classes
   Additional helper classes for Elementor & Custom Development
   ========================================================================== */

/* --------------------------------------------------------------------------
   Container & Spacing Utilities
   -------------------------------------------------------------------------- */
.container-narrow {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.container-wide {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.section-padding {
    padding-top: clamp(60px, 10vw, 120px);
    padding-bottom: clamp(60px, 10vw, 120px);
}

.section-padding-sm {
    padding-top: clamp(40px, 6vw, 80px);
    padding-bottom: clamp(40px, 6vw, 80px);
}

.section-padding-lg {
    padding-top: clamp(100px, 15vw, 180px);
    padding-bottom: clamp(100px, 15vw, 180px);
}

/* --------------------------------------------------------------------------
   Text Utilities
   -------------------------------------------------------------------------- */
.text-balance {
    text-wrap: balance;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shadow-sm {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.text-shadow-md {
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.text-shadow-lg {
    text-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   Background Utilities
   -------------------------------------------------------------------------- */
.bg-gradient-primary {
    background: linear-gradient(135deg, hsl(210, 100%, 40%) 0%, hsl(210, 100%, 30%) 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #1A1A1A 0%, #0D0D0D 100%);
}

.bg-gradient-light {
    background: linear-gradient(135deg, #FFFFFF 0%, #FAFAFA 100%);
}

.bg-blur {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

.bg-blur-lg {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

/* --------------------------------------------------------------------------
   Glassmorphism Variants
   -------------------------------------------------------------------------- */
.glass-light {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-primary {
    background: rgba(0, 102, 204, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 102, 204, 0.2);
}

/* --------------------------------------------------------------------------
   Button Utilities
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-sm {
    padding: 10px 24px;
    font-size: 14px;
    height: 40px;
}

.btn-md {
    padding: 14px 32px;
    font-size: 16px;
    height: 48px;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 18px;
    height: 56px;
}

.btn-xl {
    padding: 22px 50px;
    font-size: 20px;
    height: 64px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Card Utilities
   -------------------------------------------------------------------------- */
.card {
    background: var(--background);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.card-border {
    border: 1px solid var(--border);
}

.card-flat {
    box-shadow: none;
    border: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Image Utilities
   -------------------------------------------------------------------------- */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.img-rounded {
    border-radius: 16px;
}

.img-rounded-lg {
    border-radius: 24px;
}

.img-circle {
    border-radius: 50%;
}

/* --------------------------------------------------------------------------
   Aspect Ratio Utilities
   -------------------------------------------------------------------------- */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-portrait {
    aspect-ratio: 4 / 5;
}

.aspect-cinema {
    aspect-ratio: 21 / 9;
}

/* --------------------------------------------------------------------------
   Grid Utilities
   -------------------------------------------------------------------------- */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;
}

.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 30px;
}

/* --------------------------------------------------------------------------
   Flex Utilities
   -------------------------------------------------------------------------- */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-start {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.flex-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-xs { gap: 8px; }
.gap-sm { gap: 16px; }
.gap-md { gap: 24px; }
.gap-lg { gap: 40px; }
.gap-xl { gap: 60px; }

/* --------------------------------------------------------------------------
   Border Utilities
   -------------------------------------------------------------------------- */
.border-rounded { border-radius: 12px; }
.border-rounded-md { border-radius: 16px; }
.border-rounded-lg { border-radius: 24px; }
.border-rounded-xl { border-radius: 32px; }
.border-rounded-full { border-radius: 9999px; }

/* --------------------------------------------------------------------------
   Shadow Utilities
   -------------------------------------------------------------------------- */
.shadow-xs {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.shadow-sm {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.shadow-md {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.shadow-xl {
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
}

.shadow-primary {
    box-shadow: 0 12px 40px rgba(0, 102, 204, 0.3);
}

.shadow-glow {
    box-shadow: 0 0 40px rgba(0, 102, 204, 0.4);
}

/* --------------------------------------------------------------------------
   Hover Effects
   -------------------------------------------------------------------------- */
.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-scale-sm:hover {
    transform: scale(1.02);
}

.hover-scale-lg:hover {
    transform: scale(1.1);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.6s;
}

.hover-shine:hover::before {
    left: 100%;
}

/* --------------------------------------------------------------------------
   Back to Top Button
   -------------------------------------------------------------------------- */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   Loading States
   -------------------------------------------------------------------------- */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInDown {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out;
}

/* --------------------------------------------------------------------------
   Responsive Utilities
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .section-padding {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .text-gradient {
        /* Fallback für bessere Mobile-Performance */
        background: var(--primary);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    #site-header,
    #back-to-top,
    #mobile-menu {
        display: none !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* --------------------------------------------------------------------------
   Dark Mode Support (Automatic)
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    .card {
        background: hsl(0, 0%, 12%);
    }
    
    .glass-light {
        background: rgba(26, 26, 26, 0.7);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* --------------------------------------------------------------------------
   Reduced Motion Support (Accessibility)
   -------------------------------------------------------------------------- */
@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;
    }
    
    .hover-lift,
    .hover-scale,
    .hover-grow {
        transform: none !important;
    }
}
