/**
 * Block: Hotel Intro — Scoped Stylesheet
 * Loaded exclusively for the acf/hotel-intro block (frontend + Gutenberg editor).
 * ALL rules are strictly scoped under .hotel-intro-block to prevent any
 * style leakage into the WordPress admin interface.
 *
 * Author: ably Peru
 * Text Domain: ab_theme
 */

/* ─── Base Block Layout ──────────────────────────────────────────── */

.hotel-intro-block {
    font-family: 'Outfit', sans-serif;
    background-color: #ffffff;
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.hotel-intro-block .hi-container {
    width: 100%;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.hotel-intro-block .hi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hotel-intro-block .hi-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ─── Text Column ────────────────────────────────────────────────── */

.hotel-intro-block .hi-subtitle {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5em;
    font-weight: 700;
    display: block;
    margin-bottom: 1.5rem;
}

.hotel-intro-block .hi-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .hotel-intro-block .hi-title {
        font-size: 3.75rem;
    }
}

.hotel-intro-block .hi-quote {
    font-size: 1.125rem;
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 2rem;
}

.hotel-intro-block .hi-divider {
    width: 5rem;
    height: 4px;
    margin-bottom: 2rem;
    border: none;
}

.hotel-intro-block .hi-paragraph {
    line-height: 1.75;
    font-weight: 300;
    font-size: 1rem;
    margin-bottom: 0;
}

.hotel-intro-block .hi-paragraphs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* ─── Stats ──────────────────────────────────────────────────────── */

.hotel-intro-block .hi-stats {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.hotel-intro-block .hi-stat-number {
    display: block;
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.hotel-intro-block .hi-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: #a8a29e;
}

.hotel-intro-block .hi-stat-divider {
    width: 1px;
    height: 2.5rem;
    background-color: #f5f5f4;
    flex-shrink: 0;
}

/* ─── Image Column ───────────────────────────────────────────────── */

.hotel-intro-block .hi-image-col {
    position: relative;
}

.hotel-intro-block .hi-image-wrap {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.hotel-intro-block .hi-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Testimonial Overlay Box ────────────────────────────────────── */

.hotel-intro-block .hi-quote-box {
    position: absolute;
    bottom: -2.5rem;
    left: -2.5rem;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 35px 60px -15px rgba(0,0,0,0.4);
    display: none;
    z-index: 10;
}

@media (min-width: 768px) {
    .hotel-intro-block .hi-quote-box {
        display: block;
    }
}

.hotel-intro-block .hi-quote-box .hi-quote-icon {
    font-size: 1.875rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    display: block;
}

.hotel-intro-block .hi-quote-box .hi-quote-text {
    font-size: 0.875rem;
    font-style: italic;
    font-weight: 300;
    color: #ffffff;
    max-width: 200px;
    margin-bottom: 0;
}

.hotel-intro-block .hi-quote-box .hi-quote-source {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-top: 1rem;
}

/* ─── Column Ordering ────────────────────────────────────────────── */

.hotel-intro-block .hi-col-text  { order: 1; }
.hotel-intro-block .hi-col-image { order: 2; }

@media (min-width: 1024px) {
    .hotel-intro-block .hi-col-text--right  { order: 1; }
    .hotel-intro-block .hi-col-image--right { order: 2; }
    .hotel-intro-block .hi-col-text--left   { order: 2; }
    .hotel-intro-block .hi-col-image--left  { order: 1; }
}

/* ─── Editor-specific adjustments (Gutenberg preview) ───────────── */

.wp-block[data-type="acf/hotel-intro"] .hi-quote-box {
    /* Keep the overlay visible during preview without clipping */
    bottom: -1rem;
    left: -1rem;
}
