catcrafts.net/styles/styles.css

435 lines
7.5 KiB
CSS
Raw Normal View History

2025-11-12 21:24:23 +01:00
/* Modern CSS for catcrafts.net */
/* Base styles */
:root {
--primary-color: #4361ee;
--secondary-color: #3a0ca0;
--accent-color: #f72585;
--light-color: #f8f9fa;
--dark-color: #212529;
--success-color: #4cc9f0;
--border-radius: 12px;
--box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
--transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: var(--dark-color);
background: linear-gradient(135deg, #f5f7ff 0%, #e6e9ff 100%);
min-height: 100vh;
display: flex;
flex-direction: column;
font-size: 16px;
}
/* Header and Navigation */
header {
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
color: white;
padding: 1rem 0;
box-shadow: var(--box-shadow);
position: sticky;
top: 0;
z-index: 100;
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.nav-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.8rem;
font-weight: 700;
text-decoration: none;
color: white;
display: flex;
align-items: center;
gap: 0.5rem;
transition: var(--transition);
}
.logo:hover {
opacity: 0.9;
transform: scale(1.05);
}
nav ul {
display: flex;
list-style: none;
gap: 1.5rem;
}
nav a {
color: white;
text-decoration: none;
font-weight: 500;
padding: 0.5rem 1rem;
border-radius: var(--border-radius);
transition: var(--transition);
position: relative;
overflow: hidden;
}
nav a:hover,
nav a.active {
background-color: rgba(255, 255, 255, 0.2);
}
/* Add underline effect for active nav items */
nav a::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 2px;
background-color: var(--accent-color);
transition: var(--transition);
transform: translateX(-50%);
}
nav a:hover::after,
nav a.active::after {
width: 80%;
}
/* Main Content */
main {
flex: 1;
max-width: 1200px;
margin: 2rem auto;
padding: 0 1.5rem;
}
.hero {
text-align: center;
padding: 3rem 2rem;
margin-bottom: 2rem;
background: linear-gradient(135deg, #e0f7fa, #bbdefb);
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
border: 1px solid rgba(255, 255, 255, 0.5);
animation: fadeInUp 0.8s ease-out;
}
.hero h1 {
font-size: 2.8rem;
margin-bottom: 1rem;
color: var(--secondary-color);
background: linear-gradient(to right, var(--primary-color), var(--accent-color));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.hero p {
font-size: 1.3rem;
max-width: 600px;
margin: 0 auto 1.5rem;
color: var(--dark-color);
font-weight: 300;
}
/* Blog Posts */
.blog-posts {
display: grid;
gap: 2rem;
margin-top: 2rem;
}
.post {
background: white;
border-radius: var(--border-radius);
padding: 2rem;
box-shadow: var(--box-shadow);
transition: var(--transition);
border-left: 4px solid var(--primary-color);
animation: fadeIn 0.6s ease-out forwards;
opacity: 0;
transform: translateY(20px);
animation-fill-mode: forwards;
}
.post:nth-child(1) { animation-delay: 0.1s; }
.post:nth-child(2) { animation-delay: 0.2s; }
.post:nth-child(3) { animation-delay: 0.3s; }
.post:hover {
transform: translateY(-5px);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.post-header {
margin-bottom: 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
.post-title {
font-size: 1.8rem;
color: var(--secondary-color);
margin-bottom: 0.5rem;
flex: 1;
}
.post-date {
color: var(--accent-color);
font-weight: 600;
background-color: rgba(247, 37, 133, 0.1);
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.9rem;
white-space: nowrap;
}
.post-content {
font-size: 1.1rem;
line-height: 1.8;
color: #333;
animation: fadeIn 0.6s ease-out 0.2s forwards;
opacity: 0;
}
.post-content p {
margin-bottom: 1.2rem;
}
.post-content a {
color: var(--primary-color);
text-decoration: none;
font-weight: 600;
transition: var(--transition);
}
.post-content a:hover {
text-decoration: underline;
color: var(--secondary-color);
}
.post-content ul {
margin-left: 1.5rem;
margin-bottom: 1.2rem;
}
.post-content li {
margin-bottom: 0.5rem;
}
/* Footer */
footer {
background-color: var(--dark-color);
color: white;
text-align: center;
padding: 2rem;
margin-top: auto;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-content {
max-width: 1200px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 1rem;
}
.footer-links a {
color: #4cc9f0;
text-decoration: none;
transition: var(--transition);
display: inline-block;
padding: 0.25rem 0.5rem;
border-radius: 4px;
}
.footer-links a:hover {
background-color: rgba(255, 255, 255, 0.1);
text-decoration: underline;
}
/* Responsive Design */
@media (max-width: 768px) {
.nav-container {
flex-direction: column;
gap: 1rem;
}
nav ul {
gap: 0.5rem;
flex-wrap: wrap;
justify-content: center;
}
.hero h1 {
font-size: 2.2rem;
}
.hero p {
font-size: 1.1rem;
}
.post {
padding: 1.5rem;
}
.post-title {
font-size: 1.5rem;
}
.post-header {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
}
.post-content {
font-size: 1rem;
}
}
@media (max-width: 480px) {
main {
margin: 1rem auto;
}
.hero {
padding: 2rem 1rem;
}
.hero h1 {
font-size: 1.8rem;
}
.post {
padding: 1rem;
}
.post-title {
font-size: 1.3rem;
}
.post-date {
padding: 0.3rem 0.8rem;
font-size: 0.8rem;
}
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Button styles */
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
background-color: var(--primary-color);
color: white;
text-decoration: none;
border-radius: var(--border-radius);
font-weight: 600;
transition: var(--transition);
border: none;
cursor: pointer;
text-align: center;
box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}
.btn:hover {
background-color: var(--secondary-color);
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}
/* Code blocks styling */
.post-content pre {
background-color: #2d2d2d;
color: #f8f8f2;
padding: 1rem;
border-radius: var(--border-radius);
overflow-x: auto;
margin: 1rem 0;
font-size: 0.9rem;
line-height: 1.5;
}
.post-content code {
background-color: #f0f0f0;
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-family: 'Courier New', monospace;
font-size: 0.9em;
}
/* Card hover effect */
.post {
position: relative;
overflow: hidden;
}
.post::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.5s;
}
.post:hover::before {
left: 100%;
}
/* Scrollbar styling */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: var(--primary-color);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--secondary-color);
}