/* ========================================
   SMG MALL CALL-TO-ACTION WIDGET
   Flexibles CTA Widget für Promotions und Werbung
   ======================================== */

/* ✅ NUTZT WIDGET BASE FRAMEWORK */
.smg-cta-widget {
    /* Alle Basis-Styles kommen von .smg-widget-base */
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: clamp(16px, 3vw, 24px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.smg-cta-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.smg-cta-widget:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(227, 30, 36, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: rgba(227, 30, 36, 0.2);
}

.smg-cta-widget:hover::before {
    opacity: 1;
}

/* ========================================
   BACKGROUND & OVERLAY SYSTEM
   ======================================== */
.smg-cta-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.smg-cta-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.smg-cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(227, 30, 36, 0.85) 0%, 
        rgba(71, 8, 10, 0.75) 100%);
    z-index: 2;
}

/* ========================================
   CONTENT CONTAINER
   ======================================== */
.smg-cta-content {
    position: relative;
    z-index: 3;
    padding: var(--space-2xl, 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-lg, 2rem);
}

/* ========================================
   LAYOUT VARIANTS
   ======================================== */

/* Hero Banner - Full Width mit Background */
.smg-cta-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smg-cta-hero .smg-cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.smg-cta-hero .smg-cta-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: white;
}

.smg-cta-hero .smg-cta-subtitle,
.smg-cta-hero .smg-cta-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Card Style - Kompakt mit Schatten */
.smg-cta-card {
    max-width: 600px;
    margin: 0 auto;
    min-height: auto;
}

.smg-cta-card .smg-cta-content {
    padding: var(--space-xl, 3rem);
}

.smg-cta-card .smg-cta-title {
    color: var(--smg-600, #e31e24);
}

/* Split Layout - Text links, Bild rechts */
.smg-cta-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 400px;
}

.smg-cta-split .smg-cta-content {
    text-align: left;
    align-items: flex-start;
    padding: var(--space-xl, 3rem);
}

.smg-cta-split .smg-cta-background {
    position: relative;
    grid-column: 2;
    height: 100%;
}

/* Minimal - Nur Text, kein Background */
.smg-cta-minimal {
    background: transparent;
    box-shadow: none;
    border: 2px solid var(--smg-200, #ffc8ca);
}

.smg-cta-minimal .smg-cta-content {
    padding: var(--space-lg, 2rem);
}

.smg-cta-minimal .smg-cta-title {
    color: var(--smg-600, #e31e24);
}

/* Floating Card - Schwebt über Content */
.smg-cta-floating {
    position: relative;
    transform: translateY(-2rem);
    margin-bottom: var(--space-xl, 3rem);
    box-shadow: 0 20px 60px rgba(227, 30, 36, 0.15);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
/* 2025 MODERNE TYPOGRAPHY */
.smg-cta-subtitle {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--smg-500);
    margin: 0;
    padding: clamp(0.25rem, 1vw, 0.375rem) clamp(0.75rem, 3vw, 1rem);
    background: linear-gradient(135deg,
        rgba(227, 30, 36, 0.1) 0%,
        rgba(227, 30, 36, 0.05) 100%);
    border-radius: 50px;
    display: inline-block;
    border: 1px solid rgba(227, 30, 36, 0.2);
}

.smg-cta-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--smg-600) 0%, var(--smg-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.02em;
}

.smg-cta-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.6;
    color: var(--app-gray-600);
    margin: 0;
    max-width: 600px;
    font-weight: 500;
    opacity: 0.9;
}

/* ========================================
   BADGE SYSTEM
   ======================================== */
.smg-cta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: var(--text-xs, 0.75rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    animation: pulse-badge 2s infinite;
}

.smg-badge-primary {
    background: linear-gradient(135deg, var(--smg-600), var(--smg-700));
    color: white;
}

.smg-badge-accent {
    background: linear-gradient(135deg, var(--smg-400), var(--smg-500));
    color: white;
}

.smg-badge-dark {
    background: linear-gradient(135deg, var(--smg-900), var(--smg-950));
    color: white;
}

.smg-badge-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========================================
   BUTTON CONTAINER
   ======================================== */
.smg-cta-buttons {
    display: flex;
    gap: var(--space-md, 1.5rem);
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.smg-cta-split .smg-cta-buttons {
    justify-content: flex-start;
}

/* ========================================
   HOVER EFFECTS - Using Centralized Hover System
   ======================================== */
/* Note: Add hover classes directly to HTML elements:
   - Add 'hover-lift-md' class for lift effect
   - Add 'hover-scale-sm' class for scale effect
   - Add 'suma-card-hover' to .smg-cta-container for default hover
*/

/* Legacy hover effects - will be replaced by HTML classes */
.smg-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(227, 30, 36, 0.2);
}

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

.smg-hover-tilt:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
}

.smg-hover-glow:hover {
    box-shadow: 0 0 40px rgba(227, 30, 36, 0.3);
}

/* ========================================
   ENTRANCE ANIMATIONS
   ======================================== */
.smg-animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.smg-animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.smg-animate-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideLeft 0.8s ease forwards;
}

.smg-animate-slide-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideRight 0.8s ease forwards;
}

.smg-animate-zoom-in {
    opacity: 0;
    transform: scale(0.8);
    animation: zoomIn 0.8s ease forwards;
}

.smg-animate-bounce {
    opacity: 0;
    transform: translateY(-20px);
    animation: bounceIn 1s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    60% {
        opacity: 1;
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .smg-cta-content {
        padding: var(--space-lg, 2rem);
        gap: var(--space-md, 1.5rem);
    }

    .smg-cta-split {
        grid-template-columns: 1fr;
    }

    .smg-cta-split .smg-cta-content {
        text-align: center;
        align-items: center;
    }

    .smg-cta-split .smg-cta-buttons {
        justify-content: center;
    }

    .smg-cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .smg-cta-buttons .smg-btn {
        width: 100%;
        max-width: 300px;
    }

    .smg-cta-hero {
        min-height: 50vh;
    }

    .smg-cta-floating {
        transform: none;
        margin-bottom: var(--space-lg, 2rem);
    }
}

/* ========================================
   TITLEBOX MODE - Header Style Layout
   ======================================== */
.smg-cta-titlebox {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    overflow: visible;
}

.smg-cta-titlebox:hover {
    transform: none;
    box-shadow: none;
}

.smg-cta-titlebox::before {
    display: none;
}

/* ✅ Titlebox verwendet widget-base.css Styles */
.smg-cta-titlebox .smg-widget-header {
    text-align: center;
    margin-bottom: clamp(2rem, 5vw, 3rem);
    position: relative;
    z-index: 2;
}

/* ✅ Widget Title mit Gradient wie in widget-base.css - ÜBERSCHREIBT widget-titles.css */
.smg-cta-titlebox .smg-widget-title {
    font-size: clamp(2rem, 5vw, 2.5rem) !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, var(--app-gray-900) 0%, var(--smg-600) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important; /* Fallback für ältere Browser */
    margin-bottom: clamp(0.75rem, 2vw, 1rem) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
    display: inline-block !important;
}

/* ✅ ENTFERNT: Dekorative Elemente (Linien, Dots, etc.) */
.smg-cta-titlebox .smg-widget-header::before,
.smg-cta-titlebox .smg-widget-header::after {
    display: none !important;
}

/* ✅ ENTFERNT: Highlight-Unterstriche */
.smg-cta-titlebox .smg-widget-title .highlight::after {
    display: none !important;
}

/* ✅ Animation beim Scrollen (wie Events Widget) */
.smg-cta-titlebox .smg-widget-header.in-viewport .smg-widget-title {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

/* ✅ Widget Subtitle wie in widget-base.css */
.smg-cta-titlebox .smg-widget-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.125rem) !important;
    color: var(--app-gray-600) !important;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 500;
    opacity: 0.9;
}

/* Alignment Variants */
.smg-cta-titlebox .smg-widget-header.align-left {
    text-align: left;
}

.smg-cta-titlebox .smg-widget-header.align-left .smg-widget-subtitle {
    margin: 0;
}

.smg-cta-titlebox .smg-widget-header.align-center {
    text-align: center;
}

.smg-cta-titlebox .smg-widget-header.align-right {
    text-align: right;
}

.smg-cta-titlebox .smg-widget-header.align-right .smg-widget-subtitle {
    margin-left: auto;
    margin-right: 0;
}

/* Responsive Titlebox */
@media (max-width: 768px) {
    .smg-cta-titlebox .smg-widget-header {
        margin-bottom: var(--space-2xl, 2rem);
    }
}
