/* =====================================================
   LUXURY TRACKING PAGE STYLES (MATCHES HOME)
   ===================================================== */

/* =====================================================
   VISUAL STEPPER
   ===================================================== */
.stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    position: relative;
    z-index: 2;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all 0.4s ease;
}

.step.active .step-icon {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
    box-shadow: 0 0 20px rgba(201, 160, 67, 0.4);
}

.step.completed .step-icon {
    background: #2e7d32;
    border-color: #2e7d32;
    color: white;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s ease;
}

.step.active .step-label, 
.step.completed .step-label {
    color: var(--text-primary);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 -20px;
    margin-top: -34px; /* Align with icon center */
    z-index: 1;
}

.step-line.completed {
    background: #2e7d32;
}

/* =====================================================
   MOBILE STEPPER — Redesigned vertical/pill layout
   ===================================================== */
@media (max-width: 768px) {
    /* Override the horizontal layout entirely on mobile */
    .stepper {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 8px;
    }

    .step {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        flex: unset;
        padding: 14px 18px;
        border-radius: 16px;
        background: var(--bg-secondary);
        margin-bottom: 4px;
        transition: background 0.3s ease, box-shadow 0.3s ease;
    }

    .step.active {
        background: rgba(201, 160, 67, 0.12);
        box-shadow: 0 4px 20px rgba(201, 160, 67, 0.18);
    }

    .step.completed {
        background: rgba(46, 125, 50, 0.07);
    }

    .step-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .step-label {
        display: block;   /* Always visible on mobile */
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-secondary);
        letter-spacing: 0.5px;
        text-transform: none;
    }

    .step.active .step-label {
        color: var(--gold);
        font-weight: 700;
    }

    .step.completed .step-label {
        color: #2e7d32;
    }

    /* Replace horizontal line with a small vertical connector */
    .step-line {
        width: 2px;
        height: 20px;
        margin: 0 0 0 39px;   /* aligned with icon center */
        margin-top: 0;
        background: var(--border);
        flex: unset;
    }

    .step-line.completed {
        background: #2e7d32;
    }
}

/* Reuse .hero from style.css but add specific track page spacing */
.track-page-hero {
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--gold);
}

/* =====================================================
   NEW LUXURY SEARCH - DESKTOP & MOBILE
   ===================================================== */

/* Animated gradient border keyframe */
@keyframes borderGlow {
    0%, 100% { border-color: rgba(201, 160, 67, 0.3); }
    50% { border-color: rgba(201, 160, 67, 0.7); }
}

@keyframes scanLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes inputFocusPulse {
    0% { box-shadow: 0 0 0 0 rgba(201, 160, 67, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(201, 160, 67, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 160, 67, 0); }
}

.luxury-search-wrapper {
    margin: 40px auto 0;
    max-width: 780px;
    position: relative;
}

/* === DESKTOP DESIGN === */
.luxury-search-box {
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 0 rgba(255,255,255,0.1) inset;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.luxury-search-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(201,160,67,0.4), transparent 40%, transparent 60%, rgba(201,160,67,0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.luxury-search-box:hover,
.luxury-search-box:focus-within {
    border-color: rgba(201, 160, 67, 0.3);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(201, 160, 67, 0.08),
        0 0 0 1px rgba(201, 160, 67, 0.15) inset;
    transform: translateY(-4px);
}

.luxury-search-box:focus-within::before {
    opacity: 1;
}

/* Input Group */
.lux-input-group {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 28px;
    position: relative;
    gap: 16px;
}

.lux-icon {
    color: var(--gold);
    font-size: 1.4rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(201, 160, 67, 0.4));
    transition: all 0.4s ease;
}

.luxury-search-box:focus-within .lux-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 12px rgba(201, 160, 67, 0.6));
}

body.rtl .lux-icon {
    order: 0; /* Keep icon order in RTL, gap handles spacing */
}

.lux-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 22px 0;
    font-size: 1.15rem;
    color: #ffffff;
    outline: none;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.04em;
    min-width: 0;
}

.lux-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    font-size: 1rem;
}

/* Divider line between input and button */
.lux-input-group::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.15), transparent);
}

body.rtl .lux-input-group::after {
    right: auto;
    left: 0;
}

/* === BUTTON === */
.lux-btn {
    border-radius: 0 18px 18px 0;
    padding: 22px 40px;
    font-size: 1.05rem;
    font-weight: 700;
    min-width: 180px;
    background: linear-gradient(135deg, var(--gold), #e8b84a);
    color: var(--navy-dark);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    z-index: 1;
    letter-spacing: 0.03em;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

body.rtl .lux-btn {
    border-radius: 18px 0 0 18px;
}

.lux-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    z-index: -1;
    transition: left 0.7s ease;
}

.lux-btn:hover {
    background: linear-gradient(135deg, #dba73d, var(--gold-dark));
    box-shadow: 0 0 30px rgba(201, 160, 67, 0.4);
}

.lux-btn:hover::before {
    left: 100%;
}

.lux-btn:active {
    transform: scale(0.97);
}

.lux-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.lux-btn:hover i {
    transform: translateX(-4px);
}

body.rtl .lux-btn:hover i {
    transform: translateX(4px);
}

/* === SEARCH HINTS (below the box) === */
.search-hints {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.search-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    font-weight: 500;
}

.search-hint i {
    color: var(--gold);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Supportive Tracking Features */
.track-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.track-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    opacity: 0.9;
    font-size: 1.05rem;
    font-weight: 500;
}

.track-feature i {
    color: var(--gold);
    font-size: 1.2rem;
}

/* =====================================================
   MOBILE SEARCH REDESIGN
   ===================================================== */
@media (max-width: 768px) {
    .luxury-search-wrapper {
        margin: 30px 8px 0;
        max-width: 100%;
    }

    .luxury-search-box {
        flex-direction: column;
        border-radius: 24px;
        padding: 0;
        gap: 0;
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    }

    .luxury-search-box::before {
        border-radius: 24px;
    }

    .luxury-search-box:hover,
    .luxury-search-box:focus-within {
        transform: none;
    }

    .lux-input-group {
        width: 100%;
        padding: 6px 20px;
        gap: 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .lux-input-group::after {
        display: none;
    }

    .lux-icon {
        font-size: 1.3rem;
    }

    .lux-input-group input {
        padding: 18px 0;
        font-size: 1rem;
    }

    .lux-input-group input::placeholder {
        font-size: 0.9rem;
    }

    .lux-btn {
        width: 100%;
        border-radius: 0 0 24px 24px;
        padding: 18px 30px;
        min-width: auto;
        font-size: 1rem;
        justify-content: center;
        background: linear-gradient(135deg, var(--gold), #dba73d);
        position: relative;
        overflow: hidden;
    }

    body.rtl .lux-btn {
        border-radius: 0 0 24px 24px;
    }

    /* Scanning light animation on mobile button */
    .lux-btn::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        animation: scanLine 3s ease-in-out infinite;
    }

    .search-hints {
        gap: 16px;
        margin-top: 16px;
    }

    .search-hint {
        font-size: 0.78rem;
    }

    .track-features {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
}

/* Tracking Result Area */
.track-result {
    padding: 80px 0;
    display: none;
    /* Shown after search */
}

.track-result.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.track-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
}

/* Shipment Info Card */
.shipment-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid rgba(27, 58, 107, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shipment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.shipment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.id-tag {
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.status-badge {
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Mobile: status at top = full-width block */
.mobile-status {
    display: none;
}

@media (max-width: 768px) {
    .desktop-status {
        display: none !important;
    }
    .mobile-status {
        display: flex !important;
        width: 100%;
        justify-content: center;
        font-size: 0.9rem;
        margin-bottom: 12px;
        border-radius: 14px;
        padding: 12px 22px;
    }
}

.status-badge.ready-to-load {
    background: rgba(201, 160, 67, 0.1);
    color: var(--gold);
    border: 1px solid rgba(201, 160, 67, 0.2);
}

.status-badge.empty-to-the-shipper {
    background: rgba(255, 77, 77, 0.12);
    color: #ff4d4d;
    border: 2px solid rgba(255, 77, 77, 0.3);
}

.status-badge.loaded-on-vessel {
    background: rgba(0, 150, 136, 0.1);
    color: #009688;
    border: 1px solid rgba(0, 150, 136, 0.2);
}

.status-badge.departed {
    background: rgba(25, 118, 210, 0.1);
    color: #1976d2;
    border: 1px solid rgba(25, 118, 210, 0.2);
}

.status-badge.transbordement-discharged {
    background: rgba(156, 39, 176, 0.1);
    color: #9c27b0;
    border: 1px solid rgba(156, 39, 176, 0.2);
}

.status-badge.transbordement-loaded {
    background: rgba(156, 39, 176, 0.1);
    color: #9c27b0;
    border: 1px solid rgba(156, 39, 176, 0.2);
}

.status-badge.arrived {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
}

.info-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.info-item label i {
    color: var(--gold);
    font-size: 1rem;
}

.info-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Timeline */
.timeline-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid rgba(27, 58, 107, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

#res-timeline {
    position: relative;
    padding-left: 32px;
}

body.rtl #res-timeline {
    padding-left: 0;
    padding-right: 32px;
}

#res-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

body.rtl #res-timeline::before {
    left: auto;
    right: 6px;
}

.timeline-step {
    position: relative;
    padding-bottom: 32px;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--timeline-line);
    z-index: 2;
    transition: all var(--transition);
}

body.rtl .timeline-step::before {
    left: auto;
    right: -28px;
}

.timeline-step.completed::before {
    background: var(--gold);
    border-color: var(--bg-card);
    box-shadow: 0 0 0 3px var(--gold);
}

.timeline-step.current::before {
    background: var(--navy);
    border-color: var(--bg-card);
    box-shadow: 0 0 0 3px var(--navy);
    animation: pulse-navy 2s infinite;
}

@keyframes pulse-navy {
    0% {
        box-shadow: 0 0 0 0 rgba(27, 58, 107, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(27, 58, 107, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(27, 58, 107, 0);
    }
}

.step-date {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 4px;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2px 0 4px;
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.no-result {
    text-align: center;
    padding: 60px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-top: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    display: none;
}

.no-result i {
    font-size: 4.5rem;
    background: linear-gradient(135deg, var(--navy), var(--text-muted));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
}

.no-result h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

@media (max-width: 992px) {
    .track-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   GUIDE CARDS — Status-based tracking guide
   ===================================================== */
.guide-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px 28px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.guide-card:hover::before {
    opacity: 1;
}

.guide-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
    transition: transform 0.3s ease;
}

.guide-card:hover .guide-card-icon {
    transform: scale(1.1) rotate(-4deg);
}

.guide-card-step {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.guide-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.guide-card-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .guide-card {
        padding: 24px 20px;
    }
    .guide-card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        border-radius: 14px;
    }
    .guide-card-title {
        font-size: 1.05rem;
    }
}