/**
 * Image and Cards Widget Styles
 *
 * Two-column layout with image/badge on left and information cards on right
 *
 * @package CleanlistElementorWidgets
 * @since 1.0.0
 */

/* ==========================================================================
   WIDGET CONTAINER
   ========================================================================== */

.image-cards-container {
    padding: 60px 0;
}

.image-cards-header,
.image-cards-wrapper {
    max-width: 1240px;
    margin: 0 auto;
}

.image-cards-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 60px;
    padding: 0 1rem;

    @media (min-width: 1200px) {
        flex-direction: row;
        align-items: center;
    }
}

.image-cards-header {
    text-align: center;
    margin-bottom: 75px;
}

h2.image-cards-image-main-title {
    font-size: 30px;
    font-weight: 600;
    line-height: 40px;
    color: #263238;
}

/* ==========================================================================
   IMAGE SECTION
   ========================================================================== */

.image-cards-image {
    flex: 0 0 35%;
    max-width: 35%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

@media (max-width: 1199px) {
    .image-cards-image,
    .image-cards-content {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

.image-cards-image a {
    display: block;
    width: 100%;
    text-decoration: none;
}

.image-cards-image img {
    width: 100%;
    height: auto;
    max-width: min(50%, 200px);
    object-fit: contain;
    transition: all 0.3s ease;
}

.image-cards-image a:hover img {
    transform: scale(1.02);
    filter: brightness(1.05);
}

/* ==========================================================================
   CARDS SECTION
   ========================================================================== */

.image-cards-content {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 60px;

    @media (min-width: 768px) {
        flex-direction: row;
        gap: 60px;
    }
}

.image-cards-card {
    display: flex;
    align-items: center;
    background-color: #FFFFFF;
    box-shadow: 0px 0px 20px -2px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    padding: 30px 0 20px;
}

/* Card Link Styles */
.image-cards-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.image-cards-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.image-cards-card-inner {
    padding: 30px 50px;
    position: relative;
}

/* ==========================================================================
   CARD CONTENT
   ========================================================================== */

h3.image-cards-card-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 32px;
    color: #263238;
    margin-bottom: 20px;
    margin-top: 0;
    width: 90%;
}

.image-cards-card-content {
    color: #263238;
    margin: 0;
}

.image-cards-card-content p {
    margin: 0 0 15px;
    font-size: 15px;
    line-height: 30px;
    color: #263238;
}

.image-cards-card-content p:last-child {
    margin-bottom: 0;
}

.image-cards-card-content br {
    display: block;
    margin: 8px 0;
    content: "";
}

/* ==========================================================================
   ACCENT LINE
   ========================================================================== */

.image-cards-card-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 7px;
    background-color: #22813F;
    transition: all 0.3s ease;
}

/* ==========================================================================
   FOCUS AND ACCESSIBILITY
   ========================================================================== */

.image-cards-card-link:focus {
    outline: 2px solid #22813F;
    outline-offset: 2px;
}

.image-cards-image a:focus {
    outline: 2px solid #22813F;
    outline-offset: 2px;
    border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .image-cards-card {
        border: 1px solid #000000;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    h3.image-cards-card-title {
        color: #000000;
    }

    .image-cards-card-content,
    .image-cards-card-content p {
        color: #000000;
    }

    .image-cards-card-accent {
        background-color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .image-cards-card,
    .image-cards-card-accent,
    .image-cards-image img {
        transition: none;
    }

    .image-cards-image a:hover img {
        transform: none;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .image-cards-container {
        padding: 20px 0;
        background: white !important;
    }

    .image-cards-wrapper {
        gap: 30px;
        page-break-inside: avoid;
    }

    .image-cards-card {
        border: 1px solid #cccccc;
        box-shadow: none;
        break-inside: avoid;
        margin-bottom: 15px;
    }

    .image-cards-card-accent {
        background-color: #000000 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }

    .image-cards-image img {
        max-width: 150px;
    }

    .image-cards-card-inner {
        padding: 15px;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.image-cards-card.no-accent .image-cards-card-accent {
    display: none;
}

.image-cards-container.center-aligned {
    text-align: center;
}

.image-cards-container.center-aligned h3.image-cards-card-title,
.image-cards-container.center-aligned .image-cards-card-content {
    text-align: center;
}

/* ==========================================================================
   ANIMATION ENHANCEMENTS
   ========================================================================== */

.image-cards-card {
    animation: fadeInUp 0.6s ease-out;
}

.image-cards-card:nth-child(1) { animation-delay: 0.1s; }
.image-cards-card:nth-child(2) { animation-delay: 0.2s; }
.image-cards-card:nth-child(3) { animation-delay: 0.3s; }
.image-cards-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Disable animations on reduced motion */
@media (prefers-reduced-motion: reduce) {
    .image-cards-card {
        animation: none;
    }
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

.image-cards-card {
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    perspective: 1000px;
}

.image-cards-image img {
    will-change: transform, filter;
}

/* GPU acceleration for smooth hover effects */
.image-cards-card,
.image-cards-image img {
    transform: translateZ(0);
}