/* 
 * Wahlen im Ostallgäu - Custom CSS
 * Styles zum Erweitern von Tailwind CSS mit individuellen Design-Elementen
 */

/* ====== GRUNDLEGENDE EINSTELLUNGEN ====== */
html {
    scroll-behavior: smooth; /* Für sanftes Scrollen zu Ankerpunkten */
}

body {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11'; /* Verbesserte Zeichendarstellung */
    letter-spacing: -0.01em; /* Leicht verringerte Zeichenabstände für moderne Ästhetik */
}

/* ====== TYPOGRAFIE ====== */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* ====== ÜBERGÄNGE & ANIMATIONEN ====== */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transformationseffekte */
.transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.3s;
}

.hover\:-translate-y-1:hover {
    transform: translateY(-4px);
}

/* ====== SCHATTEN-EFFEKTE ====== */
.shadow-card {
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
}

.shadow-card-hover {
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.1), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
}

/* ====== HINTERGRUNDMUSTER ====== */
.bg-pattern {
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.bg-pattern-light {
    background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.bg-pattern-grid {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

.bg-pattern-dots {
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 15px 15px;
}

.bg-pattern-zigzag {
    background-image: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%), 
        linear-gradient(225deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%), 
        linear-gradient(315deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%), 
        linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%);
    background-size: 40px 40px;
}

/* ====== ANIMATIONEN ====== */
/* Keyframes für verschiedene Animations-Effekte */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation-Klassen */
.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scroll-Animationen */
.animate-on-scroll {
    opacity: 0;
}

/* Animation-Verzögerungen für gestaffelte Animationen */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ====== ABRUNDUNGEN ====== */
.rounded-full {
    border-radius: 9999px;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

/* ====== SPEZIALEFFEKTE ====== */
/* Glaseffekt für Karten */
.glass-card {
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Textgradienten-Effekt */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Gradienten-Rand-Effekt */
.gradient-border {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
}

.gradient-border::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.75rem;
    padding: 2px;
    background: linear-gradient(45deg, #3E43A7, #F59051);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ====== HEADER & NAVIGATION ====== */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(5px);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* ====== BILD-EFFEKTE ====== */
img.hover-effect {
    transition: transform 0.3s ease;
}

img.hover-effect:hover {
    transform: scale(1.05);
}

/* ====== BUTTON-STILE ====== */
.btn-primary {
    background-color: #3E43A7;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #32368a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(62, 67, 167, 0.2);
}

.btn-hover-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* ====== GRUPPEN-INTERAKTIONEN ====== */
.group:hover .group-hover\:rotate-6 {
    transform: rotate(6deg);
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:animate-bounce {
    animation: bounce 1s infinite;
}

/* ====== KARTEN-EFFEKTE ====== */
.election-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.1) 100%);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
}

.election-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: 0.5s;
    z-index: 1;
}

.election-card:hover::before {
    left: 100%;
}

.election-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
}

/* Aktuelle Wahl - Hover-Effekt */
#aktuelle-wahl-container > div {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    background-image: linear-gradient(135deg, rgba(245, 144, 81, 0.8) 0%, rgba(232, 123, 57, 0.9) 100%);
    box-shadow: 0 10px 20px rgba(232, 123, 57, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

#aktuelle-wahl-container > div::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

#aktuelle-wahl-container > div:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -8px rgba(232, 123, 57, 0.25);
}

/* Vergangene Wahlen - Hover-Effekt */
#vergangene-wahlen-container > div {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1), box-shadow 0.3s ease;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    background-image: linear-gradient(135deg, rgba(128, 149, 206, 0.8) 0%, rgba(90, 111, 185, 0.95) 100%);
    box-shadow: 0 8px 20px rgba(62, 67, 167, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255,255,255,0.08);
}

#vergangene-wahlen-container > div::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.07'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

#vergangene-wahlen-container > div:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -8px rgba(62, 67, 167, 0.2);
}

/* Ältere Wahlen - Hover-Effekt */
#aeltere-wahlen-container > div {
    transition: all 0.3s ease;
    backface-visibility: hidden;
    will-change: transform;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.05) 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

#aeltere-wahlen-container > div:hover {
    background-image: linear-gradient(135deg, rgba(90, 111, 185, 0.05) 0%, rgba(62, 67, 167, 0.15) 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -5px rgba(62, 67, 167, 0.15);
    border-color: rgba(62, 67, 167, 0.1);
}

.hover-active {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Fixiere Hero und Footer - keine Transformation beim Hover */
section.bg-gradient-to-br, footer {
    transform: none !important;
    transition: none !important;
}

/* ====== DETAILS/SUMMARY ELEMENTE ====== */
details {
    transition: all 0.3s ease;
    user-select: none;
}

details summary {
    cursor: pointer;
    position: relative;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary .fas {
    transition: transform 0.3s ease;
}

details[open] summary .fas {
    transform: rotate(180deg);
}

details[open] {
    margin-bottom: 1rem;
    background-color: rgba(249, 250, 251, 0.8);
}

/* ====== HILFSMITTEL ====== */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ====== BACK-TO-TOP BUTTON ====== */
#back-to-top {
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#back-to-top.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* ====== BARRIEREFREIHEIT ====== */
:focus {
    outline: 2px solid rgba(90, 111, 185, 0.5);
    outline-offset: 2px;
}

/* ====== HINTERGRUND-GRADIENTEN ====== */
.bg-gradient-blue {
    background: linear-gradient(135deg, #3E43A7, #5A6FB9);
}

.bg-blue-700 {
    background-color: #3E43A7;
}

/* ====== RESPONSIVE ANPASSUNGEN ====== */
/* Container-Breite bei großen Bildschirmen */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px !important;
    }
    
    /* Spezifischere Selektoren für Container in wichtigen Bereichen */
    #aktuelle-wahl .container,
    #vergangene-wahlen .container,
    footer .container,
    header .container {
        max-width: 1200px !important;
    }
    
    /* Tailwind-Container-Klassen überschreiben */
    .mx-auto.container {
        max-width: 1200px !important;
    }
}

/* Anpassungen für mobile Geräte */
@media (max-width: 768px) {
    .election-item {
        flex-direction: column;
    }
    
    .election-item .order-2 {
        order: 0;
    }
    
    h1, h2 {
        font-size: calc(1.5rem + 2vw);
    }
}

/* ====== WELLEN-TRENNER ====== */
.wave-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wave-divider svg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: auto;
}

.hero-decorative {
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    animation: float 5s ease-in-out infinite;
}

.hero-decorative:nth-child(odd) {
    animation-delay: 1.5s;
}

.hero-decorative:nth-child(even) {
    animation-delay: 3s;
}

.hero-decorative i {
    transform: scale(1);
    transition: transform 0.3s ease;
}

.hero-decorative:hover i {
    transform: scale(1.2);
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
} 