/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Rottöne basierend auf Basiston #d12609 */
    --primary-color: #d12609;
    --primary-dark: #a01d07;
    --primary-light: #e6391a;
    --primary-hover: #b81f08;
    --secondary-color: #1a1a1a;
    --text-color: #333;
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --accent-red: #ff1744;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --text-color: #ffffff;
    --bg-color: #2d2d2d;
    --card-bg: #3a3a3a;
    --border-color: #4a4a4a;
    --secondary-color: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
    /* Rottöne bleiben unverändert */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: -30px;
}

.logo-animation-container {
    width: 120px;
    height: 80px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    min-width: 120px;
    min-height: 80px;
    padding: 10px;
}

.logo-canvas {
    display: block;
    width: 120px !important;
    height: 80px !important;
    max-width: 120px !important;
    max-height: 80px !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    object-fit: contain;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    letter-spacing: -0.5px;
    font-size: 1.1rem;
}

.fallback-logo {
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: var(--text-color);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Gallery Section */
.gallery-section {
    padding: 3rem 0;
    min-height: 80vh;
}

.gallery-section h1 {
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 700;
}

/* Tag Filter Akkordeon */
.tag-accordion {
    margin-bottom: 2rem;
}

.tag-accordion-header {
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.tag-accordion-header:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.tag-accordion-header.active {
    border-color: var(--border-color);
    background-color: var(--card-bg);
}

.accordion-icon {
    transition: transform 0.3s;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.tag-accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.tag-filter-container {
    display: none;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    padding: 1rem;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow);
    margin-top: -2px;
}

.tag-filter-container.show {
    display: flex;
}

.tag-accordion-header.active + .tag-filter-container {
    border-color: var(--border-color);
}

.tag-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.tag-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tag-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid rgba(196, 30, 58, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}


.video-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-top: 3px solid var(--primary-color);
}

.video-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--border-color);
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.video-tag {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 400;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    cursor: default;
    line-height: 1.2;
}

.video-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-color);
    opacity: 0.6;
}

/* Contact Section */
.contact-section {
    padding: 3rem 0;
    background-color: var(--card-bg);
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: center;
}

.contact-info li {
    margin: 0;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.submit-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* Impressum Section */
.impressum-section {
    padding: 3rem 0;
}

.impressum-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    font-size: 1.1rem;
}

.impressum-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    text-align: center;
}

.impressum-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

.impressum-content p {
    margin-bottom: 1rem;
}

.impressum-content strong {
    font-weight: 400;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1600px;
    max-height: 90%;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    overflow-y: auto;
    margin: 0 auto;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 2001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--card-bg);
    opacity: 0.9;
    transition: background-color 0.3s, color 0.3s, opacity 0.3s;
    line-height: 1;
    padding: 0;
    margin: 0;
    text-align: center;
}

.close::before {
    content: '×';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 3px));
    transform-origin: center center;
    line-height: 1;
    width: 1em;
    height: 1em;
    transition: transform 0.3s;
}

.close:hover {
    background-color: var(--primary-color);
    color: white;
}

.close:hover::before {
    transform: translate(calc(-50% + 3px), -50%) rotate(90deg);
}

#modal-video-container {
    width: 100%;
    margin: 0 auto;
}

#modal-video-container iframe {
    width: 100%;
    height: calc(100vw * 0.5625); /* 16:9 Aspect Ratio */
    max-height: 675px; /* Max height für große Bildschirme */
    min-height: 400px;
    border: none;
    border-radius: 8px;
}

#modal-video-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

#modal-video-info h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

#modal-video-info p {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #9a1604;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 899px) {
    .logo-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery-section h1 {
        font-size: 2rem;
    }

    .modal-content {
        max-width: 95%;
        padding: 1rem;
    }
    
    #modal-video-container iframe {
        height: calc(100vw * 0.5625);
        max-height: 500px;
        min-height: 300px;
    }
}

