/* ========================================
   DR. MANCO - HOJA DE VIDA STYLES
   Estilos específicos para hoja-de-vida.html
======================================== */

/* ========================================
   TIMELINE SECTION
======================================== */
.timeline-section {
    padding: 120px 0;
    position: relative;
    background: var(--white-soft);
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 50px auto 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.2);
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s forwards;
}

.timeline-item:nth-child(1) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.4s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.6s;
}

.timeline-item:nth-child(4) {
    animation-delay: 0.8s;
}

.timeline-item:nth-child(5) {
    animation-delay: 1.0s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    right: -12px;
    background-color: var(--white);
    border: 4px solid var(--primary);
    top: 24px;
    border-radius: 50%;
    z-index: 1;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.timeline-item.right::after {
    left: -12px;
}

.timeline-item:hover::after {
    background-color: var(--primary);
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.6);
}

.timeline-content {
    padding: 30px;
    background-color: var(--white);
    position: relative;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--red-200);
}

.timeline-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
    color: var(--bg-dark);
    font-weight: 700;
}

.timeline-content p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.6;
}

.timeline-date {
    display: inline-block;
    margin-bottom: 15px;
    padding: 6px 15px;
    background: var(--red-50);
    color: var(--primary);
    font-weight: 700;
    border-radius: 50px;
    font-size: 13px;
    letter-spacing: 1px;
}

.timeline-item.left .timeline-content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 26px;
    width: 0;
    z-index: 1;
    right: -10px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--white);
}

.timeline-item.right .timeline-content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 26px;
    width: 0;
    z-index: 1;
    left: -10px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--white) transparent transparent;
}

/* ========================================
   TIMELINE PAGE SPECIFIC
======================================== */
.timeline-header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-darker) 100%);
    padding: 120px 0 60px;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.timeline-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(220, 38, 38, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-box-number {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 5px;
}

.stat-box-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.8;
}

.text-red {
    color: var(--primary-light);
}

.text-white {
    color: var(--white);
}

/* ========================================
   FILTER BAR
======================================== */
.filter-bar {
    position: sticky;
    top: 80px;
    z-index: 90;
    background: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-container::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--gray-200);
    color: var(--bg-dark);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

/* ========================================
   VERTICAL TIMELINE (Redesigned)
======================================== */
.timeline-wrapper {
    position: relative;
    padding: 80px 0;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-line-vertical {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--bg-dark), var(--gray-300));
    top: 0;
    z-index: 0;
    opacity: 0.3;
}

.t-item {
    position: relative;
    z-index: 10;
    margin-bottom: 60px;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.t-item-inner {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
}

.t-item-left .t-content {
    margin-right: auto;
    text-align: right;
}

.t-item-left .t-dot {
    order: 2;
    margin: 0 40px;
}

.t-item-left .t-content-wrapper {
    order: 1;
    margin-left: auto;
    width: 45%;
}

.t-item-left .t-empty {
    order: 3;
    width: 45%;
}

.t-item-right .t-content {
    margin-left: auto;
    text-align: left;
}

.t-item-right .t-dot {
    order: 2;
    margin: 0 40px;
}

.t-item-right .t-content-wrapper {
    order: 3;
    margin-right: auto;
    width: 45%;
}

.t-item-right .t-empty {
    order: 1;
    width: 45%;
}

.t-dot {
    width: 20px;
    height: 20px;
    background: var(--white);
    border: 5px solid var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 25px;
    box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.1);
    transition: var(--transition);
}

.t-item:hover .t-dot {
    transform: scale(1.3);
    border-color: var(--bg-dark);
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.05);
}

.t-card {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.t-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--red-200);
}

.t-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.tag-docencia {
    background: var(--gray-100);
    color: var(--gray-600);
}

.tag-liderazgo {
    background: var(--red-50);
    color: var(--primary);
}

.tag-formacion {
    background: var(--bg-dark);
    color: var(--white);
}

.t-year {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: 5px;
}

.t-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--bg-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.t-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
}

.t-desc {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ========================================
   HOJA DE VIDA RESPONSIVE
======================================== */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 769px) {
    .t-item-left .t-meta {
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .timeline::after {
        left: 29px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0;
    }

    .timeline-item::after {
        left: 19px;
    }

    .timeline-item.left::after {
        left: 19px;
    }

    .timeline-item.left .timeline-content::before,
    .timeline-item.right .timeline-content::before {
        left: -10px;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--white) transparent transparent;
    }

    .timeline-line-vertical {
        left: 30px;
    }

    .t-item-inner {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 60px;
    }

    .t-item-left .t-dot,
    .t-item-right .t-dot {
        position: absolute;
        left: 30px;
        top: 25px;
        transform: translateX(-50%);
        margin: 0;
        order: 0;
    }

    .t-item-left .t-content-wrapper,
    .t-item-right .t-content-wrapper {
        width: 100%;
        margin: 0;
        order: 1;
    }

    .t-item-left .t-empty,
    .t-item-right .t-empty {
        display: none;
    }

    .t-item-left .t-content {
        text-align: left;
    }

    .t-item-left .t-meta {
        justify-content: flex-start;
    }

    .filter-container {
        justify-content: flex-start;
        padding-left: 20px;
        padding-right: 20px;
    }
}