/**
 * Hero Widget - CM-Immo Style
 * 
 * 3-Column Layout: Content + Gallery | Hero Image + Badges | Stats
 * 
 * @package CockpitOS_CM_Immo_Theme
 * @version 2.0.4
 */

/* ============================================
   Base Container
   ============================================ */
.cockpit-hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.cockpit-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.cockpit-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(var(--color-accent-pink-rgb, 252, 228, 236), 0.95) 0%, 
        rgba(var(--color-cream-rgb, 254, 243, 231), 0.90) 100%);
    z-index: 2;
}

.cockpit-hero__container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--container-width, 1400px);
    margin: 0 auto;
    padding: var(--spacing-8) var(--spacing-lg);
}

/* ============================================
   CM-Immo Style 3-Column Grid
   ============================================ */
.cockpit-hero__cm-grid {
    display: grid;
    grid-template-columns: 400px 1fr 300px;
    gap: var(--spacing-2xl);
    align-items: center;
    min-height: 600px;
}

/* ============================================
   LEFT COLUMN - Content + Gallery
   ============================================ */
.cockpit-hero__left {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.cockpit-hero__content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Headline */
.cockpit-hero__title {
    font-family: var(--font-family-heading);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    line-height: 1.2;
    margin: 0;
}

/* Description */
.cockpit-hero__description {
    font-size: var(--font-size-lg);
    color: var(--color-gray-600);
    line-height: 1.6;
    margin: 0;
}

/* CTA Button */
.cockpit-hero__cta-wrapper {
    margin-top: var(--spacing-md);
}

.cockpit-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 16px 32px;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-white, #ffffff);
    background-color: var(--color-secondary, #F25363);
    border-radius: var(--radius-2xl);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.cockpit-hero__cta:hover {
    background-color: var(--color-secondary-dark, #8dc5cc);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cockpit-hero__cta i {
    transition: transform var(--transition-base);
}

.cockpit-hero__cta:hover i {
    transform: translateX(4px);
}

/* Gallery */
.cockpit-hero__gallery {
    margin-top: var(--spacing-lg);
}

.cockpit-hero__gallery-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.cockpit-hero__gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.cockpit-hero__gallery-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.cockpit-hero__gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.cockpit-hero__gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cockpit-hero__gallery-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background-color: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white, #ffffff);
    font-size: 18px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.cockpit-hero__gallery-item:hover .cockpit-hero__gallery-icon {
    transform: rotate(90deg);
    background-color: var(--color-primary);
}

/* ============================================
   CENTER COLUMN - Hero Image + Badges
   ============================================ */
.cockpit-hero__center {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.cockpit-hero__center-content {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Floating Badges */
.cockpit-hero__badges {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cockpit-hero__badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 12px 20px;
    background-color: var(--color-white, #ffffff);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    pointer-events: all;
    z-index: 10;
    color: var(--color-gray-800, #1f2937);
    font-weight: var(--font-weight-semibold);
}

/* Auto-Positioning für mehrere Badges */
.cockpit-hero__badge:nth-child(1) {
    top: 10%;
    right: 5%;
}

.cockpit-hero__badge:nth-child(2) {
    bottom: 15%;
    left: 5%;
}

.cockpit-hero__badge:nth-child(3) {
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
}

.cockpit-hero__badge:nth-child(4) {
    bottom: 40%;
    right: 5%;
}

.cockpit-hero__badge:nth-child(5) {
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
}

.cockpit-hero__badge:nth-child(6) {
    bottom: 10%;
    right: 50%;
    transform: translateX(50%);
}

/* Legacy Classes (backwards compatibility) */
.cockpit-hero__badge.badge-top-right {
    top: 10%;
    right: 5%;
}

.cockpit-hero__badge.badge-bottom-left {
    bottom: 15%;
    left: 5%;
}

.cockpit-hero__badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--color-secondary, #F25363);
    border-radius: 50%;
    color: var(--color-white, #ffffff);
    font-size: 14px;
}

.cockpit-hero__badge-text {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-700);
}

/* ============================================
   RIGHT COLUMN - Stats
   ============================================ */
.cockpit-hero__right {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.cockpit-hero__stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Team Section */
.cockpit-hero__team {
    background-color: var(--color-white, #ffffff);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.cockpit-hero__team-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.cockpit-hero__team-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: -12px; /* Overlapping avatars */
}

.cockpit-hero__team-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background-color: var(--color-secondary);
}

.cockpit-hero__team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cockpit-hero__team-avatar--more {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-secondary);
    color: var(--color-white, #ffffff);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.cockpit-hero__team-avatar--more:hover {
    background-color: var(--color-primary);
    transform: scale(1.1);
}

/* Stat Boxes */
.cockpit-hero__stat {
    background-color: var(--color-white, #ffffff);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-base);
}

.cockpit-hero__stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.cockpit-hero__stat-number {
    font-family: var(--font-family-heading);
    font-size: clamp(2.5rem, 4vw, 3rem);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.cockpit-hero__stat-label {
    font-size: var(--font-size-base);
    color: var(--color-gray-600);
    line-height: 1.5;
}

/* ============================================
   Media Background
   ============================================ */
.cockpit-hero__media-wrapper {
    width: 100%;
    height: 100%;
}

.cockpit-hero__media-wrapper img,
.cockpit-hero__media-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Large Tablets (1200px) */
@media (max-width: 1200px) {
    .cockpit-hero__cm-grid {
        grid-template-columns: 350px 1fr 250px;
        gap: var(--spacing-xl);
    }
    
    .cockpit-hero__title {
        font-size: 2.5rem;
    }
}

/* Tablets (1024px) */
@media (max-width: 1024px) {
    .cockpit-hero__cm-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }
    
    .cockpit-hero__content {
        align-items: center;
    }
    
    .cockpit-hero__gallery-grid {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .cockpit-hero__center {
        order: -1; /* Move hero image to top */
        max-height: 400px;
    }
    
    .cockpit-hero__right {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Mobile (768px) */
@media (max-width: 768px) {
    .cockpit-hero {
        min-height: auto;
        padding: var(--spacing-6) 0;
    }
    
    .cockpit-hero__container {
        padding: var(--spacing-md);
    }
    
    .cockpit-hero__cm-grid {
        gap: var(--spacing-xl);
    }
    
    .cockpit-hero__title {
        font-size: 2rem;
    }
    
    .cockpit-hero__description {
        font-size: var(--font-size-base);
    }
    
    .cockpit-hero__gallery-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .cockpit-hero__badge {
        padding: 10px 16px;
        font-size: var(--font-size-sm);
    }
    
    .cockpit-hero__badge.badge-top-right {
        top: 5%;
        right: 2%;
    }
    
    .cockpit-hero__badge.badge-bottom-left {
        bottom: 5%;
        left: 2%;
    }
    
    .cockpit-hero__stat {
        padding: var(--spacing-md);
    }
    
    .cockpit-hero__stat-number {
        font-size: 2rem;
    }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
    .cockpit-hero__title {
        font-size: 1.75rem;
    }
    
    .cockpit-hero__cta {
        width: 100%;
        justify-content: center;
    }
    
    .cockpit-hero__badge {
        position: relative;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        display: flex;
        margin-bottom: var(--spacing-sm);
    }
    
    .cockpit-hero__badges {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md);
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .cockpit-hero__gallery-item,
    .cockpit-hero__stat,
    .cockpit-hero__cta,
    .cockpit-hero__badge {
        transition: none;
    }
    
    .cockpit-hero__cta:hover i,
    .cockpit-hero__gallery-icon {
        transform: none;
    }
}
