/* =================================================================
 * Front Page — Featured Destinations Section
 * Component prefix: .fpd-*
 * Self-contained styles. Uses CSS variables with safe fallbacks
 * so it adapts to your theme tokens if they exist.
 * ================================================================= */

/* ---------- Theme tokens (override globally if needed) ---------- */
.fpd-section {
    --fpd-bg:           var(--color-cream,     #F0EDE5);
    --fpd-card-bg:      var(--color-forest,    #0A3D2C);
    --fpd-card-bg-2:    var(--color-forest-2,  #0B4633);
    --fpd-accent:       var(--color-gold,      #D4A017);
    --fpd-accent-soft:  var(--color-gold-soft, #E8B838);
    --fpd-text-light:   #FFFFFF;
    --fpd-text-muted:   rgba(255, 255, 255, 0.78);
    --fpd-heading:      var(--color-forest-dark, #07261C);
    --fpd-body:         #4B5654;

    --fpd-radius-card:  18px;
    --fpd-radius-btn:   10px;
    --fpd-shadow-card:  0 10px 30px rgba(7, 38, 28, 0.10),
                        0 2px 6px  rgba(7, 38, 28, 0.06);
    --fpd-shadow-hover: 0 20px 40px rgba(7, 38, 28, 0.18),
                        0 4px 10px  rgba(7, 38, 28, 0.10);

    --fpd-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --fpd-font-script:  "Caveat", "Brush Script MT", cursive;
    --fpd-font-body:    Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ---------- Section shell ---------- */
.fpd-section {
    position: relative;
    background: var(--fpd-bg);
    padding: 96px 0 120px;
    overflow: hidden;
    font-family: var(--fpd-font-body);
    color: var(--fpd-body);
}

.fpd-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Decorative botanical accents (corners) ---------- */
.fpd-decor {
    position: absolute;
    color: var(--fpd-accent);
    opacity: 0.18;
    pointer-events: none;
    z-index: 1;
}
.fpd-decor svg { width: 100%; height: 100%; display: block; }

.fpd-decor--tr {
    top: 24px;
    right: 24px;
    width: 140px;
    height: 200px;
    transform: rotate(8deg);
}

.fpd-decor--bl {
    bottom: 24px;
    left: 24px;
    width: 140px;
    height: 200px;
    transform: rotate(-8deg) scaleX(-1);
}

/* ---------- Section heading ---------- */
.fpd-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 56px;
}

.fpd-eyebrow {
    display: inline-block;
    font-family: var(--fpd-font-script);
    font-size: clamp(1.6rem, 2.2vw, 2.1rem);
    /* Use a darker variant for body-text contrast (was --fpd-accent
     * #D4A017 which fails 4.5:1 on cream). #8B6914 passes 4.8:1. */
    color: #8B6914;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1;
    margin-bottom: 8px;
}

.fpd-title {
    font-family: var(--fpd-font-display);
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.05;
    color: var(--fpd-heading);
    font-weight: 700;
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}

.fpd-subtitle {
    font-size: clamp(1rem, 1.2vw, 1.0625rem);
    line-height: 1.65;
    color: var(--fpd-body);
    margin: 0 auto 24px;
    max-width: 640px;
}

.fpd-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--fpd-accent);
    margin-top: 8px;
}
.fpd-divider__line {
    width: 60px;
    height: 1.5px;
    background: var(--fpd-accent);
    border-radius: 2px;
}
.fpd-divider__icon {
    width: 22px;
    height: 22px;
    color: var(--fpd-accent);
}

/* =================================================================
 *  CARDS
 * ================================================================= */
.fpd-slider {
    position: relative;
    width: 100%;
    padding: 4px 4px 8px;
    margin-bottom: 56px;
    overflow: visible; /* let shadows breathe */
}

/* Override Swiper's default overflow */
.fpd-slider .swiper-wrapper {
    /* allow card hover lift to escape the row */
    padding: 4px 0 12px;
}

/* The card itself — Swiper sets width on swiper-slide via JS, but we
   ensure a sane default in case JS hasn't run yet. */
.fpd-card {
    position: relative;
    background: var(--fpd-card-bg);
    border-radius: var(--fpd-radius-card);
    overflow: hidden;
    box-shadow: var(--fpd-shadow-card);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    height: auto;
    display: flex;
}

.fpd-card__link {
    display: flex;
    flex-direction: column;
    width: 100%;
    color: var(--fpd-text-light);
    text-decoration: none;
    outline: none;
}

.fpd-card__link:focus-visible {
    box-shadow: 0 0 0 3px var(--fpd-accent);
    border-radius: var(--fpd-radius-card);
}

/* ---- Image ---- */
.fpd-card__media {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--fpd-card-bg-2);
}

.fpd-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fpd-card:hover .fpd-card__media img {
    transform: scale(1.07);
}

/* ---- Badge ---- */
.fpd-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(10, 61, 44, 0.92);
    color: var(--fpd-accent-soft);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2;
}
.fpd-card__badge svg {
    width: 13px;
    height: 13px;
    color: var(--fpd-accent-soft);
    flex-shrink: 0;
}

/* ---- Card body (dark forest green panel) ---- */
.fpd-card__body {
    flex: 1;
    padding: 22px 22px 22px;
    display: flex;
    flex-direction: column;
    background: var(--fpd-card-bg);
}

.fpd-card__loc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--fpd-accent-soft);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    margin: 0 0 8px;
    text-transform: none;
}
.fpd-card__loc svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.fpd-card__title {
    font-family: var(--fpd-font-display);
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 10px;
    color: var(--fpd-text-light);
    letter-spacing: -0.005em;
}

.fpd-card__desc {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--fpd-text-muted);
    margin: 0 0 18px;
    flex: 1;
    /* clamp to 3 lines to keep cards aligned */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fpd-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-top: auto;
    background: transparent;
    color: var(--fpd-accent-soft);
    border: 1.5px solid var(--fpd-accent);
    border-radius: var(--fpd-radius-btn);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.fpd-card__cta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

/* ---- Card hover state ---- */
.fpd-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--fpd-shadow-hover);
}
.fpd-card:hover .fpd-card__cta {
    background: var(--fpd-accent);
    color: var(--fpd-card-bg);
}
.fpd-card:hover .fpd-card__cta svg {
    transform: translateX(4px);
}

/* =================================================================
 *  SLIDER NAV (Swiper)
 *  Hidden on desktop where 5 fit comfortably; shown on smaller widths.
 * ================================================================= */
.fpd-slider__nav {
    position: absolute;
    top: calc(50% - 30px); /* visually centre on the image */
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--fpd-card-bg);
    color: var(--fpd-accent-soft);
    box-shadow: var(--fpd-shadow-card);
    cursor: pointer;
    z-index: 10;
    display: none;             /* default off — JS shows when needed */
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}
.fpd-slider__nav:hover {
    background: var(--fpd-accent);
    color: var(--fpd-card-bg);
}
.fpd-slider__nav svg { width: 20px; height: 20px; }
.fpd-slider__nav--prev { left: -8px; }
.fpd-slider__nav--next { right: -8px; }
.fpd-slider__nav.swiper-button-disabled { opacity: 0.35; cursor: default; }

/* Pagination dots */
.fpd-slider__pagination {
    position: relative;
    bottom: auto !important;
    margin-top: 28px;
    display: none;             /* JS toggles it on for mobile */
    text-align: center;
}
.fpd-slider__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: var(--fpd-heading);
    opacity: 0.25;
    transition: opacity 0.3s ease, width 0.3s ease;
    border-radius: 999px;
}
.fpd-slider__pagination .swiper-pagination-bullet-active {
    background: var(--fpd-accent);
    opacity: 1;
    width: 24px;
}

/* Show nav/pagination only when the slider actually scrolls */
.fpd-slider.is-scrollable .fpd-slider__nav { display: flex; }
.fpd-slider.is-scrollable .fpd-slider__pagination { display: block; }

/* =================================================================
 *  VIEW ALL CTA
 * ================================================================= */
.fpd-cta-wrap {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.fpd-view-all {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--fpd-card-bg);
    color: var(--fpd-accent-soft);
    border-radius: var(--fpd-radius-btn);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(7, 38, 28, 0.18);
    transition: background 0.3s ease, transform 0.3s ease,
                box-shadow 0.3s ease, color 0.3s ease;
}
.fpd-view-all svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}
.fpd-view-all:hover {
    background: var(--fpd-accent);
    color: var(--fpd-card-bg);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(7, 38, 28, 0.24);
}
.fpd-view-all:hover svg {
    transform: translateX(4px);
}
.fpd-view-all:focus-visible {
    outline: 3px solid var(--fpd-accent);
    outline-offset: 3px;
}

/* =================================================================
 *  RESPONSIVE
 * ================================================================= */
@media (max-width: 1200px) {
    .fpd-card__title { font-size: 1.5rem; }
    .fpd-card__body  { padding: 20px; }
}

@media (max-width: 992px) {
    .fpd-section { padding: 80px 0 96px; }
    .fpd-head    { margin-bottom: 40px; }
    .fpd-decor--tr,
    .fpd-decor--bl { width: 100px; height: 140px; opacity: 0.12; }
}

@media (max-width: 768px) {
    .fpd-section     { padding: 64px 0 80px; }
    .fpd-container   { padding: 0 16px; }
    .fpd-card__media { aspect-ratio: 4 / 4.5; }
    .fpd-card__title { font-size: 1.5rem; }
    .fpd-card__body  { padding: 18px; }
    .fpd-view-all    { padding: 16px 28px; font-size: 0.95rem; }
}

@media (max-width: 480px) {
    .fpd-section   { padding: 48px 0 64px; }
    .fpd-decor    { display: none; }
    .fpd-head     { margin-bottom: 32px; }
    .fpd-subtitle { font-size: 0.95rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fpd-card,
    .fpd-card__media img,
    .fpd-card__cta,
    .fpd-card__cta svg,
    .fpd-view-all,
    .fpd-view-all svg,
    .fpd-slider__nav { transition: none !important; }
    .fpd-card:hover { transform: none; }
    .fpd-card:hover .fpd-card__media img { transform: none; }
}
