/* ============================================
   EMERGENCY SERVICES DESIGN SYSTEM
   Notstrom & Energieversorgung
   ============================================ */

:root {
    /* Hauptfarben - Kräftig und Professionell */
    --emergency-red: #DC2626;
    --police-blue: #1E40AF;
    --rescue-green: #059669;
    --warning-yellow: #F59E0B;
    --fire-orange: #EA580C;
    
    /* Akzentfarben */
    --accent-cyan: #06B6D4;
    --accent-purple: #7C3AED;
    
    /* Neutrale Farben */
    --dark: #0F172A;
    --dark-blue: #1E293B;
    --gray: #64748B;
    --light-gray: #F1F5F9;
    --white: #FFFFFF;
    
    /* Gradients */
    --gradient-red: linear-gradient(135deg, #DC2626, #EF4444);
    --gradient-blue: linear-gradient(135deg, #1E40AF, #3B82F6);
    --gradient-green: linear-gradient(135deg, #059669, #10B981);
    --gradient-dark: linear-gradient(135deg, #0F172A, #1E293B);
    
    /* Schatten */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   EMERGENCY BAR - 24/7 Hotline
   ============================================ */

.emergency-bar {
    background: var(--gradient-red);
    color: white;
    padding: 12px 0;
    font-weight: 500;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.emergency-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.pulse-indicator {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.separator {
    opacity: 0.7;
}

/* ============================================
   NAVIGATION
   ============================================ */

.main-nav {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 48px;
    z-index: 999;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-red);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: var(--shadow-lg);
    animation: rotate 20s linear infinite;
}

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

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: 'Rajdhani', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
}

.logo-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--emergency-red);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-menu a {
    padding: 12px 24px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--gradient-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-emergency {
    background: var(--gradient-red);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-emergency:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-primary {
    background: var(--gradient-blue);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: var(--gradient-green);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-white {
    background: white;
    color: var(--dark);
    box-shadow: var(--shadow-lg);
}

.btn-white:hover {
    background: var(--light-gray);
    transform: translateY(-3px);
}

.btn-lg {
    padding: 16px 48px;
    font-size: 17px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9)),
        url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    background-size: cover, 100px 100px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, transparent, var(--dark) 80%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 80px 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 32px;
    letter-spacing: 1px;
}

.badge-icon {
    font-size: 20px;
}

.hero-title {
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.title-highlight {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    text-align: center;
    font-size: 20px;
    max-width: 700px;
    margin-bottom: 48px;
    opacity: 0.9;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 64px;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    max-width: 600px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 48px;
    font-weight: 700;
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    margin-top: 8px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
    padding: 120px 0;
    background: var(--light-gray);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-badge {
    display: inline-block;
    background: var(--gradient-red);
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.section-header p {
    font-size: 18px;
    color: var(--gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    border-top: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-card:nth-child(1) { border-top-color: var(--emergency-red); }
.feature-card:nth-child(2) { border-top-color: var(--police-blue); }
.feature-card:nth-child(3) { border-top-color: var(--rescue-green); }
.feature-card:nth-child(4) { border-top-color: var(--warning-yellow); }

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 24px;
}

.feature-red { background: linear-gradient(135deg, #FEE2E2, #FECACA); }
.feature-blue { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); }
.feature-green { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); }
.feature-yellow { background: linear-gradient(135deg, #FEF3C7, #FDE68A); }

.feature-card h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.feature-card p {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 8px 0;
    color: var(--dark);
    font-weight: 500;
}

/* ============================================
   NEWS SECTION
   ============================================ */

.news-section {
    padding: 120px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.news-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-date {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gradient-red);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
}

.news-content {
    padding: 32px;
}

.news-content h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark);
}

.news-content p {
    color: var(--gray);
    margin-bottom: 24px;
    line-height: 1.7;
}

.news-link {
    display: inline-flex;
    align-items: center;
    color: var(--emergency-red);
    text-decoration: none;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.news-link:hover {
    transform: translateX(8px);
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    background: var(--gradient-dark);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="2" cy="2" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

.cta-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    flex-wrap: wrap;
}

.cta-text {
    color: white;
}

.cta-text h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.cta-text p {
    font-size: 18px;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--dark);
    color: white;
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-col h4 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
    transform: translateX(4px);
    display: inline-block;
}

.footer-emergency {
    background: rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--emergency-red);
}

.emergency-phone {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: var(--emergency-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.footer-emergency p {
    opacity: 0.7;
    font-size: 14px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 56px;
    }
    
    .nav-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 42px;
    }
    
    .hero-subtitle {
        text-align: center;
    font-size: 16px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .section-header h2 {
        font-size: 36px;
    }
    
    .cta-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-actions {
        justify-content: center;
    }
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Search Bar */
.search-container {
    position: relative;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    padding: 10px 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    min-width: 250px;
}

.search-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-input:focus {
    outline: none;
    border-color: white;
    background: rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 70px);
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s ease;
        box-shadow: 4px 0 12px rgba(0,0,0,0.3);
        z-index: 1000;
    }
    
    .nav-menu.mobile-active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
        margin: 8px 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 12px 16px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .nav-menu a:hover {
        background: rgba(220, 38, 38, 0.2);
    }
    
    .search-input {
        min-width: auto;
        width: 100%;
    }
}

/* ========================================
   PARTNER SLIDER
   ======================================== */

.partners-slider-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.partners-slider {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.partners-track {
    display: flex;
    gap: 40px;
    transition: transform 0.5s ease;
    align-items: center;
}

.partner-item {
    min-width: calc((100% - 280px) / 8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 120px;
}

.partner-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.partner-item img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.partner-link {
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow {
    background: white;
    border: 2px solid #E2E8F0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #0F172A;
}

.slider-arrow:hover {
    background: #DC2626;
    border-color: #DC2626;
    color: white;
    transform: scale(1.1);
}

.slider-arrow:active {
    transform: scale(0.95);
}

.slider-arrow svg {
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 1200px) {
    .partner-item {
        min-width: calc((100% - 180px) / 6);
    }
}

@media (max-width: 992px) {
    .partner-item {
        min-width: calc((100% - 120px) / 4);
    }
}

@media (max-width: 768px) {
    .partners-slider-wrapper {
        gap: 12px;
    }
    
    .partner-item {
        min-width: calc((100% - 80px) / 3);
        height: 100px;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
    }
    
    .slider-arrow svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 576px) {
    .partner-item {
        min-width: calc((100% - 40px) / 2);
        height: 80px;
    }
    
    .partner-item img {
        max-height: 60px;
    }
}

/* ========================================
   HERO BACKGROUND IMAGE SUPPORT
   ======================================== */

.hero {
    position: relative;
}

/* Dark overlay wenn Hintergrundbild gesetzt ist */
.hero[style*="background-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 1;
}

/* Container über dem Overlay */
.hero[style*="background-image"] .container {
    position: relative;
    z-index: 2;
}

/* Text bleibt weiß und gut lesbar */
.hero[style*="background-image"] .hero-title,
.hero[style*="background-image"] .hero-subtitle {
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

/* Hero Text Zentrierung */
.hero .container {
    text-align: center;
}

.hero-title {
    text-align: center;
}

.hero-subtitle {
    text-align: center;
}

.hero-cta {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px; /* Größerer Abstand zwischen Buttons */
    flex-wrap: wrap; /* Buttons wrappen auf kleinen Screens */
}

/* ========================================
   AUTOMATISCHE SCHRIFTFARBEN-ANPASSUNG
   ======================================== */

/* Navigation - Auto Text Color basierend auf Hintergrund */
.nav-link.auto-text-color {
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* Helper Klassen für JavaScript */
.text-light { color: #ffffff !important; }
.text-dark { color: #0F172A !important; }

/* Active State berücksichtigt automatische Farbe */
.nav-link.active.auto-text-color {
    /* Farbe wird von JavaScript gesetzt */
}
