/**
 * Frontend Styles for ContentHub POI Sync
 * Styles for images and content in generated POI pages
 */

/* POI Images - Responsive and Styled */
.ch-poi-image {
    margin: 40px auto;
    text-align: center;
    max-width: 100%;
    clear: both;
    padding: 0;
}

.ch-poi-image img.ch-poi-img {
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: block;
    margin: 0 auto;
    object-fit: cover;
}

/* Explicitly disable hover effects */
.ch-poi-image img.ch-poi-img:hover {
    transform: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

/* Image sizing - responsive breakpoints */
@media (min-width: 768px) {
    .ch-poi-image {
        margin: 50px auto;
    }
    
    .ch-poi-image img.ch-poi-img {
        max-width: 85%;
    }
}

@media (min-width: 1024px) {
    .ch-poi-image {
        margin: 60px auto;
    }
    
    .ch-poi-image img.ch-poi-img {
        max-width: 75%;
    }
}

@media (min-width: 1200px) {
    .ch-poi-image img.ch-poi-img {
        max-width: 65%;
    }
}

@media (min-width: 1400px) {
    .ch-poi-image img.ch-poi-img {
        max-width: 55%;
    }
}

/* Image alignment options (if needed in future) */
.ch-poi-image.align-left {
    float: left;
    margin-right: 20px;
    margin-left: 0;
}

.ch-poi-image.align-right {
    float: right;
    margin-left: 20px;
    margin-right: 0;
}

.ch-poi-image.align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Image caption styling (if captions are added later) */
.ch-poi-image figcaption {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Ensure images don't break layout */
.ch-poi-image::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive images in content areas */
.entry-content .ch-poi-image,
.post-content .ch-poi-image,
.page-content .ch-poi-image {
    margin: 30px auto;
}

/* Mobile optimization */
@media (max-width: 767px) {
    .ch-poi-image {
        margin: 30px auto;
        padding: 0 10px;
    }
    
    .ch-poi-image img.ch-poi-img {
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        width: 100%;
    }
}

/* Ensure images don't overflow containers */
.entry-content .ch-poi-image,
.post-content .ch-poi-image,
.page-content .ch-poi-image {
    overflow: hidden;
}

/* Image spacing between content sections */
h2 + .ch-poi-image,
h3 + .ch-poi-image {
    margin-top: 20px;
}

.ch-poi-image + p,
.ch-poi-image + ul,
.ch-poi-image + ol {
    margin-top: 30px;
}
