@font-face {
    font-display: swap;
    font-family: 'GT Eesti';
    font-style: normal;
    font-weight: 200;
    src: url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Light.woff2') format('woff2'),
         url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Light.woff') format('woff');
}

@font-face {
    font-display: swap;
    font-family: 'GT Eesti';
    font-style: italic;
    font-weight: 200;
    src: url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Light-Italic.woff2') format('woff2'),
         url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Light-Italic.woff') format('woff');
}

@font-face {
    font-display: swap;
    font-family: 'GT Eesti';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Regular.woff2') format('woff2'),
         url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Regular.woff') format('woff');
}

@font-face {
    font-display: swap;
    font-family: 'GT Eesti';
    font-style: italic;
    font-weight: 400;
    src: url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Regular-Italic.woff2') format('woff2'),
         url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Regular-Italic.woff') format('woff');
}

@font-face {
    font-display: swap;
    font-family: 'GT Eesti';
    font-style: normal;
    font-weight: 500;
    src: url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Medium.woff2') format('woff2'),
         url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Medium.woff') format('woff');
}

@font-face {
    font-display: swap;
    font-family: 'GT Eesti';
    font-style: italic;
    font-weight: 500;
    src: url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Medium-Italic.woff2') format('woff2'),
         url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Medium-Italic.woff') format('woff');
}

@font-face {
    font-display: swap;
    font-family: 'GT Eesti';
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Bold.woff2') format('woff2'),
         url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Bold.woff') format('woff');
}

@font-face {
    font-display: swap;
    font-family: 'GT Eesti';
    font-style: italic;
    font-weight: 700;
    src: url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Bold-Italic.woff2') format('woff2'),
         url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Bold-Italic.woff') format('woff');
}

@font-face {
    font-display: swap;
    font-family: 'GT Eesti';
    font-style: normal;
    font-weight: 800;
    src: url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Bold.woff2') format('woff2'),
         url('/fonts/GT-Eesti/2025/GT-Eesti-Pro-Display-Bold.woff') format('woff');
}

@font-face {
    font-family: 'fallback for GT Eesti';
    src: local('Arial');
    ascent-override: 90%;
    descent-override: -26%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'android fallback for GT Eesti';
    src: local('Roboto');
    ascent-override: 80%;
    descent-override: -26%;
    line-gap-override: 0%;
    size-adjust: 90%;
}
:root {
    --color-brand: #c8553d;
    --color-brand-hover: #d25f18;
    --color-brand-soft: #fff1e8;
    --color-secondary: #e3a121;
    --color-secondary-soft: #edb63e;
    --color-secondary-deep: #b57d12;
    --color-secondary-muted: #fbf3df;
    --color-secondary-subtle: #f5e6bf;
    --color-accent: #e3a121;
    --color-accent-strong: #c98b10;
    --color-accent-muted: #fcf1d9;
    --color-accent-subtle: #f5e3b4;
    --focus-ring-color: #d25f18;
    --focus-ring-offset: 2px;
    --btn-ease: cubic-bezier(0.34, 1.2, 0.64, 1);
    --btn-ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --font-sans: 'GT Eesti', 'fallback for GT Eesti', 'android fallback for GT Eesti', sans-serif;
    --font-display: 'GT Eesti', 'fallback for GT Eesti', 'android fallback for GT Eesti', sans-serif;
    --font-feature-default: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: var(--font-sans);
    font-feature-settings: var(--font-feature-default);
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* `.font-display` keeps its token name but maps to GT Eesti. */
.font-display {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

/* Keep class hook used in templates while using the same GT family globally. */
.diacritic-safe-display {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.12;
}
/* Form controls inherit the page font in every browser. */
input,
textarea,
select,
button,
optgroup,
option {
    font-family: inherit;
    font-feature-settings: inherit;
}

/* Heading elements use GT Eesti by default. */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.015em;
}


/* Global container alignment - React-approved */
.container {
    width: 100%;
    max-width: 1320px;          /* wider than 1280 */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;      /* 24px */
    padding-right: 1.5rem;
}

/* Tablet */
@media (min-width: 768px) {
    .container {
        padding-left: 2.5rem;  /* 40px */
        padding-right: 2.5rem;
    }
}

/* Laptop */
@media (min-width: 1024px) {
    .container {
        max-width: 1400px;
        padding-left: 3rem;    /* 48px */
        padding-right: 3rem;
    }
}

/* Large Desktop (React look) */
@media (min-width: 1440px) {
    .container {
        max-width: 1440px;
        padding-left: 4rem;    /* 64px */
        padding-right: 4rem;
    }
}



.card-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid hsl(30, 15%, 88%);
}

.card-elevated {
    background: white;
    border-radius: 1rem;
    border: 1px solid hsl(30, 15%, 88%);
    transition: all 0.3s ease;
}

.card-elevated:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.15);
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

/* ========== Buttons (global components) ========== */
.btn-primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--color-brand);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background 0.28s var(--btn-ease-out),
        transform 0.28s var(--btn-ease),
        box-shadow 0.28s var(--btn-ease-out),
        filter 0.28s ease;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    left: -40%;
    width: 50%;
    background: linear-gradient(
        100deg,
        transparent 0%,
        rgba(255, 255, 255, 0.38) 45%,
        rgba(255, 255, 255, 0.12) 55%,
        transparent 100%
    );
    transform: skewX(-18deg) translateX(-120%);
    transition: transform 0.65s var(--btn-ease-out);
    pointer-events: none;
    z-index: 1;
}

.btn-primary > * {
    position: relative;
    z-index: 2;
}

.btn-primary:not(:disabled):hover {
    background: var(--color-brand-hover);
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.03);
    box-shadow:
        0 12px 36px -12px hsla(16, 72%, 32%, 0.5),
        0 0 0 1px hsla(38, 85%, 58%, 0.58);
}

.btn-primary:not(:disabled):hover::after {
    transform: skewX(-18deg) translateX(340%);
}

.btn-primary:not(:disabled):active {
    transform: translateY(0) scale(0.97);
    transition-duration: 0.1s;
    filter: brightness(0.98);
    box-shadow:
        0 6px 20px -10px hsla(16, 65%, 30%, 0.45),
        0 0 0 1px hsla(38, 75%, 50%, 0.45);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

/* Secondary CTA - purple, complements primary terracotta */
.btn-secondary {
    position: relative;
    overflow: hidden;
    background: var(--color-secondary);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid var(--color-secondary-deep);
    cursor: pointer;
    transition:
        background 0.28s var(--btn-ease-out),
        border-color 0.28s ease,
        color 0.28s ease,
        box-shadow 0.28s ease,
        transform 0.28s var(--btn-ease),
        filter 0.22s ease;
}

.btn-secondary:not(:disabled):hover {
    background: var(--color-secondary-soft);
    border-color: var(--color-secondary);
    color: #ffffff;
    transform: translateY(-1px) scale(1.01);
    filter: brightness(1.05);
    box-shadow:
        0 10px 28px -10px rgba(210, 95, 24, 0.45),
        0 0 0 1px rgba(210, 95, 24, 0.25);
}

.btn-secondary:not(:disabled):active {
    transform: translateY(0) scale(0.98);
    transition-duration: 0.1s;
}

.btn-secondary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Quiet variant - useful for tertiary surfaces / outline buttons keyed to secondary */
.btn-secondary-outline {
    position: relative;
    overflow: hidden;
    background: transparent;
    color: var(--color-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid var(--color-secondary-subtle);
    cursor: pointer;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s var(--btn-ease);
}

.btn-secondary-outline:not(:disabled):hover {
    background: var(--color-secondary-muted);
    border-color: var(--color-secondary);
    color: var(--color-secondary-deep);
    transform: translateY(-1px);
    box-shadow:
        0 8px 22px -12px rgba(210, 95, 24, 0.3),
        0 0 0 1px rgba(210, 95, 24, 0.18);
}

.btn-glass {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition:
        border-color 0.28s ease,
        color 0.28s ease,
        background 0.28s ease,
        box-shadow 0.28s ease,
        transform 0.28s var(--btn-ease);
}

.btn-glass:not(:disabled):hover {
    border-color: var(--color-accent);
    color: #fffef8;
    background: rgba(255, 255, 255, 0.42);
    box-shadow:
        0 10px 32px -12px hsla(38, 70%, 20%, 0.35),
        0 0 0 1px hsla(38, 85%, 70%, 0.45);
    transform: translateY(-1px) scale(1.02);
}

.btn-glass:not(:disabled):active {
    transform: translateY(0) scale(0.98);
    transition-duration: 0.08s;
}

@media (max-width: 639px) {
    .btn-glass {
        padding: 0.35rem 0.7rem;
        font-size: 0.8125rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-primary,
    .btn-secondary,
    .btn-glass {
        transition-duration: 0.01ms !important;
    }

    .btn-primary:not(:disabled):hover,
    .btn-primary:not(:disabled):active,
    .btn-secondary:not(:disabled):hover,
    .btn-secondary:not(:disabled):active,
    .btn-glass:not(:disabled):hover,
    .btn-glass:not(:disabled):active {
        transform: none !important;
        filter: none !important;
    }

    .btn-primary:not(:disabled):hover::after {
        transform: none !important;
        opacity: 0 !important;
    }

    .hover\:bg-primary:hover,
    .hover\:bg-primary\/90:hover,
    .hover\:bg-primary:active,
    .hover\:bg-primary\/90:active {
        transform: none !important;
    }

    :is(main, header, footer)
        button[class~='bg-primary']:not(.icon-box):hover,
    :is(main, header, footer)
        button[class~='bg-primary']:not(.icon-box):active,
    :is(main, header, footer)
        a[class~='bg-primary']:not(.icon-box):hover,
    :is(main, header, footer)
        a[class~='bg-primary']:not(.icon-box):active {
        transform: none !important;
    }
}

/* Semantic controls - light press snap ( skips icon wells + disabled ) */
:is(main, header, footer)
    button[class~='bg-primary']:not(.icon-box):not(:disabled):not([aria-disabled='true']),
:is(main, header, footer)
    a[class~='bg-primary']:not(.icon-box):not([aria-disabled='true']) {
    transition:
        transform 0.26s var(--btn-ease),
        box-shadow 0.26s ease,
        filter 0.22s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

:is(main, header, footer)
    button[class~='bg-primary']:not(.icon-box):not(:disabled):not([aria-disabled='true']):hover,
:is(main, header, footer)
    a[class~='bg-primary']:not(.icon-box):not([aria-disabled='true']):hover {
    transform: translateY(-2px) scale(1.02);
}

:is(main, header, footer)
    button[class~='bg-primary']:not(.icon-box):not(:disabled):not([aria-disabled='true']):active,
:is(main, header, footer)
    a[class~='bg-primary']:not(.icon-box):not([aria-disabled='true']):active {
    transform: translateY(0) scale(0.97);
    transition-duration: 0.09s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px hsla(38, 85%, 52%, 0.24);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: hsl(16, 65%, 95%);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(16, 65%, 45%);
}

.hidden {
    display: none;
}

/* Title truncation (fallback when Tailwind line-clamp utilities are unavailable) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Consistent icon wells (mobile menu + cards) */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    flex-shrink: 0;
    border: 1px solid hsl(30, 15%, 90%);
    background: hsl(220, 20%, 97%);
    color: hsl(220, 25%, 28%);
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

button.icon-box:hover,
a.icon-box:hover {
    border-color: hsla(38, 72%, 58%, 0.65);
    background: var(--color-accent-muted);
    color: var(--color-accent-strong);
    box-shadow: 0 2px 12px -4px hsla(38, 70%, 40%, 0.3);
}

.icon-box svg {
    width: 1.375rem;
    height: 1.375rem;
}

.icon-box-active {
    border-color: hsl(16, 65%, 55%, 0.35);
    background: hsl(16, 65%, 55%, 0.12);
    color: hsl(16, 65%, 48%);
    box-shadow: inset 0 0 0 1px hsla(38, 75%, 52%, 0.2);
}

.icon-box-danger {
    border-color: hsl(0, 70%, 90%);
    background: hsl(0, 86%, 97%);
    color: hsl(0, 55%, 46%);
}

.icon-box-login {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.icon-box-login svg {
    color: #fff;
}

/* Smaller variant for inline meta rows */
.icon-box-sm {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
}

.icon-box-sm svg {
    width: 0.875rem;
    height: 0.875rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Theme scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) hsl(35, 30%, 94%);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: hsl(35, 30%, 94%);
    border-radius: 9999px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-accent), var(--color-brand) 55%, var(--color-secondary));
    border: 2px solid hsl(35, 30%, 94%);
    border-radius: 9999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-accent-strong), var(--color-brand-hover) 55%, var(--color-secondary-soft));
}

/* -------------------------------------------------------------------------
   Keyboard focus - accent ring (complements primary actions site-wide)
   ------------------------------------------------------------------------- */
main :is(a, button, input, textarea, select, summary):focus-visible,
header :is(a, button, input):focus-visible,
footer :is(a, button):focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline-offset: 3px;
}

/* -------------------------------------------------------------------------
   Tailwind utility synergy - second color on primary hovers (CDN build)
   ------------------------------------------------------------------------- */
.hover\:text-primary:hover,
.group:hover .group-hover\:text-primary:not(:where(.card-elevated *)) {
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
}

.group.card-elevated:hover .group-hover\:text-primary,
a.card-elevated.group:hover .group-hover\:text-primary,
a.card-elevated:hover .group-hover\:text-primary {
    text-decoration: none !important;
}

.hover\:text-primary\/80:hover {
    text-decoration: underline;
    text-decoration-color: hsla(38, 85%, 48%, 0.85);
    text-underline-offset: 0.18em;
}

.hover\:border-primary:hover {
    box-shadow: 0 0 0 1px hsla(38, 82%, 52%, 0.45);
}

.hover\:border-primary\/20:hover {
    box-shadow:
        0 8px 28px -12px rgba(0, 0, 0, 0.06),
        0 0 0 1px hsla(38, 70%, 55%, 0.18);
}

.hover\:border-primary\/30:hover {
    box-shadow:
        0 12px 36px -16px rgba(0, 0, 0, 0.08),
        0 0 0 1px hsla(38, 72%, 54%, 0.24);
}

.hover\:border-primary\/50:hover {
    box-shadow: 0 0 0 1px hsla(38, 78%, 50%, 0.35);
}

.hover\:border-primary\/60:hover {
    box-shadow: 0 0 0 1px hsla(38, 80%, 48%, 0.42);
}

.hover\:bg-primary:hover,
.hover\:bg-primary\/90:hover {
    box-shadow:
        0 10px 32px -10px hsla(16, 70%, 38%, 0.4),
        0 0 0 1px hsla(38, 85%, 55%, 0.5);
    transform: translateY(-2px) scale(1.02);
    transition:
        transform 0.26s var(--btn-ease),
        box-shadow 0.26s ease,
        filter 0.22s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.hover\:bg-primary:active,
.hover\:bg-primary\/90:active {
    transform: translateY(0) scale(0.97);
    transition-duration: 0.09s;
}

.group:hover .group-hover\:bg-primary\/20 {
    box-shadow: inset 0 0 0 2px hsla(38, 75%, 52%, 0.22);
}

.group:hover .group-hover\:bg-primary\/10 {
    box-shadow: inset 0 0 0 1px hsla(38, 78%, 52%, 0.2);
}

.hover\:bg-primary\/5:hover {
    box-shadow: inset 0 0 0 1px hsla(38, 72%, 52%, 0.14);
}

.hover\:border-primary\/40:hover {
    box-shadow: 0 0 0 1px hsla(38, 76%, 50%, 0.38);
}

.hover\:bg-surface\/40:hover,
.hover\:bg-surface\/60:hover,
.hover\:bg-surface\/80:hover,
.hover\:bg-surface:hover {
    box-shadow: inset 0 0 0 1px hsla(38, 48%, 68%, 0.32);
}

/* -------------------------------------------------------------------------
   NEW: Secondary (purple) - Tailwind utility synergy
   Apply purple accents on hover/focus for any `secondary` Tailwind utility.
   ------------------------------------------------------------------------- */

/* Text hover: pair with subtle underline like .hover\:text-primary,
   but in purple - keeps secondary distinct from primary terracotta. */
.hover\:text-secondary:hover,
.group:hover .group-hover\:text-secondary {
    text-decoration: underline;
    text-decoration-color: var(--color-secondary-soft);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
}

/* Background hover halos */
.hover\:bg-secondary:hover,
.hover\:bg-secondary\/90:hover,
.hover\:bg-secondary\/80:hover {
    box-shadow:
        0 10px 28px -12px rgba(210, 95, 24, 0.42),
        0 0 0 1px rgba(210, 95, 24, 0.25);
}

.hover\:bg-secondary\/10:hover,
.hover\:bg-secondary\/15:hover,
.hover\:bg-secondary\/20:hover {
    box-shadow: inset 0 0 0 1px rgba(210, 95, 24, 0.2);
}

.hover\:bg-secondary\/5:hover {
    box-shadow: inset 0 0 0 1px rgba(210, 95, 24, 0.14);
}

/* Border hover */
.hover\:border-secondary:hover,
.hover\:border-secondary\/60:hover {
    box-shadow: 0 0 0 1px rgba(210, 95, 24, 0.4);
}

/* Group-hover background variants */
.group:hover .group-hover\:bg-secondary\/10,
.group:hover .group-hover\:bg-secondary\/20 {
    box-shadow: inset 0 0 0 1px rgba(210, 95, 24, 0.2);
}

/* Focus rings for `ring-secondary` and `focus:ring-secondary` */
[class*="ring-secondary"]:is(:focus, :focus-visible) {
    --tw-ring-color: rgba(210, 95, 24, 0.5) !important;
}

[class*="focus:border-secondary"]:is(:focus, :focus-visible) {
    box-shadow: 0 0 0 3px rgba(210, 95, 24, 0.2);
}

/* Drop-shadow accent on hover when utilities include shadow-secondary */
[class*="hover:shadow-secondary"]:hover,
[class*="shadow-secondary/30"]:hover,
[class*="shadow-secondary/40"]:hover {
    filter: drop-shadow(0 10px 22px rgba(210, 95, 24, 0.3));
}

.hover\:bg-muted\/60:hover,
.hover\:bg-muted\/80:hover {
    box-shadow: inset 0 0 0 1px hsla(38, 42%, 62%, 0.26);
}

/* -------------------------------------------------------------------------
   Entire application - Tailwind CDN ( substring match for extra classes )
   Blend accent into ring + focus strokes using primary-named utilities.
   ------------------------------------------------------------------------- */

[class*="ring-primary"]:is(:focus, :focus-visible) {
    --tw-ring-color: color-mix(in srgb, var(--color-accent) 45%, var(--color-brand) 55%) !important;
}

[class*="focus-visible:ring-ring"]:focus-visible {
    --tw-ring-color: hsla(38, 85%, 52%, 0.45) !important;
}

[class*="focus:border-primary"]:is(:focus, :focus-visible) {
    box-shadow: 0 0 0 3px hsla(38, 85%, 52%, 0.22);
}

/* Drop-shadow accent on hover when utilities include shadow-primary (e.g. header CTA) */
[class*="hover:shadow-primary"]:hover:not([class*="destructive"]),
[class*="shadow-primary/30"]:hover:not([class*="destructive"]),
[class*="shadow-primary/40"]:hover:not([class*="destructive"]) {
    filter: drop-shadow(0 10px 22px hsla(38, 72%, 48%, 0.22));
}

/* Fallback for browsers without color-mix */
@supports not (color: color-mix(in srgb, white, black)) {
    [class*="ring-primary"]:is(:focus, :focus-visible) {
        --tw-ring-color: hsla(38, 78%, 48%, 0.85) !important;
    }
}

/* -------------------------------------------------------------------------
   Hero home search - autocomplete rows (HTML built in JS; not Tailwind-scanned)
   Hover / focus use accent + brand tokens
   ------------------------------------------------------------------------- */
#search-dropdown .home-search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    border-radius: 0.75rem;
    text-align: left;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    background: #fff;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.12s ease;
}

#search-dropdown .home-search-dropdown-item:hover {
    background: var(--color-accent-muted);
    border-color: hsla(38, 58%, 74%, 0.65);
    box-shadow:
        0 5px 22px -10px rgba(0, 0, 0, 0.11),
        inset 3px 0 0 0 var(--color-accent);
}

#search-dropdown .home-search-dropdown-item:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
    background: var(--color-accent-muted);
}

#search-dropdown .home-search-dropdown-item:active {
    transform: scale(0.992);
}

#search-dropdown .home-search-dropdown-thumb {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 1px solid hsl(30, 15%, 88%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#search-dropdown .home-search-dropdown-item:hover .home-search-dropdown-thumb {
    border-color: hsla(38, 65%, 50%, 0.5);
    box-shadow: 0 0 0 2px hsla(38, 85%, 52%, 0.22);
}

#search-dropdown .home-search-dropdown-body {
    min-width: 0;
    flex: 1;
}

#search-dropdown .home-search-dropdown-title {
    font-weight: 600;
    color: hsl(220, 25%, 14%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

#search-dropdown .home-search-dropdown-item:hover .home-search-dropdown-title {
    color: var(--color-brand-hover);
}

#search-dropdown .home-search-dropdown-meta {
    font-size: 0.75rem;
    line-height: 1.35;
    color: hsl(220, 10%, 42%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

#search-dropdown .home-search-dropdown-item:hover .home-search-dropdown-meta {
    color: hsl(220, 18%, 28%);
}

/* -------------------------------------------------------------------------
   Sicilia hover unification
   Keeps all major CTA hover/focus behavior consistent site-wide.
   ------------------------------------------------------------------------- */
:root {
    --site-hover: #d25f18;
    --site-hover-soft: rgba(210, 95, 24, 0.24);
    --site-hover-shadow: rgba(210, 95, 24, 0.34);
}
.btn-primary:not(:disabled):hover,
.btn-secondary:not(:disabled):hover,
:is(main, header, footer)
    button[class~='bg-primary']:not(.icon-box):not(:disabled):not([aria-disabled='true']):hover,
:is(main, header, footer)
    a[class~='bg-primary']:not(.icon-box):not([aria-disabled='true']):hover,
.hover\:bg-primary:hover,
.hover\:bg-primary\/90:hover {
    background: var(--site-hover) !important;
    border-color: var(--site-hover) !important;
    color: #fff !important;
    box-shadow:
        0 10px 28px -12px var(--site-hover-shadow),
        0 0 0 1px var(--site-hover-soft) !important;
}
.hover\:text-primary:hover,
.group:hover .group-hover\:text-primary,
.hover\:text-primary\/80:hover {
    color: var(--site-hover) !important;
    text-decoration-color: var(--site-hover) !important;
}
.hover\:border-primary:hover,
.hover\:border-primary\/20:hover,
.hover\:border-primary\/30:hover,
.hover\:border-primary\/40:hover,
.hover\:border-primary\/50:hover,
.hover\:border-primary\/60:hover {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--site-hover) 42%, transparent) !important;
}
.hover\:bg-primary\/10:hover,
.hover\:bg-primary\/5:hover,
.group:hover .group-hover\:bg-primary\/10,
.group:hover .group-hover\:bg-primary\/20 {
    background: color-mix(in srgb, var(--site-hover) 12%, transparent) !important;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--site-hover) 28%, transparent) !important;
}
[class*="hover:shadow-primary"]:hover:not([class*="destructive"]),
[class*="shadow-primary/30"]:hover:not([class*="destructive"]),
[class*="shadow-primary/40"]:hover:not([class*="destructive"]) {
    filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--site-hover) 28%, transparent)) !important;
}

/* Ensure Sicilia-wide hover color consistency for links/buttons. */
:is(main, header, footer) a:hover:not(.card-elevated):not(.btn-primary):not(.btn-glass):not(.btn-secondary):not([class*='bg-primary']):not([class*='hover:bg-secondary/']):not([class*='hover:bg-surface/']) {
    color: var(--site-hover) !important;
    text-decoration-color: var(--site-hover) !important;
}

/* Card blocks: no underline on hover (matches Italia Intour home cards). */
:is(main) a.card-elevated,
:is(main) a.card-elevated:hover,
:is(main) a.card-elevated:hover * {
    text-decoration: none !important;
}
:is(main, header, footer) :is(button:not(.payment-option):not(#submit-button):not(#voucher-apply-button):not(.auth-text-link), a[role='button'], a[class*='btn'], a[class*='button'], a[class*='bg-primary'], a[class*='from-primary'][class*='to-accent']):not(:disabled):not([aria-disabled='true']):hover {
    background: var(--site-hover) !important;
    background-image: none !important;
    border-color: var(--site-hover) !important;
    color: #fff !important;
}

/* Text-only button links, such as auth helper actions, should hover like links. */
:is(main, header, footer) button.auth-text-link:hover,
:is(main, header, footer) button[class*='hover:underline']:not([class*='bg-primary']):hover {
    background: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: var(--site-hover) !important;
    text-decoration-line: underline !important;
    text-decoration-color: var(--site-hover) !important;
    text-underline-offset: 3px;
}

/* Saturated tags/panels: white text only (no layout/color changes). */
.bg-accent.text-white,
.bg-accent.text-white *:not([class*='bg-card']):not([class*='bg-white']) {
    color: #ffffff !important;
}

button.date-btn:hover .text-foreground,
button.date-btn:hover .text-muted-foreground,
button.date-btn:focus-visible .text-foreground,
button.date-btn:focus-visible .text-muted-foreground {
    color: #ffffff !important;
}

/* Keep text readable on outlined surface buttons that gain tinted hover backgrounds. */
:is(main, header, footer)
    :is(a, button)[class*='text-foreground'][class*='hover:bg-secondary/']:hover,
:is(main, header, footer)
    :is(a, button)[class*='text-foreground'][class*='hover:bg-surface/']:hover {
    color: hsl(220, 25%, 12%) !important;
}

/* Tours/Audioguides filter controls: keep hover/focus text contrast readable. */
:is(main, header, footer) :is(a, button).rounded-md[class*='hover:bg-accent']:hover,
:is(main, header, footer) :is(a, button).rounded-md[class*='hover:bg-primary/10'][class*='text-foreground']:hover,
:is(main, header, footer) :is(a, button).rounded-md[class*='hover:bg-primary/10'][class*='hover:text-primary']:hover,
#tours-mobile-filters-panel :is(a, button).rounded-md:hover,
#tours-mobile-filters-panel :is(a, button).rounded-md:focus-visible,
#audioguides-mobile-filters-panel :is(a, button).rounded-md:hover,
#audioguides-mobile-filters-panel :is(a, button).rounded-md:focus-visible {
    background: var(--color-brand-hover) !important;
    border-color: var(--color-brand-hover) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow:
        0 10px 28px -12px var(--site-hover-shadow),
        0 0 0 1px var(--site-hover-soft) !important;
}

/* Private tours CTA: keep readable text when hover background becomes the secondary tint. */
:is(main, header, footer) a.private-tour-primary-cta:hover,
:is(main, header, footer) a.private-tour-primary-cta:active,
:is(main, header, footer) a.private-tour-primary-cta:focus-visible {
    color: hsl(220, 25%, 12%) !important;
    text-decoration: none !important;
}

/* Header nav: keep only the custom bottom indicator line (no text underline). */
.site-header .site-nav a:hover,
.site-header .site-nav .hover\:text-primary:hover,
.site-header .site-nav .group:hover .group-hover\:text-primary,
.site-header .site-nav .hover\:text-primary\/80:hover {
    text-decoration: none !important;
    text-underline-offset: 0 !important;
    text-decoration-thickness: 0 !important;
}

/* Hero strip headings: keep consistent uppercase titles on all under-header pages. */
:where([class*='bg-gradient-to-b'][class*='from-secondary/50'][class*='to-background']) h1.font-display {
    text-transform: uppercase;
}

/* Unified hero strip design used across all under-header pages. */
:where([class*='bg-gradient-to-b'][class*='from-secondary/50'][class*='to-background']) {
    background-color: var(--color-secondary-muted) !important;
    background-image: linear-gradient(
        180deg,
        var(--color-secondary-subtle) 0%,
        var(--color-secondary-muted) 46%,
        #f8fafc 100%
    ) !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}
