.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: #131313;
    color: #e2e2e2;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Cross-browser range slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #0e0e0e;
    border: 1px solid rgba(77, 70, 53, 0.3);
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f2ca50;
    cursor: pointer;
    border: 2px solid #3c2f00;
    box-shadow: 0 0 10px rgba(242, 202, 80, 0.3);
    transition: box-shadow 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 20px rgba(242, 202, 80, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f2ca50;
    cursor: pointer;
    border: 2px solid #3c2f00;
    box-shadow: 0 0 10px rgba(242, 202, 80, 0.3);
}

input[type="range"]::-ms-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f2ca50;
    cursor: pointer;
    border: 2px solid #3c2f00;
}

input[type="range"]::-moz-range-track {
    background: #0e0e0e;
    height: 8px;
    border-radius: 4px;
    border: 1px solid rgba(77, 70, 53, 0.3);
}

input[type="range"]::-ms-track {
    background: transparent;
    border-color: transparent;
    color: transparent;
    height: 8px;
}

.serif-display {
    font-family: 'Outfit', sans-serif;
}

.font-serif {
    font-family: 'Outfit', sans-serif;
}

.glass-panel {
    background: rgba(14, 14, 14, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Navigation */
.nav-link {
    position: relative;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #f2ca50;
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #f2ca50 !important;
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Hero wave animation — sinusoidal path */
.hero-waves {
    animation: waveFlow 12s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    will-change: transform;
    transform-origin: center center;
}

@keyframes waveFlow {
    0% {
        transform: scale(1.25) translate(0%, 0%);
    }

    12.5% {
        transform: scale(1.25) translate(-0.8%, 2.5%);
    }

    25% {
        transform: scale(1.25) translate(-1.5%, 0%);
    }

    37.5% {
        transform: scale(1.25) translate(-0.8%, -2.5%);
    }

    50% {
        transform: scale(1.25) translate(0%, 0%);
    }

    62.5% {
        transform: scale(1.25) translate(0.8%, 2.5%);
    }

    75% {
        transform: scale(1.25) translate(1.5%, 0%);
    }

    87.5% {
        transform: scale(1.25) translate(0.8%, -2.5%);
    }

    100% {
        transform: scale(1.25) translate(0%, 0%);
    }
}

/* ===== Page Transition — Curtain Wipe ===== */

#page-curtain {
    position: fixed;
    top: 0;
    left: -25vw;
    width: 150vw;
    height: 100vh;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    transform: skewX(-20deg);
}

#page-curtain .curtain-panel {
    flex: 1;
    background: #111111;
    transform: translateX(-100%);
    will-change: transform;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    position: relative;
}

/* Gold accent lines on both leading and trailing edges */
#page-curtain .curtain-panel::before,
#page-curtain .curtain-panel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #f2ca50, transparent);
    opacity: 0.6;
}

#page-curtain .curtain-panel::before {
    left: 0;
}

#page-curtain .curtain-panel::after {
    right: 0;
}

/* Wipe IN (Revealing the page): Sweeps out to the right */
#page-curtain.curtain-reveal .curtain-panel {
    animation: curtainReveal 0.7s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

/* Wipe OUT (Covering the page): Sweeps in from the left */
#page-curtain.curtain-cover .curtain-panel {
    animation: curtainCover 0.7s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes curtainCover {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(0%);
    }
}

@keyframes curtainReveal {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ===== Language Dropdown ===== */
.lang-dropdown {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.lang-dd-trigger {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border: 1px solid rgba(242, 202, 80, 0.35);
    background: transparent;
    color: #d0c5af;
    cursor: pointer;
    padding: 0 8px;
    height: 28px;
    transition: border-color 0.3s, color 0.3s, transform 0.1s;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 6px;
}

.lang-dd-trigger:hover {
    border-color: #f2ca50;
    color: #f2ca50;
}

.lang-dd-trigger:active {
    transform: scale(0.92);
}

.lang-current-label {
    pointer-events: none;
}

.lang-dd-arrow {
    font-size: 14px !important;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1;
}

.lang-dropdown.open .lang-dd-arrow {
    transform: rotate(180deg);
}

.lang-dd-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scaleY(0.85);
    transform-origin: top center;
    background: #131313;
    border: 1px solid rgba(242, 202, 80, 0.25);
    display: flex;
    flex-direction: column;
    min-width: 60px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    overflow: hidden;
}

.lang-dropdown.open .lang-dd-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scaleY(1);
}

.lang-dd-option {
    background: transparent;
    border: none;
    color: #d0c5af;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 9px 12px;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid rgba(242, 202, 80, 0.1);
}

.lang-dd-option:last-child {
    border-bottom: none;
}

.lang-dd-option:hover {
    background: rgba(242, 202, 80, 0.08);
    color: #f2ca50;
}

.lang-dd-option.active {
    color: #f2ca50;
    background: rgba(242, 202, 80, 0.05);
}

/* Mobile: menu opens upward */
.lang-dropdown-mobile .lang-dd-menu {
    top: auto;
    bottom: calc(100% + 6px);
    transform-origin: bottom center;
    transform: translateX(-50%) scaleY(0.85);
}

.lang-dropdown-mobile.open .lang-dd-menu {
    transform: translateX(-50%) scaleY(1);
}

/* ===== Compact & Premium Pricing Section & Cards ===== */
#cennik-section {
    padding-top: 4rem !important;
    /* pt-16 */
    padding-bottom: 5rem !important;
}

#cennik-section div.text-center.mb-16 {
    margin-bottom: 2rem !important;
}

#cennik-section div.flex.justify-center.mb-16 {
    margin-bottom: 2rem !important;
}

#websites-content .grid>div,
#automation-content .grid>div {
    padding: 2rem !important;
    /* Restore spacious padding for premium look (p-8) */
}

@media (min-width: 1280px) {

    #websites-content .grid>div,
    #automation-content .grid>div {
        padding: 2.25rem 2rem !important;
    }
}

#websites-content .grid>div>div:first-child,
#automation-content .grid>div>div:first-child {
    margin-bottom: 1.5rem !important;
    /* Balanced header margin */
}

#websites-content .grid>div h2.font-headline,
#automation-content .grid>div h2.font-headline {
    font-size: 1.5rem !important;
    /* Restore premium title size (text-2xl) */
    margin-top: 0.5rem !important;
}

#websites-content .grid>div p.font-body,
#automation-content .grid>div p.font-body {
    font-size: 0.875rem !important;
    /* Restore readable description text size (text-sm) */
    line-height: 1.25rem !important;
}

#websites-content .grid>div .text-\[11px\],
#automation-content .grid>div .text-\[11px\] {
    font-size: 11px !important;
    margin-top: 0.5rem !important;
}

#websites-content .grid>div .flex.items-baseline,
#automation-content .grid>div .flex.items-baseline {
    margin-bottom: 1.5rem !important;
    /* Clean price margin */
}

#websites-content .grid>div .font-headline.text-4xl,
#automation-content .grid>div .font-headline.text-4xl {
    font-size: 2.25rem !important;
    /* Restore bold price font (text-4xl) */
}

#websites-content .grid>div ul,
#automation-content .grid>div ul {
    margin-bottom: 1.5rem !important;
    /* Clean list margin */
}

#websites-content .grid>div ul.space-y-4>li,
#automation-content .grid>div ul.space-y-4>li {
    font-size: 0.875rem !important;
    /* Keep premium readable size (text-sm) */
    gap: 0.75rem !important;
}

#websites-content .grid>div ul.space-y-4>li+li,
#automation-content .grid>div ul.space-y-4>li+li {
    margin-top: 0.75rem !important;
    /* Elegant list item spacing (approx. space-y-3) */
}

#websites-content .grid>div ul>li span.material-symbols-outlined,
#automation-content .grid>div ul>li span.material-symbols-outlined {
    font-size: 18px !important;
    /* Keep clear icon size */
}

#websites-content .grid>div div.space-y-4.mt-auto.pt-8,
#automation-content .grid>div div.space-y-4.mt-auto.pt-8 {
    padding-top: 1.25rem !important;
    /* Elegant buttons top padding */
}

#websites-content .grid>div div.space-y-4.mt-auto.pt-8>button,
#automation-content .grid>div div.space-y-4.mt-auto.pt-8>button {
    padding-top: 0.875rem !important;
    /* Premium button vertical padding (py-3.5) */
    padding-bottom: 0.875rem !important;
    font-size: 11px !important;
}

#websites-content .grid>div div.space-y-4.mt-auto.pt-8>button+button,
#automation-content .grid>div div.space-y-4.mt-auto.pt-8>button+button {
    margin-top: 0.75rem !important;
    /* Clean button gap */
}

/* ---------- TIVEB SUMMARY OVERLAY ---------- */
#tiveb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#tiveb-overlay.active {
    display: flex;
    animation: overlayIn 0.3s ease;
}

@keyframes overlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tiveb-panel {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(242, 202, 80, 0.25);
    border-radius: 16px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(242, 202, 80, 0.05);
    animation: panelIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Inter', sans-serif;
}

@keyframes panelIn {
    from {
        transform: translateY(30px) scale(0.97);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.tiveb-panel::-webkit-scrollbar {
    width: 4px;
}

.tiveb-panel::-webkit-scrollbar-track {
    background: #111;
}

.tiveb-panel::-webkit-scrollbar-thumb {
    background: #f2ca50;
    border-radius: 2px;
}

.tab-switcher {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-switcher::-webkit-scrollbar {
    display: none;
}

.tiveb-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.tiveb-close:hover {
    color: #f2ca50;
    transform: scale(1.1);
}

.tiveb-steps {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
}

.tiveb-step {
    flex: 1;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555;
    padding-bottom: 10px;
    border-bottom: 2px solid #222;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.tiveb-step.active {
    color: #f2ca50;
    border-bottom-color: #f2ca50;
    text-shadow: 0 0 10px rgba(242, 202, 80, 0.2);
}

.tiveb-step.done {
    color: #7a6530;
    border-bottom-color: #7a6530;
}

.tiveb-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    font-family: 'Outfit', sans-serif;
}

.tiveb-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0 0 28px;
    line-height: 1.5;
}

.tiveb-summary-box {
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 28px;
}

.tiveb-summary-box h4 {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #666;
    margin: 0 0 14px;
    font-family: 'Outfit', sans-serif;
}

.tiveb-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: #ccc;
}

.tiveb-summary-row:last-child {
    border-bottom: none;
}

.tiveb-summary-row span {
    color: #aaa;
    font-size: 13px;
}

.tiveb-summary-row span:last-child {
    color: #fff;
    font-weight: 500;
}

.tiveb-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tiveb-summary-total .label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Outfit', sans-serif;
}

.tiveb-summary-total .price {
    font-size: 28px;
    font-weight: 800;
    color: #f2ca50;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 0 20px rgba(242, 202, 80, 0.2);
}

.tiveb-summary-total .price small {
    font-size: 14px;
    font-weight: 400;
    margin-left: 3px;
}

.tiveb-field {
    margin-bottom: 20px;
}

.tiveb-field label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.tiveb-field input,
.tiveb-field textarea {
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.tiveb-field input:focus,
.tiveb-field textarea:focus {
    border-color: #f2ca50;
    box-shadow: 0 0 15px rgba(242, 202, 80, 0.1);
}

.tiveb-field textarea {
    resize: vertical;
    min-height: 100px;
}

.tiveb-field input.error,
.tiveb-field textarea.error {
    border-color: #e05252;
    box-shadow: 0 0 10px rgba(224, 82, 82, 0.15);
}

.tiveb-field .err-msg {
    font-size: 11px;
    color: #e05252;
    margin-top: 6px;
    display: none;
}

.tiveb-field.has-error .err-msg {
    display: block;
}

.tiveb-consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.tiveb-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: #f2ca50;
    cursor: pointer;
    flex-shrink: 0;
}

.tiveb-consent label {
    font-size: 11.5px;
    color: #888;
    line-height: 1.5;
    cursor: pointer;
    user-select: none;
}

.tiveb-btn-submit {
    width: 100%;
    background: #f2ca50;
    color: #3c2f00;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.3s;
    font-family: 'Outfit', sans-serif;
}

.tiveb-btn-submit:hover {
    background: #ffdf6b;
    box-shadow: 0 0 30px rgba(242, 202, 80, 0.25);
}

.tiveb-btn-submit:active {
    transform: scale(0.985);
}

.tiveb-btn-submit:disabled {
    background: #2a2a2a;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.tiveb-success {
    text-align: center;
    padding: 30px 0;
    display: none;
}

.tiveb-success.active {
    display: block;
}

.tiveb-success-icon {
    width: 72px;
    height: 72px;
    background: rgba(242, 202, 80, 0.1);
    border: 2px solid #f2ca50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    color: #f2ca50;
    text-shadow: 0 0 10px rgba(242, 202, 80, 0.3);
    box-shadow: 0 0 20px rgba(242, 202, 80, 0.1);
}

.tiveb-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    font-family: 'Outfit', sans-serif;
}

.tiveb-success p {
    font-size: 14px;
    color: #aaa;
    line-height: 1.6;
    margin: 0;
}

.tiveb-success p strong {
    color: #fff;
}

/* ===== Mobile Optimizations for Configurator & Performance ===== */
@media (max-width: 768px) {

    /* Optimize the overly panel on mobile */
    .tiveb-panel {
        padding: 24px 20px;
        max-height: 95vh;
        border-radius: 12px;
    }

    .tiveb-title {
        font-size: 20px;
    }

    .tiveb-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .tiveb-step {
        font-size: 9.5px;
        letter-spacing: 0.05em;
        padding-bottom: 8px;
    }

    .tiveb-summary-box {
        padding: 16px;
        margin-bottom: 20px;
    }

    .tiveb-summary-row {
        font-size: 12px;
    }

    .tiveb-summary-row span {
        font-size: 12px;
    }

    .tiveb-summary-total .price {
        font-size: 24px;
    }

    .tiveb-field input,
    .tiveb-field textarea {
        padding: 12px 14px;
        font-size: 13px;
    }

    .tiveb-btn-submit {
        padding: 14px;
        font-size: 12px;
    }

    /* Configurator in-page mobile fixes */
    .option-card {
        padding: 1rem;
    }

    .option-card .text-4xl {
        font-size: 2rem;
    }

    .option-card h4 {
        font-size: 1rem;
    }

    /* Reduce heavy blur filters and animations on mobile for smooth scrolling */
    .blur-3xl {
        display: none !important;
    }

    .glass-panel {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(20, 20, 20, 0.95) !important;
    }

    #tiveb-overlay {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(10, 10, 10, 0.98) !important;
        padding: 10px;
    }

    /* ====================================================
       FIX: Animacje przy zdjęciach „zamrażały się" w trakcie
       przewijania palcem na mobile (dotyk aktywował :hover).

       Rozwiązanie: pointer-events: none na kontenerach zdjęć,
       ale TYLKO w trakcie aktywnego scrollowania (klasa
       .is-touch-scrolling nadawana/usuwana przez JS — patrz
       script.js). Dzięki temu poza scrollowaniem efekty
       hover/tap działają normalnie, tak jak na komputerze —
       strona nie wygląda sztywno.
       ==================================================== */
}

body.is-touch-scrolling section .group:has(.bg-surface-container-high),
body.is-touch-scrolling section .group:has(> img),
body.is-touch-scrolling section .group:has(.aspect-video) {
    pointer-events: none !important;
}

/* Fallback dla starszych przeglądarek bez :has() */
body.is-touch-scrolling section .group .bg-surface-container-high,
body.is-touch-scrolling section .group .bg-surface-container,
body.is-touch-scrolling section .group img,
body.is-touch-scrolling section .group > div[class*="-z-10"] {
    transition: none !important;
    transform: none !important;
}

@media (max-width: 768px) {
    /* Mobile Configurator & Images Adjustments */
    .aspect-\[4\/3\] img, img.aspect-\[4\/3\] {
        min-height: min(340px, 80vw) !important;
        object-fit: cover !important;
        width: 100% !important;
        transform: translateZ(0);
    }
    
    .option-card {
        padding: 0.5rem 0.25rem !important;
    }
    
    /* Zmień flex-direction: row na row wrap w kontenerach opcji */
    .option-card-container, .options-wrapper {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }

    .tiveb-panel {
        max-width: min(90vw, 500px) !important;
    }

    .tiveb-title {
        font-size: 18px !important;
    }

    /* Mobile Config Bar */
    .mobile-config-bar {
        z-index: 40 !important;
        -webkit-transform: translateY(100%) !important;
        transform: translateY(100%) !important;
    }
}