/* --- ZMIENNE CSS & RESET --- */
:root {
    --color-primary: #f9c805;
    /* Intensywny żółty */
    --color-primary-hover: #d1a904;
    --color-secondary: #565654;
    /* Ciemnoszary */
    --color-bg: #000000;
    /* Czarny */
    --color-surface: #1a1a1a;
    /* Tło kart */
    --color-text: #f0f0f0;
    /* Złamana biel */
    --color-text-muted: #a0a0a0;

    --background-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23f9c805' fill-opacity='0.11' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");

    --font-main: 'Inter', sans-serif;
    --spacing-section: 80px;
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-color: var(--color-primary) var(--color-bg);
}

::selection {
    background-color: #f9c805;
    color: #fff;
}

::-moz-selection {
    background-color: #f9c805;
    color: #fff;
}

html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 50px;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* --- NARZĘDZIA --- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

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

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

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

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* --- ANIMACJE (Reveal on Scroll) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    padding: 15px 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    height: 3rem;
}

.logo-img {
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.logo span {
    color: var(--color-primary);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 500;
}

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

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

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: var(--transition);
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
    position: relative;
    background: radial-gradient(circle at center, #222 0%, #000 100%);
}

.hero-content h1 {
    font-size: 3rem;
    /* Mobile default */
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--color-primary);
    display: block;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- USŁUGI (OFERTA) --- */
.services {
    padding: var(--spacing-section) 0;
    background-color: var(--color-bg);
    background-image: var(--background-pattern);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--color-surface);
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid #333;
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    background-color: rgba(249, 200, 5, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    color: var(--color-primary);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.service-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* --- FAQ --- */
.faq {
    padding: var(--spacing-section) 0;
    background-color: #0a0a0a;
    /* Nieco inne tło dla kontrastu */
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background-color: var(--color-surface);
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #333;
    overflow: hidden;
}

.accordion-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #fff;
    transition: var(--transition);
}

.accordion-header:hover {
    background-color: #252525;
    color: var(--color-primary);
}

.accordion-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
    color: var(--color-primary);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
    background-color: #111;
}

.accordion-body p {
    padding: 20px 0;
    color: var(--color-text-muted);
    border-top: 1px solid #333;
}

/* --- KONTAKT --- */
.contact {
    padding: var(--spacing-section) 0;
    background-color: var(--color-bg);
    background-image: var(--background-pattern);
    max-width: 100vw;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item h4 {
    color: var(--color-primary);
    margin-bottom: 5px;
}

.info-item p,
.info-item a {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.info-item a:hover {
    color: #fff;
    text-decoration: underline;
}

.phone-link {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    text-align: left;
    -webkit-tap-highlight-color: rgba(249, 200, 5, 0.2);
}

.phone-link:hover {
    color: #fff;
    text-decoration: underline;
}

.address-link {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.address-link:hover {
    color: #fff;
    text-decoration: underline;
}

.info-item .social-links {
    margin-top: 15px;
}

.contact-form-container {
    background-color: var(--color-surface);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #fff;
}

.form-control {
    width: 100%;
    padding: 12px;
    background-color: #000;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-family: inherit;
    cursor: text;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}



/* --- FOOTER --- */
footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #333;
    color: var(--color-text-muted);
    background-color: var(--color-bg);
    font-size: 0.9rem;
}

/* --- RWD / RESPONSIVENESS --- */
@media (min-width: 769px) {
    .hero-content h1 {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #000;
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        padding-top: 50px;
        transition: 0.3s;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 0.85rem;
        margin-bottom: 2.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info {
        gap: 25px;
    }

    .info-item h4 {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .info-item p,
    .info-item a,
    .phone-link,
    .address-link {
        font-size: 1rem;
    }

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

    /* Fix for contact form overflow on mobile */
    .contact-form-container {
        padding: 25px 20px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .contact-info {
        width: 100%;
        max-width: 100%;
    }

    .form-group {
        margin-bottom: 24px;
    }

    .form-group label {
        font-size: 1rem;
        margin-bottom: 10px;
        font-weight: 600;
    }

    .form-control {
        padding: 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    textarea.form-control {
        min-height: 140px;
    }

    /* Recaptcha fix for small screens */
    .g-recaptcha {
        transform-origin: 0 0;
        -webkit-transform-origin: 0 0;
    }

    @media (max-width: 480px) {
        .contact-form-container {
            padding: 20px 16px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .section-title {
            font-size: 1.75rem;
        }

        .section-subtitle {
            font-size: 0.8rem;
        }
    }

    @media (max-width: 380px) {
        .g-recaptcha {
            transform: scale(0.85);
            -webkit-transform: scale(0.85);
        }

        .contact-form-container {
            padding: 16px 12px;
        }
    }
}

[data-netlify-recaptcha="true"] {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    flex-direction: column;
    transform: scale(1.15);
    transform-origin: center;
    padding: 20px;
}

@media (max-width: 768px) {
    [data-netlify-recaptcha="true"] {
        transform: scale(1);
        padding: 0px
    }
}

@media (max-width: 410px) {
    [data-netlify-recaptcha="true"] {
        transform: scale(0.9);
    }
}

/* --- AKTUALNOŚCI (NEWS) --- */
.news-section {
    padding: var(--spacing-section) 0;
    background-color: var(--color-bg);
    background-image: var(--background-pattern);

}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-input {
    flex: 1;
    max-width: 400px;
    padding: 12px;
    background-color: var(--color-surface);
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-family: inherit;
    cursor: text;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.sort-select {
    padding: 10px;
    padding-left: 5px;
    background-color: var(--color-surface);
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--color-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.news-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.85rem;
    color: var(--color-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.news-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 3.36rem; /* 2 lines: 1.4 * 1.2rem * 2 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 4.8rem; /* 3 lines: 1.6 * 1rem * 3 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-tags {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
}

.news-tag {
    font-size: 0.95rem;
    color: #444;
    font-weight: 500;
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

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

.modal-content {
    background-color: var(--color-surface);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    border: 1px solid #333;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background-color: var(--color-primary);
    color: #000;
}

.modal-header-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-body {
    padding: 40px;
}

.modal-date {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #fff;
}

.modal-text {
    color: var(--color-text-muted);
    line-height: 1.8;
}

.modal-text h3 {
    color: #fff;
    margin: 30px 0 15px 0;
    font-size: 1.5rem;
}

.modal-text p {
    margin-bottom: 20px;
}

.modal-text ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        max-width: 100%;
    }

    .modal-header-image {
        height: 200px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    #success-message {
        padding: 30px 20px;
    }

    #success-message h3 {
        font-size: 1.3rem;
    }

    #success-message p {
        font-size: 0.95rem;
    }

    #captcha-error {
        font-size: 0.9rem;
    }
}

.copy-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-btn {
    background-color: transparent;
    color: var(--color-primary);
    border: none;
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
}

/* --- SCROLL TOP BUTTON --- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-primary);
    color: #000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-3px);
}

/* --- UTILITY CLASSES & INLINE STYLES TO CSS --- */
.spacer-20px {
    height: 20px;
}

.hidden {
    display: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-link {
    color: var(--color-text-muted);
    transition: color 0.3s;
    cursor: pointer;
}

.social-link[href*="facebook"]:hover {
    color: #0081fb;
}

.social-link[href*="wa.me"]:hover {
    color: #25d366;
}

.form-submit-btn {
    width: 100%;
    border: none;
}

#captcha-error {
    color: #ff4d4d;
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
}

#success-message {
    text-align: center;
    padding: 40px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-primary);
    border-radius: 8px;
}

#success-message .success-icon {
    color: var(--color-primary);
    margin-bottom: 15px;
}

#success-message h3 {
    color: #fff;
    margin-bottom: 10px;
}

#success-message p {
    color: var(--color-text-muted);
}

#back-to-form {
    margin-top: 20px;
    font-size: 0.8rem;
}

/* --- PHONE TOAST --- */
.phone-toast {
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    max-width: 90%;
    width: 400px;
    transition: bottom 0.4s ease-out;
}

.phone-toast.show {
    bottom: 30px;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast-message {
    color: #fff;
    font-size: 1rem;
    margin: 0;
    text-align: center;
}

.toast-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-toast {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

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

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

.btn-toast-primary:active {
    transform: translateY(0);
}

.btn-toast-whatsapp {
    background-color: #25d366;
    color: #fff;
}

.btn-toast-whatsapp:hover {
    background-color: #199848;
    transform: translateY(-2px);
}

.btn-toast-whatsapp:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .phone-toast {
        width: 90%;
        padding: 15px;
    }
    
    .toast-message {
        font-size: 0.95rem;
    }
    
    .toast-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-toast {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .phone-toast {
        padding: 12px;
    }
    
    .toast-message {
        font-size: 0.9rem;
    }
}

/* --- COPY TOAST --- */
.copy-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    padding: 12px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    z-index: 2100;
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    transition: bottom 0.3s ease-out;
}

.copy-toast.show {
    bottom: 30px;
}

.copy-toast svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .copy-toast {
        font-size: 0.9rem;
        padding: 10px 16px;
    }
}