/* Blog Post Specific Styles */
.blog-hero {
<#if blogPost.headerImageUrl?has_content> background: url('${img.heroImage(blogPost.headerImageUrl)}') center/cover;
<#else> background: url('https://quimbaya-tours.com/wp-content/uploads/2023/12/iStock-1408955173-min.jpg') center/cover;
</#if> min-height: 564px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-hero-container {
    padding-top: 60px;
    padding-bottom: 150px;
}

/* Content Sections */
.blog-content {
    padding: 80px 0;
}

.blog-content-wrapper {
    border: solid #d0d0d0 1px;
    border-radius: 20px;
    padding: 30px;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
}

.blog-meta-item i {
    color: #41a1ce;
}

.blog-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-tag {
    background: #f0f0f0;
    color: #333;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}

.blog-tag:hover {
    background: #41a1ce;
    color: white;
}

/* Section Styles */
.blog-section {
    margin-bottom: 60px;
}

.section-text-content h3,
.blog-section h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #41a1ce;
    margin-bottom: 20px;
    font-family: "League Spartan", sans-serif;
}

.blog-section-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    font-family: "Nunito", sans-serif;
}

/* Section with image layouts */
.section-with-image {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.section-with-image.image-left {
    flex-direction: row-reverse;
}

.section-with-image.image-right {
    flex-direction: row;
}

.section-with-image.image-above,
.section-with-image.image-below {
    flex-direction: column;
}

.section-with-image.wrapper-fill {
    align-items: stretch;
}

.section-with-image.wrapper-fill .section-image-wrapper {
    display: flex;
    flex-direction: column;
}

.section-with-image.wrapper-fill.image-left .section-image-wrapper,
.section-with-image.wrapper-fill.image-right .section-image-wrapper {
    width: 40%;
    max-width: 400px;
}

.section-with-image.wrapper-fill .section-image-wrapper img {
    width: 100%;
    height: 100%;
    flex: 1;
}

/* ============================================================================
   WRAPPER BEHAVIOR: WRAP (tight around image) - NEW
   ============================================================================ */
.section-with-image.wrapper-wrap {
    align-items: flex-start;
}

.section-with-image.wrapper-wrap .section-image-wrapper {
    display: block;
}

.section-with-image.wrapper-wrap.image-left .section-image-wrapper,
.section-with-image.wrapper-wrap.image-right .section-image-wrapper {
    width: auto;
    max-width: 400px;
}

.section-with-image.wrapper-wrap .section-image-wrapper img {
    width: 100%;
    height: auto;
}

.section-with-image.wrapper-stretch {
    align-items: stretch;
}

.section-with-image.wrapper-stretch .section-image-wrapper {
    display: block;
}

.section-with-image.wrapper-stretch.image-left .section-image-wrapper,
.section-with-image.wrapper-stretch.image-right .section-image-wrapper {
    width: 40%;
    max-width: 400px;
}

.section-with-image.wrapper-stretch .section-image-wrapper img {
    width: 100%;
    height: auto;
}

.section-image-wrapper {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-image-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.section-image-wrapper img {
    display: block; /* UPDATED: Added display block */
}

.section-image-container {
    width: 100%;
    margin: 1.5rem 0;
}

.section-image-wrapper.text-start {
    margin-right: auto;
}

.section-image-wrapper.text-center {
    margin-left: auto;
    margin-right: auto;
}

.section-image-wrapper.text-end {
    margin-left: auto;
}

.section-image-wrapper.image-stretch {
    width: 100% !important;
    max-width: none !important;
}

.section-with-image.image-above .section-image-wrapper,
.section-with-image.image-below .section-image-wrapper {
    width: auto;
    max-width: 100%;
}

.section-with-image.wrapper-wrap.image-left .section-image-wrapper,
.section-with-image.wrapper-wrap.image-right .section-image-wrapper {
    width: auto;
}

.section-image-wrapper img[style*="object-fit: contain"] {
    background: #f5f5f5;
}

.section-image-wrapper img[style*="object-fit: none"] {
    object-position: center;
}

/* Source attribution */
.source-attribution {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-attribution i {
    color: #41a1ce;
}

.source-attribution a {
    color: #41a1ce;
    text-decoration: none;
}

.source-attribution a:hover {
    text-decoration: underline;
}

/* Related Posts */
.related-posts {
    background: #f8f9fa;
    padding: 60px 0;
}

.related-posts h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 40px;
}

.related-post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.related-post-image {
    height: 200px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-content {
    padding: 20px;
}

.related-post-date {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.related-post-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.related-post-title a {
    color: inherit;
    text-decoration: none;
}

.related-post-title a:hover {
    color: #41a1ce;
}

.related-post-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.editor-button {
    display: inline-block;
    background: #48a1c5;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    transition: .3s ease-in-out;
}

.editor-button:hover {
    background: #3a8bb5;
    transform: scale(1.05);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

/* Blog Card */
.blog-card {
    background: #f5f5f5;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.blog-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card__image {
    position: relative;
    overflow: hidden;
    height: 250px;
    border-radius: 22px;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.05);
}

.blog-card__content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card__title {
    font-size: 25px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #42a1ce;
    flex-grow: 0;
    font-family: 'Montserrat Thin', sans-serif;
}

.blog-card__date {
    font-size: 18px;
    color: black;
    margin-bottom: 28px;
    font-weight: 500;
}

.blog-card__excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 10px;
    flex: 1;
}

.blog-card__cta {
    color: #6ec1e4;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
    margin-top: auto;
}

.blog-card:hover .blog-card__cta {
    gap: 10px;
}

/* Destination CTA Section - WordPress Style */
.blog-destination-cta {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.cta-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
}

.cta-image-wrapper {
    position: relative;
    width: 100%;
    max-height: 300px;
    overflow: hidden;
}

.cta-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    object-position: 50% 40%;
    transition: transform 0.3s ease;
}

.cta-image:hover {
    transform: scale(1.1);
}

.cta-label {
    position: absolute;
    top: 35px;
    right: 35px;
    background: #48a1c5;
    color: #fff;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
}

.cta-content {
    padding: 40px;
}

.cta-content h2 {
    font-size: 26px;
    font-weight: 800;
    color: #333;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 19px;
    color: #666;
    margin-bottom: 25px;
}

.cta-button {
    display: inline-block;
    background: #48a1c5;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.3s ease-in-out;
}

.cta-button:hover {
    background: #3a8bb5;
    transform: scale(1.05);
}

@media (max-width: 991px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .blog-hero h2 {
        font-size: 1.2rem;
    }

    .section-with-image.image-left,
    .section-with-image.image-right {
        flex-direction: column;
    }

    .section-image-container {
        justify-content: center !important;
    }

    .section-image-wrapper {
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* NEW: All wrappers behave like WRAP on mobile */
    .section-with-image.wrapper-fill .section-image-wrapper,
    .section-with-image.wrapper-stretch .section-image-wrapper {
        display: block;
    }

    .section-with-image.wrapper-fill .section-image-wrapper img,
    .section-with-image.wrapper-stretch .section-image-wrapper img {
        width: 100%;
        height: auto !important;
        flex: none;
    }

    /* NEW: Reset custom dimensions on mobile */
    .section-image-wrapper img {
        width: 100% !important;
        height: auto !important;
    }

    /* NEW: Maintain object-fit behavior */
    .section-image-wrapper img[style*="object-fit: contain"] {
        object-fit: contain !important;
    }
}

@media (max-width: 768px) {
    .blog-hero-container {
        padding-bottom: 115px;
    }

    .section-with-image {
        gap: 20px; /* UPDATED: from 40px */
    }

    .section-image-container {
        margin: 1rem 0;
    }

    .section-image-wrapper {
        border-radius: 10px;
    }

    .cta-content {
        padding: 20px;
    }

    .cta-content h2 {
        font-size: 20px;
    }

    .cta-content p {
        font-size: 14px;
    }

    .cta-label {
        font-size: 12px;
    }

    .cta-button {
        font-size: 16px !important;
        padding: 10px 20px;
    }
}

@media (max-width: 575px) {
    .blog-hero {
        min-height: 400px;
    }

    .blog-hero h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .blog-meta {
        gap: 15px;
    }

    .blog-section h3 {
        font-size: 1.5rem;
    }

    .blog-content {
        padding: 40px 0;
    }

    .section-image-wrapper {
        border-radius: 8px;
    }
}

@media (min-width: 992px) {
    .blog-meta-item span, .blog-tag, .source-attribution span, .blog-section-content {
        font-size: 14px;
    }

    h3 {
        font-size: 28px !important;
    }
}