:root {
    --primary-color: #00ff88;
    --primary-dark: #00cc6a;
    --bg-color: #121212;
    --bg-darker: #0a0a0a;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --card-bg: #1e1e1e;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: "Rubik", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: var(--header-height);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-green {
    color: var(--primary-color);
}

/* Navbar */
.navbar {
    background: linear-gradient(180deg, rgba(18, 18, 18, 1) 0%, rgba(18, 18, 18, 0.7) 100%);
    height: var(--header-height);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    display: flex;
    align-items: center;

    /* Keep the blurred bar on its own compositing layer. Without it the
       backdrop is re-sampled on every frame of the hero wave animation and
       the bar flickers over scrolling content. backdrop-filter already
       creates a stacking context, so isolation: isolate was redundant and
       only disturbed the compositing path. */
    will-change: transform;
    isolation: isolate;
}

/* Toggled from script.js — a class, so scrolling never writes inline styles
   (which would invalidate the backdrop-filter paint on every scroll event). */
.navbar.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.contact-info {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.logo {
    /*color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;*/
    color: var(--bg-color);
    background-color: var(--primary-color);
    border: var(--primary-dark) 5px solid;
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2pt;
    padding: 0 5px;
}

.container hr {
    width: 100%;
    padding: 30px 0;
    visibility: hidden;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100svh - var(--header-height));
    /* Use small viewport height to prevent jumping on mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #050505;
    position: relative;
    overflow: hidden;
    border-top: 8px solid var(--primary-color);
    border-bottom: 8px solid var(--primary-color);
}

/* SVG Waves Background */
.hero-bg {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: flex;
}

.hero-bg-top {
    top: 0;
    align-items: flex-start;
}

.hero-bg-bottom {
    bottom: 0;
    align-items: flex-end;
}

.hero-bg svg {
    width: 100%;
    height: auto;
    /* Ensure it covers enough height on larger screens */
    min-height: 50%;
    transform: translateY(5%);
    will-change: transform;
}

.hero-bg-top svg {
    transform: rotate(180deg) translateY(5%);
    will-change: transform;
}

.wave {
    animation: waveAnimation 5s infinite alternate-reverse ease-in-out;
    transform-origin: center bottom;
}

.wave-1 {
    animation-duration: 4s;
}

.wave-2 {
    animation-duration: 6s;
    animation-delay: -1s;
}

.wave-3 {
    animation-duration: 5s;
    animation-delay: -2s;
}

@keyframes waveAnimation {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(20px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-muted);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #000;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    transition: background-color 0.3s, transform 0.3s;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 50px 0 80px 0;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary-color);
}

/* Grid Layouts */
.grid-3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.grid-3>* {
    flex: 1 1 300px;
    max-width: 380px;
}

.card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    transition: transform 0.3s;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* To ensure badge doesn't bleed out if we use different styles */
}

a {
    color: inherit;
    text-decoration: none;
}

.badge-coming-soon {
    position: absolute;
    right: -35px;
    background-color: var(--primary-color);
    color: #000;
    padding: 5px 40px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    transform: rotate(45deg);
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.card:hover {
    transform: translateY(-5px);
}

.card .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card h3,
.contact-form h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.card p {
    color: var(--text-muted);
}

/* Project Lists in Cards */
.project-card {
    text-align: left;
}

.project-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.icon-small {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.category-list li:before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    margin-right: 10px;
    align-self: start;
}

.category-list li:last-child {
    border-bottom: none;
}

/* Partners */
.partners-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.partner-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    flex: 1 1 300px;
    max-width: 380px;
}

.partner-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* FAQ */
.accordion {
    max-width: 650px;
    margin: 0 auto;
}

.accordion-item {
    background-color: var(--card-bg);
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    color: var(--text-color);
    text-align: left;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
}

.accordion-header.active:after {
    content: '-';
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
}

.accordion-content p {
    padding-bottom: 20px;
    color: var(--text-muted);
}

/* Contact Form */
.contact-form {
    max-width: 650px;
    margin: 0 auto;
}

.small-text {
    margin-top: 15px;
    font-size: xx-small;
    color: var(--text-muted);
    text-align: justify;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    /* Base for tooltip positioning */
}

.form-group input.error,
.form-group textarea.error {
    border-color: #ff4444;
}

/* Error Tooltip */
.error-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: -10px;
    background-color: #ff4444;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    animation: fadeIn 0.2s ease-out;
}

.error-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 15px;
    border: 6px solid transparent;
    border-top-color: #ff4444;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    /* Ensure same font as inputs */
    resize: none;
}

/* Fix for Chrome Autofill background */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group textarea:-webkit-autofill,
.form-group textarea:-webkit-autofill:hover,
.form-group textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-color);
    -webkit-box-shadow: 0 0 0px 1000px var(--card-bg) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

/* Custom Checkbox Container */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    color: var(--text-muted);
}

/* Hide original checkbox */
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom checkmark box */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 4px;
    transition: all 0.3s;
}

/* Hover state */
.custom-checkbox:hover input~.checkmark {
    border-color: var(--primary-color);
}

/* Checked state */
.custom-checkbox input:checked~.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Checkmark indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show indicator when checked */
.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

/* Indicator icon (checkmark symbol) */
.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox .label-text {
    line-height: 1.4;
}

.custom-checkbox .label-text a,
.link, .small-text a {
    color: var(--primary-color);
    text-decoration: none;
    transition: text-decoration 0.3s;
}

.custom-checkbox .label-text a:hover, .link:hover, .small-text a:hover, article a:hover {
    text-decoration: underline;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Align both top */
    gap: 30px;
    margin-top: 10px;
}

.form-footer .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .form-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .form-footer .btn {
        width: 100%;
    }
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    background-color: #000;
    color: var(--text-muted);
    border-top: 1px solid #333;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar.active {
        height: auto;
        align-items: flex-start;
        overflow-y: visible;
        padding-bottom: 20px;
    }

    .navbar.active .container {
        flex-wrap: wrap;
        align-content: flex-start;
        padding-top: 0.98rem;
    }

    .nav-links {
        display: none;
        width: 100%;
        order: 3;
        flex-direction: column;
        align-items: center;
        padding-top: 20px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 8px 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        padding: 10px;
    }

    .hamburger {
        display: block;
        margin-left: auto;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-color);
        margin: 5px 0;
        transition: 0.3s;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Cookie Settings Button */
.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #000;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s, background-color 0.3s;
}

.cookie-settings-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cookie-modal.active {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.cookie-modal.active .cookie-modal-content {
    transform: translateY(0);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.cookie-modal-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--text-color);
}

.cookie-modal-body p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-color);
    text-align: justify;
}

.cookie-modal-body a {
    color: var(--primary-color);
    text-decoration: none;
}

.cookie-modal-body a:hover {
    text-decoration: underline;
}

.cookie-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #000;
}

/* Notification Modal Specifics */
.notification-modal .cookie-modal-content {
    max-width: 600px;
}

.notification-modal.error .cookie-modal-header h3 {
    color: #ff4444;
}

.notification-modal.error .cookie-modal-content {
    border-color: #ff4444;
}


article {
    text-align: justify;
}

article ul,
article ol {
    /* user-agent styles */
    display: block;
    list-style-type: disc;
    margin-block-start: 1em;
    margin-block-end: 1em;
    padding-inline-start: 40px;
}

article ol {
    list-style-type: decimal;
}

article li {
    display: list-item;
    text-align: match-parent;
}

article ::marker {
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    text-transform: none;
}

article h2 {
    margin-top: 2rem;
}

article a {
    color: var(--primary-color);
    text-decoration: none;
}

/* ==========================================================================
   Widget ALTCHA (weryfikacja antyspamowa proof-of-work)
   ========================================================================== */

.altcha-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding: 12px 14px;
    margin-bottom: 18px;
    background-color: var(--bg-darker);
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
    overflow: hidden;
    transition: border-color 0.2s, color 0.2s;
}

.altcha-icon {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s;
}

.altcha-label {
    flex: 1;
    line-height: 1.35;
}

.altcha-widget[data-state="working"] {
    border-color: #444;
}

.altcha-widget[data-state="done"] {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.altcha-widget[data-state="done"] .altcha-icon {
    color: var(--primary-color);
}

.altcha-widget[data-state="error"] {
    border-color: #ff4444;
    color: #ff6b6b;
    cursor: pointer;
}

.altcha-widget[data-state="error"] .altcha-icon {
    color: #ff6b6b;
}

.altcha-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: transparent;
}

.altcha-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    transition: width 0.15s linear;
}

@media (prefers-reduced-motion: reduce) {
    .altcha-progress-fill {
        transition: none;
    }
}

/* ==========================================================================
   Dokumenty prawne
   ========================================================================== */

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 14px 18px;
    margin-bottom: 28px;
    background-color: var(--card-bg);
    border-left: 3px solid var(--primary-color);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.legal-toc {
    padding: 18px 22px;
    margin-bottom: 32px;
    margin-top: 16px;
    background-color: var(--card-bg);
    border-radius: 8px;
}

.legal-toc h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: var(--primary-color);
}

.legal-toc ol {
    margin: 0;
    padding-inline-start: 22px;
    columns: 2;
    column-gap: 30px;
}

@media (max-width: 700px) {
    .legal-toc ol {
        columns: 1;
    }
}

.legal-toc a {
    color: var(--text-color);
    text-decoration: none;
}

.legal-toc a:hover {
    color: var(--primary-color);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
    padding: 10px 12px;
    border: 1px solid #333;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background-color: var(--card-bg);
    color: var(--primary-color);
    font-weight: 600;
}

.legal-table-wrap {
    overflow-x: auto;
}

/* Nieuzupełniony placeholder z legal_config.py — ma kłuć w oczy. */
.legal-todo {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background-color: rgba(255, 68, 68, 0.15);
    border: 1px dashed #ff4444;
    color: #ff8080;
    font-family: monospace;
    font-size: 0.85em;
}

/* ==========================================================================
   Stopka i strona błędu
   ========================================================================== */

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin-bottom: 10px;
    font-size: 0.88rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.error-page {
    text-align: center;
    padding: 90px 20px;
}

.error-page .error-code {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 26px;
}

/* Wyróżnienie wartości w modalu potwierdzenia rezerwacji. */
#success-message .accent {
    color: var(--primary-color);
}
