/* Vlastné štýly webu – animácie, modaly, toasty. Vzhľad komponentov je v tailwind.css. */

/* --- Odhalenie pri scrollovaní (náhrada framer-motion whileInView) --- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease-out var(--d, 0s), transform .6s ease-out var(--d, 0s);
    will-change: opacity, transform;
}
.js [data-reveal="small"] { transform: translateY(20px); transition-duration: .5s; }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="left"] { transform: translateX(-20px); transition-duration: .4s; }
.js [data-reveal="right"] { transform: translateX(30px); }
.js [data-reveal="left-lg"] { transform: translateX(-50px); }
.js [data-reveal="right-lg"] { transform: translateX(50px); }
.js [data-reveal="scale"] { transform: translateY(40px) scale(.9); transition-duration: .5s; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* --- Hlavička --- */
.header-enter { animation: header-in .5s ease-out both; }
@keyframes header-in { from { transform: translateY(-100px); } to { transform: translateY(0); } }
#site-header.is-scrolled {
    background-color: hsl(var(--background) / .8);
    border-bottom: 1px solid hsl(var(--border) / .5);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    --tw-backdrop-blur: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}
@media (min-width: 1024px) {
    #site-header.is-scrolled { background-color: hsl(var(--background) / .8); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
}

/* --- Mobilná hlavička: menšie vlajky, aby sa zmestili vedľa loga --- */
.lang-switcher--mobile { gap: .25rem; }
.lang-switcher--mobile a { width: 1.5rem; height: 1.125rem; border-width: 1.5px; border-radius: .2rem; }
@media (max-width: 359px) {
    .lang-switcher--mobile a { width: 1.25rem; height: .9375rem; }
}

/* --- Mobilné menu --- */
.mobile-menu { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .3s ease, opacity .3s ease; }
.mobile-menu[hidden] { display: none; }
.mobile-menu > div { min-height: 0; overflow: hidden; }
.mobile-menu.is-open { grid-template-rows: 1fr; opacity: 1; }
.mobile-menu-item { opacity: 0; transform: translateX(-20px); transition: opacity .3s ease, transform .3s ease; transition-delay: calc(var(--i, 0) * .05s); }
.mobile-menu.is-open .mobile-menu-item { opacity: 1; transform: none; }

/* --- Hero: písací efekt a scroll indikátor --- */
.typing-cursor { color: hsl(var(--primary)); margin-left: .125rem; animation: cursor-blink 1s ease-in-out infinite; }
@keyframes cursor-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.scroll-dot { animation: scroll-dot 1.5s ease-in-out infinite; }
@keyframes scroll-dot { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* --- Cookie lišta --- */
.cookie-banner { animation: cookie-in .5s cubic-bezier(.2, .9, .3, 1.15) both; }
.cookie-banner.is-leaving { animation: cookie-out .3s ease-in both; }
@keyframes cookie-in { from { transform: translateY(100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes cookie-out { from { transform: translateY(0); opacity: 1; } to { transform: translateY(100px); opacity: 0; } }

/* --- Toasty (náhrada sonner) --- */
.ods-toast {
    display: flex; align-items: center; gap: .5rem;
    padding: 1rem; font-size: 13px; border-radius: 8px;
    background: hsl(var(--card)); color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
    box-shadow: 0 4px 12px rgb(0 0 0 / .3);
    animation: toast-in .4s ease-out both;
}
.ods-toast.is-leaving { animation: toast-out .3s ease-in both; }
.ods-toast--success { border-color: hsl(var(--primary) / .5); }
.ods-toast--success svg { color: hsl(var(--primary)); }
.ods-toast--error { border-color: hsl(var(--destructive) / .6); }
.ods-toast--error svg { color: hsl(var(--destructive)); }
@keyframes toast-in { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(20%); opacity: 0; } }

/* --- Dialógy (modaly služieb a konfigurátory) --- */
body.ods-dialog-open { overflow: hidden; }
.ods-overlay { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .8); animation: fade-in .2s ease-out both; }
.ods-overlay.is-closing { animation: fade-out .2s ease-in both; }
.ods-dialog {
    position: fixed; left: 50%; top: 50%; z-index: 50; width: 100%;
    transform: translate(-50%, -50%);
    border: 1px solid hsl(var(--border)); background: hsl(var(--background));
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    animation: dialog-in .2s ease-out both;
    display: flex; flex-direction: column;
}
.ods-dialog.is-closing { animation: dialog-out .2s ease-in both; }
@media (min-width: 640px) { .ods-dialog { border-radius: .5rem; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translate(-50%, -48%) scale(.95); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes dialog-out { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -48%) scale(.95); } }
.ods-dialog-close {
    position: absolute; right: 1rem; top: 1rem; border-radius: .125rem; opacity: .7;
    transition: opacity .15s; z-index: 10;
}
.ods-dialog-close:hover { opacity: 1; }
.ods-dialog-close:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring)); }
.ods-scroll { scrollbar-width: thin; scrollbar-color: hsl(var(--border)) transparent; }
.ods-scroll::-webkit-scrollbar { width: 10px; }
.ods-scroll::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 9999px; border: 2px solid transparent; background-clip: padding-box; }

/* --- Konfigurátor: kroky a animácie --- */
.cfg-step { animation: step-in .3s ease-out both; }
@keyframes step-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.cfg-item-in { animation: item-in .4s ease-out both; animation-delay: var(--d, 0s); }
@keyframes item-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.cfg-glow { animation: cfg-glow 2s ease-in-out infinite; }
@keyframes cfg-glow {
    0%, 100% { box-shadow: 0 10px 30px -10px rgba(34, 197, 94, .3); }
    50% { box-shadow: 0 10px 30px -10px rgba(34, 197, 94, .6); }
}
.cfg-progress-shimmer { animation: shimmer 2.5s linear infinite; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
.cfg-bob { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -2px); } }
.cfg-icon-active { animation: icon-pop 2.5s ease-in-out infinite; }
@keyframes icon-pop { 0%, 80%, 100% { transform: scale(1) rotate(0); } 85% { transform: scale(1.1) rotate(-5deg); } 95% { transform: scale(1.05) rotate(5deg); } }
.cfg-check-in { animation: check-in .25s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes check-in { from { transform: scale(0); } to { transform: scale(1); } }
.cfg-price-pop { animation: price-pop .3s ease-out both; }
@keyframes price-pop { from { transform: scale(1.15); color: hsl(var(--primary)); } to { transform: scale(1); } }
.cfg-success-icon { animation: check-in .5s cubic-bezier(.2, .9, .3, 1.3) both; }


/* --- Súťaž: porovnanie before / after --- */
.ba { position: relative; aspect-ratio: 1600 / 843; overflow: hidden; user-select: none; touch-action: pan-y; background: hsl(var(--muted)); }
.ba .ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 12px rgb(0 0 0 / .5); pointer-events: none; }
.ba-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 9999px; background: hsl(var(--primary)); color: hsl(var(--background)); display: flex; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 4px 16px rgb(0 0 0 / .4); }
.ba-label { position: absolute; top: 12px; padding: 4px 10px; border-radius: 9999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: rgb(0 0 0 / .6); color: #fff; backdrop-filter: blur(4px); pointer-events: none; }
.ba-label--before { left: 12px; }
.ba-label--after { right: 12px; background: hsl(var(--primary)); color: hsl(var(--background)); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba-range:focus-visible + * , .ba:focus-within .ba-handle { box-shadow: 0 0 0 2px hsl(var(--primary)); }
details > summary::-webkit-details-marker { display: none; }

/* --- Súťaž: hero s mockupom --- */
.ct-hero { padding: 7rem 0 4rem; min-height: 88vh; display: flex; align-items: center; }
.ct-hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; max-width: 80rem; margin: 0 auto; }
.ct-hero-text { text-align: center; }
.ct-hero-actions { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.ct-hero-visual { position: relative; }
.ct-hero-img { position: relative; width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 60px rgb(0 0 0 / .55)); }
.ct-hero-glow { position: absolute; inset: 10% 5%; border-radius: 9999px; background: radial-gradient(closest-side, hsl(var(--primary) / .35), transparent); filter: blur(40px); }
@media (min-width: 640px) { .ct-hero-actions { flex-direction: row; } }
@media (min-width: 1024px) {
    .ct-hero { padding: 8rem 0 5rem; }
    .ct-hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3rem; }
    .ct-hero-text { text-align: left; }
    .ct-hero-actions { justify-content: flex-start; }
    .ct-hero-visual { margin-right: -2rem; }
}

/* --- Súťaž: výhra --- */
.ct-prize { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 2rem; }
.ct-prize-list { display: grid; grid-template-columns: 1fr; gap: .75rem; align-content: center; }
.ct-prize-list li { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-radius: .875rem; background: hsl(var(--muted) / .5); border: 1px solid hsl(var(--border)); font-size: .95rem; transition: border-color .3s, transform .3s; }
.ct-prize-list li:hover { border-color: hsl(var(--primary) / .5); transform: translateX(4px); }
@media (min-width: 768px) { .ct-prize { padding: 3rem; } }
@media (min-width: 1024px) { .ct-prize { grid-template-columns: 1fr 1fr; gap: 3rem; } }

/* --- Súťaž: kroky --- */
.ct-steps { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1.5rem; position: relative; }
.ct-step { position: relative; display: flex; flex-direction: column; align-items: center; }
.ct-step-num { position: relative; z-index: 2; width: 4.5rem; height: 4.5rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; font-weight: 800; color: hsl(var(--foreground)); background: hsl(var(--background)); border: 3px solid hsl(var(--primary)); box-shadow: inset 0 0 20px hsl(var(--primary) / .25), 0 0 30px hsl(var(--primary) / .25); margin-bottom: -2.25rem; }
.ct-step--optional .ct-step-num { border-style: dashed; border-color: hsl(var(--primary) / .7); color: hsl(var(--primary)); }
.ct-step-card { width: 100%; height: 100%; padding: 3.5rem 1.75rem 2rem; border-radius: 1.25rem; background: linear-gradient(180deg, hsl(var(--card) / .9), hsl(var(--card) / .5)); border: 1px solid hsl(var(--border) / .7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-md); text-align: center; transition: transform .3s, border-color .3s, box-shadow .3s; }
.ct-step-card:hover { transform: translateY(-6px); border-color: hsl(var(--primary) / .5); box-shadow: var(--shadow-lg), 0 0 40px hsl(var(--primary) / .12); }
.ct-step--optional .ct-step-card { border-style: dashed; }
.ct-step-top { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-bottom: 1.25rem; }
.ct-step-icon { width: 3rem; height: 3rem; border-radius: .875rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 25px -10px hsl(var(--primary) / .6); }
.ct-step-badge { padding: .25rem .65rem; border-radius: 9999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: hsl(var(--secondary)); background: hsl(var(--secondary) / .15); border: 1px solid hsl(var(--secondary) / .3); }
@media (min-width: 768px) {
    .ct-steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

/* --- Súťaž: trvanie --- */
.ct-duration { margin-top: 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; padding: 2rem; border-radius: 1.25rem; background: linear-gradient(135deg, hsl(var(--primary) / .14), hsl(var(--accent) / .08)); border: 1px solid hsl(var(--primary) / .3); }
.ct-duration-ring { flex-shrink: 0; width: 6rem; height: 6rem; border-radius: 9999px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 3px solid hsl(var(--primary)); box-shadow: inset 0 0 20px hsl(var(--primary) / .25), 0 0 30px hsl(var(--primary) / .25); }
.ct-duration-ring span { font-size: 2rem; font-weight: 800; line-height: 1; color: hsl(var(--foreground)); }
.ct-duration-ring small { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: hsl(var(--primary)); margin-top: .2rem; }
.ct-duration-cta { display: flex; flex-direction: column; align-items: center; gap: .75rem; flex-shrink: 0; }
@media (min-width: 768px) { .ct-duration { flex-direction: row; text-align: left; padding: 2rem 2.5rem; gap: 2rem; } .ct-duration-cta { align-items: flex-end; } }
@media (min-width: 1280px) { .ct-hero-title { font-size: 3.75rem; line-height: 1.1; } }

.ct-steps-head { margin-bottom: 4rem; }
.ct-steps { gap: 4rem; }
@media (min-width: 768px) { .ct-steps { gap: 2rem; } }
.ct-more { text-align: center; margin-top: 3.5rem; }

/* Šípky medzi krokmi (namiesto spojovacej čiary) – sedia v medzere medzi kartami, mimo krúžkov */
.ct-step:not(:last-child)::after {
    content: ""; position: absolute; z-index: 3; width: 2rem; height: 2rem;
    left: 50%; bottom: -3rem; transform: translateX(-50%) rotate(90deg);
    background: hsl(var(--primary));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
    opacity: .85; filter: drop-shadow(0 0 6px hsl(var(--primary) / .6));
}
@media (min-width: 768px) {
    .ct-steps { gap: 3.5rem; }
    .ct-step:not(:last-child)::after { left: auto; bottom: auto; right: -2.75rem; top: 50%; transform: translateY(-50%); }
}

/* --- Doplnené triedy, ktoré v skompilovanom tailwind.css chýbajú --- */
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.accent-primary { accent-color: hsl(var(--primary)); }
.bg-secondary\/15 { background-color: hsl(var(--secondary) / .15); }
.border-secondary\/30 { border-color: hsl(var(--secondary) / .3); }
.first\:mt-0:first-child { margin-top: 0; }
.hover\:scale-105:hover { transform: scale(1.05) translateY(-.25rem); }
.scroll-mt-28 { scroll-margin-top: 7rem; }
.z-\[200\] { z-index: 200; }
.w-\[min\(356px\2c calc\(100vw-2rem\)\)\] { width: min(356px, calc(100vw - 2rem)); }
.group[open] .group-open\:rotate-180 { transform: rotate(180deg); }
@media (min-width: 640px) {
    .sm\:items-center { align-items: center; }
    .sm\:text-5xl { font-size: 3rem; line-height: 1; }
}
@media (min-width: 768px) { .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; } }

/* --- Súťažný formulár: vzdušnejšie rozloženie --- */
#contest-form .grid { row-gap: 1.5rem; column-gap: 1.25rem; }
#contest-form label.block { margin-bottom: .6rem; }
#contest-form label.flex { margin-top: .5rem; padding: 1rem 1.1rem; border-radius: .75rem; border: 1px solid hsl(var(--border)); background: hsl(var(--background) / .35); align-items: flex-start; gap: .85rem; }
#contest-form input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin-top: .15rem; }
#contest-form button[type="submit"] { margin-top: .75rem; }
.ct-more [hidden] { display: none !important; }
