/* ==========================================
   Chenxin Cargo - Dynamic Styles v6
   Updated: 2026-06-26
   - 4-card fixed carousel
   ========================================== */

/* === Scroll reveal animation === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.visible { animation: fadeInUp 0.8s ease forwards; }

/* === Number counter === */
.counter-value {
    font-size: 3rem;
    font-weight: 700;
    color: #C9A84C;
    line-height: 1.2;
}

/* === Testimonials: 4-card carousel === */
#testimonials-container {
    width: 100%;
    overflow: visible;
    padding: 20px 0;
}

.chat-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.chat-track {
    display: flex;
    gap: 16px;
    will-change: transform;
}

.chat-slide {
    flex: 0 0 calc(25% - 12px);
    width: calc(25% - 12px);
    max-width: 280px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
}

.chat-slide:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.chat-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.chat-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.chat-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(11,29,58,0.25);
    border: 2px solid rgba(201,168,76,0.5);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.chat-dot.active {
    background: #C9A84C;
    border-color: #C9A84C;
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(201,168,76,0.5);
}

.chat-dot:hover {
    background: #C9A84C;
    border-color: #C9A84C;
    transform: scale(1.15);
}

/* === Shipment feed === */
.shipment-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-left: 3px solid #C9A84C;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 0 8px 8px 0;
    gap: 12px;
    flex-wrap: wrap;
}

.shipment-dest {
    font-weight: 600;
    color: #C9A84C;
    font-size: 1rem;
}

.shipment-info {
    color: #ccc;
    font-size: 0.9rem;
    flex: 1;
}

.shipment-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.shipment-status.in-transit {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.shipment-status.customs {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
}

.shipment-status.delivered {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.shipment-time {
    color: #888;
    font-size: 0.8rem;
    width: 100%;
    margin-top: 4px;
}

/* === Responsive === */
@media (max-width: 992px) {
    .chat-slide {
        flex: 0 0 calc(33.333% - 11px);
        width: calc(33.333% - 11px);
    }
}

@media (max-width: 768px) {
    .chat-slide {
        flex: 0 0 calc(50% - 8px);
        width: calc(50% - 8px);
    }
    .chat-track { gap: 12px; }
    .shipment-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .chat-slide {
        flex: 0 0 100%;
        width: 100%;
    }
}

/* ==========================================
   Tracking Section Styles
   ========================================== */
.tracking-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.tracking-section .section-title {
    color: #0B1D3A;
    text-align: center;
    margin-bottom: 8px;
}

.tracking-section .section-subtitle {
    text-align: center;
    margin-bottom: 32px;
    color: #666;
}

/* Search Box */
.tracking-search-box {
    max-width: 700px;
    margin: 0 auto 32px;
}

.tracking-input-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.tracking-input-wrap:focus-within {
    border-color: #C9A84C;
}

.tracking-input-icon {
    padding: 0 0 0 18px;
    font-size: 18px;
}

.tracking-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 12px;
    font-size: 16px;
    color: #333;
    background: transparent;
}

.tracking-input::placeholder {
    color: #aaa;
}

.tracking-search-btn {
    background: #0B1D3A;
    color: #C9A84C;
    border: none;
    padding: 16px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.tracking-search-btn:hover {
    background: #162d52;
}

.tracking-search-hint {
    text-align: center;
    font-size: 13px;
    color: #999;
    margin-top: 10px;
}

/* Shipment Cards */
.trk-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #0B1D3A;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #C9A84C;
    display: inline-block;
}

.trk-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.trk-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.trk-card-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    gap: 12px;
}

.trk-id-col {
    display: flex;
    flex-direction: column;
    min-width: 130px;
}

.trk-order-id {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 14px;
    color: #0B1D3A;
    letter-spacing: 0.5px;
}

.trk-method-badge {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.trk-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.trk-product {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.trk-meta {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.trk-status-col {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.trk-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: color-mix(in srgb, var(--badge-color) 12%, transparent);
    color: var(--badge-color);
    border: 1px solid color-mix(in srgb, var(--badge-color) 25%, transparent);
}

.trk-chevron {
    font-size: 20px;
    color: #ccc;
    transition: transform 0.3s;
    line-height: 1;
}

/* Expandable Detail */
.trk-detail {
    overflow: hidden;
    transition: max-height 0.4s ease;
    border-top: 1px solid #f0f0f0;
}

.trk-detail-inner {
    padding: 16px 18px;
}

/* Invoice Mini Table */
.trk-invoice-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.trk-inv-row {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.trk-inv-label {
    color: #999;
    font-size: 11px;
    margin-bottom: 2px;
}

.trk-inv-row span:last-child {
    color: #333;
    font-weight: 500;
}

/* Timeline */
.trk-timeline {
    position: relative;
    padding-left: 4px;
}

.tl-item {
    position: relative;
    padding-left: 28px;
    padding-bottom: 16px;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px currentColor;
    z-index: 1;
}

.tl-line {
    position: absolute;
    left: 5px;
    top: 18px;
    width: 2px;
    bottom: 0;
    background: #e0e0e0;
}

.tl-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tl-date {
    font-size: 11px;
    color: #999;
    font-family: 'Courier New', monospace;
}

.tl-status {
    font-size: 13px;
    font-weight: 600;
}

.tl-detail {
    font-size: 12px;
    color: #666;
}

/* No Results */
.trk-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.trk-no-results-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.trk-no-results p {
    margin: 6px 0;
    font-size: 14px;
}

.trk-no-results a {
    color: #0B1D3A;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .trk-card-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .trk-id-col {
        min-width: auto;
    }
    .trk-status-col {
        margin-left: auto;
    }
    .trk-invoice-table {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .tracking-input-wrap {
        flex-direction: column;
    }
    .tracking-search-btn {
        width: 100%;
        padding: 14px;
    }
    .trk-invoice-table {
        grid-template-columns: 1fr;
    }
    .trk-meta {
        font-size: 11px;
    }
}
