/* Ciervo Timeline - Modern & Visual Styles */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Bitter:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --cb-green: #2d5a27;
    --cb-green-light: #4a7c59;
    --cb-gold: #c5a059;
    --cb-cream: #f9f7f2;
    --cb-dark: #1a2e35;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.ciervo-timeline-wrapper {
    font-family: 'Outfit', sans-serif;
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    position: relative;
}

.ciervo-timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--cb-green-light), var(--cb-gold), transparent);
    z-index: 1;
}

/* Loader */
.ciervo-timeline-loader {
    text-align: center;
    padding: 50px;
    color: var(--cb-green);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,0.1);
    border-top: 4px solid var(--cb-gold);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

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

/* Timeline Items */
.timeline-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Date Marker - Centered on line */
.date-marker {
    width: 100px;
    height: 100px;
    min-width: 100px;
    background: var(--cb-green);
    color: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--cb-gold);
    box-shadow: var(--shadow);
    z-index: 5;
    transition: transform 0.3s ease;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item:hover .date-marker {
    transform: translateX(-50%) scale(1.1) rotate(5deg);
}

.date-marker .day {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.date-marker .month {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Card Content */
.event-card {
    width: 40%;
    margin-left: auto; /* Default to right side */
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.timeline-item:nth-child(even) .event-card {
    margin-left: 0;
    margin-right: auto; /* Even items to left side */
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 45px 0 rgba(31, 38, 135, 0.25);
}

.event-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.event-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.event-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--cb-gold);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.event-card-body {
    padding: 25px;
}

.event-card-body h3 {
    font-family: 'Bitter', serif;
    font-size: 1.4rem;
    color: var(--cb-dark);
    margin: 0;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.event-title-link {
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.event-title-link:hover h3 {
    color: var(--cb-green-light);
}

.event-author {
    color: var(--cb-green-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

.event-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-excerpt {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 20px;
}

.event-btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--cb-green);
    color: white;
    text-decoration: none !important;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.event-btn:hover {
    background: var(--cb-dark);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .ciervo-timeline-wrapper::before {
        left: 40px;
    }

    .timeline-item {
        justify-content: flex-start;
        padding-left: 80px;
        margin-bottom: 40px;
    }

    .date-marker {
        left: 40px;
        width: 60px;
        height: 60px;
        min-width: 60px;
    }

    .timeline-item:hover .date-marker {
        transform: translateX(-50%) scale(1.05);
    }

    .date-marker .day {
        font-size: 1.2rem;
    }

    .date-marker .month {
        font-size: 0.6rem;
    }

    .event-card {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .event-card-image {
        height: 150px;
    }
}
