/* =========================================================
   AJEEB EXPRESS — REUSABLE COMPONENTS
   Load order:
   1. app.css
   2. components.css
   3. home.css
   This file contains reusable UI components only:
   - Buttons
   - Tracking modal
   - Tracking form/result
   - Timeline
   - Shared animations
   - Shared section typography
========================================================= */
/* =========================================================
   1. BUTTONS
========================================================= */
.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 21px;
}
.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 19px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition:
        background var(--transition),
        color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}
.button:hover {
    transform:
        translateY(-2px);
}
/* ---------- Primary ---------- */
.button-primary {
    color: #fff;
    background:
        var(--primary);
    box-shadow:
        var(--shadow-red);
    gap: 12px;
}
.button-primary:hover {
    color: #fff;
    background:
        var(--primary-hover);
}
/* ---------- Secondary ---------- */
.button-secondary {
    color:
        var(--text);
    background:
        var(--surface);
    box-shadow:
        var(--shadow-sm);
}
.button-secondary:hover {
    background:
        var(--surface);
}
/* =========================================================
   2. TRACKING MODAL
========================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    place-items: center;

    padding: 18px;
    box-sizing: border-box;

    background: rgba(25, 25, 28, .48);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity var(--transition),
        visibility var(--transition);
}

/* Support both class names */
.modal-overlay.active,
.modal-overlay.open {
    display: grid;
    place-items: center;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-overlay.active .tracking-modal,
.modal-overlay.open .tracking-modal {
    transform: translateY(0) scale(1);
}
/* =========================================================
   3. TRACKING MODAL BOX
========================================================= */
.tracking-modal {
    position: relative;
    width: min(
        100%,
        650px
    );
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 23px;
    border:
        1px solid rgba(255, 255, 255, .55);
    border-radius: 21px;
    background:
        color-mix(
            in srgb,
            var(--surface) 88%,
            transparent
        );
    backdrop-filter:
        blur(22px);
    -webkit-backdrop-filter:
        blur(22px);
    box-shadow:
        0 35px 80px rgba(0, 0, 0, .25);
    transform:
        translateY(18px)
        scale(.98);
    transition:
        transform var(--transition);
}
.modal-overlay.open .tracking-modal {
    transform: none;
}
/* =========================================================
   4. MODAL CLOSE BUTTON
========================================================= */
.modal-close {
    position: absolute;
    top: 13px;
    inset-inline-end: 14px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background:
        transparent;
    cursor: pointer;
    font-size: 22px;
    border-radius: 8px;
    transition:
        background var(--transition),
        color var(--transition);
}
.modal-close:hover {
    background:
        rgba(189, 30, 32, .07);
    color:
        var(--primary);
}
/* =========================================================
   5. TRACKING TITLE
========================================================= */
.tracking-title-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-inline-end: 25px;
}
.tracking-title-row h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}
/* =========================================================
   6. LIVE INDICATOR
========================================================= */
.live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding:
        4px 8px;
    color:
        var(--primary);
    border:
        1px solid rgba(189, 30, 32, .3);
    border-radius:
        999px;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .15em;
    white-space: nowrap;
}
.live::before {
    content: "";
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background:
        var(--primary);
    animation:
        livePulse 1.1s infinite;
}
/* =========================================================
   7. TRACKING DESCRIPTION
========================================================= */
.tracking-description {
    max-width: 540px;
    margin:
        7px 0 16px;
    color:
        var(--text-secondary);
    font-size: 11px;
    line-height: 1.5;
}
/* =========================================================
   8. TRACKING FORM
========================================================= */
.tracking-form {
    display: flex;
    gap: 8px;
    width: 100%;
}
.tracking-input {
    min-width: 0;
    flex: 1;
    width: 100%;
    height: 47px;
    padding:
        0 15px;
    color:
        var(--text);
    border:
        1px solid var(--border);
    outline: 0;
    border-radius: 11px;
    background:
        color-mix(
            in srgb,
            var(--surface) 92%,
            transparent
        );
    transition:
        border var(--transition),
        box-shadow var(--transition);
}
.tracking-input:focus {
    border-color:
        rgba(189, 30, 32, .42);
    box-shadow:
        0 0 0 4px rgba(189, 30, 32, .07);
}
.track-submit {
    min-width: 94px;
    flex: 0 0 auto;
}
/* =========================================================
   9. TRACKING RESULT
========================================================= */
.tracking-result {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 15px;
    border:
        1px solid var(--border);
    border-radius: 14px;
    background:
        color-mix(
            in srgb,
            var(--surface) 88%,
            transparent
        );
}
.tracking-result.show {
    display: block;
    animation:
        fadeUp .35s var(--ease);
}

/* =========================================================
   14. SCROLL REVEAL
========================================================= */
.reveal {
    opacity: 0;
    transform:
        translateY(28px);
    transition:
        opacity .75s var(--ease),
        transform .75s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform:
        none;
}
/* =========================================================
   15. SHARED SECTION KICKER
========================================================= */
.section-kicker {
    margin:
        0 0 14px;
    color:
        #985356;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .32em;
    text-transform: uppercase;
}

html[dir="rtl"] .section-kicker {
    letter-spacing: .04em;
}
/* =========================================================
   16. SHARED SECTION TITLE
========================================================= */
.section-title {
    margin: 0;
    font-size:
        clamp(34px, 4vw, 56px);
    line-height: 1;
    letter-spacing:
        -.045em;
    font-weight: 850;
}

html[dir="rtl"] .section-title {
    letter-spacing:
        -.015em;
}
/* =========================================================
   17. SHARED SECTION COPY
========================================================= */
.section-copy {
    margin:
        14px 0 0;
    color:
        var(--muted);
    line-height: 1.6;
}
/* =========================================================
   18. COMPONENT RESPONSIVE RULES
========================================================= */
/*
 * These rules are only for reusable components.
 * Page-specific responsive rules remain in home.css.
 */
@media (max-width: 720px) {
    .hero-buttons {
        width: 100%;
    }
    .button {
        min-width: 0;
    }
    .tracking-modal {
        width: 100%;
        max-height:
            calc(100vh - 30px);
        padding: 20px;
        border-radius: 18px;
    }
    .tracking-title-row {
        gap: 8px;
    }
    .tracking-title-row h2 {
        font-size: 17px;
    }
    .tracking-form {
        flex-direction: column;
    }
    .tracking-input {
        flex: none;
    }
    .track-submit {
        width: 100%;
        min-height: 44px;
    }
    .tracking-footer {
        align-items: flex-start;
        flex-direction: column;
    }
    .whatsapp {
        align-self: flex-start;
    }
}
@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-buttons .button {
        width: 100%;
    }
    .modal-overlay {
        padding: 10px;
    }
    .tracking-modal {
        padding: 18px;
        border-radius: 16px;
    }
    .tracking-title-row {
        padding-inline-end: 24px;
        align-items: flex-start;
        flex-direction: column;
    }
    .tracking-description {
        font-size: 10px;
    }
    .section-title {
        font-size:
            clamp(32px, 9vw, 42px);
    }
}
/* =========================================================
   19. REDUCED MOTION
========================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
