/* ==========================================================================
   HOMQI Locations · Widget Elementor
   ========================================================================== */

.homqi-loc-wrap {
    position: relative;
    width: 100%;
    background-color: #0F1C26;
    color: #fff;
    box-sizing: border-box;
}

.homqi-loc-wrap *,
.homqi-loc-wrap *::before,
.homqi-loc-wrap *::after {
    box-sizing: border-box;
}

.homqi-loc-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

/* Layout: título a la izquierda, grid a la derecha */
.homqi-loc-wrap--sidebar .homqi-loc-inner {
    grid-template-columns: minmax(260px, 22%) 1fr;
    gap: 50px;
}

/* Layout stacked: título arriba, grid abajo */
.homqi-loc-wrap--stacked .homqi-loc-inner {
    grid-template-columns: 1fr;
    gap: 32px;
}

.homqi-loc-wrap--stacked .homqi-loc-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

/* ===== Header ===== */
.homqi-loc-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.homqi-loc-title {
    margin: 0;
    color: #D6A461;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(28px, 3.2vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.homqi-loc-subtitle {
    margin: 0;
    color: #B8C2CC;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}

/* ===== Grid ===== */
.homqi-loc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
}

/* ===== Tarjeta ===== */
.homqi-loc-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 100 / 105;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background-color: #13222B;
    transition: transform .35s ease, box-shadow .35s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    isolation: isolate;
}

.homqi-loc-card:hover,
.homqi-loc-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .45);
    outline: none;
}

.homqi-loc-card:focus-visible {
    box-shadow: 0 14px 32px rgba(0, 0, 0, .45), 0 0 0 3px #D6A461;
}

.homqi-loc-card__image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform .6s ease;
    z-index: 1;
}

.homqi-loc-card__image--placeholder {
    background: linear-gradient(135deg, #13222B 0%, #1c3140 100%);
}

.homqi-loc-card:hover .homqi-loc-card__image {
    transform: scale(1.06);
}

.homqi-loc-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(15, 28, 38, 0)   35%,
        rgba(15, 28, 38, .55) 65%,
        rgba(15, 28, 38, .92) 100%);
    z-index: 2;
    pointer-events: none;
}

.homqi-loc-card__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 20px;
    z-index: 3;
}

.homqi-loc-card__count {
    display: block;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    color: #D6A461;
    text-transform: uppercase;
    margin-bottom: 6px;
    line-height: 1.2;
}

.homqi-loc-card__count-label {
    margin-left: 4px;
}

.homqi-loc-card__title {
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    letter-spacing: 0;
}

/* ===== Flecha circular (esquina inferior derecha) ===== */
.homqi-loc-card__arrow {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #D6A461;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    opacity: 0;
    transform: translate(8px, 8px) scale(0.85);
    transition: opacity .35s ease, transform .35s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}

.homqi-loc-card__arrow svg {
    width: 20px;
    height: 20px;
    display: block;
}

.homqi-loc-card:hover .homqi-loc-card__arrow,
.homqi-loc-card:focus-visible .homqi-loc-card__arrow {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* En móvil se muestra siempre (no hay hover). */
@media (hover: none) {
    .homqi-loc-card__arrow {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .homqi-loc-wrap--sidebar .homqi-loc-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .homqi-loc-wrap--sidebar .homqi-loc-header {
        text-align: center;
        max-width: 720px;
        margin: 0 auto;
    }

    .homqi-loc-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .homqi-loc-card__title {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .homqi-loc-grid {
        grid-template-columns: 1fr;
    }

    .homqi-loc-card {
        aspect-ratio: 16 / 10;
    }

    .homqi-loc-card__content {
        padding: 16px 18px;
    }

    .homqi-loc-card__title {
        font-size: 22px;
    }
}
