/* ============================================
   Andrea Malär – Elementor Custom Enhancements
   ============================================
   Erweiterte Effekte für Elementor-Seiten:
   - Button Hover-Animationen
   - Galerie Hover-Effekte
   - Bild-Rahmen-Effekte
   - Zitat-Styling
   - Lightbox-Anpassungen
   - Smooth Scroll & Utility
   ============================================ */

/* ===== BUTTON HOVER (Fill from Left) ===== */
.am-btn-elementor .elementor-button,
.elementor-widget-button .am-btn-elementor {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.am-btn-elementor .elementor-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--am-rust);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

.am-btn-elementor .elementor-button:hover::before {
    transform: scaleX(1);
}

.am-btn-elementor .elementor-button .elementor-button-content-wrapper {
    position: relative;
    z-index: 1;
}

/* ===== IMAGE FRAME EFFECT ===== */
.am-img-frame-el .elementor-image img {
    filter: contrast(1.05) saturate(0.9);
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.8s ease !important;
}

.am-img-frame-el:hover .elementor-image img {
    transform: scale(1.04) !important;
    filter: contrast(1.1) saturate(1);
}

/* ===== GALLERY GRID ENHANCEMENTS ===== */
.am-gallery-grid .e-gallery-item {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.am-gallery-grid .e-gallery-item:hover {
    z-index: 2;
}

.am-gallery-grid .e-gallery-item img {
    filter: contrast(1.05) saturate(0.9);
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.8s ease !important;
}

.am-gallery-grid .e-gallery-item:hover img {
    filter: contrast(1.1) saturate(1) brightness(1.05);
}

/* Showcase gallery (home page) */
.am-showcase-gallery .e-gallery-item img {
    filter: grayscale(25%) contrast(1.05);
}

.am-showcase-gallery .e-gallery-item:hover img {
    filter: grayscale(0%) contrast(1.1) brightness(1.05);
}

/* ===== QUOTE BLOCK STYLING ===== */
.am-quote-block blockquote {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.am-quote-block blockquote em {
    font-style: normal;
    color: var(--am-rust-light);
}

/* ===== GALLERY TEXT (max-width for readability) ===== */
.am-gallery-text .elementor-widget-container {
    max-width: 700px;
}

/* ===== ELEMENTOR LIGHTBOX CUSTOMIZATION ===== */
.elementor-lightbox {
    background: rgba(20, 20, 20, 0.96) !important;
}

.elementor-lightbox .dialog-lightbox-close-button {
    color: rgba(250, 250, 248, 0.5) !important;
    transition: color 0.3s ease;
}

.elementor-lightbox .dialog-lightbox-close-button:hover {
    color: var(--am-rust-light) !important;
}

.elementor-lightbox .elementor-swiper-button {
    color: rgba(250, 250, 248, 0.5) !important;
    transition: color 0.3s ease;
}

.elementor-lightbox .elementor-swiper-button:hover {
    color: var(--am-rust-light) !important;
}

/* ===== NAVIGATION GLASS EFFECT ===== */
.elementor-location-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ===== SMOOTH SECTION TRANSITIONS ===== */
.elementor-section {
    transition: opacity 0.3s ease;
}

/* ===== ELEMENTOR EDITOR VISUAL HELPERS ===== */
.elementor-editor-active .am-gallery-grid {
    min-height: 200px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 1024px) {
    .am-gallery-text .elementor-widget-container {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    /* Smaller gallery gaps on mobile */
    .am-gallery-grid .e-gallery-grid {
        gap: 6px !important;
    }

    /* Adjust button padding on mobile */
    .am-btn-elementor .elementor-button {
        padding: 14px 28px !important;
    }
}

/* ===== SCROLL INDICATOR (optional, for hero sections) ===== */
@keyframes am-pulse-down {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(8px); }
}

.am-scroll-indicator {
    animation: am-pulse-down 2.5s ease-in-out infinite;
}

/* ===== PRINT OVERRIDES ===== */
@media print {
    .elementor-section[data-settings*="background_background"] {
        background: white !important;
        color: black !important;
    }

    .elementor-section[data-settings*="background_background"] * {
        color: black !important;
    }
}
