Hero Sections
The Siloé Perú website uses multiple hero sections to create visually striking introductions for each major section. Each hero section has a unique design that reflects the purpose and tone of its content.
Hero Section Types
The website includes four distinct hero sections:
Main Hero The primary landing section with background image, gradient overlay, and navigation buttons
Clow Hero Vibrant gradient hero for the Clown section with yellow and pink colors
Aliados Hero Partnership section hero with gradient background
Nosotros Hero About section hero with mission statement styling
Main Hero Section
The primary hero section features a background image with gradient overlay and navigation buttons.
HTML Structure
< section class = "hero" style = "background-image: linear-gradient(135deg, rgba(41, 171, 226, 0.75), rgba(255, 107, 180, 0.75)), url('./img voluntario/fondo.png'); background-size: cover; background-position: center; background-attachment: fixed;" >
< h1 > "Estuve enfermo y me visitaste" </ h1 >
< p > — Mt 25:36 — </ p >
< p > Acompañamos a niños y familias en su proceso de recuperación en el Hospital del Niño y comunidades vulnerables de Perú. </ p >
< br >
< div class = "nav-buttons" >
< button id = "btn-nosotros" class = "nav-btn nav-btn-active" >
ℹ️ Nosotros
</ button >
< button id = "btn-voluntarios" class = "nav-btn" >
👥 Voluntariado Siloé
</ button >
< button id = "btn-clow" class = "nav-btn" >
🤡 Clow de Siloé
</ button >
< button id = "btn-aliados" class = "nav-btn" >
🤝 Nuestros Aliados
</ button >
</ div >
</ section >
CSS Styling
.hero {
background-size : cover ;
background-position : center ;
background-attachment : fixed ;
height : auto ;
min-height : 70 vh ;
display : flex ;
flex-direction : column ;
justify-content : center ;
align-items : center ;
color : white ;
text-align : center ;
padding : 60 px 20 px ;
position : relative ;
}
.hero::before {
content : '' ;
position : absolute ;
inset : 0 ;
background : linear-gradient ( 135 deg , rgba ( 41 , 171 , 226 , 0.3 ), rgba ( 255 , 107 , 180 , 0.3 ));
pointer-events : none ;
z-index : 1 ;
}
.hero h1 {
font-size : 2.8 rem ;
margin-bottom : 10 px ;
font-style : italic ;
position : relative ;
z-index : 2 ;
text-shadow : 3 px 3 px 6 px rgba ( 0 , 0 , 0 , 0.4 );
}
.hero p {
font-size : 1.1 rem ;
max-width : 700 px ;
position : relative ;
z-index : 2 ;
text-shadow : 2 px 2 px 4 px rgba ( 0 , 0 , 0 , 0.3 );
}
The main hero uses background-attachment: fixed for a parallax scrolling effect.
Clow Hero Section
The Clow hero features bright, cheerful colors with a yellow-to-pink gradient.
HTML Structure
< section id = "clow" class = "clow-hero" >
< h1 > 🤡 El Clow de Siloé 🤡 </ h1 >
< p class = "clow-tagline" > La Magia de la Risa es Nuestra Medicina </ p >
< div class = "clow-intro" >
< p >
En los pasillos del Hospital del Niño, la risa es medicina. Nuestros clowns hospitalarios
transforman momentos de miedo y dolor en instantes de alegría y esperanza. Con nariz roja,
sonrisa amplia y corazón generoso, traen algo invaluable: la oportunidad de ser niño otra vez.
</ p >
< p >
No somos performers que buscan aplausos. Somos acompañantes que entienden que en el rostro
de cada niño hospitalizado hay universos de emociones. Nuestra misión es simple pero profunda:
recordarles que la vida, incluso en los momentos más difíciles, sigue siendo digna de una sonrisa.
</ p >
</ div >
</ section >
CSS Styling
.clow-hero {
background : linear-gradient ( 135 deg , var ( --amarillo-vibrante ), var ( --rosa-vibrante ));
padding : 60 px 20 px ;
text-align : center ;
color : white ;
}
.clow-hero h1 {
font-size : 3 rem ;
margin-bottom : 10 px ;
text-shadow : 2 px 2 px 4 px rgba ( 0 , 0 , 0 , 0.3 );
}
.clow-tagline {
font-size : 1.3 rem ;
font-weight : bold ;
margin-bottom : 40 px ;
text-shadow : 1 px 1 px 3 px rgba ( 0 , 0 , 0 , 0.2 );
}
.clow-intro {
max-width : 900 px ;
margin : 0 auto ;
font-size : 1 rem ;
line-height : 1.8 ;
text-shadow : 1 px 1 px 2 px rgba ( 0 , 0 , 0 , 0.1 );
}
.clow-intro p {
margin : 15 px 0 ;
}
Aliados Hero Section
The partners/allies hero section uses a gradient background without an image.
HTML Structure
< section class = "aliados-hero" style = "background: linear-gradient(135deg, rgba(41, 171, 226, 0.75), rgba(255, 107, 180, 0.75)); padding: 60px 20px; text-align: center; color: white;" >
< h1 > 🤝 Nuestros Aliados </ h1 >
< p > Instituciones comprometidas con transformar vidas a través de la solidaridad y el voluntariado. </ p >
< p style = "font-style: italic; margin-top: 20px;" > Juntos, hacemos la diferencia </ p >
</ section >
CSS Styling
.aliados-hero {
background : linear-gradient ( 135 deg , rgba ( 41 , 171 , 226 , 0.75 ), rgba ( 255 , 107 , 180 , 0.75 ));
color : white ;
}
.aliados-hero h1 {
font-size : 3 rem ;
margin-bottom : 10 px ;
text-shadow : 2 px 2 px 4 px rgba ( 0 , 0 , 0 , 0.3 );
}
.aliados-hero p {
font-size : 1.1 rem ;
text-shadow : 1 px 1 px 3 px rgba ( 0 , 0 , 0 , 0.2 );
}
Nosotros Hero Section
The About section hero with mission-focused messaging.
HTML Structure
< section class = "nosotros-hero" style = "background: linear-gradient(135deg, rgba(41, 171, 226, 0.8), rgba(255, 107, 180, 0.8)); padding: 80px 20px; text-align: center; color: white;" >
< h1 style = "font-size: 3.5rem; margin-bottom: 20px; text-shadow: 2px 2px 6px rgba(0,0,0,0.3);" > Sobre Siloé </ h1 >
< p style = "font-size: 1.3rem; max-width: 700px; margin: 0 auto; text-shadow: 1px 1px 3px rgba(0,0,0,0.2);" > "Transformamos el dolor en esperanza a través de la solidaridad y el acompañamiento" </ p >
</ section >
CSS Styling
The Nosotros hero uses inline styles but can be extracted to CSS:
.nosotros-hero {
background : linear-gradient ( 135 deg , rgba ( 41 , 171 , 226 , 0.8 ), rgba ( 255 , 107 , 180 , 0.8 ));
padding : 80 px 20 px ;
text-align : center ;
color : white ;
}
.nosotros-hero h1 {
font-size : 3.5 rem ;
margin-bottom : 20 px ;
text-shadow : 2 px 2 px 6 px rgba ( 0 , 0 , 0 , 0.3 );
}
.nosotros-hero p {
font-size : 1.3 rem ;
max-width : 700 px ;
margin : 0 auto ;
text-shadow : 1 px 1 px 3 px rgba ( 0 , 0 , 0 , 0.2 );
}
CSS Variables Used
All hero sections use consistent color variables:
:root {
--azul-siloe : #29abe2 ; /* Blue */
--amarillo-vibrante : #FFD700 ; /* Yellow */
--rosa-vibrante : #FF69B4 ; /* Pink */
}
Responsive Design
Desktop (Default)
Tablet/Mobile (768px)
.hero h1 { font-size : 2.8 rem ; }
.clow-hero h1 { font-size : 3 rem ; }
.nosotros-hero h1 { font-size : 3.5 rem ; }
.aliados-hero h1 { font-size : 3 rem ; }
@media ( max-width : 768 px ) {
.hero h1 {
font-size : 1.8 rem ;
}
.clow-hero h1 {
font-size : 2 rem ;
}
.aliados-hero h1 {
font-size : 2 rem ;
}
}
Creating a Custom Hero
Choose your style
Decide between:
Image + gradient overlay (like main hero)
Gradient only (like clow/aliados/nosotros)
Create the HTML structure
< section class = "custom-hero" style = "background-image: linear-gradient(135deg, rgba(41, 171, 226, 0.75), rgba(255, 107, 180, 0.75)), url('./img/background.jpg'); background-size: cover; background-position: center;" >
< h1 > Your Title </ h1 >
< p > Your subtitle or description </ p >
</ section >
Add CSS styling
.custom-hero {
min-height : 70 vh ;
display : flex ;
flex-direction : column ;
justify-content : center ;
align-items : center ;
color : white ;
text-align : center ;
padding : 60 px 20 px ;
}
.custom-hero h1 {
font-size : 3 rem ;
text-shadow : 2 px 2 px 4 px rgba ( 0 , 0 , 0 , 0.3 );
}
Make it responsive
@media ( max-width : 768 px ) {
.custom-hero h1 {
font-size : 2 rem ;
}
}
Customization Options
Background Gradients
Blue to Pink
Yellow to Pink
Custom Colors
background: linear-gradient(135deg, rgba(41, 171, 226, 0 .75 ), rgba(255, 107, 180, 0 .75 ));
Text Shadows
/* Subtle shadow */
text-shadow : 1px 1px 3px rgba(0, 0, 0, 0 .2 );
/* Medium shadow */
text-shadow : 2px 2px 4px rgba(0, 0, 0, 0 .3 );
/* Strong shadow */
text-shadow : 3px 3px 6px rgba(0, 0, 0, 0 .4 );
Padding Options
/* Compact hero */
padding: 40px 20px;
/* Standard hero */
padding: 60px 20px;
/* Spacious hero */
padding: 80px 20px;
Best Practices
Use high-quality images : For image-based heroes, ensure images are at least 1920px wide
Maintain contrast : Ensure text is readable against backgrounds (use text-shadow)
Consistent gradients : Use the CSS variables for brand consistency
Mobile-first : Test all hero sections on mobile devices
Accessibility : Ensure sufficient color contrast (WCAG AA standards)
Performance : Optimize background images (compress, use WebP format)
All hero sections use color: white for text. If using a light background, adjust text color accordingly.
Common Patterns
Hero with Overlay
< section class = "hero" style = "background-image: linear-gradient(135deg, rgba(41, 171, 226, 0.75), rgba(255, 107, 180, 0.75)), url('./img/background.jpg');" >
<!-- Content -->
</ section >
Hero with ::before Overlay
.hero::before {
content : '' ;
position : absolute ;
inset : 0 ;
background : linear-gradient ( 135 deg , rgba ( 41 , 171 , 226 , 0.3 ), rgba ( 255 , 107 , 180 , 0.3 ));
pointer-events : none ;
z-index : 1 ;
}
Hero with Parallax
.hero {
background-attachment : fixed ;
background-size : cover ;
background-position : center ;
}