/* =========================================================
   Tour Packages Slider – style.css  v2.0
   All design values come from CSS custom properties (--tps-*)
   which are injected dynamically from the Settings page.
   ========================================================= */

/* ── Fallback defaults (overridden by inline style from PHP) ── */
:root {
    --tps-accent:        #2c97de;
    --tps-accent-dark:   #1a7ab8;
    --tps-gold:          #b8982a;
    --tps-gold-light:    #d4af37;
    --tps-navy:          #1a2d45;
    --tps-text:          #2e3a4a;
    --tps-muted:         #6b7a8d;
    --tps-bg:            #f4f6f8;
    --tps-white:         #ffffff;
    --tps-card-shadow:   0 4px 24px rgba(44,151,222,0.10);
    --tps-radius:        16px;
    --tps-btn-radius:    8px;
    --tps-font:          'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    --tps-transition:    0.35s cubic-bezier(0.4,0,0.2,1);
    --tps-badge-bg:      #b8982a;
    --tps-badge-text:    #ffffff;
    --tps-btn-text:      #ffffff;
    --tps-card-gap:      24px;
    --tps-img-fit:       cover;
    --tps-img-zoom:      scale(1.07);
    --tps-section-pad:   60px;
}

/* ── Section ── */
.tps-section {
    font-family: var(--tps-font);
    background: var(--tps-bg);
    padding: var(--tps-section-pad) 0;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* ── Header ── */
.tps-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 0 20px;
}

.tps-title {
    font-family: var(--tps-font);
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--tps-navy);
    margin: 0 0 10px;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.tps-subtitle {
    font-family: var(--tps-font);
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--tps-muted);
    margin: 0;
    font-style: italic;
    letter-spacing: 0.03em;
}

/* ── Slider Wrapper ── */
.tps-slider-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 20px;
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
}

/* ── Viewport ── */
.tps-slider-viewport {
    overflow: hidden;
    flex: 1;
    border-radius: var(--tps-radius);
}

/* ── Track ── */
.tps-slider-track {
    display: flex;
    gap: var(--tps-card-gap);
    transition: transform var(--tps-transition);
    will-change: transform;
    padding: 12px 4px;
}

/* ── Arrow Buttons ── */
.tps-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--tps-accent);
    background: var(--tps-white);
    color: var(--tps-accent);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--tps-transition), color var(--tps-transition),
                transform var(--tps-transition), box-shadow var(--tps-transition);
    box-shadow: 0 2px 12px rgba(44,151,222,0.15);
    z-index: 2;
    position: relative;
}

.tps-arrow:hover {
    background: var(--tps-accent);
    color: var(--tps-white);
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(44,151,222,0.32);
}

.tps-arrow:active  { transform: scale(0.97); }
.tps-arrow--prev   { margin-right: 12px; }
.tps-arrow--next   { margin-left:  12px; }

.tps-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Card ── */
.tps-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 280px;
    background: var(--tps-white);
    border-radius: var(--tps-radius);
    box-shadow: var(--tps-card-shadow);
    overflow: hidden;
    transition: transform var(--tps-transition), box-shadow var(--tps-transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.tps-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(44,151,222,0.18);
}

/* ── Card Image ── */
.tps-card__img-wrap {
    position: relative;
    width: 100%;
    height: 220px; /* overridden by inline CSS */
    overflow: hidden;
}

.tps-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: var(--tps-img-fit);
    display: block;
    transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}

.tps-card:hover .tps-card__img-wrap img {
    transform: var(--tps-img-zoom);
}

/* ── Badge ── */
.tps-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--tps-badge-bg);
    color: var(--tps-badge-text);
    font-family: var(--tps-font);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border-radius: 30px;
    text-transform: capitalize;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* ── Card Body ── */
.tps-card__body {
    padding: 22px 24px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

/* ── Meta Row ── */
.tps-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--tps-muted);
    font-size: 0.92rem;
    font-weight: 400;
}

.tps-card__days,
.tps-card__rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tps-card__days svg,
.tps-card__rating svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.tps-card__rating svg {
    color: var(--tps-gold);
    fill: var(--tps-gold);
}

/* ── Card Title ── */
.tps-card__title {
    font-family: var(--tps-font);
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--tps-navy);
    margin: 0;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

/* ── Card Footer ── */
.tps-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
}

.tps-card__price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tps-card__from {
    font-size: 0.82rem;
    color: var(--tps-muted);
    font-style: italic;
    font-weight: 300;
}

.tps-card__price strong {
    font-family: var(--tps-font);
    font-size: 1.5rem; /* overridden by inline CSS */
    font-weight: 700;
    color: var(--tps-navy);
    letter-spacing: -0.01em;
    line-height: 1;
}

/* ── CTA Button ── */
.tps-btn {
    display: inline-block;
    background: var(--tps-gold);
    color: var(--tps-btn-text);
    font-family: var(--tps-font);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 10px 20px;
    border-radius: var(--tps-btn-radius);
    text-decoration: none;
    transition: background var(--tps-transition), transform var(--tps-transition), box-shadow var(--tps-transition);
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(184,152,42,0.25);
}

.tps-btn:hover {
    background: var(--tps-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44,151,222,0.30);
    color: var(--tps-btn-text);
    text-decoration: none;
}

/* ── View All / Close ── */
.tps-view-all-wrap {
    text-align: center;
    margin-top: 36px;
}

.tps-view-all-btn,
.tps-close-btn {
    background: none;
    border: none;
    font-family: var(--tps-font);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--tps-navy);
    cursor: pointer;
    padding: 8px 0;
    position: relative;
    text-transform: uppercase;
    transition: color var(--tps-transition);
}

.tps-view-all-btn::after,
.tps-close-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 2px;
    background: var(--tps-accent);
    transform: scaleX(1);
    transform-origin: left;
    transition: transform var(--tps-transition);
}

.tps-view-all-btn:hover,
.tps-close-btn:hover {
    color: var(--tps-accent);
}

/* ── Expanded Grid ── */
.tps-grid-wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 32px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.4,0,0.2,1),
                opacity 0.4s ease,
                padding 0.4s ease;
    pointer-events: none;
}

.tps-grid-wrap.tps-expanded {
    max-height: 5000px;
    opacity: 1;
    padding-top: 16px;
    pointer-events: all;
}

.tps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* overridden per-instance inline */
    gap: var(--tps-card-gap);
    padding: 8px 0;
}

/* ── Slider hidden when expanded ── */
.tps-slider-wrap.tps-hidden,
.tps-view-all-slider.tps-hidden {
    display: none;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .tps-card {
        flex: 0 0 calc(50% - 12px);
    }
    .tps-grid {
        grid-template-columns: repeat(var(--tps-cols-md, 2), 1fr) !important;
    }
}

@media (max-width: 640px) {
    .tps-card {
        flex: 0 0 100%;
        min-width: unset;
    }
    .tps-grid {
        grid-template-columns: repeat(var(--tps-cols-sm, 1), 1fr) !important;
    }
    .tps-slider-wrap  { padding: 0 8px; }
    .tps-grid-wrap    { padding: 0 16px; }
    .tps-arrow { width: 36px; height: 36px; font-size: 1.3rem; }
}
