/* Velgrina Hero — dynamic, server-rendered first slide */

.velgrina-hero {
    width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-top: 0 !important;
    max-width: none !important;
    background: #1e2022;
}

.cms-index-index .column.main,
.cms-index-index .page-main,
.cms-index-index .columns {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.cms-index-index .page-main {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.cms-index-index .column.main {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.velgrina-hero [x-cloak] {
    display: none !important;
}

.velgrina-hero-inner {
    height: clamp(430px, 60vh, 580px);
}

.velgrina-hero__ssr,
.velgrina-hero__ssr picture,
.velgrina-hero__link-only {
    display: block;
    width: 100%;
    height: 100%;
}

.velgrina-hero__media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
}

@media (max-width: 767px) {
    .velgrina-hero-inner {
        height: clamp(390px, 52svh, 480px);
    }

    .velgrina-hero__media {
        object-position: 48% 45%;
    }
}

/* Overlay variants */
.velgrina-hero__overlay--left {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.38) 42%, rgba(0, 0, 0, 0.08) 72%, transparent 100%);
}

.velgrina-hero__overlay--right {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.38) 42%, rgba(0, 0, 0, 0.08) 72%, transparent 100%);
}

.velgrina-hero__overlay--full {
    background: rgba(0, 0, 0, 0.44);
}

.velgrina-hero__overlay--none {
    background: transparent;
}

@media (max-width: 767px) {
    .velgrina-hero__overlay--left,
    .velgrina-hero__overlay--right {
        background: linear-gradient(to right, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.36) 72%, rgba(0, 0, 0, 0.12) 100%);
    }
}

/* Text position */
.velgrina-hero__text {
    width: min(520px, calc(100% - 48px));
    top: 50% !important;
    transform: translateY(-50%) !important;
    bottom: auto !important;
    left: 24px !important;
    right: auto !important;
    pointer-events: none;
}

.velgrina-hero__copy {
    pointer-events: auto;
}

.velgrina-hero__copy--light {
    color: #fff;
}

.velgrina-hero__copy--dark {
    color: #1e2022;
}

@media (max-width: 767px) {
    .velgrina-hero__text {
        width: min(88%, 430px);
        top: 2rem !important;
        top: max(2rem, env(safe-area-inset-top)) !important;
        transform: none !important;
        left: max(16px, env(safe-area-inset-left)) !important;
    }
}

@media (min-width: 768px) {
    .velgrina-hero__text {
        left: 48px !important;
    }
}

@media (min-width: 1200px) {
    .velgrina-hero__text {
        left: max(48px, calc((100vw - 1300px) / 2 + 32px)) !important;
    }
}

.velgrina-hero__title {
    color: inherit;
    font-size: clamp(2rem, 3.2vw, 3.25rem) !important;
    font-weight: 700 !important;
    line-height: 1.12 !important;
    margin: 0 0 0.625rem !important;
    text-wrap: balance;
    -webkit-text-size-adjust: 100%;
    text-rendering: geometricPrecision;
}

.velgrina-hero__subtitle {
    color: inherit;
    opacity: 0.9;
    font-size: clamp(0.9375rem, 1vw + 0.75rem, 1.125rem) !important;
    font-weight: 400 !important;
    margin: 0 0 1.5rem !important;
    line-height: 1.55 !important;
    max-width: 42ch;
    -webkit-text-size-adjust: 100%;
    text-rendering: geometricPrecision;
}

.velgrina-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 28px;
    border: 1.5px solid currentColor;
    border-radius: 8px;
    color: inherit;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.velgrina-hero__copy--light .velgrina-hero__cta:hover {
    background: #fff;
    color: #1e2022;
    border-color: #fff;
}

.velgrina-hero__copy--dark .velgrina-hero__cta:hover {
    background: #1e2022;
    color: #fff;
    border-color: #1e2022;
}

.velgrina-hero__cta:focus-visible,
.velgrina-hero__dot:focus-visible,
.velgrina-hero__toggle:focus-visible,
.velgrina-hero__link-only:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    box-shadow: 0 0 0 2px #2e7d8c;
}

.velgrina-hero__controls {
    position: absolute;
    z-index: 20;
    left: 50%;
    bottom: 0.875rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.velgrina-hero__dots {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 0.125rem;
    min-height: 44px;
    border-radius: 999px;
    background: rgba(30, 32, 34, 0.34);
    backdrop-filter: blur(6px);
}

.velgrina-hero__dot {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

.velgrina-hero__dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.2s, background-color 0.2s;
}

.velgrina-hero__dot--active::before {
    width: 24px;
    background: #fff;
}

.velgrina-hero__dot:hover::before {
    background: rgba(255, 255, 255, 0.82);
}

.velgrina-hero__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: rgba(30, 32, 34, 0.38);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background-color 0.2s, border-color 0.2s;
}

.velgrina-hero__toggle:hover {
    background: rgba(30, 32, 34, 0.68);
    border-color: #fff;
}

.velgrina-hero__toggle svg {
    width: 18px;
    height: 18px;
}

.velgrina-hero__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .velgrina-hero *,
    .velgrina-hero *::before,
    .velgrina-hero *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
