/* ============================================================
   Feature Guides — The App section
   ============================================================ */

/* --- Index Page (page-the-app.php) --- */

.ha-features-index {
    padding-bottom: 60px;
}

.ha-features-hero {
    text-align: center;
    padding: 60px 20px 48px;
}

.ha-features-hero__title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--ha-text);
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.ha-features-hero__subtitle {
    font-size: 1.1rem;
    color: var(--ha-text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.ha-features-hero__badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ha-features-hero__badges img {
    height: 44px;
    width: auto;
}

.ha-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .ha-features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 960px) {
    .ha-features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ha-feature-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--ha-text);
    background: transparent;
    box-shadow: none;
    transition: transform 0.2s ease;
}

.ha-feature-card::before {
    display: none;
}

.ha-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
    color: var(--ha-text);
}

.ha-feature-card__phone {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: var(--ha-surface-variant);
    border-radius: 24px;
    padding: 6px;
    overflow: hidden;
}

.ha-feature-card__phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 20px;
    display: block;
}

.ha-feature-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ha-text);
    margin: 0 0 10px;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ha-feature-card__title .mdi {
    font-size: 1.15em;
    flex-shrink: 0;
    opacity: 0.85;
}


/* --- Individual Guide Page (page-feature-guide.php) --- */

.ha-guide {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.ha-guide__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--ha-text-secondary);
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.15s ease;
}

.ha-guide__back:hover {
    color: var(--ha-accent);
}

.ha-guide__header {
    margin-bottom: 32px;
}

.ha-guide__title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ha-text);
    margin: 0 0 16px;
    letter-spacing: -0.3px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ha-guide__title .mdi {
    font-size: 0.9em;
    flex-shrink: 0;
    opacity: 0.85;
}

.ha-guide__description {
    font-size: 1.05rem;
    color: var(--ha-text-secondary);
    line-height: 1.7;
    margin: 0 0 32px;
}

.ha-guide__description strong {
    color: var(--ha-text);
    font-weight: 600;
}

/* Screenshots carousel */

.ha-guide__screenshots {
    margin: 0 -20px 40px;
    padding: 0 20px;
}

.ha-guide__screenshots-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--ha-border) transparent;
}

.ha-guide__screenshots-scroll::-webkit-scrollbar {
    height: 6px;
}

.ha-guide__screenshots-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.ha-guide__screenshots-scroll::-webkit-scrollbar-thumb {
    background: var(--ha-border);
    border-radius: 3px;
}

/* Phone mockup frame */

.ha-phone-frame {
    flex: 0 0 auto;
    width: 220px;
    scroll-snap-align: start;
}

.ha-phone-frame__bezel {
    background: #1c1c1e;
    border-radius: 32px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .ha-phone-frame__bezel {
    background: #2c2c2e;
}

.ha-phone-frame__screen {
    border-radius: 26px;
    overflow: hidden;
    aspect-ratio: 393 / 852;
    background: #000;
}

.ha-phone-frame__screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

@media (min-width: 640px) {
    .ha-phone-frame {
        width: 260px;
    }
}

@media (min-width: 960px) {
    .ha-phone-frame {
        width: 280px;
    }
}

/* Sections breakdown (sales deck layout) */

.ha-guide__sections {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin-bottom: 48px;
}

.ha-guide__section {
    display: flex;
    align-items: center;
    gap: 32px;
}

.ha-guide__section--reverse {
    flex-direction: row-reverse;
}

.ha-guide__section-phone {
    flex: 0 0 auto;
}

.ha-guide__section-phone .ha-phone-frame {
    width: 220px;
}

.ha-guide__section-text {
    flex: 1;
    min-width: 0;
}

.ha-guide__section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ha-accent);
    margin: 0 0 10px;
}

.ha-guide__section-desc {
    font-size: 1rem;
    color: var(--ha-text-secondary);
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 639px) {
    .ha-guide__section,
    .ha-guide__section--reverse {
        flex-direction: column;
        text-align: center;
    }

    .ha-guide__section-phone .ha-phone-frame {
        width: 200px;
        margin: 0 auto;
    }
}

@media (min-width: 640px) {
    .ha-guide__section-phone .ha-phone-frame {
        width: 240px;
    }
}

@media (min-width: 960px) {
    .ha-guide__sections {
        gap: 64px;
    }

    .ha-guide__section {
        gap: 48px;
    }

    .ha-guide__section-phone .ha-phone-frame {
        width: 280px;
    }

    .ha-guide__section-title {
        font-size: 1.4rem;
    }

    .ha-guide__section-desc {
        font-size: 1.05rem;
    }
}

/* How to use it section */

.ha-guide__how {
    margin-bottom: 40px;
}

.ha-guide__how-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ha-text);
    margin: 0 0 20px;
}

.ha-guide__steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: guide-step;
}

.ha-guide__step {
    counter-increment: guide-step;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ha-divider);
}

.ha-guide__step:last-child {
    border-bottom: none;
}

.ha-guide__step::before {
    content: counter(guide-step);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ha-accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 1px;
}

.ha-guide__step-text {
    font-size: 1rem;
    color: var(--ha-text-secondary);
    line-height: 1.6;
}

.ha-guide__step-text strong {
    color: var(--ha-text);
    font-weight: 600;
}

/* Editorial note */

.ha-guide__note {
    background: var(--ha-surface);
    border-left: 3px solid var(--ha-accent);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: var(--ha-text-secondary);
    line-height: 1.5;
}

/* CTA */

.ha-guide__cta {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid var(--ha-divider);
    margin-bottom: 24px;
}

.ha-guide__cta-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ha-text);
    margin: 0 0 8px;
}

.ha-guide__cta-text {
    font-size: 0.95rem;
    color: var(--ha-text-secondary);
    margin: 0 0 20px;
}

.ha-guide__cta-btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--ha-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}

.ha-guide__cta-btn:hover {
    background: var(--ha-accent-hover);
    color: #fff;
}

/* Prev / Next navigation */

.ha-guide__nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--ha-divider);
}

.ha-guide__nav-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--ha-text);
    max-width: 45%;
    transition: color 0.15s ease;
}

.ha-guide__nav-link:hover {
    color: var(--ha-accent);
}

.ha-guide__nav-link--next {
    text-align: right;
    margin-left: auto;
}

.ha-guide__nav-label {
    font-size: 0.75rem;
    color: var(--ha-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.ha-guide__nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}
