/**
 * Homepage campaign tiles (SUREFLAP-2248)
 *
 * Full-width hero image with two linked product tiles below (50% each on
 * desktop, stacked on mobile). Applied only to stores configured in
 * application/config/homepage_campaign.php (currently en-gb); other stores
 * keep the standard freewall 5-tile layout.
 */

.homepage-campaign {
    max-width: 2000px;
    margin: 0 auto;
    width: 100%;
}

/* ---- Hero (full width, not linked) ---- */
.homepage-campaign__hero {
    display: block;
    line-height: 0; /* remove inline-image gap */
}

.homepage-campaign__hero-image {
    display: block;
    width: 100%;
    height: auto;
}

/* ---- Two product tiles below the hero ---- */
.homepage-campaign__tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.homepage-campaign__tile {
    position: relative;
    display: block;
    line-height: 0;
    overflow: hidden;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.homepage-campaign__tile:hover,
.homepage-campaign__tile:focus {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.homepage-campaign__tile:focus {
    outline: 3px solid #0099a8;
    outline-offset: 2px;
}

.homepage-campaign__tile-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Subtle bottom-centred product caption (matches campaign mockup):
   white text with a soft shadow and a gentle bottom gradient for legibility. */
.homepage-campaign__tile-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3rem 1rem 1.5rem;
    text-align: center;
    color: #fff;
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
}

/* ---- Mobile: stack hero + tiles in a single column ---- */
@media (max-width: 768px) {
    .homepage-campaign__tiles {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .homepage-campaign__tile {
        transition: none;
    }
    .homepage-campaign__tile:hover,
    .homepage-campaign__tile:focus {
        transform: none;
    }
}
