.hero-tiles-wrapper {
    display: grid;
    gap: 0.25rem;
    width: 100%;
    min-height: 25rem;
    max-height: 30rem;
}

@media (min-width: 768px) {
    .hero-tiles-wrapper {
        min-height: max(35rem, 45vh);
        max-height: min(45rem, 55vh);
    }
}

@media (min-width: 1024px) {
    .hero-tiles-wrapper {
        min-height: max(40rem, 50vh);
        max-height: min(50rem, 65vh);
    }
}

.hero-tile {
    position: relative;
    overflow: hidden;
    min-height: 12.5rem;
}

@media (min-width: 768px) {
    .hero-tile {
        min-height: 15rem;
    }
}

@media (min-width: 1024px) {
    .hero-tile {
        min-height: 18rem;
    }
}

.hero-tile-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform .75s cubic-bezier(.1,.2,0,1);
}

.hero-tile:hover .hero-tile-bg {
    transform: scale(1.06);
}

.hero-tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        transparent 0%, 
        transparent 50%, 
        rgba(0, 0, 0, 0.2) 80%, 
        rgba(0, 0, 0, 0.5) 100%);
    z-index: 0;
}

.hero-tile.has-background-image .hero-tile-overlay {
    background: linear-gradient(180deg, 
        transparent 0%, 
        transparent 40%, 
        rgba(0, 0, 0, 0.4) 70%, 
        rgba(0, 0, 0, 0.8) 100%);
}

.hero-tile-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    z-index: 1;
    color: white;
}

.hero-tile:not(.has-background-image) .hero-tile-content {
    bottom: 0;
}

.hero-tile:not(.has-background-image) .hero-tile-link {
    margin-top: auto;
    align-self: flex-start;
}

.hero-tile-title {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    line-height: 1.3;
    color: white;
}

.hero-tile-title a {
    color: white;
    text-decoration: none;
}

.hero-tile-title a:hover {
    text-decoration: underline;
}

.tile-description>p {
    font-size: 0.875rem;
}

.hero-tile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.hero-tile-link:hover {
    opacity: 0.9;
    text-decoration: underline;
}

.hero-tile-main .hero-tile-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.hero-tile-secondary .hero-tile-title {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.hero-tile-main .hero-tile-content {
    padding: 1.875rem;
}

.hero-tiles-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.hero-tiles-2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.hero-tiles-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.hero-tiles-3 .hero-tile-main {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.hero-tiles-4 {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.hero-tiles-4 .hero-tile-main {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.hero-tiles-4 .hero-tile:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.hero-tiles-4 .hero-tile:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

.hero-tiles-4 .hero-tile:nth-child(4) {
    grid-column: 2 / span 2;
    grid-row: 2;
}

.hero-tiles-5 {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.hero-tiles-5 .hero-tile-main {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.hero-tiles-5 .hero-tile:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.hero-tiles-5 .hero-tile:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

.hero-tiles-5 .hero-tile:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
}

.hero-tiles-5 .hero-tile:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
}

@media (max-width: 768px) {
    .hero-tiles-wrapper {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 0.75rem;
        max-height: none !important;
        min-height: auto !important;
    }
    
    .hero-tile {
        grid-column: 1 !important;
        grid-row: auto !important;
        min-height: 15rem !important;
    }
    
    .hero-tile-main .hero-tile-title {
        font-size: clamp(1.25rem, 5vw, 2rem);
    }
    
    .hero-tile-secondary .hero-tile-title {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
}

@media (max-width: 480px) {
    .hero-tile-content {
        padding: 1rem;
    }
    
    .hero-tile-main .hero-tile-content {
        padding: 1.25rem;
    }
    
    .hero-tile {
        min-height: 12.5rem !important;
    }
}