/*
==============================================================================
SavvyGreat Material 3 home refinement v3
Copyright (c) 2026 SavvyGreat. All rights reserved.
==============================================================================
*/

/* The runtime measures the real context surface and keeps only a compact gap. */
.sghome-m3 {
    margin-top: var(--sghome-context-gap-adjust, 0px);
}

/* Guarantee continuous marquee motion instead of relying on inherited shorthand. */
.sghome-m3-breaking-track.is-sghome-marquee-running {
    display: flex;
    width: max-content;
    min-width: max-content;
    transform: translate3d(0, 0, 0);
    animation-name: sghomeM3MarqueeV3 !important;
    animation-duration: var(--sghome-marquee-duration, 22s) !important;
    animation-timing-function: linear !important;
    animation-delay: 0s !important;
    animation-iteration-count: infinite !important;
    animation-direction: normal !important;
    animation-fill-mode: none !important;
    animation-play-state: running !important;
    will-change: transform;
}

@keyframes sghomeM3MarqueeV3 {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

/* Tighter home hero and smaller primary heading. */
.sghome-m3-hero {
    min-height: clamp(230px, 20vw, 330px);
    padding: clamp(22px, 3.2vw, 46px);
}

.sghome-m3-hero h1#sghomeM3Title {
    max-width: 21ch;
    margin-block: 10px 13px;
    font-size: clamp(30px, 3.2vw, 48px);
    letter-spacing: -.03em;
    line-height: 1.06;
}

.sghome-m3-hero-copy > p {
    font-size: clamp(14px, 1.05vw, 17px);
    line-height: 1.48;
}

.sghome-m3-hero-actions {
    margin-top: 20px;
}

.sghome-m3-destination-grid > a {
    min-height: 68px;
}

/* Material 3 tonal icon buttons for horizontal content browsing. */
.sghome-m3-scroll-controls {
    display: inline-flex;
    gap: 8px;
    padding: 4px;
    border-radius: 28px;
    background: var(--sghome-surface-container, #f3edf7);
}

.sghome-m3-scroll-controls button {
    position: relative;
    display: inline-grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    padding: 0;
    place-items: center;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: var(--sghome-secondary-container, #e8def8);
    color: var(--sghome-on-secondary-container, #1d192b);
    box-shadow: none;
    cursor: pointer;
    transition:
        background 160ms linear,
        color 160ms linear,
        transform 240ms cubic-bezier(.2, 0, 0, 1),
        opacity 160ms linear;
}

.sghome-m3-scroll-controls button::before {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: currentColor;
    content: "";
    opacity: 0;
    transition: opacity 160ms linear;
}

.sghome-m3-scroll-controls button:hover::before {
    opacity: .08;
}

.sghome-m3-scroll-controls button:active::before {
    opacity: .12;
}

.sghome-m3-scroll-controls button:hover {
    transform: scale(1.05);
}

.sghome-m3-scroll-controls button .material-symbols-rounded {
    position: relative;
    z-index: 1;
    font-size: 26px;
    font-variation-settings: "FILL" 0, "wght" 550, "GRAD" 0, "opsz" 24;
}

.sghome-m3-scroll-controls button:disabled,
.sghome-m3-scroll-controls button[aria-disabled="true"] {
    background: var(--sghome-surface-container-high, #ece6f0);
    color: var(--sghome-on-surface, #1d1b20);
    cursor: default;
    opacity: .38;
    transform: none;
}

.sghome-m3-scroll-controls button:disabled::before,
.sghome-m3-scroll-controls button[aria-disabled="true"]::before {
    display: none;
}

@media (max-width: 839px) {
    .sghome-m3-hero {
        min-height: 0;
        padding: 24px;
    }

    .sghome-m3-hero h1#sghomeM3Title {
        font-size: clamp(28px, 6vw, 40px);
    }
}

@media (max-width: 599px) {
    .sghome-m3-hero {
        padding: 20px 18px;
    }

    .sghome-m3-hero h1#sghomeM3Title {
        max-width: 22ch;
        font-size: clamp(27px, 8vw, 36px);
        line-height: 1.08;
    }

    .sghome-m3-hero-copy > p {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sghome-m3-breaking-window {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .sghome-m3-breaking-track.is-sghome-marquee-running {
        animation: none !important;
        transform: none !important;
    }

    .sghome-m3-breaking-group[aria-hidden="true"] {
        display: none;
    }
}
