html {
    scroll-behavior: smooth;
}

:root {
    --color-bg: #F7F7F7;
    --color-primary: #0E325B;
    --color-accent: #00C49F;
    --color-text: #1F2933;
    --color-muted: #6B7280;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
}

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

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Lato", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(247, 247, 247, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.logo {
    display: inline-flex;
    flex-direction: column;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    font-size: 14px;
}

.logo-line-bottom {
    margin-top: 2px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-muted);
    font-weight: 500;
    padding: 6px 8px;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav a:hover {
    color: var(--color-primary);
    background-color: rgba(14, 50, 91, 0.06);
}

/* Dropdown */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: transparent;
    border: none;
    font: inherit;
    color: var(--color-muted);
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-dropdown-toggle:hover {
    color: var(--color-primary);
    background-color: rgba(14, 50, 91, 0.06);
}

.nav-dropdown-menu {
    position: absolute;
    top: 115%;
    right: 0;
    min-width: 260px;
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    padding: 12px;
    display: none;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: grid;
}

.nav-dropdown-menu {
    grid-template-columns: 1fr;
    gap: 8px;
}

.nav-dropdown-group {
    padding: 6px 8px;
    border-radius: 10px;
}

.nav-dropdown-group:hover {
    background-color: rgba(14, 50, 91, 0.03);
}

.nav-dropdown-title {
    margin: 0 0 4px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
}

.nav-dropdown-menu a {
    display: block;
    text-decoration: none;
    font-size: 13px;
    color: var(--color-muted);
    padding: 2px 0;
}

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

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-accent {
    background-color: var(--color-accent);
    color: #022c22;
    box-shadow: 0 12px 30px rgba(0, 196, 159, 0.25);
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(0, 196, 159, 0.32);
}

/* dodatkowy glow na CTA w hero (zostawione na przyszłość) */
.hero-cta:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 20px 45px rgba(0, 196, 159, 0.45);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-full {
    width: 100%;
}

/* Hero */

.hero {
    padding: 48px 0 40px;
    animation: heroSectionFade 1.2s ease-out both;
}

/* nowy układ: logo po lewej, tekst po prawej */
.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-left {
    flex: 0 0 45%;
}

.hero-right {
    flex: 0 0 55%;
}

.hero-logo {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 16px 20px;
    margin-bottom: 24px;
    animation: heroLogoFade 1.5s ease-out 0.3s both;
}

.hero-logo img {
    width: 70%;
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

.hero-right h1 {
    font-size: 32px;
    line-height: 1.2;
    color: var(--color-primary);
    margin: 0 0 16px 0;
}

.hero-right h2 {
    font-size: 18px;
    font-weight: 400;
    color: var(--color-muted);
    margin: 0;
}

@keyframes heroSectionFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroLogoFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Form – zachowujemy styl, formularz jest w ukrytej sekcji #contact */

.hero-form-card {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    padding: 24px 24px 20px;
    box-shadow: var(--shadow-soft);
    animation: heroFormFade 1.2s ease-out 0.5s both;
}

@keyframes heroFormFade {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-form-card h3,
.contact-section h3 {
    margin: 0 0 18px 0;
    font-size: 18px;
    color: var(--color-primary);
}

.form-field {
    margin-bottom: 14px;
}

.form-field label,
.form-field .label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    font: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    background-color: #f9fafb;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px rgba(0, 196, 159, 0.35);
    background-color: #ffffff;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.radio-group label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    color: var(--color-text);
}

.checkbox-group label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.4rem;
}

.radio-group input[type="radio"] {
    margin-top: 3px;
}

.form-note {
    margin-top: 10px;
    font-size: 11px;
    color: var(--color-muted);
}

.form-success {
    margin-top: 10px;
    font-size: 13px;
    color: #047857;
}

/* Sekcje */

.section {
    padding: 40px 0;
}

.section-alt {
    background-color: #ffffff;
}

.section h2 {
    font-size: 24px;
    color: var(--color-primary);
    margin: 0 0 20px 0;
}

/* Ukryta sekcja kontaktu – formularz źródłowy dla popupu */
.contact-hidden {
    display: none;
}

/* Krok po kroku */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.step-card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.04);
}

.step-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.step-icon-number {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background-color: rgba(0, 196, 159, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-primary);
}

.step-icon-symbol {
    font-size: 18px;
}

.step-card h3 {
    font-size: 16px;
    margin: 0 0 8px 0;
    color: var(--color-primary);
}

.step-card p {
    font-size: 14px;
    color: var(--color-muted);
    margin: 0;
}

/* About */

.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: center;
}

.about-text p {
    margin-top: 8px;
    color: var(--color-text);
}

.about-list {
    margin: 16px 0 0 0;
    padding-left: 18px;
    font-size: 14px;
    color: var(--color-text);
}

.about-list li {
    margin-bottom: 8px;
}

.about-list strong {
    display: block;
    margin-bottom: 2px;
    color: var(--color-primary);
}

.about-photo {
    display: flex;
    justify-content: center;
}

.about-img {
    width: 100%;
    max-width: 280px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

/* Blog */

#blog p {
    max-width: 640px;
    color: var(--color-muted);
}

/* Final CTA */

.final-cta {
    text-align: center;
}

.final-cta h2 {
    margin-bottom: 16px;
}

/* Footer */

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.5);
    background-color: #ffffff;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 13px;
}

.footer-logo {
    margin-bottom: 4px;
}

.footer-right a {
    color: var(--color-muted);
    text-decoration: none;
    font-weight: 500;
}

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

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: #64748b;
}

.breadcrumbs a {
    color: #64748b;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs-separator {
    margin: 0 4px;
}

/* Responsive */

@media (max-width: 900px) {

    .hero {
        padding-top: 32px;
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-left,
    .hero-right {
        flex: 0 0 100%;
    }

    .hero-right h1 {
        font-size: 26px;
    }

    .hero-right h2 {
        font-size: 16px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* Dropdown „Moje Usługi” na mobile */
    .nav-dropdown-menu {
        right: auto;
        left: 0;
        width: calc(100vw - 32px); /* szerokość ekranu minus padding kontenera */
        min-width: 0;
    }
}

/* ===== POPUP (modal z formularzem) ===== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none; /* domyślnie ukryty */
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
}

.modal-overlay.is-visible {
    display: flex;
}

.modal {
    position: relative;
    max-width: 820px;
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
    padding: 28px 32px 26px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h3,
.modal h2 {
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--color-primary);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

.modal-close:hover {
    color: #0f172a;
}

.modal .btn-full {
    width: 100%;
}

/* gdy popup otwarty – blokuj scroll strony */
body.modal-open {
    overflow: hidden;
}

.blog-highlight-inner {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.blog-featured {
    flex: 2 1 260px;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.blog-featured h3 {
    margin-top: 4px;
    margin-bottom: 10px;
}

.blog-featured h3 a {
    text-decoration: none;
    color: #0f172a;
}

.blog-featured h3 a:hover {
    text-decoration: underline;
}

.blog-excerpt {
    margin-bottom: 14px;
    color: #4b5563;
}

.blog-kicker {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 4px;
}

.blog-archive-link {
    flex: 1 1 200px;
    padding-top: 8px;
}

.blog-archive-title {
    font-weight: 600;
    margin-bottom: 6px;
}

@media (max-width: 900px) {
    .blog-highlight-inner {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 32px 0;
    }
}

/* ===== TOAST (środek ekranu, fade + slide) ===== */
.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    /* start: lekko poniżej i przezroczyste */
    transform: translate(-50%, 20px);
    background: #0f766e; /* kolor jak CTA */
    color: #ffffff;
    padding: 18px 32px;
    border-radius: 16px;
    font-size: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 9999;
    text-align: center;
}

.toast-message.show {
    opacity: 1;
    /* przesunięcie lekko do góry przy wejściu */
    transform: translate(-50%, 0);
}
