/* ========================================
   TANZANIA DESTINATION - CONVERSION COMPONENTS
   Forms feedback, homepage funnel sections, trust, mobile CTA bar.
   Built on the brand tokens in main.css.
   ======================================== */

/* ---------- Form feedback ---------- */
.hp-field {
    position: absolute !important;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-message {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin: 0 0 20px;
    font-weight: 600;
    line-height: 1.5;
}
.form-message-success { background: #EAF4E4; color: #2F4A1C; border: 1px solid #B9D3A6; }
.form-message-error { background: #FDECEA; color: #8A1C12; border: 1px solid #F3B8B1; }

.field-error {
    color: #B42318;
    font-size: 14px;
    margin-top: 6px;
}
input.error, select.error, textarea.error { border-color: #D92D20; }

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: td-spin 0.8s linear infinite;
}
@keyframes td-spin { to { transform: rotate(360deg); } }

.form-hint { font-size: 14px; color: #6B6560; margin-top: 6px; }
.form-section-title { font: 600 20px/1.3 var(--font-display); color: var(--navy); margin: 32px 0 6px; }
.form-section-sub { color: #6B6560; font-size: 15px; margin-bottom: 16px; }

/* Large touch-friendly choice chips (checkbox / radio) */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 14px;
    background: var(--off-white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--navy);
    margin: 0;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.choice input { width: 20px; height: 20px; flex-shrink: 0; margin: 0; accent-color: var(--khaki); }
.choice:has(input:checked) { border-color: var(--khaki); background: var(--khaki-pale); }
.choice:focus-within { box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.25); }

/* ---------- Buttons ---------- */
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1EBE5A; color: #fff; transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--khaki-pale); color: var(--navy); transform: translateY(-2px); }

/* ---------- Homepage: hero ---------- */
.hero-title.hero-title-funnel {
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: 0.5px;
}
.hero-title-funnel span { display: block; }
.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 28px;
}
.hero-chat-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.hero-chat-link:hover { color: var(--savanna); }
.hero-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    margin-top: 28px;
    padding: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    font-weight: 600;
}
.hero-trust li { display: flex; align-items: center; gap: 8px; }
.hero-trust li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--savanna);
}

/* ---------- Homepage: safari finder ---------- */
.finder-section {
    position: relative;
    z-index: 5;
    margin-top: -70px;
    padding-bottom: 40px;
}
.finder-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 28px 28px 24px;
}
.finder-card h2 { font-size: 28px; margin-bottom: 4px; }
.finder-card > p { color: #6B6560; margin-bottom: 18px; }
.finder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr 1fr auto;
    gap: 14px;
    align-items: end;
}
.finder-grid .form-group { margin: 0; }
.finder-grid .btn { min-height: 54px; white-space: nowrap; }

/* ---------- Generic section helpers ---------- */
.section-intro { max-width: 680px; margin: 14px auto 40px; color: #55524D; }

/* Why travel with us */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.why-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    border-top: 4px solid var(--khaki);
    box-shadow: var(--shadow-sm);
}
.why-card h3 {
    font: 700 15px/1.3 var(--font-body);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--khaki);
    margin-bottom: 10px;
}
.why-card p { margin: 0; font-size: 17px; color: var(--navy); font-family: var(--font-display); line-height: 1.45; }

/* Verified stats (rendered with real values; JS only animates) */
.stats-band { background: var(--navy); color: #fff; padding: 44px 0; }
.stats-band .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; text-align: center; }
.stats-band .stat-number { font: 700 44px/1 var(--font-display); color: var(--savanna); }
.stats-band .stat-label { color: var(--dusk); margin-top: 8px; font-size: 15px; }
.selling-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.selling-point h3 { color: #fff; font: 700 19px/1.3 var(--font-body); margin-bottom: 6px; }
.selling-point p { color: var(--dusk); margin: 0; font-size: 15px; }

/* Safari styles */
.style-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.style-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 210px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--navy) center/cover no-repeat;
    color: #fff;
    padding: 18px;
    font: 700 18px/1.25 var(--font-display);
    isolation: isolate;
}
.style-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 27, 45, 0.85), rgba(15, 27, 45, 0.05) 65%);
    z-index: -1;
    transition: background var(--transition-normal);
}
.style-card:hover { color: #fff; }
.style-card:hover::before { background: linear-gradient(to top, rgba(15, 27, 45, 0.95), rgba(15, 27, 45, 0.25) 70%); }
.style-card span::after { content: ' →'; color: var(--savanna); }

/* Reviews */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.review-card {
    background: #fff;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
}
.review-card .review-stars { color: var(--savanna); letter-spacing: 2px; font-size: 18px; }
.review-card h3 { font: 700 18px/1.35 var(--font-body); margin: 6px 0 10px; }
.review-card blockquote { margin: 0 0 16px; color: #3A3835; font-size: 16px; line-height: 1.65; flex: 1; }
.review-meta { font-size: 14px; color: #6B6560; border-top: 1px solid var(--light-gray); padding-top: 12px; }
.review-meta strong { color: var(--navy); }
.review-source a { color: var(--khaki); font-weight: 600; }

/* How it works */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    counter-reset: step;
}
.step { text-align: center; padding: 0 8px; }
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--khaki-pale);
    color: var(--khaki);
    font: 700 24px var(--font-display);
}
.step h3 { font: 700 18px/1.3 var(--font-body); margin-bottom: 6px; }
.step p { font-size: 15px; color: #55524D; margin: 0; }
.steps-note { text-align: center; margin-top: 32px; font: italic 22px var(--font-accent); color: var(--navy); }

/* FAQ / objection handling (native details: works without JS) */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-list details {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 0 20px;
}
.faq-list summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 32px 18px 0;
    position: relative;
    font: 600 18px/1.4 var(--font-body);
    color: var(--navy);
    min-height: 44px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 0; top: 14px; font-size: 26px; color: var(--khaki); }
.faq-list details[open] summary::after { content: '−'; }
.faq-list .faq-body { padding-bottom: 18px; color: #4A4743; }
.faq-list .faq-body p { margin-bottom: 10px; }
.faq-list .faq-body a { color: var(--khaki); font-weight: 600; text-decoration: underline; }

/* Final conversion */
.final-cta {
    background: linear-gradient(rgba(15, 27, 45, 0.72), rgba(15, 27, 45, 0.82)), url('../../img/td (1).jpg') center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 100px 0;
}
.final-cta h2 { color: #fff; font-size: clamp(30px, 4.5vw, 48px); max-width: 820px; margin: 0 auto; }
.final-cta p { color: var(--dusk); font: italic 26px var(--font-accent); margin: 14px 0 30px; }

/* ---------- Package page ---------- */
.pkg-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 28px; }
.pkg-fact { background: var(--khaki-pale); border-radius: var(--radius-md); padding: 16px; }
.pkg-fact small { display: block; color: #6B6560; font-size: 13px; }
.pkg-fact strong { color: var(--navy); font-size: 16px; }
.pkg-section { margin-top: 48px; }
.pkg-section h2 { margin-bottom: 18px; font-size: 32px; }
.tick-list li, .cross-list li { padding: 6px 0 6px 28px; position: relative; }
.tick-list li::before { content: '✓'; position: absolute; left: 0; color: var(--grass); font-weight: 700; }
.cross-list li::before { content: '✗'; position: absolute; left: 0; color: var(--earth); font-weight: 700; }
.itinerary-day { border: 1px solid var(--light-gray); border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden; }
.itinerary-day summary { cursor: pointer; padding: 16px 18px; font-weight: 700; color: var(--navy); background: var(--off-white); list-style: none; min-height: 44px; }
.itinerary-day summary::-webkit-details-marker { display: none; }
.itinerary-day[open] summary { background: var(--khaki-pale); }
.itinerary-day .day-body { padding: 16px 18px; }
.itinerary-day .day-meta { font-size: 14px; color: #6B6560; margin: 0; }

/* ---------- Thank-you page ---------- */
.thanks-card { max-width: 760px; margin: 0 auto; text-align: center; }
.thanks-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--grass); display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; }
.thanks-ref { display: inline-block; background: var(--khaki-pale); padding: 14px 24px; border-radius: var(--radius-md); margin: 6px 0 24px; }
.thanks-ref small { display: block; color: #6B6560; }
.thanks-ref strong { font: 700 24px var(--font-display); color: var(--navy); letter-spacing: 1px; }
.thanks-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.thanks-next { text-align: left; background: var(--off-white); border-radius: var(--radius-lg); padding: 24px 28px; margin-top: 28px; }
.thanks-next ol { list-style: decimal; padding-left: 20px; line-height: 1.8; }

/* ---------- Trust centre ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.trust-item { background: #fff; border: 1px solid var(--light-gray); border-radius: var(--radius-md); padding: 20px; }
.trust-item small { color: #6B6560; display: block; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; font-weight: 700; }
.trust-item strong { color: var(--navy); font-size: 17px; }
.trust-item a { color: var(--khaki); font-weight: 600; }

/* ---------- Mobile sticky conversion bar ---------- */
.mobile-cta-bar { display: none; }

@media (max-width: 768px) {
    .mobile-cta-bar {
        display: grid;
        grid-template-columns: 1.4fr 1fr;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9998;
        background: #fff;
        box-shadow: 0 -4px 16px rgba(15, 27, 45, 0.15);
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        gap: 8px;
    }
    .mobile-cta-bar a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 50px;
        border-radius: var(--radius-md);
        font-weight: 700;
        font-size: 15px;
        letter-spacing: 0.5px;
        color: #fff;
    }
    .mobile-cta-bar .mcb-plan { background: var(--khaki); }
    .mobile-cta-bar .mcb-wa { background: #25D366; }
    .mobile-cta-bar svg { width: 20px; height: 20px; fill: currentColor; }

    /* Reserve space so the bar never covers page content, and drop the duplicate floating button. */
    body.has-mobile-cta { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
    body.has-mobile-cta .whatsapp-float { display: none; }

    /* Package page: show the safari before the enquiry form (hero + sticky bar already offer CTAs). */
    .safari-sidebar { order: 2 !important; margin-top: 40px; }
    .safari-sidebar .card { position: static !important; }

    .finder-section { margin-top: 0; padding-top: 24px; }
    .finder-grid { grid-template-columns: 1fr 1fr; }
    .finder-grid .finder-experience, .finder-grid .finder-submit { grid-column: 1 / -1; }
    .finder-grid .btn { width: 100%; }
    .style-grid { grid-template-columns: repeat(2, 1fr); }
    .style-card { min-height: 150px; font-size: 16px; }
    .steps { grid-template-columns: 1fr 1fr; }
    .hero-cta-row .btn { width: 100%; }
    .choice-grid { grid-template-columns: 1fr 1fr; }
    input, select, textarea { font-size: 16px; min-height: 50px; } /* 16px stops iOS zoom-on-focus */
}

@media (min-width: 769px) and (max-width: 1100px) {
    .finder-grid { grid-template-columns: 1fr 1fr 1fr; }
    .finder-grid .finder-experience { grid-column: span 2; }
    .style-grid { grid-template-columns: repeat(3, 1fr); }
    .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
    .steps { grid-template-columns: 1fr; }
    .choice { font-size: 14px; padding: 10px; gap: 8px; }
}

@media (max-width: 340px) {
    .choice-grid { grid-template-columns: 1fr; }
}
