/*
Theme Name: AffiliateCMS Child
Theme URI: https://lat.vn/
Description: Child theme for AffiliateCMS Theme. Add your custom styles and overrides here.
Author: AffiliateCMS Team
Author URI: https://lat.vn/
Template: affiliateCMS-theme
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: affiliatecms-child
*/

/* ==========================================================================
   Custom Styles - Add your overrides below
   ========================================================================== */

/* Guides have comments closed, so the hero "Be the first to review" link points nowhere. */
.post-hero__rating--empty {
    display: none;
}

/* Homepage topic blocks (child front-page.php). Three layouts chosen per site via acms_home_layout. */
.home-sections {
    padding: 2.5rem 0 1.5rem;
}
.home-sections__list {
    display: grid;
    gap: 1.25rem;
}
.home-section {
    display: flex;
    gap: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 8px);
    padding: 1.25rem;
}
.home-section__icon {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md, 8px);
    background: var(--color-primary-light, rgba(0, 0, 0, .05));
    color: var(--color-primary);
    font-size: 1.35rem;
}
.home-section__title {
    font-size: 1.3rem;
    line-height: 1.25;
    margin: 0 0 .4rem;
}
.home-section__title a {
    color: var(--color-text);
    text-decoration: none;
}
.home-section__title a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}
.home-section__summary {
    color: var(--color-text-secondary);
    margin: 0 0 .85rem;
    line-height: 1.55;
}
.home-section__children {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.home-section__children a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: .25rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-bg-alt);
    color: var(--color-text);
    font-size: .9rem;
    text-decoration: none;
}
.home-section__children a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
/* grid: cards in two columns on wide screens */
@media (min-width: 900px) {
    .home-sections--grid .home-sections__list {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* editorial: one wide column, no card chrome, divider lines, larger headings */
.home-sections--editorial .home-sections__list {
    max-width: 820px;
    margin: 0 auto;
    gap: 0;
}
.home-sections--editorial .home-section {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    padding: 1.75rem 0;
}
.home-sections--editorial .home-section__title {
    font-size: 1.6rem;
}
.home-sections--editorial .home-section__children a {
    border-radius: 4px;
    background: none;
}
/* tiles: compact three-column tiles, icon on top */
@media (min-width: 700px) {
    .home-sections--tiles .home-sections__list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1100px) {
    .home-sections--tiles .home-sections__list {
        grid-template-columns: repeat(3, 1fr);
    }
}
.home-sections--tiles .home-section {
    flex-direction: column;
    border-top: 4px solid var(--color-primary);
}

/* Accessibility (WCAG 2.2 AA, found by axe + keyboard test 2026-10-18). */
/* The parent theme removes focus outlines on menu links and buttons; restore a visible indicator. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--color-primary) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 5px var(--color-surface, #fff) !important;
}
/* Footer copyright used a muted color below 4.5:1 on the footer background. */
.footer__copyright {
    color: var(--color-text-secondary) !important;
}
/* Footer policy links: 24px minimum target size with spacing (WCAG 2.5.8). */
.footer__link {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 4px;
}
