:root {
    /* Brand Colors derived from the Image */
    --primary-color: #e3000f;
    /* Original Karls Red */
    --neon-blue: #00d2ff;
    --neon-purple: #9d00ff;
    --dark-bg: #0f172a;

    --bg-color: #f8fafc;
    --text-color: #334155;
    --card-bg: #ffffff;
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
.main-header {
    background: #000;
    /* Dark header to match the image background */
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--neon-blue);
}

.logo-container {
    display: flex;
    align-items: center;
}

.main-logo {
    height: 60px;
    /* Adjust based on image aspect ratio */
    width: auto;
    object-fit: contain;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

/* Hero */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
    background: radial-gradient(circle at center, rgba(0, 210, 255, 0.05) 0%, transparent 70%);
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.intro-text {
    font-size: 1.25rem;
    color: #4b5563;
    max-width: 700px;
    margin: 0 auto;
}

/* Video Section */
.video-section {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    border: 1px solid #e5e7eb;
}

.section-header {
    margin-bottom: 1.5rem;
}

/* Filter Nav */
.filter-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    color: #4b5563;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 600;
}

.section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.video-wrapper {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    position: relative;
    aspect-ratio: 16 / 9;
}

.video-placeholder-link {
    display: flex;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('https://img.youtube.com/vi/PLX2PHhsRVBu2IfEKua5U_c6YANG3XDu4v/hqdefault.jpg');
    background-size: cover;
    background-position: center;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.video-placeholder-link:hover .play-button-overlay {
    transform: scale(1.05);
}

.play-button-overlay {
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}

.play-button-overlay span:last-child {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.video-note {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
    background: #eef2ff;
    padding: 1rem;
    border-radius: 8px;
    color: #3730a3;
    align-items: start;
}

/* Mandate Section */
.mandate-section {
    margin-bottom: 4rem;
}

.mandate-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    border: 1px solid #f3f4f6;
}

.card:hover {
    transform: translateY(-5px);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #fff;
}

.color-1 {
    background: linear-gradient(135deg, #FF6B6B, #EE5253);
}

.color-2 {
    background: linear-gradient(135deg, #48DBFB, #0ABDE3);
}

.color-3 {
    background: linear-gradient(135deg, #1DD1A1, #10AC84);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.card h4 {
    font-size: 0.9rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.card p {
    color: #4b5563;
    font-size: 0.95rem;
}

/* Support Section */
.support-section {
    background: #2b3a42;
    color: #fff;
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
}

.support-section h2 {
    margin-bottom: 2rem;
    color: #fff;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: left;
    margin-bottom: 3rem;
}

.support-item {
    display: flex;
    gap: 15px;
}

.support-item h3 {
    margin-bottom: 0.5rem;
    color: #a5b4fc;
}

.support-item p {
    color: #d1d5db;
    font-size: 0.9rem;
}

.signature {
    border-top: 1px solid #4b5563;
    padding-top: 2rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Chat Widget Placeholder Styling (Example) */
df-messenger {
    --df-messenger-bot-message: #f0f0f0;
    --df-messenger-button-titlebar-color: var(--primary-color);
    --df-messenger-chat-background-color: #fff;
    --df-messenger-font-color: #333;
    --df-messenger-send-icon: #10AC84;
    --df-messenger-user-message: #e3f2fd;
}

/* Hero CTA Button */
.hero-cta-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
}

.hero-decoration-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Basic animation to float slightly */
    animation: float 6s ease-in-out infinite;
    background: #000;
}

.hero-decoration-wrapper iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    /* Scale up to cover the circle */
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Prevent clicks on the video */
}

.hero-decoration-wrapper:nth-child(3) {
    animation-delay: 3s;
    /* Offset for right video */
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.cta-button.hero-cta {
    font-size: 1.3rem;
    padding: 1.2rem 3rem;
    box-shadow: 0 8px 25px rgba(227, 0, 15, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(227, 0, 15, 0.7);
    }

    70% {
        transform: scale(1.03);
        box-shadow: 0 0 0 10px rgba(227, 0, 15, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(227, 0, 15, 0);
    }
}

/* Video Grid Layout */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.video-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
    background: #2b3a42;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.video-thumbnail.url-2 {
    background: #455a64;
}

.video-thumbnail.url-3 {
    background: #607d8b;
}

.video-thumbnail .material-icons-round {
    font-size: 48px;
    opacity: 0.8;
}

.video-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.video-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.watch-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    align-self: flex-start;
}

.comment-button {
    align-self: flex-start;
    background: #e0f2f1;
    color: #00695c;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-button:hover {
    background: #b2dfdb;
}

.comment-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Local Video Container */
.local-video-container {
    width: 100%;
    background: #000;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.local-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.file-badge {
    display: inline-block;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    align-self: flex-start;
}

/* Booking Button */
.booking-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.booking-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #4b5563;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #000;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-header p {
    margin: 0.5rem 0 0 0;
    color: #666;
}

.modal-body {
    flex-grow: 1;
    background: #f9fafb;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.modal-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .hero-cta-container {
        gap: 0.5rem;
        margin-top: 1.5rem;
    }

    .hero-decoration-wrapper {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }

    .cta-button.hero-cta {
        font-size: 1rem;
        padding: 0.8rem 1rem;
        white-space: nowrap;
        width: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .cta-button.hero-cta span.material-icons-round {
        font-size: 1.2rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    /* Hide Karlchen on mobile to prevent clutter */
    .karlchen-deco {
        display: none;
    }
}

/* Karlchen Decorations */
.section-header {
    position: relative;
    /* Anchor for absolute Karlchens */
}

.karlchen-deco {
    position: absolute;
    z-index: 0;
    /* Behind text but in front of bg? Background is white, multiply makes it transparent. Text is z-index auto. */
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
    mix-blend-mode: multiply;

    max-width: 120px;
    height: auto;
    top: 50%;
    transform: translateY(-50%);
}

.karlchen-deco.active {
    opacity: 0.9;
    animation: float-header 6s ease-in-out infinite;
}

.karlchen-deco.side-left {
    left: 20px;
    transform: translateY(-50%) rotate(-5deg);
}

.karlchen-deco.side-right {
    right: 20px;
    transform: translateY(-50%) rotate(5deg);
}

@keyframes float-header {
    0% {
        margin-top: 0px;
    }

    50% {
        margin-top: -10px;
    }

    100% {
        margin-top: 0px;
    }
}

/* Ensure container has relative positioning so absolute children are relative to it */
.container {
    position: relative;
}