/* Image Text Component Styles */
/* Mobile-first approach */

.image-text {
    padding: var(--spacing-2xl) 0;
}

.image-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    align-items: center;
}

.image-text-image {
    width: 100%;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-card-mobile);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
    /* Background image has no intrinsic height; give it one until the grid layout stretches it */
    aspect-ratio: 4 / 3;
}

.image-text-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.image-text-title {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-normal);
    color: var(--color-text);
    margin: 0 0 var(--spacing-md);
    font-variation-settings: var(--font-variation-settings);
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Heading level sizes - Mobile */
.image-text-title-h1 {
    font-size: var(--font-size-h1-mobile);
    line-height: var(--line-height-h1-mobile);
}

.image-text-title-h2 {
    font-size: var(--font-size-h2-mobile);
    line-height: var(--line-height-h2-mobile);
}

.image-text-title-h3 {
    font-size: var(--font-size-h3-mobile);
    line-height: var(--line-height-h3-mobile);
}

.image-text-title-h4 {
    font-size: var(--font-size-h4);
    line-height: var(--line-height-h4);
}

.image-text-title-h5 {
    font-size: var(--font-size-h5);
    line-height: var(--line-height-h5);
}

.image-text-text {
    font-family: var(--font-family-body);
    font-size: var(--font-size-body-mobile);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-body-mobile);
    color: var(--color-secondary);
}

.image-text-text p {
    margin: 0 0 var(--spacing-md);
}

.image-text-text p:last-child {
    margin-bottom: 0;
}

.image-text-text ul {
    list-style: disc;
    margin: 0 0 var(--spacing-md);
    padding-left: 1.25em;
}

.image-text-text ul:last-child {
    margin-bottom: 0;
}

.image-text-text li {
    margin-bottom: var(--spacing-sm);
}

.image-text-text li:last-child {
    margin-bottom: 0;
}

.image-text-text li::marker {
    color: var(--color-primary);
}

/* Tablet (768px+) */
@media (min-width: 768px) {
    .image-text-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
        align-items: stretch;
    }
    
    .image-text-image {
        width: 100%;
        border-radius: var(--radius-card);
        height: 100%;
        min-height: 0;
        aspect-ratio: auto;
    }
    
    .image-text-content {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .image-text-title-h1 {
        font-size: var(--font-size-h1-tablet);
        line-height: var(--line-height-h1-tablet);
    }
    
    .image-text-title-h2 {
        font-size: var(--font-size-h2-tablet);
        line-height: var(--line-height-h2-tablet);
    }
    
    .image-text-title-h3 {
        font-size: var(--font-size-h3);
        line-height: var(--line-height-h3);
    }
    
    .image-text-text {
        font-size: var(--font-size-body);
        line-height: var(--line-height-body);
    }
    
    /* Reverse layout */
    .image-text-reverse .image-text-wrapper {
        flex-direction: row-reverse;
    }
}

/* Desktop (1200px+) */
@media (min-width: 1200px) {
    .image-text-title-h1 {
        font-size: var(--font-size-h1);
        line-height: var(--line-height-h1);
    }
    
    .image-text-title-h2 {
        font-size: var(--font-size-h2);
        line-height: var(--line-height-h2);
    }
}

