css optimierungen

This commit is contained in:
2025-11-11 11:27:35 +01:00
parent 27e184b89d
commit 55562f59d4
2 changed files with 50 additions and 54 deletions

View File

@@ -30,16 +30,20 @@
box-shadow:
0 0 25px color-mix(in srgb, var(--ci-gold) 40%, transparent),
inset 0 0 10px rgba(255, 255, 255, 0.4);
width: clamp(320px, 94vw, 1600px); /* Default für sehr kleine Geräte */
/* Dynamisch skalierendes Layout */
width: min(90vw, 1800px);
max-height: 90vh;
overflow-y: auto;
overflow-x: hidden;
padding: clamp(1.5rem, 2vw, 3rem);
color: #333;
text-align: center;
animation: popIn 0.35s ease;
position: relative;
backdrop-filter: blur(3px);
transition: width 0.3s ease, padding 0.3s ease;
animation: popIn 0.35s ease;
box-sizing: border-box;
}
/* === Inhalt === */
@@ -48,6 +52,36 @@
font-family: "Bratonien2025", cursive;
font-size: clamp(1rem, 1.2vw, 1.5rem);
line-height: 1.6;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
align-items: center;
justify-items: center;
gap: clamp(1rem, 2vw, 3rem);
}
/* === Medien (Video, Bild etc.) === */
#popup-content video,
#popup-content img {
max-width: 100%;
height: auto;
display: block;
border-radius: 8px;
background: #000;
object-fit: contain;
}
/* === Titel & Text === */
#popup-content h2 {
font-size: clamp(1.4rem, 2vw, 2.6rem);
color: var(--ci-darkgreen);
margin-bottom: 1rem;
}
#popup-content p {
font-size: clamp(1rem, 1.1vw, 1.4rem);
line-height: 1.6;
color: #333;
max-width: 65ch;
}
/* === Close-Button === */
@@ -57,10 +91,11 @@
right: 16px;
background: transparent;
border: none;
font-size: 2rem;
font-size: clamp(1.8rem, 2vw, 2.4rem);
color: var(--ci-gold);
cursor: pointer;
transition: transform 0.2s ease, color 0.2s ease;
z-index: 10;
}
#popup-close:hover {
@@ -79,57 +114,17 @@
100% { transform: scale(1); opacity: 1; }
}
/* === Geräteoptimierungen === */
/* Smartphones bis 600 px */
@media (max-width: 600px) {
/* === Geräteübergreifende Anpassung === */
@media (max-height: 600px) {
#popup-box {
width: 94vw;
padding: 1.4rem;
font-size: 1rem;
}
#popup-close {
font-size: 1.6rem;
max-height: 85vh;
padding: 1rem;
}
}
/* Kleine Tablets (600899 px) */
@media (min-width: 601px) and (max-width: 899px) {
#popup-box {
width: 90vw;
padding: 1.6rem;
}
}
/* Tablets & kleine Laptops (9001279 px) */
@media (min-width: 900px) and (max-width: 1279px) {
#popup-box {
width: 85vw;
padding: 2rem;
}
}
/* Standard-Laptops & Desktops (12801599 px) */
@media (min-width: 1280px) and (max-width: 1599px) {
#popup-box {
width: 80vw;
padding: 2.2rem 3rem;
}
}
/* Große Monitore (16001919 px) */
@media (min-width: 1600px) and (max-width: 1919px) {
#popup-box {
width: 75vw;
padding: 2.5rem 3.5rem;
}
}
/* 4K und Ultrawide (≥1920 px) */
@media (min-width: 1920px) {
#popup-box {
width: 70vw;
max-width: 1800px;
padding: 3rem 4rem;
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0s !important;
transition: none !important;
}
}

View File

@@ -17,9 +17,10 @@
html, body {
margin: 0;
padding: 0;
height: 100dvh;
width: 100vw;
overflow: hidden;
min-height: 100dvh;
width: 100%;
overflow-x: hidden; /* horizontales Scrollen verhindern, vertikal zulassen */
overflow-y: auto;
font-family: sans-serif;
color: var(--ci-creamwhite);
background: linear-gradient(180deg, var(--ci-darkgreen), var(--ci-blue));