Files
homeproz/wp-content/themes/homeproz/template-parts/components/hero-section.scss
T
Hanson.xyz Dev 4be4edb4ad Add rotating hero image gallery for desktop breakpoint
- Add 5 new hero images to assets/images/hero-gallery/
- Create hero-section.js with image rotation (6s interval)
- Only preload/animate at >= 1450px to save mobile bandwidth
- Fade transition with slight grow effect
- Add overflow:hidden to prevent scrollbar during transition
- Images use 30% right crop via transform system

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 22:38:34 -06:00

204 lines
4.1 KiB
SCSS
Executable File

/**
* Hero Section Styles - Two Column Split Layout
*
* @package HomeProz
*/
// Two-column split hero
.hero-section--split {
display: flex;
min-height: 70vh;
max-height: 725px;
width: 100%;
@media (max-width: 768px) {
flex-direction: column;
max-height: none;
}
&.hero-section--small {
min-height: 300px;
max-height: 400px;
@media (max-width: 768px) {
max-height: none;
}
.hero-section-title {
font-size: 2.5rem;
@media (max-width: 768px) {
font-size: 2rem;
}
}
.hero-section-logo {
max-width: 280px;
margin-bottom: 1.5rem;
}
}
}
.hero-split-content {
width: 40%;
max-width: 800px;
background-color: var(--color-bg-dark);
display: flex;
align-items: center;
justify-content: center;
padding: 3rem;
@media (max-width: 1024px) {
width: 45%;
max-width: none;
padding: 2rem;
}
@media (max-width: 768px) {
width: 100%;
padding: 3rem 1.5rem;
order: 2;
}
}
.hero-split-image {
flex: 1;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
position: relative;
overflow: hidden;
@media (max-width: 768px) {
width: 100%;
flex: none;
height: 300px;
order: 1;
}
}
.hero-split-inner {
max-width: 420px;
text-align: center;
@media (max-width: 768px) {
margin: 0 auto;
}
}
.hero-section-logo {
display: block;
max-width: 320px;
height: auto;
margin: 0 auto 2rem;
@media (max-width: 768px) {
max-width: 280px;
margin-bottom: 1.5rem;
}
}
.hero-section-title {
font-family: var(--font-display);
font-size: 3rem;
color: var(--color-text);
margin-bottom: 1.25rem;
line-height: 1.1;
@media (max-width: 1024px) {
font-size: 2.5rem;
}
@media (max-width: 768px) {
font-size: 2.25rem;
margin-bottom: 1rem;
}
}
.hero-section-subtitle {
font-size: 1.125rem;
color: var(--color-text-muted);
margin-bottom: 2rem;
line-height: 1.6;
@media (max-width: 768px) {
font-size: 1rem;
margin-bottom: 1.5rem;
}
}
.hero-section-actions {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
}
// Location Search Dropdown
.hero-location-search {
margin-bottom: 2rem;
}
.hero-location-search-inner {
display: flex;
gap: 0;
background-color: var(--color-bg-card);
border-radius: 0.5rem;
overflow: hidden;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
@media (max-width: 480px) {
flex-direction: column;
}
}
.hero-location-select {
flex: 1;
padding: 0.875rem 1rem;
font-size: 1rem;
font-family: var(--font-body);
color: var(--color-text);
background-color: var(--color-bg-card);
border: none;
outline: none;
cursor: pointer;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B0B0B0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.75rem center;
padding-right: 2rem;
min-width: 180px;
&:focus {
box-shadow: inset 0 0 0 2px var(--color-accent);
}
option {
background-color: var(--color-bg-card);
color: var(--color-text);
}
@media (max-width: 480px) {
text-align: center;
background-position: right 1.5rem center;
}
}
.hero-search-btn {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.875rem 1.25rem;
border-radius: 0;
white-space: nowrap;
svg {
flex-shrink: 0;
}
@media (max-width: 480px) {
width: 100%;
justify-content: center;
}
}