/**
 * SUPER POWERFUL Advanced Image Styling
 * Professional styling for strategically placed images
 */

/* Base styling for all CSW auto images */
.csw-auto-image {
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
}

.csw-auto-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.csw-auto-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px 8px 0 0;
}

.csw-auto-image figcaption {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    border-radius: 0 0 8px 8px;
    border-top: 3px solid #007cba;
}

.csw-auto-image figcaption strong {
    color: #007cba;
    font-weight: 600;
}

/* Featured image styling */
.csw-featured {
    margin: 30px 0;
    text-align: center;
}

.csw-featured figcaption {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    font-size: 16px;
    font-weight: 500;
    border-top: none;
}

.csw-featured figcaption strong {
    color: #ffd700;
}

/* Intro image styling */
.csw-intro {
    float: none;
    clear: both;
    margin: 25px auto;
    max-width: 90%;
}

.csw-intro figcaption {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-top: 3px solid #ffc107;
}

.csw-intro figcaption strong {
    color: #ffc107;
}

/* Content image styling */
.csw-content {
    margin: 20px 15px;
    max-width: 45%;
}

.csw-content.alignleft {
    float: left;
    margin-right: 25px;
    margin-left: 0;
}

.csw-content.alignright {
    float: right;
    margin-left: 25px;
    margin-right: 0;
}

.csw-content figcaption {
    background: linear-gradient(135deg, #fd7e14 0%, #e83e8c 100%);
    color: white;
    border-top: 3px solid #ffc107;
}

.csw-content figcaption strong {
    color: #fff3cd;
}

/* Advanced image styling */
.csw-advanced {
    margin: 30px 0;
    text-align: center;
    border: 2px solid #6f42c1;
}

.csw-advanced figcaption {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
    color: white;
    font-size: 15px;
    border-top: 3px solid #ffd700;
}

.csw-advanced figcaption strong {
    color: #ffd700;
}

/* Summary image styling */
.csw-summary {
    margin: 35px 0;
    text-align: center;
    border: 3px solid #20c997;
}

.csw-summary figcaption {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-top: 3px solid #ffc107;
}

.csw-summary figcaption strong {
    color: #fff3cd;
}

/* Responsive design */
@media (max-width: 768px) {
    .csw-content {
        float: none !important;
        max-width: 100%;
        margin: 20px 0;
    }
    
    .csw-intro,
    .csw-advanced,
    .csw-summary {
        max-width: 100%;
        margin: 20px 0;
    }
    
    .csw-auto-image figcaption {
        font-size: 13px;
        padding: 12px;
    }
    
    .csw-featured figcaption,
    .csw-summary figcaption {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .csw-auto-image {
        margin: 15px 0;
        border-radius: 6px;
    }
    
    .csw-auto-image img {
        border-radius: 6px 6px 0 0;
    }
    
    .csw-auto-image figcaption {
        padding: 10px;
        font-size: 12px;
        border-radius: 0 0 6px 6px;
    }
}

/* Animation effects */
@keyframes imageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.csw-auto-image {
    animation: imageSlideIn 0.6s ease-out;
}

/* Print styles */
@media print {
    .csw-auto-image {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .csw-auto-image figcaption {
        background: #f8f9fa !important;
        color: #333 !important;
        border-top: 2px solid #333 !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .csw-auto-image {
        border: 2px solid #000;
    }
    
    .csw-auto-image figcaption {
        background: #000 !important;
        color: #fff !important;
        border-top: 3px solid #fff !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .csw-auto-image {
        animation: none;
        transition: none;
    }
    
    .csw-auto-image:hover {
        transform: none;
    }
}
