/*
 * Portada - Fase 4 (identidad visual + consistencia entre secciones).
 * Prefijo propio `.home-*` para no reestilizar `.section-title`/`.app-list`
 * compartidas con categoria/plataforma/tags/etc.
 */

/* Encabezado de seccion con icono, sin perder el estilo de .section-title. */
.home-section-title {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.home-section-title svg {
    height: 14px;
    fill: #92c66c;
    flex-shrink: 0;
}

/* Tarjeta de app con elevacion sutil al pasar el cursor. */
.home-card {
    display: block;
    border-radius: 10px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.home-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

/* Topics / News: mismo contenedor "card" que el resto de secciones. */
.home-card-section {
    background: #fff;
    border-radius: .375rem;
}

.home-card-section .topics {
    padding: 0 .5rem .5rem;
}

.home-topic-card,
.home-news-card {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.home-topic-card:hover,
.home-news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

/* LiquidGlass ON: horizontal glass cards like the provided reference:
   large rounded panel, three-column app grid, icon left, text right. */
body.dowdes-theme-light #dowdes-main .col-md-9 > .lg-glass,
body.dowdes-theme-dark #dowdes-main .col-md-9 > .lg-glass,
body.dowdes-theme-auto #dowdes-main .col-md-9 > .lg-glass {
    padding: 1.25rem 1.25rem .45rem !important;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 16px !important;
    background: var(--dowdes-glass-panel-bg, var(--dowdes-surface, rgba(255, 255, 255, .72))) !important;
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    backdrop-filter: blur(22px) saturate(165%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .58),
        0 18px 46px rgba(64, 76, 112, .16);
}

body.dowdes-theme-dark #dowdes-main .col-md-9 > .lg-glass,
html[data-dowdes-theme-choice="dark"] body #dowdes-main .col-md-9 > .lg-glass {
    border-color: rgba(255, 255, 255, .20);
    background: var(--dowdes-glass-panel-bg, rgba(18, 27, 24, .62)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .18),
        0 18px 48px rgba(0, 0, 0, .34);
}

body.dowdes-theme-light #dowdes-main .col-md-9 > .lg-glass .m-1,
body.dowdes-theme-dark #dowdes-main .col-md-9 > .lg-glass .m-1,
body.dowdes-theme-auto #dowdes-main .col-md-9 > .lg-glass .m-1 {
    margin: 0 !important;
}

body.dowdes-theme-light .home-section-title,
body.dowdes-theme-dark .home-section-title,
body.dowdes-theme-auto .home-section-title {
    margin-bottom: 1.05rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(255, 255, 255, .28);
    color: var(--dowdes-heading, #26312d) !important;
    font-size: 1.45rem;
    line-height: 1.1;
}

body.dowdes-theme-light .more,
body.dowdes-theme-dark .more,
body.dowdes-theme-auto .more {
    color: var(--dowdes-heading, #26312d) !important;
    font-size: 1.18rem;
    line-height: 1.2;
    text-shadow: none;
}

body.dowdes-theme-dark .more,
html[data-dowdes-theme-choice="dark"] body .more {
    color: #fff !important;
    text-shadow: 0 0 9px rgba(255, 255, 255, .18);
}

body.dowdes-theme-light .app-list:not(.featured),
body.dowdes-theme-dark .app-list:not(.featured),
body.dowdes-theme-auto .app-list:not(.featured) {
    row-gap: .95rem;
}

body.dowdes-theme-light .app-list:not(.featured) > [class*="col-"],
body.dowdes-theme-dark .app-list:not(.featured) > [class*="col-"],
body.dowdes-theme-auto .app-list:not(.featured) > [class*="col-"] {
    margin-bottom: 0 !important;
}

body.dowdes-theme-light .home-card,
body.dowdes-theme-dark .home-card,
body.dowdes-theme-auto .home-card {
    background-color: var(--dowdes-glass-card-bg, var(--dowdes-surface-soft, rgba(255, 255, 255, .56)));
    background-image: var(--dowdes-glass-card-image, linear-gradient(145deg, rgba(255, 255, 255, .44), rgba(255, 255, 255, .16)));
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .42),
        0 8px 22px rgba(64, 76, 112, .12);
    color: var(--dowdes-page-text, #35423d);
}

body.dowdes-theme-light .app-list:not(.featured) .home-card,
body.dowdes-theme-dark .app-list:not(.featured) .home-card,
body.dowdes-theme-auto .app-list:not(.featured) .home-card {
    min-height: 86px;
    padding: .72rem .82rem;
    border-radius: 16px;
}

body.dowdes-theme-light .app-list:not(.featured) .home-card > .row,
body.dowdes-theme-dark .app-list:not(.featured) .home-card > .row,
body.dowdes-theme-auto .app-list:not(.featured) .home-card > .row {
    align-items: center;
    flex-wrap: nowrap;
    height: 100%;
    margin-left: 0;
    margin-right: 0;
}

body.dowdes-theme-light .app-list:not(.featured) .home-card > .row > .col-md-4,
body.dowdes-theme-dark .app-list:not(.featured) .home-card > .row > .col-md-4,
body.dowdes-theme-auto .app-list:not(.featured) .home-card > .row > .col-md-4 {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    padding-left: 0;
    padding-right: .85rem;
}

body.dowdes-theme-light .app-list:not(.featured) .home-card > .row > .col-md-8,
body.dowdes-theme-dark .app-list:not(.featured) .home-card > .row > .col-md-8,
body.dowdes-theme-auto .app-list:not(.featured) .home-card > .row > .col-md-8 {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
    padding-left: 0 !important;
    padding-top: 0 !important;
}

body.dowdes-theme-light .app-list:not(.featured) .home-card img,
body.dowdes-theme-dark .app-list:not(.featured) .home-card img,
body.dowdes-theme-auto .app-list:not(.featured) .home-card img {
    width: 64px;
    height: 64px;
    max-width: 64px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(24, 42, 36, .14);
}

body.dowdes-theme-dark .home-card,
html[data-dowdes-theme-choice="dark"] body .home-card {
    background-color: var(--dowdes-glass-card-bg, rgba(20, 30, 26, .42));
    background-image: var(--dowdes-glass-card-image,
        radial-gradient(circle at 18% 8%, rgba(146, 198, 108, .14), transparent 40%),
        linear-gradient(145deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .035)));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .16),
        0 8px 24px rgba(0, 0, 0, .26);
}

body.dowdes-theme-light .home-card:hover,
body.dowdes-theme-dark .home-card:hover,
body.dowdes-theme-auto .home-card:hover {
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--lg-accent, #92c66c) 34%, rgba(255, 255, 255, .48)),
        0 12px 28px rgba(64, 76, 112, .18);
}

body.dowdes-theme-dark .home-card:hover,
html[data-dowdes-theme-choice="dark"] body .home-card:hover {
    box-shadow:
        inset 0 0 0 1px rgba(146, 198, 108, .32),
        0 12px 30px rgba(0, 0, 0, .34),
        0 0 18px rgba(146, 198, 108, .10);
}

body.dowdes-theme-light .app-list:not(.featured) .home-card .title,
body.dowdes-theme-dark .app-list:not(.featured) .home-card .title,
body.dowdes-theme-auto .app-list:not(.featured) .home-card .title {
    display: -webkit-box;
    margin-bottom: .32rem;
    color: var(--dowdes-heading, #26312d) !important;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.22;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

body.dowdes-theme-light .app-list:not(.featured) .home-card .developer,
body.dowdes-theme-light .app-list:not(.featured) .home-card .date,
body.dowdes-theme-dark .app-list:not(.featured) .home-card .developer,
body.dowdes-theme-dark .app-list:not(.featured) .home-card .date,
body.dowdes-theme-auto .app-list:not(.featured) .home-card .developer,
body.dowdes-theme-auto .app-list:not(.featured) .home-card .date {
    color: var(--dowdes-muted, #66736d) !important;
    font-size: .92rem;
    line-height: 1.25;
}

body.dowdes-theme-dark .app-list:not(.featured) .home-card .title,
html[data-dowdes-theme-choice="dark"] body .app-list:not(.featured) .home-card .title {
    color: #fff !important;
    text-shadow: 0 0 9px rgba(255, 255, 255, .20), 0 1px 2px rgba(0, 0, 0, .55);
}

body.dowdes-theme-dark .app-list:not(.featured) .home-card .developer,
body.dowdes-theme-dark .app-list:not(.featured) .home-card .date,
html[data-dowdes-theme-choice="dark"] body .app-list:not(.featured) .home-card .developer,
html[data-dowdes-theme-choice="dark"] body .app-list:not(.featured) .home-card .date {
    color: #d8e7df !important;
    text-shadow: 0 0 7px rgba(255, 255, 255, .12);
}

body.dowdes-theme-light .home-topic-card,
body.dowdes-theme-light .home-news-card,
body.dowdes-theme-dark .home-topic-card,
body.dowdes-theme-dark .home-news-card,
body.dowdes-theme-auto .home-topic-card,
body.dowdes-theme-auto .home-news-card {
    background-color: var(--dowdes-glass-card-bg, var(--dowdes-surface-soft, rgba(255, 255, 255, .56)));
    background-image: var(--dowdes-glass-card-image, none);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .38),
        0 8px 22px rgba(64, 76, 112, .12);
}

body.dowdes-glass-no-cards .home-card,
body.dowdes-glass-no-cards .home-topic-card,
body.dowdes-glass-no-cards .home-news-card {
    background: transparent !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
}

body.dowdes-glass-no-cards .home-card:hover,
body.dowdes-glass-no-cards .home-topic-card:hover,
body.dowdes-glass-no-cards .home-news-card:hover {
    box-shadow: none !important;
}

@media (min-width: 1200px) {
    body.dowdes-theme-light .app-list:not(.featured) .home-card,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card {
        min-height: 92px;
        padding: .82rem .95rem;
    }

    body.dowdes-theme-light .app-list:not(.featured) .home-card img,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card img,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card img {
        width: 70px;
        height: 70px;
        max-width: 70px;
    }

    body.dowdes-theme-light .app-list:not(.featured) .home-card .title,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card .title,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card .title {
        font-size: 1.06rem;
    }
}

@media (max-width: 767.98px) {
    body.dowdes-theme-light .app-list:not(.featured),
    body.dowdes-theme-dark .app-list:not(.featured),
    body.dowdes-theme-auto .app-list:not(.featured) {
        margin-left: -.45rem;
        margin-right: -.45rem;
        row-gap: 1rem;
    }

    body.dowdes-theme-light .app-list:not(.featured) > [class*="col-"],
    body.dowdes-theme-dark .app-list:not(.featured) > [class*="col-"],
    body.dowdes-theme-auto .app-list:not(.featured) > [class*="col-"] {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        margin-bottom: .95rem !important;
        padding-left: .45rem;
        padding-right: .45rem;
    }

    body.dowdes-theme-light .app-list:not(.featured) .home-card,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card {
        min-height: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        background-image: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: none;
    }

    body.dowdes-theme-light .app-list:not(.featured) .home-card:hover,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card:hover,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card:hover {
        transform: translateY(-1px);
        box-shadow: none;
    }

    body.dowdes-theme-light .app-list:not(.featured) .home-card > .row,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card > .row,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card > .row {
        display: block;
        height: auto;
        margin-left: 0;
        margin-right: 0;
    }

    body.dowdes-theme-light .app-list:not(.featured) .home-card > .row > .col-md-4,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card > .row > .col-md-4,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card > .row > .col-md-4,
    body.dowdes-theme-light .app-list:not(.featured) .home-card > .row > .col-md-8,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card > .row > .col-md-8,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card > .row > .col-md-8 {
        display: block;
        width: 100%;
        max-width: 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
    }

    body.dowdes-theme-light .app-list:not(.featured) .home-card img,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card img,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card img {
        width: 100%;
        height: auto;
        max-width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 5px 14px rgba(24, 42, 36, .10);
    }

    body.dowdes-theme-light .app-list:not(.featured) .home-card .title,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card .title,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card .title {
        margin-top: .5rem;
        margin-bottom: .2rem;
        font-size: .96rem;
        line-height: 1.08;
        -webkit-line-clamp: 1;
    }

    body.dowdes-theme-light .app-list:not(.featured) .home-card .developer,
    body.dowdes-theme-light .app-list:not(.featured) .home-card .date,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card .developer,
    body.dowdes-theme-dark .app-list:not(.featured) .home-card .date,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card .developer,
    body.dowdes-theme-auto .app-list:not(.featured) .home-card .date {
        display: -webkit-box;
        overflow: hidden;
        font-size: .88rem;
        line-height: 1.18;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
}
