/* Manufacturer profiles: brand header above the brand-filtered Shop and the card layout of the Gyártók page. */

/* Logo frames sized by brand-logo-sizer.js */
.av365-brand-logo-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.av365-brand-logo-frame img {
    display: block;
    width: auto;
    height: auto;
    max-width: 82%;
    max-height: 70%;
    object-fit: contain;
    opacity: 0;
    animation: av365-brand-frame-fallback 1ms 1500ms forwards;
}

.av365-brand-logo-frame img.av365-brand-logo-sized {
    opacity: 1;
    animation: none;
}

@keyframes av365-brand-frame-fallback {
    to { opacity: 1; }
}

/* ------------------------------------------------------------------ */
/* Brand header                                                        */
/* ------------------------------------------------------------------ */

.av365-brand-hero {
    margin: 0 0 30px;
    overflow: hidden;
    border: 1px solid #e2e7eb;
    border-top: 3px solid var(--av365-accent, #d90012);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 5px 18px rgb(21 40 63 / 4%);
}

.av365-brand-hero__summary {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 30px;
    align-items: center;
    padding: 26px 30px;
}

.av365-brand-hero__summary:not(:has(.av365-brand-hero__logo)) {
    grid-template-columns: minmax(0, 1fr);
}

.av365-brand-hero__logo {
    height: 118px;
    border-right: 1px solid #eef1f4;
}

.av365-brand-hero__intro {
    min-width: 0;
}

.av365-brand-hero__tagline {
    margin: 0 0 6px;
    color: var(--av365-ink, #171a1f);
    font-size: 20px;
    font-weight: 650;
    line-height: 1.35;
}

.av365-brand-hero__lead {
    max-width: 78ch;
    margin: 0 0 18px;
    color: var(--av365-slate, #56616d);
    font-size: 15px;
    line-height: 1.6;
}

.av365-brand-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    align-items: center;
}

.av365-brand-hero__toggle {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 40px;
    margin: 0;
    padding: 8px 14px 8px 18px;
    border: 0;
    border-radius: 4px;
    background: var(--av365-accent, #d90012);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.av365-brand-hero__toggle:hover {
    background: var(--av365-accent-hover, #b00012);
}

.av365-brand-hero__toggle svg,
.av365-brand-hero__link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.av365-brand-hero__toggle svg {
    transition: transform 240ms ease;
}

.av365-brand-hero.is-open .av365-brand-hero__toggle svg {
    transform: rotate(180deg);
}

.av365-brand-hero__link {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--av365-ink, #171a1f);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.av365-brand-hero__link svg {
    width: 16px;
    height: 16px;
}

.av365-brand-hero__link:hover,
.av365-brand-hero__all:hover {
    color: var(--av365-accent-hover, #b00012);
}

.av365-brand-hero__all {
    margin-left: auto;
    color: var(--av365-slate, #56616d);
    font-size: 13px;
    text-decoration: none;
}

.av365-brand-hero__all::before {
    content: "← ";
}

/* Collapsible details: animated with grid rows, kept in the DOM for search engines. */
.av365-brand-hero__details {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 320ms ease;
}

.av365-brand-hero.is-open .av365-brand-hero__details {
    grid-template-rows: 1fr;
}

.av365-brand-hero__details-inner {
    min-height: 0;
    overflow: hidden;
}

.av365-brand-hero__grid {
    display: grid;
    gap: 36px;
    margin: 0 30px;
    padding: 28px 0 32px;
    border-top: 1px solid #e9edf1;
}

.av365-brand-hero__grid.has-aside {
    grid-template-columns: minmax(0, 1fr) 320px;
}

/* Description text */
.av365-brand-hero__text {
    min-width: 0;
    max-width: 80ch;
    color: #2c343c;
    font-size: 15px;
    line-height: 1.7;
}

.av365-brand-hero__text > :first-child {
    margin-top: 0;
}

.av365-brand-hero__text > :last-child {
    margin-bottom: 0;
}

.av365-brand-hero__text p {
    margin: 0 0 14px;
}

.av365-brand-hero__text strong {
    color: var(--av365-ink, #171a1f);
    font-weight: 650;
}

.av365-brand-hero__text a {
    color: var(--av365-accent, #d90012);
}

.av365-brand-hero__text h3,
.av365-brand-hero__text h4 {
    position: relative;
    margin: 28px 0 12px;
    padding-left: 14px;
    color: var(--av365-ink, #171a1f);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.av365-brand-hero__text h4 {
    font-size: 15px;
}

.av365-brand-hero__text h3::before,
.av365-brand-hero__text h4::before {
    content: "";
    position: absolute;
    top: 0.2em;
    bottom: 0.2em;
    left: 0;
    width: 3px;
    border-radius: 2px;
    background: var(--av365-brand-red, #ff0000);
}

.av365-brand-hero__text ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

/* Plain lists: compact checklist in columns */
.av365-brand-hero__text ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 6px 24px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.av365-brand-hero__text ul > li {
    position: relative;
    margin: 0;
    padding-left: 24px;
    line-height: 1.55;
}

.av365-brand-hero__text ul > li::before {
    content: "";
    position: absolute;
    top: 0.42em;
    left: 3px;
    width: 10px;
    height: 5px;
    border-bottom: 2px solid var(--av365-accent, #d90012);
    border-left: 2px solid var(--av365-accent, #d90012);
    transform: rotate(-45deg);
}

/* "Label: text" lists: small cards with a red edge */
.av365-brand-hero__text ul.av365-brand-facts {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.av365-brand-hero__text ul.av365-brand-facts > li {
    padding: 12px 14px 13px;
    border: 1px solid #e6ebef;
    border-left: 3px solid var(--av365-accent, #d90012);
    border-radius: 4px;
    background: #fafbfc;
    color: var(--av365-slate, #56616d);
    font-size: 14px;
    line-height: 1.55;
}

.av365-brand-hero__text ul.av365-brand-facts > li::before {
    content: none;
}

.av365-brand-hero__text ul.av365-brand-facts > li > strong:first-child {
    display: block;
    margin-bottom: 3px;
    color: var(--av365-ink, #171a1f);
    font-size: 14.5px;
}

/* Aside: videos and contact */
.av365-brand-hero__aside {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.av365-brand-video {
    margin: 0;
}

.av365-brand-video__preview,
.av365-brand-video iframe {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 0;
    border-radius: 4px;
    background: var(--av365-ink, #171a1f);
}

.av365-brand-video__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 350ms ease, filter 350ms ease;
}

.av365-brand-video__placeholder {
    display: flex;
    height: 100%;
    align-items: flex-end;
    padding: 14px 16px;
    background: linear-gradient(135deg, #171a1f, #3b4550);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.av365-brand-video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--av365-accent, #d90012);
    box-shadow: 0 10px 26px rgb(0 0 0 / 30%);
    transform: translate(-50%, -50%);
    transition: transform 200ms ease, background-color 200ms ease;
}

.av365-brand-video__play svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
    fill: #fff;
}

.av365-brand-video__preview:hover img,
.av365-brand-video__preview:focus-visible img {
    filter: brightness(0.82);
    transform: scale(1.03);
}

.av365-brand-video__preview:hover .av365-brand-video__play,
.av365-brand-video__preview:focus-visible .av365-brand-video__play {
    background: var(--av365-accent-hover, #b00012);
    transform: translate(-50%, -50%) scale(1.08);
}

.av365-brand-video figcaption {
    margin: 8px 0 0;
    color: var(--av365-slate, #56616d);
    font-size: 13px;
    line-height: 1.45;
}

.av365-brand-contact {
    padding: 16px 18px 17px;
    border: 1px solid #e6ebef;
    border-radius: 4px;
    background: #fafbfc;
}

.av365-brand-contact__title {
    margin: 0 0 12px;
    color: var(--av365-accent, #d90012);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.av365-brand-contact__person {
    display: flex;
    gap: 12px;
    align-items: center;
}

.av365-brand-contact__person img {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 50%;
    object-fit: cover;
}

.av365-brand-contact__person strong {
    display: block;
    color: var(--av365-ink, #171a1f);
    font-size: 15px;
    line-height: 1.3;
}

.av365-brand-contact__person span {
    display: block;
    color: var(--av365-slate, #56616d);
    font-size: 13px;
}

.av365-brand-contact__links {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.av365-brand-contact__links li {
    margin: 0 0 4px;
}

.av365-brand-contact__links a {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--av365-ink, #171a1f);
    font-size: 14px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.av365-brand-contact__links a:hover {
    color: var(--av365-accent-hover, #b00012);
}

.av365-brand-contact__links svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: var(--av365-accent, #d90012);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ------------------------------------------------------------------ */
/* Gyártók page: cards                                                 */
/* ------------------------------------------------------------------ */

.av365-brand-directory {
    --av365-brand-gap: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(210px, calc((100% - (var(--av365-brand-columns, 4) - 1) * var(--av365-brand-gap)) / var(--av365-brand-columns, 4))), 1fr));
    gap: var(--av365-brand-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.av365-brand-card {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.av365-brand-card > a {
    position: relative;
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e7eb;
    border-radius: 4px;
    background: #fff;
    color: var(--av365-ink, #171a1f);
    text-decoration: none;
    box-shadow: 0 5px 18px rgb(21 40 63 / 3%);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.av365-brand-card > a:hover,
.av365-brand-card > a:focus-visible {
    border-color: #cbd5de;
    border-top-color: var(--av365-accent, #d90012);
    box-shadow: 0 14px 30px rgb(21 40 63 / 9%);
    transform: translateY(-4px);
}

.av365-brand-card__logo {
    height: 132px;
    flex: 0 0 auto;
    border-bottom: 1px solid #eef1f4;
}

.av365-brand-card__initials {
    color: var(--av365-ink, #171a1f);
    font-size: 20px;
    font-weight: 700;
}

.av365-brand-card__body {
    display: block;
    flex: 1 1 auto;
    padding: 16px 48px 18px 18px;
}

.av365-brand-card__name {
    display: block;
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.35;
}

.av365-brand-card__text {
    display: -webkit-box;
    overflow: hidden;
    color: var(--av365-slate, #56616d);
    font-size: 12.5px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* A plain arrow in the corner beside the text: quiet grey, red and nudged forward on hover/focus. */
.av365-brand-card__cta {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: block;
    color: #8a96a2;
    line-height: 0;
    transition: color 160ms ease;
}

.av365-brand-card__cta svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 180ms ease;
}

.av365-brand-card > a:is(:hover, :focus-visible) .av365-brand-card__cta {
    color: var(--av365-accent, #d90012);
}

.av365-brand-card > a:is(:hover, :focus-visible) .av365-brand-card__cta svg {
    transform: translateX(4px);
}

/* ------------------------------------------------------------------ */
/* Small screens                                                       */
/* ------------------------------------------------------------------ */

@media (max-width: 999px) {
    .av365-brand-hero__grid.has-aside {
        grid-template-columns: minmax(0, 1fr);
    }

    .av365-brand-hero__aside {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        align-items: start;
    }
}

@media (max-width: 689px) {
    .av365-brand-hero {
        margin-bottom: 22px;
    }

    .av365-brand-hero__summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding: 18px 18px 20px;
    }

    .av365-brand-hero__logo {
        height: 86px;
        border-right: 0;
        border-bottom: 1px solid #eef1f4;
    }

    .av365-brand-hero__tagline {
        font-size: 18px;
    }

    .av365-brand-hero__all {
        margin-left: 0;
    }

    .av365-brand-hero__grid {
        gap: 26px;
        margin: 0 18px;
        padding: 22px 0 24px;
    }

    .av365-brand-hero__text {
        font-size: 14.5px;
    }

    .av365-brand-directory {
        --av365-brand-gap: 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .av365-brand-card__logo {
        height: 96px;
    }

    .av365-brand-card__body {
        padding: 12px 12px 36px;
    }

    .av365-brand-card__name {
        font-size: 15px;
    }

    .av365-brand-card__text {
        font-size: 12px;
    }

    .av365-brand-card__cta {
        right: 12px;
        bottom: 12px;
    }

    .av365-brand-card__cta svg {
        width: 20px;
        height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .av365-brand-hero__details,
    .av365-brand-hero__toggle svg,
    .av365-brand-card > a,
    .av365-brand-card__cta svg,
    .av365-brand-video__preview img,
    .av365-brand-video__play {
        transition: none;
    }

    .av365-brand-card > a:hover,
    .av365-brand-card > a:focus-visible {
        transform: none;
    }
}
