/*
  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 — Signature Villas Hero Carousel)
*/

/* ═══════════════════════════════════════════════════════
   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
   ═══════════════════════════════════════════════════════ */
.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;
}

/* ═══════════════════════════════════════════════════════
   HERO CAROUSEL — Container & Viewport
   ═══════════════════════════════════════════════════════ */
.villa-hero-carousel {
    position: relative;
    margin-top: 1.5rem;
}

.villa-hero-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    background: #faf8f4;
    max-height: 620px;
}

/* ═══════════════════════════════════════════════════════
   HERO SLIDE — Crossfade Transitions (absolute stacking)
   Height is set by JS after measuring the tallest slide.
   ═══════════════════════════════════════════════════════ */
.villa-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.9s;
    z-index: 1;
}

.villa-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Outgoing slide stays visible briefly for crossfade overlap */
.villa-hero-slide.is-leaving {
    opacity: 0;
    visibility: visible;
    z-index: 1;
}

.villa-hero-inner {
    display: flex;
    height: 100%;
}

/* ═══════════════════════════════════════════════════════
   IMAGE PANEL (60%)
   ═══════════════════════════════════════════════════════ */
.villa-hero-image {
    position: relative;
    flex: 0 0 58%;
    max-width: 58%;
    overflow: hidden;
    background: #e8e4dc;
}

.villa-hero-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.villa-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1.0);
    transition: transform 8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.villa-hero-slide.is-active .villa-hero-image img {
    transform: scale(1.06);
}



/* ── Counter badge ── */
.villa-hero-counter {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(20, 20, 20, 0.6);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 12px;
    letter-spacing: 1px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════
   INFO PANEL (42%)
   ═══════════════════════════════════════════════════════ */
.villa-hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2.5rem 2rem;
    background: #faf8f4;
}

/* ── Signature badge ── */
.villa-hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--pc-gold), var(--pc-gold-light));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    align-self: flex-start;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* ── Villa name ── */
.villa-hero-title {
    font-family: var(--pc-font-title);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.6rem;
    color: var(--pc-text);
}

.villa-hero-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s;
}

.villa-hero-title a:hover {
    color: var(--pc-gold);
}

/* ── Region badge (below title) ── */
.villa-hero-region {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    background: rgba(20, 20, 20, 0.8);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    letter-spacing: 0.3px;
    margin: 0 0 1.1rem;
    line-height: 1.4;
}

.villa-hero-region i {
    color: #e8c47c;
    margin-right: 6px;
    font-size: 0.78rem;
}

/* ── Features (beds / baths / guests) ── */
.villa-hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.villa-hero-feat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #555;
    font-weight: 500;
    line-height: 1.4;
}

.villa-hero-feat i {
    color: var(--pc-gold);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

/* ── Description ── */
.villa-hero-desc-wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    margin: 0 0 0.6rem;
}

.villa-hero-desc-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2.5rem;
    background: linear-gradient(to bottom, rgba(250,248,244,0), rgba(250,248,244,1));
    pointer-events: none;
}

.villa-hero-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* ── Amenity tags ── */
.villa-hero-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: auto;
    margin-bottom: 0.6rem;
}

.villa-hero-amen-tag {
    display: inline-block;
    background: #efe9da;
    color: #6b5317;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    letter-spacing: 0.2px;
    line-height: 1.3;
}

.villa-hero-amen-more {
    display: inline-block;
    background: #eee;
    color: #777;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    line-height: 1.3;
}

/* ── CTA button ── */
.villa-hero-cta {
}

.villa-hero-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--pc-gold), var(--pc-gold-light));
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 12px 32px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.villa-hero-btn:hover {
    background: linear-gradient(135deg, #6d5210, #a88430);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 105, 20, 0.35);
}

/* ═══════════════════════════════════════════════════════
   STAGGERED TEXT ENTRY ANIMATIONS
   ═══════════════════════════════════════════════════════ */
.villa-hero-slide .villa-hero-badge,
.villa-hero-slide .villa-hero-title,
.villa-hero-slide .villa-hero-region,
.villa-hero-slide .villa-hero-features,
.villa-hero-slide .villa-hero-desc-wrap,
.villa-hero-slide .villa-hero-amenities,
.villa-hero-slide .villa-hero-cta {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.villa-hero-slide.is-active .villa-hero-badge    { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.villa-hero-slide.is-active .villa-hero-title     { opacity: 1; transform: translateY(0); transition-delay: 0.35s; }
.villa-hero-slide.is-active .villa-hero-region    { opacity: 1; transform: translateY(0); transition-delay: 0.45s; }
.villa-hero-slide.is-active .villa-hero-features  { opacity: 1; transform: translateY(0); transition-delay: 0.55s; }
.villa-hero-slide.is-active .villa-hero-desc-wrap { opacity: 1; transform: translateY(0); transition-delay: 0.65s; }
.villa-hero-slide.is-active .villa-hero-amenities { opacity: 1; transform: translateY(0); transition-delay: 0.75s; }
.villa-hero-slide.is-active .villa-hero-cta       { opacity: 1; transform: translateY(0); transition-delay: 0.85s; }

/* ═══════════════════════════════════════════════════════
   NAVIGATION — Arrows + Dots
   ═══════════════════════════════════════════════════════ */
.villa-hero-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.villa-hero-prev,
.villa-hero-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(139, 105, 20, 0.3);
    background: #fff;
    color: var(--pc-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 0;
    line-height: 1;
}

.villa-hero-prev:hover,
.villa-hero-next:hover {
    background: var(--pc-gold);
    color: #fff;
    border-color: var(--pc-gold);
    box-shadow: 0 4px 15px rgba(139, 105, 20, 0.3);
    transform: scale(1.08);
}

/* ── Dots ── */
.villa-hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.villa-hero-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;
}

.villa-hero-dot.is-active {
    background: var(--pc-gold);
    transform: scale(1.25);
    box-shadow: 0 0 8px rgba(139, 105, 20, 0.4);
}

.villa-hero-dot:hover {
    background: rgba(139, 105, 20, 0.45);
}

/* ═══════════════════════════════════════════════════════
   PROGRESS BAR (autoplay indicator)
   ═══════════════════════════════════════════════════════ */
.villa-hero-progress {
    height: 3px;
    background: rgba(139, 105, 20, 0.12);
    border-radius: 2px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.villa-hero-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--pc-gold), var(--pc-gold-light));
    border-radius: 2px;
    transition: width 0.3s linear;
}

.villa-hero-carousel.is-paused .villa-hero-progress-bar {
    transition: none;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .villa-hero-image { flex: 0 0 50%; max-width: 50%; }
    .villa-hero-info { padding: 2rem 1.75rem 1.5rem; }
    .villa-hero-title { font-size: 1.45rem; }
    .villa-hero-desc { font-size: 0.85rem; }
}

@media (max-width: 767.98px) {
    .villa-hero-viewport { max-height: 680px; }
    .villa-hero-inner {
        flex-direction: column;
        height: 680px;
    }
    .villa-hero-image {
        flex: 0 0 240px;
        max-width: 100%;
        height: 240px;
    }
    .villa-hero-info {
        flex: 1;
        min-height: 0;
        padding: 1.25rem 1.25rem 1.25rem;
        display: flex;
        flex-direction: column;
    }
    .villa-hero-desc-wrap {
        flex: 1;
        min-height: 0;
    }
    .villa-hero-title { font-size: 1.25rem; }
    .villa-hero-region { margin: 0 0 0.7rem; }
    .villa-hero-features { margin-bottom: 0.7rem; }
    .villa-hero-location { bottom: 12px; left: 12px; font-size: 0.72rem; padding: 5px 10px; }
    .villa-hero-counter { top: 12px; right: 12px; font-size: 0.68rem; }
    .villa-hero-prev,
    .villa-hero-next {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
    .villa-hero-dot { width: 8px; height: 8px; }
    .villa-hero-btn { padding: 10px 24px; font-size: 0.82rem; width: 100%; text-align: center; }
}

@media (max-width: 575.98px) {
    .villa-hero-image { height: 220px; }
    .villa-hero-info { padding: 1rem 1rem 1.25rem; }
    .villa-hero-title { font-size: 1.1rem; }
    .villa-hero-badge { font-size: 0.58rem; padding: 3px 10px; }
    .villa-hero-features { gap: 0.5rem; margin-bottom: 0.5rem; }
    .villa-hero-feat { font-size: 0.8rem; }
    .villa-hero-desc { font-size: 0.8rem; }
    .villa-hero-amenities { margin-bottom: 0.4rem; }
    .villa-hero-amen-tag { font-size: 0.65rem; padding: 2px 8px; }
    .villa-hero-amen-more { font-size: 0.65rem; padding: 2px 8px; }
    .villa-hero-btn { padding: 8px 20px; font-size: 0.78rem; }
}
