:root {
    --primary-color: #007bff;
    --primary-gradient: linear-gradient(135deg, #007bff 0%, #00d4ff 100%);
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --transition-speed: 0.6s;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

body.light-theme {
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --header-color: #1a1a1a;
}

body.dark-theme {
    --text-color: #e0e0e0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --header-color: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

/* Snap scrolling - Only for Home Page */
html.snap-scroll {
    scroll-snap-type: y mandatory;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--header-color);
}

p {
    color: var(--text-color);
}

/* Background image settings */
.bg-image {
    background-position: center;
    background-repeat: no-repeat;
}

.bg-fixed {
    background-attachment: fixed;
}

/* Font themes per section */
.font-light h1, .font-light h2, .font-light h3:not(.service-card h3) {
    color: #ffffff;
}
.font-light p, .font-light li:not(.service-card li) {
    color: #cbcbcb;
}

.font-dark h1, .font-dark h2, .font-dark h3 {
    color: #1a1a1a;
}
.font-dark p, .font-dark li {
    color: #313131;
}

/* Fix: White cards always have dark text regardless of section font theme */
.service-card h3, .service-card p, .service-card li,
.contact-form-container label, .contact-form-container h2, .contact-form-container p {
    color: #1a1a1a !important;
}

/* Ensure subpage content always has proper contrast based on theme */
body.light-theme .subpage-content p, body.light-theme .subpage-content h2, body.light-theme .subpage-content li {
    color: #333;
}
body.dark-theme .subpage-content p, body.dark-theme .subpage-content h2, body.dark-theme .subpage-content li {
    color: #e0e0e0;
}

.font-light .image-placeholder {
    color: #444;
}


/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text {
    animation: fadeInUp 1s ease-out;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Section Title decoration */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Services improvements */
.service-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: 0.4s;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.service-card h3 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Button modernization */
.btn-more, .btn-submit, .btn-back {
    background: var(--dark-color);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn-more::before, .btn-submit::before, .btn-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-gradient);
    transition: 0.3s;
    z-index: -1;
}

.btn-more:hover::before, .btn-submit:hover::before, .btn-back:hover::before {
    width: 100%;
}

/* Subpage styling refinements */
.subpage-content {
    border-left: 5px solid var(--primary-color);
}


/* Sections */
section {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem 2rem; /* space for fixed header */
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hero Section 1 */
.section-hero .container {
    max-width: 90vw;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content.no-image {
    grid-template-columns: 1fr;
    text-align: center;
    margin: 0 auto;
}

/* Alignment options */
.hero-content.align-left {
    grid-template-columns: 1.5fr 1fr;
}
.hero-content.align-left .hero-text {
    grid-column: 1;
    text-align: left;
}
.hero-content.align-left .hero-image {
    grid-column: 2;
}

.hero-content.align-right {
    grid-template-columns: 1fr 1fr;
}
.hero-content.align-right .hero-text {
    grid-column: 2;
    text-align: right;
    order: 2;
}
.hero-content.align-right .hero-image {
    grid-column: 1;
    order: 1;
}

.hero-content.align-right.no-image {
    grid-template-columns: 1fr;
    display: flex;
    justify-content: flex-end;
}

.hero-content.align-right.no-image .hero-text {
    max-width: 45%;
    margin-left: auto;
    text-align: right;
}

.hero-content.align-center {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}
.hero-content.align-center .hero-image {
    max-width: 600px;
    margin: 2rem auto 0;
}

.hero-text h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-text p {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.hero-image .image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ddd;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #aaa;
    box-shadow: 20px 20px 60px #bebebe, -20px -20px 60px #ffffff;
}

.scroll-arrow-container {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.scroll-arrow-container:hover {
    bottom: 1.5rem;
}

.scroll-text {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
    color: #ffffff;
}

.scroll-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    animation: bounce 2s infinite;
    background: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* Services Section 2 */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
}

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

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-card ul {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.service-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.btn-more {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--dark-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: 0.3s;
}

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

/* Contact Section 3 */
.contact-form-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    background: #0056b3;
}

/* Responsive */
@media screen and (max-width: 768px) {
    section {
        height: auto;
        min-height: 100vh;
        padding: 6rem 1.5rem 4rem;
        scroll-snap-align: none;
    }
    
    html.snap-scroll {
        scroll-snap-type: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }
    
    .scroll-arrow-container {
        display: none;
    }
}


/* Subpage Styling */
.subpage-hero {
    min-height: 100vh;
    padding-top: 8rem;
    padding-bottom: 4rem;
    justify-content: flex-start;
    align-items: flex-start;
    scroll-snap-align: none;
}

.subpage-hero h1 {
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.subpage-content {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
    width: 100%;
}

.subpage-content h2 {
    margin-top: 2rem;
    color: var(--dark-color);
}

.subpage-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.btn-back {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--dark-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: 0.3s;
}

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

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .subpage-content {
        padding: 1.5rem;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--dark-color); /* Zawsze w kolorze stopki */
    backdrop-filter: blur(10px);
    transition: var(--transition-speed);
}

header.scrolled {
    padding: 1rem 2rem;
    background: rgba(26, 26, 26, 0.95); /* var(--dark-color) z lekką przezroczystością */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    color: white; /* Logo musi być białe na ciemnym tle */
    display: flex;
    align-items: center;
}

.logo img.logo-desktop {
    display: block;
}

.logo img.logo-mobile {
    display: none;
}

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

.nav-links a {
    text-decoration: none;
    color: #ffffff; /* Pełna biel */
    font-weight: 500;
    transition: 0.3s;
}

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

/* Mobile Nav */
.burger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white; /* Burger biały na ciemnym tle */
    margin: 5px;
    transition: all 0.3s ease;
}

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

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

/* Footer */
footer {
    background: var(--dark-color);
    color: #eee; /* Rozjaśniony tekst copyright dla lepszej widoczności */
    padding: 4rem 2rem;
    text-align: center;
    scroll-snap-align: end;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ffffff; /* Linki w stopce na biało */
    text-decoration: none;
}

/* Cookies info */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    font-size: 0.9rem;
}

#cookie-banner button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70%;
        background: var(--dark-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }
    
    .nav-links.nav-active {
        right: 0;
    }
    
    .burger {
        display: block;
    }

    header {
        padding: 1rem 1.5rem;
    }

    .logo img.logo-desktop {
        display: none;
    }

    .logo img.logo-mobile {
        display: block;
    }

    section {
        padding-top: 8rem;
        justify-content: flex-start;
    }
}
