Files
Steuerungstechnik/styles.css
2025-12-15 19:52:56 +01:00

670 lines
13 KiB
CSS

/* Global Styles */
:root {
--primary: #3b82f6; /* Brighter blue (was #2563eb) */
--primary-dark: #2563eb; /* Less dark blue (was #1e40af) */
--secondary: #10b981; /* Success green */
--accent: #f59e0b; /* Warning/Attention orange */
--dark: #1e293b; /* Dark slate */
--light: #f8fafc; /* Very light grey/blue */
--white: #ffffff;
--text-main: #334155;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Poppins', sans-serif;
line-height: 1.6;
color: var(--text-main);
background-color: var(--light);
scroll-behavior: smooth;
}
/* Navbar */
.navbar {
background-color: var(--white);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: var(--shadow);
position: sticky;
top: 0;
z-index: 100;
flex-wrap: wrap; /* Allow wrapping for mobile menu */
}
.menu-toggle {
display: none;
flex-direction: column;
justify-content: space-between;
width: 30px;
height: 21px;
background: none;
border: none;
cursor: pointer;
}
.menu-toggle .bar {
height: 3px;
width: 100%;
background-color: var(--primary);
border-radius: 3px;
}
.logo {
font-weight: 700;
font-size: 1.5rem;
color: var(--primary);
}
.nav-links {
list-style: none;
display: flex;
gap: 2rem;
}
.nav-links a {
text-decoration: none;
color: var(--text-main);
font-weight: 500;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary);
}
/* Hero Section */
.hero {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
color: var(--white);
padding: 6rem 2rem;
text-align: center;
border-bottom-right-radius: 50px;
border-bottom-left-radius: 50px;
}
.hero h1 {
font-size: 3.5rem;
margin-bottom: 1rem;
font-weight: 700;
}
.hero p {
font-size: 1.2rem;
opacity: 0.9;
margin-bottom: 2rem;
}
/* Buttons */
.btn {
display: inline-block;
background-color: var(--accent);
color: var(--white);
padding: 0.8rem 2rem;
border-radius: 30px;
text-decoration: none;
font-weight: 600;
transition: transform 0.2s, box-shadow 0.2s;
border: none;
cursor: pointer;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.hidden {
display: none;
}
/* Sections */
.section {
padding: 4rem 2rem;
max-width: 1200px;
margin: 0 auto;
}
.alt-bg {
background-color: #e2e8f0;
border-radius: 20px;
margin-top: 2rem;
margin-bottom: 2rem;
}
.section-title {
text-align: center;
font-size: 2.5rem;
margin-bottom: 3rem;
color: var(--dark);
position: relative;
}
.section-title::after {
content: '';
display: block;
width: 60px;
height: 4px;
background-color: var(--primary);
margin: 10px auto 0;
border-radius: 2px;
}
/* Goals Section (Green) */
.goals-list {
list-style: none;
font-size: 1.2rem;
font-weight: 500;
}
.goals-list li {
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 10px;
}
.check-icon {
color: #22c55e; /* Bright Green */
font-weight: bold;
font-size: 1.5rem;
}
.goals-container {
background: #f0fdf4; /* Very light green background */
padding: 2rem;
border-radius: 10px;
box-shadow: var(--shadow);
max-width: 800px;
margin: 0 auto;
}
/* Cards */
.card-grid {
display: flex; /* Changed from grid to flex for vertical stack */
flex-direction: column;
gap: 2rem;
max-width: 800px; /* Limit width so they don't stretch too far */
margin: 0 auto; /* Center the stack */
}
.card {
background: var(--white);
padding: 3rem; /* Bigger padding */
border-radius: 15px;
box-shadow: var(--shadow);
transition: transform 0.3s;
text-align: center;
border: 1px solid #e2e8f0; /* Slight border for definition */
}
.card:hover {
transform: translateY(-5px);
border-color: var(--primary); /* Highlight on hover */
}
.card .icon {
font-size: 4rem; /* Bigger icon */
margin-bottom: 1.5rem;
}
.card h3 {
margin-bottom: 1rem;
font-size: 2rem; /* Bigger title */
color: var(--primary-dark);
}
.card p {
font-size: 1.2rem; /* Bigger text */
line-height: 1.8;
}
/* Steps (EVA) */
.steps-container {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 1rem;
}
.step {
flex: 1;
min-width: 200px;
text-align: center;
position: relative;
background: white;
padding: 2rem;
border-radius: 15px;
box-shadow: var(--shadow);
}
.step-number {
width: 60px;
height: 60px;
background-color: var(--primary);
color: var(--white);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
font-weight: bold;
margin: 0 auto 1rem;
}
.small-text {
font-size: 0.9rem;
color: #64748b;
margin-top: 0.5rem;
}
/* Interactive Simulation (EVA Traffic Light) */
.simulation-container {
background: var(--white);
padding: 3rem;
border-radius: 15px;
box-shadow: var(--shadow);
text-align: center;
}
.circuit-diagram {
display: flex;
justify-content: center;
align-items: center;
gap: 2rem;
flex-wrap: wrap;
margin-bottom: 2rem;
}
.circuit-control, .circuit-power {
border: 3px solid #cbd5e1;
padding: 1.5rem;
border-radius: 15px;
width: 220px;
height: 300px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
background-color: #f8fafc;
}
.component-wrapper {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
.label {
font-weight: 600;
font-size: 0.9rem;
color: var(--text-main);
}
/* Button / Taster Symbol */
.sim-button {
background-color: #ef4444;
border: none;
padding: 0;
border-radius: 50%;
width: 80px;
height: 80px;
cursor: pointer;
box-shadow: 0 4px 0 #b91c1c;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.1s;
}
.sim-button:active, .sim-button.active {
transform: translateY(4px);
box-shadow: none;
}
.symbol-taster {
width: 40px;
height: 40px;
position: relative;
}
.button-head {
width: 30px;
height: 10px;
background: white;
position: absolute;
top: 15px;
left: 5px;
border-radius: 2px;
}
.line-top, .line-bottom {
width: 4px;
height: 12px;
background: white;
position: absolute;
left: 18px;
}
.line-top { top: 3px; }
.line-bottom { bottom: 3px; }
/* Logic Processing Animation */
.coil#sim-logic {
background: white;
border: 2px solid #cbd5e1;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s;
}
.coil#sim-logic.processing {
border-color: var(--accent);
background-color: #fffbeb;
box-shadow: 0 0 15px var(--accent);
animation: pulseLogic 0.5s infinite alternate;
}
@keyframes pulseLogic {
from { transform: scale(1); }
to { transform: scale(1.1); }
}
/* Traffic Light */
.traffic-light {
width: 80px;
height: 160px;
background-color: #333;
border-radius: 10px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
padding: 10px;
}
.light {
width: 50px;
height: 50px;
border-radius: 50%;
background-color: #555;
transition: background-color 0.3s, box-shadow 0.3s;
}
.light.red.active {
background-color: #ef4444;
box-shadow: 0 0 20px #ef4444;
}
.light.green.active {
background-color: #10b981;
box-shadow: 0 0 20px #10b981;
}
.circuit-arrow {
font-weight: bold;
color: var(--primary);
font-size: 1.2rem;
}
.status-text {
font-size: 1.5rem;
font-weight: bold;
color: var(--dark);
}
/* Accordion */
.accordion {
max-width: 800px;
margin: 0 auto;
}
.accordion-item {
background: var(--white);
border-radius: 8px;
margin-bottom: 1rem;
box-shadow: var(--shadow);
overflow: hidden;
}
.accordion-header {
width: 100%;
padding: 1.5rem;
text-align: left;
border: none;
background-color: #f1f5f9; /* Light grey background to make it visible */
color: #1e293b; /* Dark text explicitly */
font-weight: 600;
font-size: 1.1rem;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: background-color 0.2s;
}
.accordion-header:hover {
background-color: #e2e8f0; /* Darker on hover */
color: var(--primary); /* Blue text on hover */
}
.accordion-header:after {
content: '+';
font-size: 1.5rem;
}
.accordion-content {
padding: 0 1.5rem;
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease, padding 0.3s ease;
}
.accordion-content.open {
padding-bottom: 1.5rem;
max-height: 200px; /* Adjust based on content */
}
/* Quiz */
.quiz-container {
background: var(--white);
padding: 3rem;
border-radius: 15px;
box-shadow: var(--shadow);
max-width: 800px;
margin: 0 auto;
text-align: center;
}
.quiz-question {
font-size: 1.5rem;
margin-bottom: 2rem;
font-weight: 600;
}
.quiz-options {
display: grid;
gap: 1rem;
}
.option-btn {
padding: 1rem;
border: 2px solid #e2e8f0;
border-radius: 10px;
background: #f8fafc; /* Light background for visibility */
color: #1e293b; /* Dark text */
cursor: pointer;
font-size: 1.1rem;
transition: all 0.2s;
font-weight: 500;
}
.option-btn:hover {
background-color: #e2e8f0;
border-color: var(--primary);
color: #1e293b;
}
.option-btn.correct {
background-color: var(--secondary);
color: white;
border-color: var(--secondary);
}
.option-btn.wrong {
background-color: #ef4444;
color: white;
border-color: #ef4444;
}
.quiz-result {
margin-top: 1.5rem;
font-weight: bold;
font-size: 1.2rem;
min-height: 1.5rem;
}
/* Responsive */
@media (max-width: 768px) {
.navbar {
padding: 1rem;
}
.menu-toggle {
display: flex; /* Show hamburger on mobile */
}
.nav-links {
display: none; /* Hide default menu */
width: 100%;
position: absolute;
top: 100%;
left: 0;
background-color: var(--white);
flex-direction: column;
padding: 1rem;
box-shadow: var(--shadow);
text-align: center;
gap: 1.5rem;
}
.nav-links.active {
display: flex; /* Show when active */
}
.time-counter {
display: none; /* Hide timer on very small screens or move it */
}
.hero {
padding: 3rem 1rem;
}
.hero h1 {
font-size: 2rem;
}
.section {
padding: 2rem 1rem;
}
/* Cards - Ensure they fit on small screens */
.card {
padding: 1.5rem;
width: 100%; /* Ensure full width usage */
}
.card .icon {
font-size: 3rem;
}
.card h3 {
font-size: 1.5rem;
}
/* Simulation - Ensure it fits */
.simulation-container {
padding: 1.5rem; /* Reduce padding */
}
.circuit-diagram {
flex-direction: column;
gap: 1.5rem;
}
.circuit-arrow {
transform: rotate(90deg);
margin: 0.5rem 0;
}
.circuit-control, .circuit-power {
width: 100%;
max-width: 100%; /* Use full width */
height: auto; /* Auto height to fit content */
min-height: 250px;
}
/* Steps */
.steps-container {
flex-direction: column;
}
.step {
width: 100%;
margin-bottom: 1rem;
}
.watermark {
font-size: 0.6rem;
bottom: 10px;
right: 10px;
background-color: rgba(255, 255, 255, 0.9);
padding: 3px 8px;
}
}
/* Small Phones (iPhone SE, etc.) */
@media (max-width: 380px) {
.hero h1 {
font-size: 1.5rem;
}
.section-title {
font-size: 1.8rem;
}
.card {
padding: 1rem;
}
.circuit-control, .circuit-power {
padding: 1rem;
}
}
/* Watermark */
.watermark {
position: fixed;
bottom: 20px;
right: 20px;
background-color: rgba(255, 255, 255, 0.8);
padding: 5px 10px;
border-radius: 5px;
font-size: 0.8rem;
color: #64748b;
font-weight: 600;
pointer-events: none; /* Allows clicking through it */
z-index: 1000;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
border: 1px solid rgba(0,0,0,0.1);
}