/**
 * PyziTheme - timeline.css (pyzitheme/assets/css/timeline.css)
 * 
 * Styl dla timeline w header strony
 *
 * @package     PyziTheme
 * @subpackage  Assets/CSS
 * @author      Patryk Kowalski <p.kowalski@kamikstudio.pl>
 * @copyright   2025 KamikStudio & PyziPyzi
 * @license     Proprietary
 * @version     1.0.0
 * @since       1.0.0
 * 
 * Client: PyziPyzi - Domowe wyroby cukiernicze
 * Website: https://pyzipyzi.pl
 * 
 * This file is part of PyziTheme.
 * Unauthorized copying or distribution is prohibited.
 */

        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            overflow-x: hidden;
        }

        body > section,
        body > div {
            overflow: visible !important;
        }

        .timeline-section {
            background: linear-gradient(135deg, #fff 0%, #fef8f4 100%);
            padding: 0;
            overflow: visible;
            position: relative;
            height: 160px;
        }

        .timeline-container {
            position: relative;
            height: 100%;
            cursor: grab;
            user-select: none;
        }

        .timeline-container:active {
            cursor: grabbing;
        }

        .timeline-wrapper {
            overflow-x: auto;
            overflow-y: hidden;
            scrollbar-width: thin;
            scrollbar-color: #ef6341 #f0f0f0;
            height: 100%;
            position: relative;
            z-index: 1;
        }

        .timeline-wrapper::-webkit-scrollbar {
            height: 6px;
        }

        .timeline-wrapper::-webkit-scrollbar-track {
            background: #f0f0f0;
        }

        .timeline-wrapper::-webkit-scrollbar-thumb {
            background: #ef6341;
            border-radius: 10px;
        }

        .timeline-wrapper::-webkit-scrollbar-thumb:hover {
            background: #d94f2e;
        }

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

        html, body {
            overflow-x: hidden;
        }

        section {
            overflow: visible !important;
        }

        .timeline-track {
            position: relative;
            min-width: max-content;
            height: 100%;
            display: flex;
            align-items: center;
        }

        .timeline-line {
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #ef6341 0%, #ffa07a 50%, #ef6341 100%);
            transform: translateY(-50%);
            z-index: 1;
        }

        .timeline-items {
            display: flex;
            gap: 200px;
            position: relative;
            padding: 0 100px;
            align-items: center;
            height: 100%;
        }

        .timeline-item {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        /* Alternatywne pozycjonowanie - parzyste na górze, nieparzyste na dole */
        .timeline-item:nth-child(odd) .timeline-label {
            bottom: -35px;
        }

        .timeline-item:nth-child(even) .timeline-label {
            bottom: auto;
            top: -35px;
        }

        .timeline-item:nth-child(odd) .timeline-badge {
            top: -28px;
        }

        .timeline-item:nth-child(even) .timeline-badge {
            top: auto;
            bottom: -28px;
        }

        .timeline-point {
            position: relative;
            width: 20px;
            height: 20px;
            background: #fff;
            border: 3px solid #ef6341;
            border-radius: 50%;
            cursor: pointer;
            transition: transform 0.3s;
            z-index: 2;
        }

        /* Wyszarzone - przeszłe wydarzenia */
        .timeline-item.past .timeline-point {
            border-color: #ccc;
            opacity: 0.5;
        }

        .timeline-item.past .timeline-point::before {
            display: none;
        }

        .timeline-item.past .timeline-label,
        .timeline-item.past .timeline-badge {
            opacity: 0.5;
            color: #999;
        }

        /* Główne wydarzenie - pulsujące */
        .timeline-item.main-event .timeline-point {
            border-color: #ef6341;
            animation: mainPulse 1.5s infinite;
        }

        @keyframes mainPulse {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.3);
            }
        }

        .timeline-item.main-event .timeline-point::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 35px;
            height: 35px;
            background: rgba(239, 99, 65, 0.5);
            border-radius: 50%;
            animation: pulse 1.5s infinite;
            z-index: -1;
        }

        @keyframes pulse {
            0%, 100% {
                transform: translate(-50%, -50%) scale(1);
                opacity: 1;
            }
            50% {
                transform: translate(-50%, -50%) scale(1.5);
                opacity: 0;
            }
        }

        /* Przyszłe wydarzenia - bez pulsowania */
        .timeline-item.upcoming .timeline-point {
            border-color: #ef6341;
        }

        .timeline-item.active .timeline-point,
        .timeline-point:hover {
            transform: scale(1.4);
            border-width: 4px;
        }

        .timeline-label {
            position: absolute;
            font-size: 11px;
            font-weight: 600;
            color: #5e341c;
            white-space: nowrap;
            text-align: center;
        }

        .timeline-content {
            position: fixed;
            bottom: auto;
            top: auto;
            left: 0;
            transform: translateY(10px);
            width: 280px;
            background: white;
            padding: 18px;
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
            z-index: 99999 !important;
            pointer-events: none;
        }

        .timeline-content::after {
            content: '';
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            border: 8px solid transparent;
            z-index: 2147483647 !important;
        }

        .timeline-content[data-arrow="top"]::after {
            top: -16px;
            border-bottom-color: white;
        }

        .timeline-content[data-arrow="bottom"]::after {
            bottom: -16px;
            border-top-color: white;
        }

        .timeline-content::before {
            content: attr(data-popup-index);
            display: none;
        }

        .timeline-item.active .timeline-content {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
            pointer-events: auto;
        }

        .timeline-date {
            color: #ef6341;
            font-size: 12px;
            font-weight: 700;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .timeline-date svg {
            width: 14px;
            height: 14px;
            fill: currentColor;
        }

        .timeline-title {
            color: #5e341c;
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 8px;
            line-height: 1.3;
        }

        .timeline-description {
            color: #666;
            font-size: 12px;
            line-height: 1.5;
            margin-bottom: 12px;
        }

        .timeline-link {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            color: #ef6341;
            font-size: 12px;
            font-weight: 600;
            text-decoration: none;
            transition: gap 0.3s;
        }

        .timeline-link:hover {
            gap: 8px;
        }

        .timeline-link::after {
            content: '→';
        }

        .timeline-badge {
            position: absolute;
            background: #ef6341;
            color: white;
            font-size: 9px;
            font-weight: 600;
            padding: 3px 10px;
            border-radius: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }

        .timeline-item.upcoming .timeline-badge {
            background: #4CAF50;
        }

        .timeline-item.main-event .timeline-badge {
            background: #FF5722;
            animation: bounce 2s infinite;
        }

        .timeline-item.active-now .timeline-badge {
            background: #FF5722;
        }

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

        .countdown-mini {
            position: absolute;
            top: 10px;
            right: 20px;
            background: linear-gradient(135deg, #ef6341 0%, #d94f2e 100%);
            color: white;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(239, 99, 65, 0.3);
            z-index: 10;
            align-items: center;
        }

        .countdown-mini span {
            font-size: 16px;
            font-weight: 700;
            margin: 0 2px;
        }

        @media (max-width: 768px) {
            .timeline-items {
                gap: 120px;
                padding: 0 50px;
            }
            
            .timeline-section {
                overflow: hidden !important;
                width: 100vw;
                max-width: 100%;
                padding-top: 50px;
                height: 210px;
            }

            .timeline-content {
                width: 260px !important;
                padding: 15px !important;
                max-width: calc(100vw - 20px) !important;
                position: fixed !important;
                z-index: 2147483647 !important;
                left: 10px !important;
                right: 10px !important;
                margin: 0 auto !important;
                pointer-events: auto !important;
            }

            .timeline-label {
                font-size: 10px;
            }

            .countdown-mini {
                top: 0;
                right: 0;
                left: 0;
                width: 100%;
                padding: 12px 20px;
                font-size: 11px;
                z-index: 100;
                border-radius: 0;
                text-align: center;
                justify-content: center;
            }

            .countdown-mini span {
                font-size: 14px;
            }
            
            .timeline-container {
                overflow: hidden !important;
                width: 100%;
                max-width: 100%;
            }
            
            .timeline-wrapper {
                width: 100%;
                max-width: 100%;
            }
            
            .timeline-content {
                transform: none !important;
            }
        }

        .timeline-content {
            position: fixed;
            bottom: auto;
            top: auto;
            left: 0;
            transform: translateY(10px);
            width: 280px;
            background: white;
            padding: 18px;
            border-radius: 12px;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
            z-index: 999999 !important;
            pointer-events: none;
        }