Template:Main page/header/styles.css: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 69: | Line 69: | ||
/* | /* | ||
* 3. THE ANIMATED GLOW (::before pseudo-element) | * 3. THE ANIMATED GLOW (::before pseudo-element) - NEW ANIMATION | ||
*/ | */ | ||
.citizen-search-trigger::before { | .citizen-search-trigger::before { | ||
content: ''; | content: ''; | ||
position: absolute; | position: absolute; | ||
z-index: -1; | z-index: -1; /* Keep it behind the button content */ | ||
/* Make it slightly larger than the button to create the "glow" border */ | |||
/* These values might need fine-tuning with your final button size */ | |||
top: -4px; | top: -4px; | ||
left: -4px; | left: -4px; | ||
width: calc(100% + 8px); | width: calc(100% + 8px); | ||
height: calc(100% + 8px); | height: calc(100% + 8px); | ||
background: linear-gradient(90deg, | border-radius: 9999px; /* Match the button's pill shape */ | ||
# | |||
# | /* Default (blue) glow - Using a large linear gradient to simulate conic for better compatibility */ | ||
# | background: linear-gradient( | ||
90deg, | |||
#1d2c3d 0%, /* Dark blue base */ | |||
#007bff 20%, /* Vibrant blue */ | |||
#1d2c3d 40%, /* Dark blue base */ | |||
#1d2c3d 60%, /* Dark blue base */ | |||
#007bff 80%, /* Vibrant blue */ | |||
#1d2c3d 100% /* Dark blue base */ | |||
); | ); | ||
background-size: | background-size: 200% 200%; /* Make gradient large enough to animate smoothly */ | ||
filter: blur(4px); | filter: blur(4px); /* Default blur, less intense */ | ||
animation: | |||
transition: all 0.5s ease; | /* Default animation: slow rotation */ | ||
animation: rotateGlow 15s linear infinite; /* Slower default rotation */ | |||
transition: all 0.5s ease; /* Smooth transition for hover effects */ | |||
} | } | ||
/* | /* | ||
* 4. HOVER EFFECTS | * 4. HOVER EFFECTS - UPDATED FOR NEW ANIMATION | ||
*/ | */ | ||
.citizen-search-trigger:hover { | .citizen-search-trigger:hover { | ||
background-color: #1a1a1a; | background-color: #1a1a1a; /* Darken the button on hover */ | ||
} | } | ||
.citizen-search-trigger:hover::before { | .citizen-search-trigger:hover::before { | ||
background: linear-gradient(90deg, | /* Hover (orange) glow */ | ||
# | background: linear-gradient( | ||
# | 90deg, | ||
# | #3d2c1d 0%, /* Dark orange base */ | ||
#ff8c00 20%, /* Vibrant orange */ | |||
#3d2c1d 40%, /* Dark orange base */ | |||
#3d2c1d 60%, /* Dark orange base */ | |||
#ff8c00 80%, /* Vibrant orange */ | |||
#3d2c1d 100% /* Dark orange base */ | |||
); | ); | ||
background-size: | background-size: 200% 200%; | ||
filter: blur(8px); | filter: blur(8px); /* More intense blur on hover */ | ||
animation: | |||
/* Faster animation on hover */ | |||
animation: rotateGlow 8s linear infinite; /* Faster rotation on hover */ | |||
} | } | ||
/* | /* | ||
* 5. | * 5. KEYFRAMES FOR THE NEW ROTATION ANIMATION | ||
*/ | */ | ||
@keyframes | @keyframes rotateGlow { | ||
0% { | 0% { transform: rotate(0deg); } | ||
100% { transform: rotate(360deg); } | |||
100% { | |||
} | } | ||
Revision as of 19:39, 8 November 2025
.home-header {
position: relative;
padding-top: 3.2rem;
padding-bottom: 3.2rem;
line-height: 1.1;
text-align: center;
}
.home-header__pretitle {
color: #888;
font-size: 0.9em;
letter-spacing: 0.05em;
margin: -0.8rem;
}
.home-header__title {
margin: 0;
font-size: 4.5rem;
text-transform: uppercase;
line-height: 0.9;
font-weight: 600;
}
.home-header__subtitle {
margin-top: -0.6rem;
color: #888;
font-size: 0.9em;
}
/*
* 1. STYLES FOR THE BUTTON ITSELF
* (Now with Flexbox for icon alignment)
*/
.citizen-search-trigger {
/* --- Core Setup --- */
position: relative;
z-index: 1;
/* CHANGED: Use flex to align icon and text */
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
/* ----------------- */
overflow: hidden;
padding: 12px 24px;
margin-top: 32px;
margin-left: auto;
margin-right: auto;
max-width: 600px;
/* --- Appearance --- */
background-color: #2a2a2a;
color: #eee;
border: 1px solid #555;
border-radius: 9999px;
/* --- Text --- */
font-size: 14px;
font-weight: 500;
/* text-align is no longer needed */
/* --- Other --- */
cursor: pointer;
transition: background-color 0.3s ease;
}
/*
* 3. THE ANIMATED GLOW (::before pseudo-element) - NEW ANIMATION
*/
.citizen-search-trigger::before {
content: '';
position: absolute;
z-index: -1; /* Keep it behind the button content */
/* Make it slightly larger than the button to create the "glow" border */
/* These values might need fine-tuning with your final button size */
top: -4px;
left: -4px;
width: calc(100% + 8px);
height: calc(100% + 8px);
border-radius: 9999px; /* Match the button's pill shape */
/* Default (blue) glow - Using a large linear gradient to simulate conic for better compatibility */
background: linear-gradient(
90deg,
#1d2c3d 0%, /* Dark blue base */
#007bff 20%, /* Vibrant blue */
#1d2c3d 40%, /* Dark blue base */
#1d2c3d 60%, /* Dark blue base */
#007bff 80%, /* Vibrant blue */
#1d2c3d 100% /* Dark blue base */
);
background-size: 200% 200%; /* Make gradient large enough to animate smoothly */
filter: blur(4px); /* Default blur, less intense */
/* Default animation: slow rotation */
animation: rotateGlow 15s linear infinite; /* Slower default rotation */
transition: all 0.5s ease; /* Smooth transition for hover effects */
}
/*
* 4. HOVER EFFECTS - UPDATED FOR NEW ANIMATION
*/
.citizen-search-trigger:hover {
background-color: #1a1a1a; /* Darken the button on hover */
}
.citizen-search-trigger:hover::before {
/* Hover (orange) glow */
background: linear-gradient(
90deg,
#3d2c1d 0%, /* Dark orange base */
#ff8c00 20%, /* Vibrant orange */
#3d2c1d 40%, /* Dark orange base */
#3d2c1d 60%, /* Dark orange base */
#ff8c00 80%, /* Vibrant orange */
#3d2c1d 100% /* Dark orange base */
);
background-size: 200% 200%;
filter: blur(8px); /* More intense blur on hover */
/* Faster animation on hover */
animation: rotateGlow 8s linear infinite; /* Faster rotation on hover */
}
/*
* 5. KEYFRAMES FOR THE NEW ROTATION ANIMATION
*/
@keyframes rotateGlow {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}