/* ═══════════════════════════════════════════════════════════════════════════
   COMPANY HISTORY SECTION  —  css/history-section.css
   Zero-dependency version — no Owl Carousel classes needed.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Section wrapper ─────────────────────────────────────────────────────── */
#company-history {
    background: #f6f6f6;
    padding: 80px 0 80px;
    overflow: hidden;
}

#company-history .section-header {
    text-align: center;
    margin-bottom: 50px;
}

#company-history .section-header h5 {
    color: #0d6efd;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Tactic Sans';
    font-size: .85rem;
    font-weight: 900 !important;
    margin-bottom: 8px;
}

#company-history .section-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0d2137;
    margin: 0;
}

/* ── Two-column layout ───────────────────────────────────────────────────── */
.history-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.history-carousel-col {
    flex: 0 0 58%;
    max-width: 58%;
    position: relative;
}

.history-text-col {
    flex: 0 0 42%;
    max-width: 42%;
    padding: 48px 52px;
    background: #fff;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .history-carousel-col,
    .history-text-col { flex: 0 0 100%; max-width: 100%; }
    .history-text-col { padding: 30px 24px; }
}

/* ── Slide stage ─────────────────────────────────────────────────────────── */
#hc-stage {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
}

@media (max-width: 768px) {
    #hc-stage { height: 260px; }
}

/* ── Individual slides ───────────────────────────────────────────────────── */
.hc-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}

.hc-slide.hc-active {
    opacity: 1;
    pointer-events: auto;
}

.hc-slide.hc-leaving {
    opacity: 0;
}

/* ── Image wrapper ───────────────────────────────────────────────────────── */
.history-img-wrap {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Right-edge feather so text panel sits flush */
.history-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 65%, #fff 100%);
    pointer-events: none;
}

@media (max-width: 768px) {
    .history-img-wrap::after { display: none; }
}

/* ── Ken Burns ───────────────────────────────────────────────────────────── */
.history-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    animation: kenBurns 5s ease-in-out forwards;
}

@keyframes kenBurns {
    0%   { transform: scale(1.00) translate(  0px,  0px); }
    100% { transform: scale(1.10) translate(-12px, -6px); }
}

/* ── Text panel ──────────────────────────────────────────────────────────── */
#historyTextPanel {
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#historyTextPanel.ht-text-exit {
    opacity: 0;
    transform: translateX(-18px);
    pointer-events: none;
}

#historyTextPanel.ht-text-enter {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ht-text-year {
    display: inline-block;
    font-size: 4rem;
    font-weight: 900;
    color: #0d2137;
    line-height: 1;
    margin-bottom: 6px;
    font-family: 'Tactic Sans';
}

.ht-text-divider {
    width: 50px;
    height: 4px;
    background: #0d6efd;
    border-radius: 2px;
    margin: 10px 0 16px;
}

.ht-text-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0d2137;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ht-text-body {
    font-size: .95rem;
    color: #555;
    line-height: 1.75;
}

/* ── Timeline ────────────────────────────────────────────────────────────── */
#historyTimeline {
    position: relative;
    padding: 50px 48px 20px;
    margin-top: 24px;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
}

.ht-track {
    position: absolute;
    bottom: 38px;
    left: 48px;
    right: 48px;
    height: 3px;
    background: #dde3ec;
    border-radius: 2px;
    overflow: hidden;
}

.ht-fill {
    height: 100%;
    width: 0%;
    background: #0d6efd;
    border-radius: 2px;
    transition: width 0.7s cubic-bezier(.4,0,.2,1);
}

.ht-dots {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
    z-index: 1;
}

.ht-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.ht-year {
    font-family: 'Tactic Sans';
    font-size: .8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: color 0.3s, font-size 0.3s;
    white-space: nowrap;
    line-height: 1;
}

.ht-dot.active .ht-year {
    color: #0d6efd;
    font-family: 'Tactic Sans';
    font-size: 1.3rem;
    font-weight: 900;
}

.ht-pin {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #ccd4de;
    transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 0 0 rgba(13,110,253,0);
    flex-shrink: 0;
}

.ht-dot.active .ht-pin {
    background: #0d6efd;
    border-color: #0d6efd;
    transform: scale(1.5);
    box-shadow: 0 0 0 5px rgba(13,110,253,.18);
}

.ht-dot:hover .ht-pin {
    border-color: #0d6efd;
}

@media (max-width: 576px) {
    #historyTimeline { padding: 40px 16px 16px; }
    .ht-track { left: 16px; right: 16px; bottom: 28px; }
    .ht-year  { font-size: .6rem; letter-spacing: 0; }
    .ht-dot.active .ht-year { font-size: .68rem; }
}