/*
 * Homepage (resources/views/landing-page/index.blade.php). Loaded only there.
 * Mobile first: 360px is the narrowest target. Plain CSS, no build step.
 */
.hp-home {
    --hp-yellow: #f6c743;
    --hp-yellow-strong: #ffc41f;
    --hp-green: #184542;
    --hp-green-soft: #51746e;
    --hp-ink: #1c1f34;
    --hp-text: #4a5060;
    --hp-muted: #6b7180;
    --hp-surface: #ffffff;
    --hp-tint: #fbf7ec;
    --hp-line: #ece6d6;
    --hp-radius: 16px;
    --hp-shadow: 0 10px 30px rgba(28, 31, 52, .08);
    color: var(--hp-text);
    overflow-x: clip;
}

[data-bs-theme="dark"] .hp-home {
    --hp-ink: #f4f5f8;
    --hp-text: #c9ccd6;
    --hp-muted: #a3a8b6;
    --hp-surface: #1f2230;
    --hp-tint: #171925;
    --hp-line: #2d3142;
    --hp-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.hp-home .container {
    padding-inline: 16px;
}

.hp-home h1,
.hp-home h2,
.hp-home h3 {
    color: var(--hp-ink);
    text-transform: none;
    letter-spacing: -0.01em;
}

.hp-home h2 {
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
    line-height: 1.2;
    margin: 0 0 .5rem;
}

.hp-home h3 {
    font-size: 1.125rem;
    line-height: 1.35;
    margin: 0 0 .35rem;
}

.hp-home p {
    line-height: 1.6;
}

.hp-eyebrow {
    display: inline-block;
    margin: 0 0 .75rem;
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--hp-green);
}

[data-bs-theme="dark"] .hp-eyebrow,
.hp-eyebrow--light {
    color: var(--hp-yellow);
}

/* Buttons and links */
.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
    white-space: nowrap;
}

.hp-btn--primary {
    background: var(--hp-yellow);
    color: #1c1f34;
}

.hp-btn--primary:hover,
.hp-btn--primary:focus-visible {
    background: var(--hp-yellow-strong);
    color: #1c1f34;
}

.hp-btn--ghost {
    border-color: var(--hp-ink);
    color: var(--hp-ink);
    background: transparent;
}

.hp-btn--ghost:hover,
.hp-btn--ghost:focus-visible {
    background: var(--hp-ink);
    color: var(--hp-surface);
}

.hp-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
    color: var(--hp-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}

[data-bs-theme="dark"] .hp-link {
    color: var(--hp-yellow);
}

.hp-home a:focus-visible,
.hp-home button:focus-visible,
.hp-home summary:focus-visible,
.hp-home input:focus-visible {
    outline: 3px solid var(--hp-green-soft);
    outline-offset: 2px;
}

/* Store badges */
.hp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hp-badge {
    display: inline-flex;
    min-height: 44px;
    border-radius: 8px;
}

.hp-badge img {
    display: block;
    height: 44px;
    width: auto;
}

/* Hero */
.hp-hero {
    padding: 24px 0 28px;
    background:
        radial-gradient(ellipse 70% 60% at 85% 20%, rgba(246, 199, 67, .28), transparent 70%),
        linear-gradient(180deg, var(--hp-tint), var(--hp-surface));
}

.hp-hero__grid {
    display: grid;
    gap: 24px;
    align-items: center;
}

.hp-hero__title {
    font-size: clamp(1.85rem, 1.2rem + 3.2vw, 3.25rem);
    line-height: 1.12;
    font-weight: 700;
    margin: 0 0 .75rem;
    max-width: 18ch;
}

.hp-hero__subtitle {
    font-size: clamp(1rem, .95rem + .3vw, 1.175rem);
    margin: 0 0 1.25rem;
    max-width: 52ch;
}

.hp-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
    border-radius: 14px;
    box-shadow: var(--hp-shadow);
    max-width: 560px;
}

.hp-search__icon {
    flex: none;
    margin-left: 8px;
    color: var(--hp-muted);
}

.hp-search__input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    border: 0;
    background: transparent;
    color: var(--hp-ink);
    font-size: 16px; /* 16px keeps iOS from zooming on focus */
}

.hp-search__input::placeholder {
    color: var(--hp-muted);
}

.hp-search__input:focus {
    outline: none;
}

.hp-search:focus-within {
    border-color: var(--hp-green-soft);
}

.hp-search__button {
    flex: none;
    padding: 0 18px;
}

.hp-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin: 12px 0 0;
    font-size: .9375rem;
}

.hp-suggestions span {
    color: var(--hp-muted);
    margin-right: 2px;
}

.hp-suggestions a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
    color: var(--hp-ink);
    text-decoration: none;
}

.hp-suggestions a:hover {
    border-color: var(--hp-yellow);
}

.hp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.hp-hero__visual {
    display: none;
    justify-self: center;
}

/* A whole phone: frame on all four sides, rounded top and bottom. */
.hp-phone {
    margin: 0;
    width: 100%;
    max-width: 300px;
    border: 10px solid #1c1f34;
    border-radius: 40px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--hp-shadow);
}

.hp-phone picture {
    display: block;
}

.hp-phone img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 540 / 700;
    object-fit: cover;
    object-position: top;
}

/* Under the phone, never over its screen. */
.hp-hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--hp-surface);
    color: var(--hp-ink);
    font-weight: 600;
    font-size: .9375rem;
    box-shadow: var(--hp-shadow);
}

.hp-hero__chip svg {
    color: var(--hp-green);
}

.hp-trust {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
}

/* Three badges ("Paga en cuotas" hidden while cuotas are off): the last one
   takes the whole row on a phone instead of sitting alone in half of it. */
.hp-trust--three li:last-child {
    grid-column: 1 / -1;
}

.hp-trust li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
    color: var(--hp-ink);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.3;
}

.hp-trust svg {
    flex: none;
    color: var(--hp-green);
}

[data-bs-theme="dark"] .hp-trust svg,
[data-bs-theme="dark"] .hp-hero__chip svg {
    color: var(--hp-yellow);
}

/* Sections */
.hp-section {
    padding: 48px 0;
}

.hp-section--tint {
    background: var(--hp-tint);
}

.hp-section__head {
    margin-bottom: 24px;
    max-width: 640px;
}

.hp-section__head p {
    margin: 0;
}

.hp-section__head--row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 24px;
    max-width: none;
}

/* How it works */
.hp-steps {
    list-style: none;
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.hp-step {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
    padding: 18px;
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
}

.hp-step p {
    margin: 0;
}

.hp-step__number {
    grid-row: span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 50%;
    background: var(--hp-yellow);
    color: #1c1f34;
    font-weight: 700;
    font-size: 1.125rem;
}

/* Categories */
.hp-categories {
    list-style: none;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.hp-category {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    height: 100%;
    min-height: 44px;
    padding: 16px;
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
    color: inherit;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.hp-category:hover,
.hp-category:focus-visible {
    border-color: var(--hp-yellow);
    box-shadow: var(--hp-shadow);
}

.hp-category img {
    flex: none;
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--hp-tint);
}

.hp-category__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hp-category__name {
    color: var(--hp-ink);
    font-weight: 700;
    font-size: 1.0625rem;
}

.hp-category__text {
    font-size: .9375rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-category__count {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--hp-green);
}

[data-bs-theme="dark"] .hp-category__count {
    color: var(--hp-yellow);
}

/* Coverage */
.hp-coverage {
    display: grid;
    gap: 24px;
    padding: 24px;
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
}

.hp-coverage__copy p {
    margin: 0 0 .5rem;
}

.hp-coverage__note {
    color: var(--hp-muted);
    font-size: .9375rem;
}

.hp-cities {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin: 0;
    padding: 0;
}

.hp-cities li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    line-height: 1.3;
}

.hp-cities svg {
    flex: none;
    margin-top: 2px;
    color: var(--hp-green-soft);
}

.hp-cities strong {
    color: var(--hp-ink);
    font-weight: 600;
}

.hp-cities small {
    display: block;
    color: var(--hp-muted);
    font-size: .8125rem;
}

/* Providers */
.hp-provider {
    padding: 56px 0;
    background: var(--hp-green);
    color: #e3ece9;
}

.hp-provider h2,
.hp-provider h3 {
    color: #fff;
}

.hp-provider__grid {
    display: grid;
    gap: 32px;
    align-items: center;
}

.hp-provider__lead {
    font-size: 1.125rem;
    margin: 0 0 .5rem;
}

.hp-provider__requirement {
    margin: 0 0 1.25rem;
    font-weight: 600;
    color: var(--hp-yellow);
}

.hp-provider__actions {
    margin-bottom: 20px;
}

.hp-provider__app-label {
    margin: 0 0 8px;
    font-size: .9375rem;
}

.hp-provider__contact {
    margin: 20px 0 0;
    font-size: .9375rem;
}

.hp-provider__contact a {
    display: inline-block;
    padding: 10px 0;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hp-benefits {
    list-style: none;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.hp-benefit {
    display: flex;
    gap: 14px;
    padding: 18px;
    border-radius: var(--hp-radius);
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
}

.hp-benefit p {
    margin: 0;
}

.hp-benefit__icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--hp-yellow);
    color: #1c1f34;
}

/* Reviews */
.hp-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* App */
.hp-app {
    display: grid;
    gap: 24px;
    align-items: end;
    padding: 28px 24px 0;
    border-radius: var(--hp-radius);
    background:
        radial-gradient(ellipse 60% 80% at 100% 0%, rgba(246, 199, 67, .45), transparent 70%),
        var(--hp-tint);
    border: 1px solid var(--hp-line);
    overflow: hidden;
}

.hp-app__copy {
    align-self: center;
    padding-bottom: 4px;
}

.hp-app__copy p {
    margin: 0 0 1.25rem;
    max-width: 46ch;
}

/* App section: the phone rises out of the card's bottom edge (card clips it). */
.hp-phone--small {
    max-width: 240px;
    justify-self: center;
    border-bottom-width: 0;
    border-radius: 40px 40px 0 0;
}

/* FAQ */
.hp-faq-wrap {
    max-width: 860px;
}

.hp-faq {
    display: grid;
    gap: 10px;
}

.hp-faq__item {
    border-radius: 12px;
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
}

.hp-faq__item summary {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 14px 52px 14px 18px;
    color: var(--hp-ink);
    font-weight: 600;
    font-size: 1.0625rem;
    cursor: pointer;
    list-style: none;
}

.hp-faq__item summary::-webkit-details-marker {
    display: none;
}

.hp-faq__item summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--hp-green-soft);
}

.hp-faq__item[open] summary::after {
    content: "\2212";
}

.hp-faq__item p {
    margin: 0;
    padding: 0 18px 18px;
}

.hp-faq__more {
    margin: 16px 0 0;
}

/* Motion: only once JS has confirmed motion is welcome (html.hp-motion). */
html.hp-motion .hp-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s ease;
}

html.hp-motion .hp-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html.hp-motion .hp-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hp-btn,
    .hp-category {
        transition: none;
    }
}

/* >= 576px */
@media (min-width: 576px) {
    .hp-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hp-cities {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* >= 768px */
@media (min-width: 768px) {
    .hp-hero {
        padding: 48px 0 40px;
    }

    .hp-hero__grid {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
        gap: 40px;
    }

    .hp-hero__visual {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        width: 100%;
    }

    .hp-trust {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-top: 40px;
    }

    .hp-trust--three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hp-trust--three li:last-child {
        grid-column: auto;
    }

    .hp-section {
        padding: 72px 0;
    }

    .hp-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .hp-step {
        display: block;
        padding: 22px;
    }

    .hp-step__number {
        margin-bottom: 12px;
    }

    .hp-app {
        grid-template-columns: minmax(0, 1fr) 260px;
        padding: 40px 40px 0;
    }

    .hp-coverage {
        padding: 32px;
    }
}

/* >= 992px */
@media (min-width: 992px) {
    .hp-home .container {
        max-width: 1240px;
    }

    .hp-hero {
        padding: 64px 0 48px;
    }

    .hp-categories {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hp-category {
        flex-direction: column;
    }

    .hp-coverage {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
        align-items: center;
        gap: 40px;
        padding: 40px;
    }

    .hp-provider {
        padding: 80px 0;
    }

    .hp-provider__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 56px;
    }

    .hp-app {
        grid-template-columns: minmax(0, 1fr) 300px;
        padding: 48px 56px 0;
    }

    .hp-phone--small {
        max-width: 300px;
    }
}

/* Small phones: three suggestions keep the hero to one screen. */
@media (max-width: 399.98px) {
    .hp-suggestions a:nth-of-type(n + 4) {
        display: none;
    }
}

/* Phones: six categories; "Ver todas las categorías" leads to the rest. */
@media (max-width: 575.98px) {
    .hp-categories li:nth-child(n + 7) {
        display: none;
    }
}
