Files
homeproz/wp-content/themes/homeproz/template-parts/components/hero-section-card.scss
T
root 57b752f54e Manual property enhancements: MLS status sync, agent clone, description formatting
- Manual properties linked to MLS now inherit status (Active/Pending/Closed) and
  days_on_market from the MLS listing dynamically
- Properties not in MLS default to Closed status
- Clone feature now auto-populates listing agent by matching MLS ID to Agent CPT
- Description formatter detects embedded headers (unpunctuated text after sentences)
  and splits them into separate paragraphs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:28:44 +00:00

308 lines
6.7 KiB
SCSS
Executable File

/**
* Hero Section Styles - Card Overlay Layout (Option 1)
*
* @package HomeProz
*/
// Card overlay hero
.hero-section--card {
position: relative;
display: flex;
align-items: center;
justify-content: flex-start;
background-color: var(--color-bg-dark);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
min-height: 70vh;
max-height: 725px;
padding: 4rem 0;
@media (max-width: 768px) {
min-height: auto;
max-height: none;
padding: 3rem 0;
justify-content: center;
}
&.hero-section--small {
min-height: 300px;
max-height: 400px;
padding: 2rem 0;
.hero-section-title {
font-size: 2.25rem;
@media (max-width: 768px) {
font-size: 1.8rem;
}
}
.hero-card {
padding: 1.5rem;
}
}
}
.hero-card {
background-color: rgba(10, 10, 10, 0.85);
backdrop-filter: blur(8px);
border-radius: 1rem;
padding: 2.375rem;
width: 520px;
text-align: center;
border: 1px solid var(--color-border);
// Position box absolutely, centered by default
position: absolute;
top: 50%;
left: 50vw;
transform: translate(-50%, -50%);
@media (min-width: 1800px) {
// Above 1800px: right edge 150px left of center
// Right edge = 50vw - 150px, center = 50vw - 150px - 260px
left: calc(50vw - 410px);
}
@media (min-width: 1650px) and (max-width: 1799px) {
// 1650-1800px: transition zone, use 32vw
left: 32vw;
}
@media (min-width: 1500px) and (max-width: 1649px) {
// 1500-1650px: left edge 150px from left of page
// Left edge = 150px, center = 150px + 260px = 410px
left: 410px;
}
// Below 1500px: stays centered at 50vw (default)
@media (max-width: 768px) {
position: relative;
top: auto;
left: auto;
transform: none;
padding: 1.125rem 2.375rem; // 10px less top/bottom, 10px more left/right
margin: 0 auto;
border-radius: 0.75rem;
width: calc(100% - 2rem);
max-width: 520px;
}
}
// When inside hero-mobile-only, use flexbox centering instead of absolute
// This ensures the hero section grows to fit the card + padding
.hero-mobile-only .hero-section--card {
// Override to use flexbox centering - parent grows to fit content
min-height: max(70vh, auto);
padding: 20px 0; // 20px top + 20px bottom = 40px total buffer
justify-content: center; // Center the card horizontally
.hero-card {
position: relative;
top: auto;
left: auto;
transform: none;
max-width: 520px;
margin: 0 auto; // Ensure horizontal centering
@media (max-width: 768px) {
width: calc(100% - 2rem);
}
// Ensure top margin on medium-short viewports (700-960px)
@media (min-height: 700px) and (max-height: 960px) {
margin-top: 20px;
margin-bottom: auto;
}
// Scale down on short viewports
@media (max-height: 700px) {
transform: scale(0.9);
}
}
}
.hero-section--card .hero-section-logo {
display: block;
max-width: 360px;
height: auto;
margin: 0 auto 1.75rem;
@media (max-width: 768px) {
max-width: 280px;
margin-bottom: 1.25rem;
}
}
.hero-section--card .hero-section-title {
font-family: var(--font-display);
font-size: 2.475rem;
color: var(--color-text);
margin-bottom: 1.8125rem;
line-height: 1.1;
@media (max-width: 1450px) {
font-size: 42px;
}
@media (max-width: 768px) {
font-size: 1.6rem;
margin-bottom: 0.875rem;
}
@media (max-width: 600px) {
font-size: 1.5rem;
}
}
.hero-section--card .hero-section-subtitle {
font-size: 1rem;
color: var(--color-text-muted);
margin-bottom: 1.75rem;
line-height: 1.6;
@media (max-width: 768px) {
font-size: 0.9rem;
margin-bottom: 1.25rem;
}
@media (max-width: 650px) {
font-size: 0.775rem;
}
}
.hero-section--card .hero-section-actions {
display: flex;
flex-wrap: wrap;
gap: 0.875rem;
justify-content: center;
@media (max-width: 549px) {
flex-direction: column;
width: 100%;
.btn {
width: 100%;
justify-content: center;
}
}
}
.hero-section--card .hero-location-search {
margin-bottom: 1.75rem;
}
.hero-section--card .hero-location-search-inner {
display: flex;
gap: 0;
background-color: var(--color-bg-card);
border-radius: 0.5rem;
overflow: visible;
@media (max-width: 480px) {
flex-wrap: wrap;
}
}
.hero-section--card .hero-location-input-wrap {
flex: 1;
position: relative;
@media (max-width: 480px) {
flex: 1 1 100%;
}
}
.hero-section--card .hero-location-input {
width: 100%;
padding: 0.75rem 0.875rem;
font-size: 0.9rem;
font-family: var(--font-body);
color: var(--color-text);
background-color: var(--color-bg-card);
border: none;
outline: none;
&::placeholder {
color: var(--color-text-muted);
}
&:focus {
box-shadow: inset 0 0 0 2px var(--color-accent);
}
@media (max-width: 480px) {
text-align: center;
border-radius: 0.5rem 0.5rem 0 0;
}
&.has-error {
animation: shake-card 0.3s ease-in-out;
box-shadow: inset 0 0 0 2px var(--color-accent);
}
}
@keyframes shake-card {
0%, 100% { transform: translateX(0); }
25% { transform: translateX(-4px); }
75% { transform: translateX(4px); }
}
// Ghost text autocomplete overlay for card variant
.hero-section--card .hero-location-ghost {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
overflow: hidden;
white-space: nowrap;
display: none;
align-items: center;
box-sizing: border-box;
padding: 0.75rem 0.875rem;
font-size: 0.9rem;
font-family: var(--font-body);
line-height: 1.5;
.ghost-typed {
opacity: 0;
}
.ghost-completion {
color: var(--color-text-muted);
opacity: 0.6;
}
}
.hero-section--card .hero-location-dropdown {
font-size: 0.9rem;
}
.hero-section--card .hero-geolocation-btn {
padding: 0.75rem;
@media (max-width: 480px) {
flex: 1;
}
}
.hero-section--card .hero-search-btn {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1rem;
border-radius: 0 0.5rem 0.5rem 0;
white-space: nowrap;
font-size: 0.8rem;
@media (max-width: 480px) {
flex: 1;
justify-content: center;
border-radius: 0 0 0.5rem 0;
}
}