/**
 * Animated Elementor Widgets - Frontend Styles
 */

/* Reset and base styles */
.aew-widget-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main widget container */
.aew-widget-container {
    font-family: inherit;
    /* Removed default background - now controlled via Elementor */
    min-height: 80vh;
    padding: 2rem;
    border-radius: 0;
    overflow: hidden;
}

/* Main layout container */
.aew-main-container {
    display: flex;
    flex-direction: row;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
    min-height: 80vh;
}

/* Content section */
.aew-content-section {
    padding: 2rem;
    flex: 1;
}

.aew-title {
    font-size: 3.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 2rem;
    line-height: 1.2;
    /* Removed default text shadow - now controlled via Elementor */
}

.aew-title .aew-highlight {
    color: #ff6b6b; /* Default highlight color, customizable via Elementor */
}

.aew-description,
.aew-additional-text {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    /* Removed default text shadow - now controlled via Elementor */
}

/* Animation section */
.aew-animation-section {
    position: relative;
    height: 600px;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    flex: 1;
}

.aew-container-2c {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Grid container and animation */
.aew-grid-container {
    position: absolute;
    width: 120%;
    height: 400%;
    transform: rotate(45deg);
    top: -150%;
    left: 10%;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

/* Grid rows */
.aew-grid-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.aew-grid-row:nth-child(even) {
    transform: translateX(60px);
}

/* Grid items */
.aew-grid-item {
    width: 150px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.aew-grid-item:hover {
    transform: scale(1.05);
}

.aew-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.aew-grid-item:hover img {
    transform: scale(1.1);
}

/* Responsive Design */

/* Large tablet styles */
@media (max-width: 1024px) {
    .aew-main-container {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
        min-height: auto;
    }
    
    .aew-content-section {
        flex: none;
        width: 100%;
        order: 1;
    }
    
    .aew-animation-section {
        flex: none;
        width: 100%;
        height: 500px;
        order: 2;
    }

    .aew-title {
        font-size: 3rem;
    }
    
    .aew-grid-container {
        width: 150%;
        left: -25%;
        top: -100%;
    }
}

/* Tablet styles */
@media (max-width: 768px) {
    .aew-widget-container {
        padding: 1.5rem;
        min-height: auto;
    }
    
    .aew-main-container {
        gap: 2rem;
        padding: 0;
    }

    .aew-content-section {
        padding: 1rem;
    }

    .aew-title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .aew-description,
    .aew-additional-text {
        font-size: 1.1rem;
    }

    .aew-animation-section {
        height: 400px;
    }

    .aew-grid-container {
        width: 200%;
        left: -50%;
        top: -80%;
    }

    .aew-grid-item {
        width: 120px;
        height: 160px;
    }
    
    .aew-grid-row {
        gap: 15px;
        margin-bottom: 15px;
    }
}

/* Mobile styles */
@media (max-width: 640px) {
    .aew-widget-container {
        padding: 1rem;
    }

    .aew-title {
        font-size: 2rem;
    }

    .aew-description,
    .aew-additional-text {
        font-size: 1rem;
    }

    .aew-animation-section {
        height: 350px;
    }

    .aew-grid-container {
        width: 250%;
        left: -75%;
        top: -60%;
    }

    .aew-grid-item {
        width: 100px;
        height: 140px;
    }

    .aew-grid-row:nth-child(even) {
        transform: translateX(40px);
    }
    
    .aew-grid-row {
        gap: 12px;
        margin-bottom: 12px;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    .aew-widget-container {
        padding: 0.75rem;
    }

    .aew-title {
        font-size: 1.75rem;
    }

    .aew-animation-section {
        height: 300px;
    }

    .aew-grid-container {
        width: 300%;
        left: -100%;
        top: -40%;
    }

    .aew-grid-item {
        width: 80px;
        height: 120px;
    }

    .aew-grid-row:nth-child(even) {
        transform: translateX(30px);
    }
}

/* Editor specific styles */
.elementor-editor-active .aew-grid-container {
    animation-play-state: running !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .aew-grid-container {
        animation: none;
    }
    
    .aew-grid-item,
    .aew-grid-item img {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .aew-animation-section {
        border: 2px solid white;
    }
    
    .aew-grid-item {
        box-shadow: 0 4px 16px rgba(255,255,255,0.5);
    }
}

/* Responsive visibility classes */
@media (min-width: 1025px) {
    .aew-hidden-desktop-yes {
        display: none !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .aew-hidden-tablet-yes {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .aew-hidden-mobile-yes {
        display: none !important;
    }
}