/*
  IVS Homepage — Scoped Component Styles
  ========================================
  Shared CSS for homepage sections redesign.
  Each section is scoped via its own class (e.g. .preferred-collection)
  to prevent interference with legacy Bootstrap/Owl Carousel styles.

  Sections:
  - .preferred-collection  (Featured Properties / IVS Preferred Collection)
  - (future sections will be added here)
*/

/* ═══════════════════════════════════════════════════════
   GOOGLE FONTS — loaded via <link> in blade for performance.
   @see resources/views/index.blade.php @push('styles')
   ═══════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════
   SHARED VARIABLES
   ═══════════════════════════════════════════════════════ */
.preferred-collection {
    --pc-gold: #8b6914;
    --pc-gold-light: #c49b3a;
    --pc-text: #2c2c2c;
    --pc-green: #00a652;
    --pc-font-heading: 'Cormorant Garamond', serif;
    --pc-font-body: 'Lora', serif;
    --pc-font-title: 'Playfair Display', Georgia, serif;
}

/* ═══════════════════════════════════════════════════════
   SCOPED TYPOGRAPHY — match loc-city-v4 modernpage fonts
   ═══════════════════════════════════════════════════════ */
.preferred-collection,
.preferred-collection p,
.preferred-collection span,
.preferred-collection div,
.preferred-collection a,
.preferred-collection button {
    font-family: var(--pc-font-body);
    line-height: 1.75;
}

.preferred-collection .title h2 {
    font-family: var(--pc-font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.preferred-collection .title h4 {
    font-family: var(--pc-font-body);
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════════
   MODERN TABS (scoped)
   ═══════════════════════════════════════════════════════ */
.preferred-collection .modern-tablist {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem;
    margin: 0 0 1rem;
    list-style: none;
    padding: 0;
}

.preferred-collection .modern-tab {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0.4rem 0;
    color: var(--pc-text);
    font-family: var(--pc-font-body);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

.preferred-collection .modern-tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 3px;
    background: var(--pc-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.preferred-collection .modern-tab.is-active::after,
.preferred-collection .modern-tab:hover::after,
.preferred-collection .modern-tab:focus-visible::after {
    transform: scaleX(1);
}

.preferred-collection .modern-tab:focus,
.preferred-collection .modern-tab:focus-visible,
.preferred-collection .modern-tab:active {
    outline: none !important;
    box-shadow: none !important;
}

.preferred-collection .modern-tabpanel[hidden] {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════
   CARD CAROUSEL (scoped)
   ═══════════════════════════════════════════════════════ */
.preferred-collection .dest-carousel {
    position: relative;
    overflow: hidden;
    padding: 20px 48px 50px;
}

.preferred-collection .dest-carousel-track {
    display: flex;
    gap: 20px;
    will-change: transform;
}

.preferred-collection .dest-carousel-track > * {
    flex-shrink: 0;
}

/* ── Navigation Arrows ── */
.preferred-collection .dest-carousel-prev,
.preferred-collection .dest-carousel-next {
    position: absolute;
    top: calc(50% - 35px);
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(139, 105, 20, 0.3);
    background: rgba(255, 255, 255, 0.95);
    color: var(--pc-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.preferred-collection .dest-carousel-prev { left: 0; }
.preferred-collection .dest-carousel-next { right: 0; }

.preferred-collection .dest-carousel-prev:hover,
.preferred-collection .dest-carousel-next:hover {
    background: var(--pc-gold);
    color: #fff;
    border-color: var(--pc-gold);
    box-shadow: 0 4px 15px rgba(139, 105, 20, 0.35);
}

.preferred-collection .dest-carousel-prev.disabled,
.preferred-collection .dest-carousel-next.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ── Dot Pagination ── */
.preferred-collection .dest-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
}

.preferred-collection .dest-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--pc-gold);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.preferred-collection .dest-carousel-dot.active {
    background: var(--pc-gold);
    transform: scale(1.2);
    box-shadow: 0 0 6px rgba(139, 105, 20, 0.4);
}

.preferred-collection .dest-carousel-dot:hover {
    background: rgba(139, 105, 20, 0.5);
}

/* ═══════════════════════════════════════════════════════
   PROPERTY CARDS (scoped)
   ═══════════════════════════════════════════════════════ */
.preferred-collection .prop-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.preferred-collection .prop-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
}

/* ── Image Container ── */
.preferred-collection .prop-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.preferred-collection .prop-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.preferred-collection .prop-card:hover .prop-card-image img {
    transform: scale(1.06);
}

/* ── Location Badge ── */
.preferred-collection .prop-location-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    max-width: calc(100% - 28px);
    background: rgba(30, 41, 51, 0.85);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    letter-spacing: 0.3px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.preferred-collection .prop-location-badge i {
    margin-right: 4px;
    color: #e8c47c;
}

/* ── Type Tag ── */
.preferred-collection .prop-type-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--pc-gold), var(--pc-gold-light));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.5rem;
    align-self: flex-start;
}

/* ── Card Body ── */
.preferred-collection .prop-card-body {
    padding: 1.25rem 1.25rem 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    font-family: var(--pc-font-body);
}

.preferred-collection .prop-card-title {
    font-family: var(--pc-font-title);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 0.75rem;
    color: var(--pc-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.34rem;
}

.preferred-collection .prop-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.preferred-collection .prop-card-title a:hover {
    color: var(--pc-gold);
}

.preferred-collection .modern-card-text {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Hotel Star Rating ── */
.preferred-collection .prop-star-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 0.6rem;
}

.preferred-collection .prop-star {
    color: #d4a843;
    font-size: 1.1rem;
    line-height: 1;
}

/* ── Features Row (beds, baths, guests) ── */
.preferred-collection .prop-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.preferred-collection .prop-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    color: #555;
    font-weight: 500;
}

.preferred-collection .prop-feature i {
    color: var(--pc-gold);
    font-size: 0.92rem;
    width: 16px;
    text-align: center;
}

/* ── Amenities Preview ── */
.preferred-collection .prop-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    margin-top: auto;
}

.preferred-collection .prop-amenity-tag {
    display: inline-block;
    background: #f5f0e6;
    color: #6b5317;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    letter-spacing: 0.2px;
}

.preferred-collection .prop-amenity-more {
    display: inline-block;
    background: #eee;
    color: #777;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
}

/* ── Card Footer ── */
.preferred-collection .prop-card-footer {
    padding: 0.75rem 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    border-top: 1px solid #f0ece4;
}

/* ── View Details Button ── */
.preferred-collection .prop-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--pc-gold), var(--pc-gold-light));
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 10px 22px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.preferred-collection .prop-btn:hover {
    background: linear-gradient(135deg, #6d5210, #a88430);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 105, 20, 0.35);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
    .preferred-collection .dest-carousel {
        padding-left: 42px;
        padding-right: 42px;
    }
    .preferred-collection .dest-carousel-prev { width: 38px; height: 38px; }
    .preferred-collection .dest-carousel-next { width: 38px; height: 38px; }
}

@media (max-width: 991.98px) {
    .preferred-collection .prop-card-title { font-size: 1.05rem; }
    .preferred-collection .prop-btn { padding: 8px 16px; font-size: 0.82rem; }
}

@media (max-width: 767.98px) {
    .preferred-collection .modern-tablist {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem 0.75rem;
        overflow: visible;
        padding: 0.5rem 0;
    }
    .preferred-collection .modern-tab {
        width: 100%;
        white-space: normal;
        text-align: center;
        min-height: 44px;
        padding: 0.65rem 0.5rem;
        line-height: 1.2;
        font-size: 0.875rem;
    }
    .preferred-collection .dest-carousel {
        padding-left: 38px;
        padding-right: 38px;
        padding-bottom: 44px;
    }
    .preferred-collection .dest-carousel-prev,
    .preferred-collection .dest-carousel-next {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    .preferred-collection .dest-carousel-dot { width: 8px; height: 8px; }
    .preferred-collection .prop-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .preferred-collection .prop-btn {
        width: 100%;
        text-align: center;
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .preferred-collection .prop-card-body { padding: 1rem 1rem 0.5rem; }
    .preferred-collection .prop-card-footer { padding: 0.75rem 1rem 1rem; }
    .preferred-collection .prop-location-badge { font-size: 0.7rem; padding: 4px 10px; }
}
