/**
 * Safari Directory – Tours Listing Shortcode Styles
 * Beautiful filterable safari directory with sidebar + card grid
 *
 * @package Safari_Directory
 */


/* Queens Air – self-hosted woff2 */

@font-face {
    font-family: "Queens Air";
    src: url("../fonts/queens-air-_a6gDC1u.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Carrie";
    src: url("../fonts/carrie-regular-EV4Khv9h.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* ============================================================
   DESIGN TOKENS
   ============================================================ */

.sd-tours-wrap {
    --st-font-heading: var(--sd-heading-font, var(--sd-font-heading, "Playfair Display", Georgia, serif));
    --st-font-body: var(--sd-body-font, var(--sd-font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif));
    --st-primary: #2c5b4b;
    --st-primary-light: #e8f5ef;
    --st-primary-dark: #1a3d32;
    --st-secondary: #c8860a;
    --st-secondary-light: #fdf4e3;
    --st-text: #2d3436;
    --st-text-muted: #636e72;
    --st-text-light: #b2bec3;
    --st-bg: transparent;
    --st-card-bg: transparent;
    --st-border: #e8e5e0;
    --st-border-light: #f0eeeb;
    --st-radius: 0px;
    --st-radius-sm: 0px;
    --st-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --st-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
    --st-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--st-font-body);
    color: var(--st-text);
    display: block;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px;
}


/* ============================================================
   HORIZONTAL FILTER BAR
   ============================================================ */

.sd-tours-filterbar {
    margin-bottom: 32px;
}

.sd-tours-filterbar__form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}


/* Individual dropdown wrapper */

.sd-tours-dropdown {
    position: relative;
}


/* The trigger button */

.sd-tours-dropdown__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: transparent;
    border: 1px solid #000;
    cursor: pointer;
    font-family: var(--sd-font-accent, "Carrie", cursive);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #000;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    border-radius: 0;
}

.sd-tours-dropdown__btn:hover,
.sd-tours-dropdown--open .sd-tours-dropdown__btn {
    background: #000;
    color: #fff;
}

.sd-tours-dropdown__chevron {
    font-size: 12px;
    transition: transform 0.25s ease;
}

.sd-tours-dropdown--open .sd-tours-dropdown__chevron {
    transform: rotate(180deg);
}


/* Active indicator dot when filter has selections */

.sd-tours-dropdown__badge {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--st-primary);
    flex-shrink: 0;
}

.sd-tours-dropdown--open .sd-tours-dropdown__badge,
.sd-tours-dropdown--active .sd-tours-dropdown__badge {
    background: #fff;
}


/* Dropdown panel */

.sd-tours-dropdown__panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #000;
    z-index: 100;
    overflow-y: auto;
    max-height: 280px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.sd-tours-dropdown--open .sd-tours-dropdown__panel {
    display: block;
}


/* Each checkbox row */

.sd-tours-dropdown__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    cursor: pointer;
    font-family: var(--sd-font-accent, "Carrie", cursive);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #000;
    transition: background 0.15s;
}

.sd-tours-dropdown__option:hover {
    background: #f5f5f5;
}

.sd-tours-dropdown__option input[type="checkbox"] {
    display: none;
}


/* Custom checkbox mark */

.sd-tours-dropdown__check {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #000;
    position: relative;
    transition: background 0.15s;
}

.sd-tours-dropdown__option input:checked~.sd-tours-dropdown__check {
    background: #000;
}

.sd-tours-dropdown__option input:checked~.sd-tours-dropdown__check::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.sd-tours-dropdown__option input:checked~span:last-child {
    font-weight: 600;
}


/* Clear all link */

.sd-tours-filterbar__clear {
    font-family: var(--sd-font-accent, "Carrie", cursive);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--st-text-muted);
    text-decoration: none;
    padding: 11px 16px;
    border: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    display: none;
}

.sd-tours-filterbar__clear:hover {
    color: #c0392b;
    border-color: #c0392b;
}


/* ============================================================
   TOUR CARDS GRID
   ============================================================ */

.sd-tours-grid {
    width: 100%;
}

.sd-tours-grid__header {
    margin-bottom: 20px;
}

.sd-tours-grid__count {
    font-size: 0.9rem;
    color: var(--st-text-muted);
    margin: 0;
    font-weight: 500;
}

.sd-tours-grid__cards {
    display: grid;
    gap: 24px;
}

.sd-tours-cols-2 .sd-tours-grid__cards {
    grid-template-columns: repeat(2, 1fr);
}

.sd-tours-cols-3 .sd-tours-grid__cards {
    grid-template-columns: repeat(3, 1fr);
}

.sd-tours-cols-4 .sd-tours-grid__cards {
    grid-template-columns: repeat(4, 1fr);
}


/* ============================================================
   INDIVIDUAL TOUR CARD — Full-bleed image with overlay
   ============================================================ */

.sd-tour-card {
    position: relative;
    overflow: hidden;
    height: 570px;
    border-radius: 0 !important;
    cursor: pointer;
    display: block;
}

.sd-tour-card:hover .sd-tour-card__bg {
    transform: scale(1.05);
}

.sd-tour-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    position: relative;
}


/* Background image */

.sd-tour-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    background-color: #2c5b4b;
}


/* Dark overlay */

.sd-tour-card__overlay-dark {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}


/* Content layer */

.sd-tour-card__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 36px;
}


/* Top section: destination + title */

.sd-tour-card__top {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sd-tour-card__destination {
    font-family: var(--sd-font-accent, "Carrie", cursive);
    font-size: 17px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
}

.sd-tour-card__title {
    margin: 0;
    font-family: var(--sd-font-heading, "Queens Air", Georgia, serif);
    font-size: var(--sd-size-h1, 40px);
    font-weight: 400;
    line-height: 1.15;
    color: #fff;
}

.sd-tour-card:hover .sd-tour-card__title {
    color: #fff;
}


/* Bottom section: days/nights + CTA button */

.sd-tour-card__bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.sd-tour-card__duration {
    font-family: var(--sd-font-accent, "Carrie", cursive);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
}

.sd-tour-card__cta-btn {
    display: inline-block;
    font-family: var(--sd-font-accent, "Carrie", cursive);
    font-size: 15px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid rgba(255, 255, 255, 0.85);
    padding: 11px 28px;
    background: transparent;
    transition: all 0.3s ease;
}

.sd-tour-card:hover .sd-tour-card__cta-btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}


/* ============================================================
   PAGINATION
   ============================================================ */

.sd-tours-pagination {
    text-align: center;
    padding: 32px 0 8px;
    margin-top: 16px;
}

.sd-tours-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 3px;
    border-radius: var(--st-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--st-text-muted);
    text-decoration: none;
    transition: all var(--st-transition);
    border: 1px solid var(--st-border);
    background: var(--st-card-bg);
}

.sd-tours-pagination .page-numbers:hover {
    background: var(--st-primary-light);
    color: var(--st-primary);
    border-color: var(--st-primary);
}

.sd-tours-pagination .page-numbers.current {
    background: var(--st-primary);
    color: #fff;
    border-color: var(--st-primary);
}

.sd-tours-pagination .prev,
.sd-tours-pagination .next {
    font-size: 1.1rem;
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.sd-tours-grid__empty {
    text-align: center;
    padding: 80px 40px;
    background: var(--st-card-bg);
    border-radius: var(--st-radius);
    border: 2px dashed var(--st-border);
}

.sd-tours-grid__empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.sd-tours-grid__empty h3 {
    margin: 0 0 10px;
    font-family: var(--st-font-heading);
    font-size: 1.5rem;
    color: var(--st-text);
    font-weight: 700;
}

.sd-tours-grid__empty p {
    margin: 0 0 28px;
    color: var(--st-text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}


/* ============================================================
   LOADING OVERLAY
   ============================================================ */

.sd-tours-grid {
    position: relative;
}

.sd-tours-loading {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.7);
    align-items: center;
    justify-content: center;
}

.sd-tours-loading__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--st-border);
    border-top-color: var(--st-primary);
    border-radius: 50%;
    animation: sd-spin 0.7s linear infinite;
}

@keyframes sd-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ============================================================
   BORDER-RADIUS OVERRIDE — Hard zero everywhere
   ============================================================ */

.sd-tours-wrap,
.sd-tours-wrap *,
.sd-tours-wrap *::before,
.sd-tours-wrap *::after {
    border-radius: 0px !important;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
    .sd-tours-cols-3 .sd-tours-grid__cards,
    .sd-tours-cols-4 .sd-tours-grid__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .sd-tour-card {
        height: 550px;
    }
    .sd-tours-cols-2 .sd-tours-grid__cards,
    .sd-tours-cols-3 .sd-tours-grid__cards,
    .sd-tours-cols-4 .sd-tours-grid__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sd-tours-wrap {
        padding: 12px;
    }
    .sd-tours-filterbar__form {
        flex-direction: column;
        align-items: stretch;
    }
    .sd-tours-dropdown__panel {
        min-width: 100%;
    }
    .sd-tours-cols-2 .sd-tours-grid__cards,
    .sd-tours-cols-3 .sd-tours-grid__cards,
    .sd-tours-cols-4 .sd-tours-grid__cards {
        grid-template-columns: 1fr;
    }
    .sd-tour-card {
        height: 480px;
    }
    .sd-tour-card__title {
        font-size: 28px;
    }
    .sd-tour-card__content {
        padding: 28px 24px;
    }
}