/* ============================================================
   Giant Kenya Logistics LTD — assets/css/style.css
   Custom overrides layered on top of Tailwind CSS (CDN).
   Brand: Deep Navy #0A2342 · Safety Orange #FF6B00
   ============================================================ */

:root {
    --navy: #0A2342;
    --navy-soft: #12335e;
    --safety: #FF6B00;
    --safety-dark: #e35f00;
    --whatsapp: #25D366;
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* offset sticky header on anchor jumps */
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--safety);
    color: #ffffff;
}

/* Accessible focus ring */
:focus-visible {
    outline: 3px solid rgba(255, 107, 0, 0.55);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Hero decorative background ---------- */
.hero-pattern {
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 26px 26px;
}

.hero-glow {
    background: radial-gradient(circle at 30% 20%, rgba(255, 107, 0, 0.18), transparent 55%);
}

/* ---------- Floating animation (hero badges) ---------- */
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
.animate-floaty {
    animation: floaty 6s ease-in-out infinite;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ---------- WhatsApp pulse ring ---------- */
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
    70%  { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.whatsapp-pulse {
    animation: pulse-ring 2s infinite;
}

/* ---------- Navigation underline links ---------- */
.nav-link {
    position: relative;
    padding-bottom: 2px;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 2px;
    width: 0;
    background: var(--safety);
    transition: width 0.25s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ---------- Form inputs ---------- */
.form-field {
    position: relative;
}
.form-field::after {
    content: attr(data-error);
    display: block;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 6px;
    min-height: 0;
}
.form-field:not([data-error])::after {
    content: "";
}
.field-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-input:focus {
    border-color: var(--safety);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18);
}
.field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ---------- Service cards ---------- */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #e2e8f0;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px -12px rgba(10, 35, 66, 0.22);
    border-color: rgba(255, 107, 0, 0.45);
}
.service-card:hover .service-icon {
    background: var(--safety);
    color: #ffffff;
}
.service-icon {
    transition: background 0.3s ease, color 0.3s ease;
}

/* ---------- Custom scrollbar (WebKit) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #eef2f7; }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--safety); }

/* ---------- FAQ accordion ---------- */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.faq-question .faq-icon {
    transition: transform 0.3s ease;
}
.faq-open .faq-icon {
    transform: rotate(180deg);
}
.faq-item {
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.faq-item.faq-open {
    border-color: rgba(255, 107, 0, 0.5);
    box-shadow: 0 10px 24px -12px rgba(10, 35, 66, 0.18);
}

/* ---------- Testimonials carousel ---------- */
.testimonial-slides {
    display: flex;
}
.testimonial-slide {
    min-width: 100%;
    max-width: 100%;
}
/* Guarantee long quotes wrap inside the card instead of overflowing */
.testimonial-slide blockquote {
    overflow-wrap: break-word;
    word-break: break-word;
}
/* Client logo shown instead of the client name */
.testimonial-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 8px -4px rgba(10, 35, 66, 0.08);
}
.testimonial-logo {
    max-height: 44px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
}
/* Client logos in the "Clients Portfolio" grid (about page) */
.client-logo {
    max-height: 56px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ---------- How It Works steps ---------- */
.step-card {
    transition: transform 0.3s ease, background 0.3s ease;
}
.step-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.1);
}

/* ---------- Google Map ---------- */
.map-wrap iframe {
    display: block;
}

/* ---------- Background image helpers (WebP) ----------
   Paths are relative to this stylesheet (/assets/css/) and work
   at the domain root or in a subfolder. */
.img-bg-containers { background-image: url('../../assets/img/containers.webp'); }
.img-bg-ship       { background-image: url('../../assets/img/cargo-ship.webp'); }
.img-bg-truck      { background-image: url('../../assets/img/truck.webp'); }
.img-bg-truck1     { background-image: url('../../assets/img/truck1.webp'); }
.img-bg-truck2     { background-image: url('../../assets/img/truck2.webp'); }
.img-bg-containers,
.img-bg-ship,
.img-bg-truck,
.img-bg-truck1,
.img-bg-truck2 {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ---------- Cookie consent bar ----------
   The bar is VISIBLE BY DEFAULT in the HTML (footer.php). It is hidden
   only by the inline script when a choice is saved, or by Allow/Deny. */
.cookie-bar {
    animation: cookieUp 0.4s ease-out;
}
@keyframes cookieUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Right-click / long-press menu suppression ----------
   The context menu event is cancelled in JS (assets/js/main.js); iOS Safari
   never fires that event and instead shows its own link/image callout, so the
   long-press menu is disabled here. Removing this rule only re-enables the
   long-press callout on iOS — right-click stays disabled everywhere else. */
html, body, a, img, button, [contenteditable="true"] {
    -webkit-touch-callout: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .animate-floaty, .whatsapp-pulse, .service-card { animation: none; transition: none; }
    .faq-answer { transition: none; }
    .testimonial-slides { transition: none; }
    .cookie-bar { animation: none; }
}
