/* Explain: Shared component styles and home-page red updates ticker styles. */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.section-label::before {
    content: "";
    display: inline-block;
    width: 1.75rem;
    height: 2px;
    background: var(--accent-color);
}

/* Service / feature cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

/* FAQ accordion (native details/summary) */
details.faq-item summary {
    list-style: none;
}

details.faq-item summary::-webkit-details-marker {
    display: none;
}

details.faq-item summary i {
    transition: transform 0.25s ease;
}

details.faq-item[open] summary i {
    transform: rotate(180deg);
}

details.faq-item[open] {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

/* Header */
.nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.82);
}

.nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

/* Language toggle */
.lang-btn {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
}

.lang-btn.is-active {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* daisyUI form focus polish */
.input:focus,
.textarea:focus,
.select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 1px;
}

/* Floating service balloons */
.svc-balloon {
    position: fixed;
    left: 0;
    top: 0;
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    white-space: nowrap;
    color: #ffffff;
    background: linear-gradient(135deg, var(--balloon-a, var(--accent-color)), var(--balloon-b, var(--primary-color)));
    box-shadow: var(--shadow-md);
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
    animation: balloonFly linear forwards;
}

.svc-balloon::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--balloon-b, var(--primary-color));
}

/* Each floating service tag keeps its own colour */
.svc-balloon.tone-1 { --balloon-a: #c9a227; --balloon-b: #8a6d12; }
.svc-balloon.tone-2 { --balloon-a: #0e9488; --balloon-b: #0b6f66; }
.svc-balloon.tone-3 { --balloon-a: #6366f1; --balloon-b: #4338ca; }
.svc-balloon.tone-4 { --balloon-a: #e11d48; --balloon-b: #9f1239; }
.svc-balloon.tone-5 { --balloon-a: #059669; --balloon-b: #04664a; }
.svc-balloon.tone-6 { --balloon-a: #ea580c; --balloon-b: #b4440a; }
.svc-balloon.tone-7 { --balloon-a: #0284c7; --balloon-b: #075985; }
.svc-balloon.tone-8 { --balloon-a: #9333ea; --balloon-b: #6b21a8; }

@keyframes balloonFly {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-8deg) scale(0.7);
    }
    12% {
        opacity: 1;
    }
    50% {
        opacity: 1;
        transform: translate(calc(var(--tx) / 2), calc(var(--ty) / 2)) rotate(8deg) scale(0.9);
    }
    84% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) rotate(-4deg) scale(1);
    }
}

@media (max-width: 640px) {
    .svc-balloon {
        max-width: 72vw;
        padding: 0.55rem 0.95rem;
        font-size: 0.82rem;
        line-height: 1.25;
        white-space: normal;
        text-align: center;
        box-shadow: var(--shadow-lg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .svc-balloon {
        display: none;
    }
}

/* Scrolling services ticker (hero) */
.ticker-bar {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.ticker-bar::before,
.ticker-bar::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3rem;
    z-index: 2;
    pointer-events: none;
}

.ticker-bar::before {
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), rgba(10, 37, 64, 0));
}

.ticker-bar::after {
    right: 0;
    background: linear-gradient(270deg, var(--primary-color), rgba(10, 37, 64, 0));
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: tickerScroll 45s linear infinite;
}

.ticker-bar:hover .ticker-track,
.ticker-bar:focus-within .ticker-track {
    animation-play-state: paused;
}

.ticker-group {
    display: flex;
    align-items: center;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.82);
}

.ticker-item i {
    color: var(--accent-color);
}

@keyframes tickerScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track {
        animation: none;
    }
}

/* Receipt printing */
@media print {
    body * {
        visibility: hidden;
    }

    #receiptPrint,
    #receiptPrint *,
    #entryReceiptPrint,
    #entryReceiptPrint *,
    #invoicePrint,
    #invoicePrint *,
    #invoiceDocPrint,
    #invoiceDocPrint * {
        visibility: visible;
    }

    #receiptPrint,
    #entryReceiptPrint,
    #invoicePrint,
    #invoiceDocPrint {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }
}

/* Share button — website + CRM updates */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.95rem;
    border-radius: 0.65rem;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.share-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.share-btn i {
    color: inherit;
}

.share-popover {
    position: fixed;
    z-index: 80;
    display: flex;
    min-width: 12.5rem;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem;
    border-radius: 0.85rem;
    border: 1px solid var(--border-color);
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

.share-popover[hidden] {
    display: none;
}

.share-pop-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.share-pop-item:hover {
    background: var(--surface-color);
}

.share-pop-item i {
    width: 1.05rem;
    text-align: center;
    color: var(--primary-color);
}

/* Customer reviews carousel */
.review-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.review-track::-webkit-scrollbar {
    display: none;
}

.review-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.review-arrow:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Golden glow headings (services) */
.svc-glow {
    color: var(--accent-hover);
    text-shadow: 0 0 6px rgba(201, 162, 39, 0.6), 0 0 16px rgba(201, 162, 39, 0.35);
}

/* Insurance & investment partner brand badges */
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid var(--border-color);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.brand-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 0.6rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.brand-logo-mark-lic {
    background: linear-gradient(135deg, #1769aa, #00539f);
}

.brand-logo-mark-star {
    background: linear-gradient(135deg, #0e9f6e, #047857);
}

.brand-logo-text {
    display: inline-flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.brand-logo-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-color);
}

.brand-logo-sub {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Hero background crossfade slideshow */
.hero-bg-layer {
    opacity: 0;
    animation: heroBgFade 18s ease-in-out infinite;
}

.hero-bg-layer-2 {
    animation-delay: 9s;
}

@keyframes heroBgFade {
    0% {
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    58% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg-layer {
        animation: none;
        opacity: 1;
    }

    .hero-bg-layer-2 {
        animation: none;
        display: none;
    }
}

/* Statistics band — each item enlarges one by one when scrolled into view,
   then keeps cycling a gentle enlarge / reduce highlight, one at a time */
.stats-item {
    opacity: 0;
    transform: scale(0.7);
    transform-origin: 50% 65%;
    transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

.stats-item.is-in {
    opacity: 1;
    transform: scale(1);
}

/* Continuous highlight loop: only one figure is enlarged at any moment */
.stats-item.is-cycle {
    animation: statsPulse 6s ease-in-out infinite;
}

.stats-item.is-cycle:nth-child(1) {
    animation-delay: 0s;
}

.stats-item.is-cycle:nth-child(2) {
    animation-delay: 1s;
}

.stats-item.is-cycle:nth-child(3) {
    animation-delay: 2s;
}

.stats-item.is-cycle:nth-child(4) {
    animation-delay: 3s;
}

.stats-item.is-cycle:nth-child(5) {
    animation-delay: 4s;
}

.stats-item.is-cycle:nth-child(6) {
    animation-delay: 5s;
}

@keyframes statsPulse {
    0%,
    100% {
        transform: scale(1);
    }
    4% {
        transform: scale(1.14);
    }
    12% {
        transform: scale(1.14);
    }
    16.67% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .stats-item {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
    }
}

/* Home-page updates bar — the latest notices scroll across the very top of the
   site in red, and each one opens that notice on the Updates page. */
.upd-ticker-viewport {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 2rem, #000 calc(100% - 2rem), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 2rem, #000 calc(100% - 2rem), transparent);
}

.upd-ticker-track {
    display: flex;
    width: max-content;
    animation: updTickerScroll 36s linear infinite;
}

.upd-ticker:hover .upd-ticker-track,
.upd-ticker:focus-within .upd-ticker-track {
    animation-play-state: paused;
}

.upd-ticker-group {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 2.5rem;
    min-width: 90rem;
    padding-right: 2.5rem;
}

.upd-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 700;
    color: #dc2626;
    text-decoration: none;
    transition: color 0.2s ease;
}

.upd-ticker-item:hover,
.upd-ticker-item:focus-visible {
    color: #991b1b;
    text-decoration: underline;
}

.upd-ticker-item i {
    color: #dc2626;
}

@keyframes updTickerScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 640px) {
    .upd-ticker-group {
        gap: 1.5rem;
        min-width: 58rem;
        padding-right: 1.5rem;
    }

    .upd-ticker-item {
        font-size: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .upd-ticker-track {
        animation: none;
    }

    .upd-ticker-viewport {
        overflow-x: auto;
    }
}

/* Shared update link — the notice the shared link points at is picked out in
   the red updates bar and on its own notice card. */
.upd-ticker-item.is-focused {
    border-radius: 9999px;
    background: #ffffff;
    padding: 0.25rem 0.75rem;
    box-shadow: 0 0 0 2px #dc2626;
}

.is-highlighted {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-md);
}