/**
 * Africa Safari Connect — Tour Operator profile mobile refinements.
 * v1.10.385
 *
 * Presentation only. Operator data, verification, inquiries, reviews and
 * marketplace lifecycle remain owned by Traveler Operators Directory.
 */

@media (max-width: 720px) {
    /* Keep the profile comfortably inside narrow phone viewports. */
    .tod-profile-template .tod-profile-design-c {
        margin: 14px auto 48px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /*
     * Hero: let content determine the height instead of forcing a large fixed
     * mobile canvas. A stronger lower fade keeps identity copy separate from
     * busy cover photography.
     */
    .tod-profile-design-c .tod-c-hero {
        min-height: 0 !important;
        border-radius: 12px 12px 0 0 !important;
        background-position: center top !important;
    }
    .tod-profile-design-c .tod-c-hero__shade {
        background: linear-gradient(
            180deg,
            rgba(3, 25, 18, .24) 0%,
            rgba(3, 25, 18, .54) 30%,
            rgba(3, 25, 18, .88) 54%,
            rgba(3, 25, 18, .97) 100%
        ) !important;
    }
    .tod-profile-design-c .tod-c-breadcrumb {
        left: 16px !important;
        right: 16px !important;
        top: 14px !important;
        gap: 6px !important;
        font-size: 10px !important;
        line-height: 1.35;
        max-width: calc(100% - 32px);
        overflow: hidden;
        white-space: nowrap;
    }
    .tod-profile-design-c .tod-c-breadcrumb a,
    .tod-profile-design-c .tod-c-breadcrumb span {
        flex: 0 0 auto;
    }
    .tod-profile-design-c .tod-c-breadcrumb span[aria-current="page"] {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tod-profile-design-c .tod-c-hero__content {
        position: relative !important;
        inset: auto !important;
        display: block !important;
        padding: 112px 16px 18px !important;
    }
    .tod-profile-design-c .tod-c-logo {
        width: 72px !important;
        height: 72px !important;
        min-width: 72px !important;
        flex-basis: 72px !important;
        margin: 0 0 10px !important;
        padding: 6px !important;
        border-width: 3px !important;
        border-radius: 10px !important;
        box-shadow: 0 7px 20px rgba(0,0,0,.22) !important;
    }
    .tod-profile-design-c .tod-c-status-row {
        gap: 6px !important;
        margin-bottom: 7px !important;
    }
    .tod-profile-design-c .tod-c-status {
        min-height: 24px;
        padding: 5px 7px !important;
        font-size: 9.5px !important;
        line-height: 1.1;
    }
    .tod-profile-design-c .tod-c-hero h1 {
        font-size: clamp(27px, 8vw, 31px) !important;
        line-height: 1.02 !important;
        margin-bottom: 6px !important;
        overflow-wrap: anywhere;
    }
    .tod-profile-design-c .tod-c-tagline {
        font-size: 13.5px !important;
        line-height: 1.42 !important;
        margin-bottom: 11px !important;
        max-width: 30rem;
    }

    /* Operator facts scan much more cleanly as a 2 x N board. */
    .tod-profile-design-c .tod-c-meta {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px 10px !important;
        margin-bottom: 14px !important;
    }
    .tod-profile-design-c .tod-c-meta span {
        min-width: 0;
        font-size: 10.5px !important;
        line-height: 1.3;
        gap: 5px !important;
    }

    /*
     * One clear conversion action in the hero. Review creation remains in the
     * Reviews section; WhatsApp and Website are secondary contact paths.
     */
    .tod-profile-design-c .tod-c-hero__actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .tod-profile-design-c .tod-c-hero__actions > .tod-c-btn--gold {
        grid-column: 1 / -1;
    }
    .tod-profile-design-c .tod-c-hero__actions > a[href*="tod_write_operator_review"] {
        display: none !important;
    }
    .tod-profile-design-c .tod-c-hero__actions .tod-c-btn {
        min-width: 0 !important;
        min-height: 42px !important;
        width: 100% !important;
        padding: 0 10px !important;
        font-size: 11px !important;
        line-height: 1.2;
        text-align: center;
    }

    /* Mobile section navigation behaves like the other marketplace guide rails. */
    .tod-profile-design-c .tod-c-profile-nav {
        position: relative !important;
        display: flex !important;
        gap: 7px !important;
        margin: 0 0 22px !important;
        padding: 8px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tod-profile-design-c .tod-c-profile-nav::-webkit-scrollbar { display: none; }
    .tod-profile-design-c .tod-c-profile-nav a {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 10px 13px !important;
        border: 1px solid #dde7e1 !important;
        border-radius: 999px !important;
        background: #f7faf8;
        color: #40584e !important;
        font-size: 11px !important;
        line-height: 1.1;
        scroll-snap-align: start;
    }
    .tod-profile-design-c .tod-c-profile-nav a:first-child {
        background: #0d5a43;
        border-color: #0d5a43 !important;
        color: #fff !important;
    }

    /* Main content: retain the story, but remove desktop-sized vertical gaps. */
    .tod-profile-design-c .tod-c-layout {
        gap: 18px !important;
    }
    .tod-profile-design-c .tod-c-story-section {
        gap: 16px !important;
        margin-bottom: 20px !important;
        padding: 2px 0 23px !important;
    }
    .tod-profile-design-c .tod-c-story__copy h2,
    .tod-profile-design-c .tod-c-section h2 {
        font-size: 24px !important;
        line-height: 1.12 !important;
    }
    .tod-profile-design-c .tod-rich-text {
        font-size: 14px !important;
        line-height: 1.7 !important;
    }
    .tod-profile-design-c .tod-c-story__lead {
        font-size: 15px !important;
        line-height: 1.5 !important;
    }
    .tod-profile-design-c .tod-c-story__media {
        min-height: 205px !important;
    }

    /* Credibility numbers remain visible but should not dominate the page. */
    .tod-profile-design-c .tod-c-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin-bottom: 24px !important;
    }
    .tod-profile-design-c .tod-c-stat {
        min-height: 76px !important;
        padding: 12px 7px !important;
    }
    .tod-profile-design-c .tod-c-stat:nth-child(odd):last-child {
        grid-column: 1 / -1;
    }
    .tod-profile-design-c .tod-c-stat i { font-size: 17px !important; }
    .tod-profile-design-c .tod-c-stat strong { font-size: 18px !important; }
    .tod-profile-design-c .tod-c-stat span { font-size: 9.5px !important; }

    .tod-profile-design-c .tod-c-section {
        margin-bottom: 21px !important;
        padding-bottom: 23px !important;
    }
    .tod-profile-design-c .tod-c-section-intro {
        font-size: 12.5px !important;
        line-height: 1.55 !important;
        margin-bottom: 13px !important;
    }

    /* Countries and expertise are discovery cards; 2-up is ideal on phones. */
    .tod-profile-design-c .tod-c-country-grid,
    .tod-profile-design-c .tod-c-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }
    .tod-profile-design-c .tod-c-country-card__image {
        height: 82px !important;
    }
    .tod-profile-design-c .tod-c-country-card__body {
        padding: 9px 10px 10px !important;
    }
    .tod-profile-design-c .tod-c-country-card__body strong {
        font-size: 12.5px !important;
    }
    .tod-profile-design-c .tod-c-country-card__body small {
        font-size: 9px !important;
    }
    .tod-profile-design-c .tod-c-type-card {
        min-height: 78px !important;
        padding: 11px 8px !important;
        font-size: 10.5px !important;
    }
    .tod-profile-design-c .tod-c-type-card i {
        font-size: 20px !important;
    }
    .tod-profile-design-c .tod-c-key-destinations {
        margin-top: 12px !important;
        padding: 9px 10px !important;
        font-size: 11.5px !important;
        line-height: 1.5 !important;
    }

    /* Tour cards need the full phone width, but not an oversized image. */
    .tod-profile-design-c .tod-c-tour-list > .tod-profile-canonical-tour-card,
    .tod-profile-design-c .tod-c-tour-strip {
        display: block !important;
        width: 100% !important;
    }
    .tod-profile-design-c .tod-profile-canonical-tour-card .tmc-tour-card__media,
    .tod-profile-design-c .tod-c-tour-strip__media {
        height: 185px !important;
        min-height: 185px !important;
    }

    /* Policies and reviews remain easy to tap without oversized gaps. */
    .tod-profile-design-c .tod-policy-item summary {
        min-height: 48px;
        padding: 14px 2px !important;
        font-size: 14px !important;
    }
    .tod-profile-design-c .tod-c-review-write {
        min-height: 42px;
        width: 100%;
    }
    .tod-profile-design-c .tod-review-card {
        padding: 15px !important;
    }

    /* Sidebar becomes normal document flow on phones; compact each trust card. */
    .tod-profile-design-c .tod-c-sidebar {
        margin-top: 0 !important;
    }
    .tod-profile-design-c .tod-c-side-card,
    .tod-profile-design-c .tod-company-card {
        margin-bottom: 14px !important;
    }
    .tod-profile-design-c .tod-trust-card,
    .tod-profile-design-c .tod-c-contact-info-card,
    .tod-profile-design-c .tod-c-company-info-card {
        border-radius: 11px !important;
    }
    .tod-profile-design-c .tod-trust-card {
        padding: 16px !important;
    }
    .tod-profile-design-c .tod-trust-list {
        gap: 7px 9px !important;
    }
    .tod-profile-design-c .tod-c-info-list,
    .tod-profile-design-c .tod-c-company-list {
        min-width: 0;
    }
    .tod-profile-design-c .tod-c-company-list > div {
        grid-template-columns: minmax(82px, 96px) minmax(0, 1fr) !important;
        gap: 7px !important;
        padding: 9px 0 !important;
    }
    .tod-profile-design-c .tod-c-company-list dt {
        font-size: 9px !important;
    }
    .tod-profile-design-c .tod-c-company-list dd {
        font-size: 10.8px !important;
        line-height: 1.4 !important;
    }

    .tod-profile-design-c .tod-c-profile-footer-nav {
        margin-top: 14px !important;
        padding-top: 16px !important;
    }
}

@media (max-width: 360px) {
    .tod-profile-design-c .tod-c-meta {
        grid-template-columns: 1fr !important;
    }
    .tod-profile-design-c .tod-c-hero__actions {
        grid-template-columns: 1fr !important;
    }
    .tod-profile-design-c .tod-c-hero__actions > .tod-c-btn--gold {
        grid-column: auto;
    }
    .tod-profile-design-c .tod-c-country-grid,
    .tod-profile-design-c .tod-c-type-grid {
        grid-template-columns: 1fr !important;
    }
    .tod-profile-design-c .tod-c-company-list > div {
        grid-template-columns: 1fr !important;
        gap: 3px !important;
    }
}
