Template:Main page/header/styles.css: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 31: | Line 31: | ||
/* | /* | ||
* 1. STYLES FOR THE BUTTON ITSELF | * 1. STYLES FOR THE BUTTON ITSELF | ||
* ( | * (Now with Flexbox for icon alignment) | ||
*/ | */ | ||
.citizen-search-trigger { | .citizen-search-trigger { | ||
/* --- Core Setup --- */ | /* --- Core Setup --- */ | ||
position: relative; | position: relative; | ||
z-index: 1; | |||
z-index: 1; | /* CHANGED: Use flex to align icon and text */ | ||
/* | display: flex; | ||
display: | align-items: center; | ||
justify-content: center; | |||
/* ----------------- */ | |||
overflow: hidden; | |||
/* --- | |||
padding: 12px 24px; | padding: 12px 24px; | ||
margin-top: 32px; | |||
margin-top: 32px; | |||
margin-left: auto; | margin-left: auto; | ||
margin-right: auto; | margin-right: auto; | ||
max-width: 600px; | max-width: 600px; | ||
/* --- Appearance | /* --- Appearance --- */ | ||
background-color: #2a2a2a; | |||
background-color: #2a2a2a; | color: #eee; | ||
color: #eee; | |||
border: 1px solid #555; | border: 1px solid #555; | ||
border-radius: 9999px; | |||
border-radius: 9999px; | |||
/* --- Text | /* --- Text --- */ | ||
font-size: 14px; | font-size: 14px; | ||
font-weight: 500; | font-weight: 500; | ||
text-align | /* text-align is no longer needed */ | ||
/* --- Other --- */ | /* --- Other --- */ | ||
cursor: pointer; | cursor: pointer; | ||
transition: background-color 0.3s ease; | transition: background-color 0.3s ease; | ||
} | } | ||
/* | /* | ||
* 2. THE ANIMATED GLOW (::before pseudo-element) | * 2. (NEW) STYLES FOR THE ICON | ||
*/ | |||
.citizen-search-trigger-icon { | |||
/* The mw-ui-icon class uses 'background-color' for its image */ | |||
background-color: #eee; /* Match the text color */ | |||
/* Space between icon and text */ | |||
margin-right: 8px; | |||
/* Opacity from your example CSS */ | |||
opacity: 0.8; | |||
/* Smooth transition for hover */ | |||
transition: all 0.3s ease; | |||
} | |||
.citizen-search-trigger:hover .citizen-search-trigger-icon { | |||
background-color: #fff; /* Brighter on hover */ | |||
opacity: 1; | |||
} | |||
/* | |||
* 3. THE ANIMATED GLOW (::before pseudo-element) | |||
* (This is unchanged from before) | |||
*/ | */ | ||
.citizen-search-trigger::before { | .citizen-search-trigger::before { | ||
content: ''; | content: ''; | ||
position: absolute; | position: absolute; | ||
z-index: -1; | |||
z-index: -1; | |||
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, | background: linear-gradient(90deg, | ||
#87bfdb, #77abC8, #6797b5, #577f9d, #476684, #43668a, | #87bfdb, #77abC8, #6797b5, #577f9d, #476684, #43668a, | ||
#3e668f, #304a66, # | #3e668f, #304a66, #212d3d, #304a66, #3e668f, #43668a, | ||
#476684, #577f9d, #6797b5, #77abC8, #87bfdb | #476684, #577f9d, #6797b5, #77abC8, #87bfdb | ||
); | ); | ||
background-size: 400% 400%; | background-size: 400% 400%; | ||
filter: blur(4px); | filter: blur(4px); | ||
animation: moveGradient 10s linear infinite; | animation: moveGradient 10s linear infinite; | ||
transition: all 0.5s ease; | transition: all 0.5s ease; | ||
} | } | ||
/* | /* | ||
* | * 4. HOVER EFFECTS | ||
* (This is unchanged from before) | |||
*/ | */ | ||
.citizen-search-trigger:hover { | .citizen-search-trigger:hover { | ||
background-color: #1a1a1a; | |||
background-color: #1a1a1a; | |||
} | } | ||
.citizen-search-trigger:hover::before { | .citizen-search-trigger:hover::before { | ||
background: linear-gradient(90deg, | background: linear-gradient(90deg, | ||
#120d0e, #321d13, #512d19, #713d1e, #90571d, #b0701b, | #120d0e, #321d13, #512d19, #713d1e, #90571d, #b0701b, | ||
| Line 127: | Line 125: | ||
); | ); | ||
background-size: 400% 400%; | background-size: 400% 400%; | ||
filter: blur(8px); | filter: blur(8px); | ||
animation: moveGradient 5s linear infinite; | animation: moveGradient 5s linear infinite; | ||
} | } | ||
/* | /* | ||
* | * 5. THE KEYFRAMES FOR THE ANIMATION | ||
* ( | * (This is unchanged from before) | ||
*/ | */ | ||
@keyframes moveGradient { | @keyframes moveGradient { | ||
Revision as of 16:54, 8 November 2025
.home-header {
position: relative;
padding-top: 3.5rem;
padding-bottom: 3.5rem;
line-height: 1.1;
text-align: center;
}
.home-header__pretitle {
margin-bottom: 0.25rem;
color: #888;
font-size: 0.9em;
letter-spacing: 0.05em;
}
.home-header__title {
margin: 0;
font-size: 3.5rem;
text-transform: uppercase;
line-height: 0.9;
font-weight: 600;
}
.home-header__subtitle {
margin-top: 0.25rem;
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;
/* ----------------- */
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;
}
/*
* 2. (NEW) STYLES FOR THE ICON
*/
.citizen-search-trigger-icon {
/* The mw-ui-icon class uses 'background-color' for its image */
background-color: #eee; /* Match the text color */
/* Space between icon and text */
margin-right: 8px;
/* Opacity from your example CSS */
opacity: 0.8;
/* Smooth transition for hover */
transition: all 0.3s ease;
}
.citizen-search-trigger:hover .citizen-search-trigger-icon {
background-color: #fff; /* Brighter on hover */
opacity: 1;
}
/*
* 3. THE ANIMATED GLOW (::before pseudo-element)
* (This is unchanged from before)
*/
.citizen-search-trigger::before {
content: '';
position: absolute;
z-index: -1;
top: -4px;
left: -4px;
width: calc(100% + 8px);
height: calc(100% + 8px);
background: linear-gradient(90deg,
#87bfdb, #77abC8, #6797b5, #577f9d, #476684, #43668a,
#3e668f, #304a66, #212d3d, #304a66, #3e668f, #43668a,
#476684, #577f9d, #6797b5, #77abC8, #87bfdb
);
background-size: 400% 400%;
filter: blur(4px);
animation: moveGradient 10s linear infinite;
transition: all 0.5s ease;
}
/*
* 4. HOVER EFFECTS
* (This is unchanged from before)
*/
.citizen-search-trigger:hover {
background-color: #1a1a1a;
}
.citizen-search-trigger:hover::before {
background: linear-gradient(90deg,
#120d0e, #321d13, #512d19, #713d1e, #90571d, #b0701b,
#cf8a1a, #de9822, #eeA529, #fdb331, #eeA529, #de9822,
#cf8a1a, #b0701b, #90571d, #713d1e, #512d19, #321d13, #120d0e
);
background-size: 400% 400%;
filter: blur(8px);
animation: moveGradient 5s linear infinite;
}
/*
* 5. THE KEYFRAMES FOR THE ANIMATION
* (This is unchanged from before)
*/
@keyframes moveGradient {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}