/*
 * TMCC-Inspired Timeline Design for Cool Timeline Pro
 * Targets: Compact layout + Classic Design (design-3)
 * --------------------------------------------------------
 */

/* ========================
   CSS Custom Properties
   ======================== */
:root {
    --tmcc-accent-orange: #be590f;
    --tmcc-accent-green: #72c02c;
    --tmcc-border-color: #BBBBBB;
    --tmcc-line-color: #D6D6D6;
    --tmcc-dot-color: #DDDDDD;
    --tmcc-card-bg: #ffffff;
    --tmcc-card-border: #D0D0D0;
    --tmcc-text-color: #333333;
    --tmcc-heading-color: #333333;
    --tmcc-font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --tmcc-heading-font: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================
   Override Plugin CSS Variables
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 {
    --ctw-first-story-color: transparent !important;
    --ctw-second-story-color: transparent !important;
    --ctw-cbx-des-background: var(--tmcc-card-bg) !important;
    --ctw-cbx-des-color: var(--tmcc-text-color) !important;
    --ctw-cbx-title-color: var(--tmcc-heading-color) !important;
    --ctw-line-bg: var(--tmcc-line-color) !important;
    --ctw-cbx-shadow: none !important;
    --ctw-cbx-title-font-family: var(--tmcc-heading-font) !important;
    --ctw-cbx-desc-font-family: var(--tmcc-font-family) !important;
    --ctw-cbx-date-font-family: var(--tmcc-heading-font) !important;
    font-family: var(--tmcc-font-family) !important;
    --ctw-ibx-size: 40px !important;
    max-width: 1140px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ========================
   Center Line
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-timeline::before,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-inner-line {
    background-color: var(--tmcc-line-color) !important;
    width: 2px !important;
}

/* ========================
   Hide Start/End Dots
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-start,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-end {
    display: none !important;
}

/* ========================
   Year Labels (Decade Headers)
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-year {
    position: relative !important;
    text-align: center !important;
    margin: 60px 0 40px !important;
    clear: both !important;
    width: 100% !important;
    z-index: 5 !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-year .ctl-year-title {
    display: inline-block !important;
    background: var(--tmcc-card-bg) !important;
    color: var(--tmcc-accent-orange) !important;
    font-family: var(--tmcc-heading-font) !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    padding: 10px 30px !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    position: relative !important;
}

/* Decorative lines beside decade headers */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-year .ctl-year-title::before,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-year .ctl-year-title::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    width: 80px !important;
    height: 1px !important;
    background-color: var(--tmcc-line-color) !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-year .ctl-year-title::before {
    right: 100% !important;
    margin-right: 15px !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-year .ctl-year-title::after {
    left: 100% !important;
    margin-left: 15px !important;
}

/* ========================
   Story Cards
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story .ctl-content {
    background: var(--tmcc-card-bg) !important;
    border: 1px solid var(--tmcc-card-border) !important;
    border-left: 1px solid var(--tmcc-card-border) !important;
    border-right: 1px solid var(--tmcc-card-border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 5px !important;
    padding-bottom: 10px !important;
    overflow: hidden !important;
    transition: box-shadow 0.3s ease !important;
}

/* Remove the design-3 colored left/right borders */
.thr-timeline .ctl-design-3.ctl-compact-wrapper .ctl-story-right .ctl-content,
.thr-timeline .ctl-design-3.ctl-compact-wrapper .ctl-story-left .ctl-content {
    border-left: 1px solid var(--tmcc-card-border) !important;
    border-right: 1px solid var(--tmcc-card-border) !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story:hover .ctl-content {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story:hover .ctl-arrow {
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.08)) !important;
}

/* ========================
   Story Images
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-content .ctl-media {
    margin: 0 !important;
    padding: 0 !important;
    order: 1 !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-content .ctl-media img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 0 !important;
}

/* ========================
   Story Title
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-title {
    font-family: var(--tmcc-heading-font) !important;
    font-weight: 700 !important;
    font-size: 1.35rem !important;
    color: var(--tmcc-heading-color) !important;
    padding: 16px 18px 12px !important;
    margin: 0 0 0 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 2px solid #e8e8e8 !important;
    text-align: left !important;
    line-height: 1.3 !important;
    order: 2 !important;
    letter-spacing: 0.3px !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-title a {
    color: var(--tmcc-heading-color) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

/* When title is a "main title" (year), make it bolder */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story.ctl-main-title .ctl-title {
    background: transparent !important;
    background-color: transparent !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story.ctl-main-title .ctl-title a {
    color: var(--tmcc-heading-color) !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}

/* ========================
   Story Date / Labels (inside card in compact layout)
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-labels {
    font-family: var(--tmcc-heading-font) !important;
    background: transparent !important;
    background-color: transparent !important;
    padding: 5px 15px !important;
    order: 3 !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-labels .ctl-label-big {
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    color: #888 !important;
    line-height: 1.2 !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-labels .ctl-label-small {
    font-size: 0.8rem !important;
    color: #999 !important;
    font-weight: 400 !important;
}

/* ========================
   Story Description
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description {
    padding: 5px 15px 20px !important;
    font-family: var(--tmcc-font-family) !important;
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
    color: var(--tmcc-text-color) !important;
    background: transparent !important;
    background-color: var(--tmcc-card-bg) !important;
    order: 4 !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description p {
    margin-bottom: 1em !important;
    line-height: 1.7 !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description p:last-child {
    margin-bottom: 0 !important;
}

/* ========================
   Blockquotes (Green Accent)
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description blockquote {
    color: var(--tmcc-accent-green) !important;
    font-size: 1.15em !important;
    padding: 10px 0 10px 20px !important;
    border-left: 3px solid var(--tmcc-accent-green) !important;
    margin: 15px 0 !important;
    font-weight: 400 !important;
    font-style: italic !important;
    background: transparent !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description blockquote footer,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description blockquote cite {
    font-size: 0.85em !important;
    color: var(--tmcc-accent-green) !important;
    text-align: right !important;
    font-style: italic !important;
    display: block !important;
    margin-top: 8px !important;
}

/* ========================
   Icon Dots on Center Line
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-icondot,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-icon {
    width: 14px !important;
    height: 14px !important;
    background-color: var(--tmcc-dot-color) !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    z-index: 3 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    /* margin-top: 14px !important; */
}

/* Hide icon, pseudo-elements (connecting lines & font icons) */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-icondot i,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-icon i {
    display: none !important;
}
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-icondot::before,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-icondot::after,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-icon::before,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-icon::after {
    display: none !important;
}

/* Center dots on the center line */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story-left .ctl-icondot,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story-left .ctl-icon {
    right: calc(0px - (var(--ctw-ibx-size) - 25px) / 2) !important;
}
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story-right .ctl-icondot,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story-right .ctl-icon {
    left: calc(0px - (var(--ctw-ibx-size) - 25px) / 2) !important;
}

/* ========================
   Arrow Pointers — white with card-border outline
   Sized to start flush with card border edge
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-arrow {
    border: none !important;
    background: none !important;
    width: 28px !important;
    height: 28px !important;
    top: 14px !important;
}

/* Left stories → arrow points RIGHT toward center */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story-left .ctl-arrow {
    background: var(--tmcc-card-border) !important;
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%) !important;
    right: calc(var(--ctw-ibx-size) + 10px - 28px + 1px) !important;
    left: auto !important;
}
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story-left .ctl-arrow::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 1px !important;
    right: 1px !important;
    bottom: 1px !important;
    left: 0 !important;
    background: #ffffff !important;
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%) !important;
}

/* Right stories → arrow points LEFT toward center */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story-right .ctl-arrow {
    background: var(--tmcc-card-border) !important;
    clip-path: polygon(100% 0%, 0% 50%, 100% 100%) !important;
    left: calc(var(--ctw-ibx-size) + 10px - 28px + 1px) !important;
    right: auto !important;
}
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story-right .ctl-arrow::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 1px !important;
    right: 0 !important;
    bottom: 1px !important;
    left: 1px !important;
    background: #ffffff !important;
    clip-path: polygon(100% 0%, 0% 50%, 100% 100%) !important;
}

/* ========================
   Read More Button
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description a.ctl_read_more,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description a.read_more {
    display: inline-block !important;
    color: #444444 !important;
    background: transparent !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    padding: 7px 18px !important;
    border: 1.5px solid #999999 !important;
    border-radius: 3px !important;
    margin-top: 12px !important;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease !important;
    cursor: pointer !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description a.ctl_read_more:hover,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description a.read_more:hover {
    color: #222222 !important;
    border-color: #555555 !important;
    background-color: rgba(0, 0, 0, 0.03) !important;
}

/* ========================
   Lists Inside Timeline
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description ul,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description ol {
    padding-left: 20px !important;
    margin-bottom: 1em !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description li {
    margin-bottom: 0.5em !important;
    line-height: 1.6 !important;
}

/* ========================
   Emphasis & Bold Text
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description strong {
    font-weight: 600 !important;
    color: #222 !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description em {
    font-style: italic !important;
    color: #555 !important;
}

/* ========================
   Links
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description a {
    color: var(--tmcc-accent-green) !important;
    text-decoration: none !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description a:hover {
    text-decoration: underline !important;
}

/* ========================
   Responsive - Mobile
   ======================== */
@media (max-width: 767px) {
    .thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-year .ctl-year-title {
        font-size: 1.8rem !important;
    }

    .thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-year .ctl-year-title::before,
    .thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-year .ctl-year-title::after {
        width: 40px !important;
    }

    .thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-title {
        font-size: 1rem !important;
    }

    .thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-description {
        font-size: 0.9rem !important;
        padding: 5px 15px 15px !important;
    }

    /* Remove colored borders on mobile too */
    .thr-timeline .ctl-design-3.ctl-compact-wrapper .ctl-story .ctl-content {
        border-left: 1px solid var(--tmcc-card-border) !important;
        border-right: 1px solid var(--tmcc-card-border) !important;
    }

    /* Arrows — flush with card left edge on mobile */
    .thr-timeline .ctl-compact-wrapper.ctl-design-3:not(.ctl-design-4) .ctl-story .ctl-arrow {
        left: -27px !important;
        right: auto !important;
    }

    /* Dots — center on the line and align vertically with arrow on mobile */
    .thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story .ctl-icondot,
    .thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story .ctl-icon {
        left: calc(0px - var(--ctw-ibx-size) * 1.8 + var(--ctw-line-width) - 10.5px) !important;
        right: auto !important;
        margin-top: 3px !important;
    }
}

/* ========================
   Pagination
   ======================== */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-pagination {
    text-align: center !important;
    margin-top: 40px !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-pagination a,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-pagination span {
    display: inline-block !important;
    padding: 8px 16px !important;
    margin: 0 4px !important;
    border: 1px solid var(--tmcc-border-color) !important;
    color: var(--tmcc-text-color) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-pagination a:hover,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-pagination span.current {
    background-color: var(--tmcc-accent-green) !important;
    border-color: var(--tmcc-accent-green) !important;
    color: #fff !important;
}

/* ========================
   Clean Up Plugin Defaults
   ======================== */

/* Remove pseudo-element decorations */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story .ctl-content::before,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story .ctl-content::after {
    display: none !important;
}

.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-content .ctl-title::before,
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-content .ctl-title::after {
    display: none !important;
}

/* Ensure clean card — no background images or colored top borders */
.thr-timeline .ctl-compact-wrapper.ctl-design-3 .ctl-story .ctl-content {
    background-image: none !important;
}

/* ========================
   Story Overlay
   ======================== */
.thr-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.thr-overlay.thr-overlay--open {
    display: flex;
}

.thr-overlay__panel {
    background: #fff;
    max-width: 720px;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    margin: auto;
}

.thr-overlay__close {
    position: absolute;
    top: 1px;
    right: 12px;
    width: 36px;
    height: 36px;
   
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 2rem;
    line-height: 26px;
    text-align: center;
    color: #666;
    z-index: 2;
    transition: background 0.2s;
}

.thr-overlay__close:hover {
    background: transparent;
    color: #333;
}

.thr-overlay__loading {
    text-align: center;
    padding: 60px 20px;
    font-family: var(--tmcc-font-family, sans-serif);
    color: #999;
    font-size: 0.95rem;
}

.thr-overlay__content {
    padding: 30px 35px 40px;
    font-family: var(--tmcc-font-family, sans-serif);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--tmcc-text-color, #333);
}

.thr-overlay__content h1,
.thr-overlay__content h2 {
    font-family: var(--tmcc-heading-font, sans-serif);
    font-weight: 600;
    color: var(--tmcc-heading-color, #333);
    margin: 0 0 15px;
    line-height: 1.3;
}

.thr-overlay__content h1 {
    font-size: 1.6rem;
}

.thr-overlay__content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 0 20px;
}

.thr-overlay__content p {
    margin-bottom: 1em;
}

.thr-overlay__content blockquote {
    color: var(--tmcc-accent-green, #72c02c);
    border-left: 3px solid var(--tmcc-accent-green, #72c02c);
    padding: 10px 0 10px 20px;
    margin: 15px 0;
    font-style: italic;
}

@media (max-width: 767px) {
    .thr-overlay {
        padding: 20px 10px;
    }

    .thr-overlay__content {
        padding: 20px 20px 30px;
    }
}
