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

body {
    font-family: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    background-color: #fff;
}

h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
}

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

/* Top Bar */
.top-bar {
    background: linear-gradient(90deg, rgb(50, 42, 35) 0%, rgb(70, 58, 48) 50%, rgb(50, 42, 35) 100%);
    color: #fff;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1001;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.top-bar.hidden {
    transform: translateY(-100%);
}

.header.top-bar-hidden {
    top: 0;
}

.top-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.6rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

.top-bar-contact {
    display: flex;
    gap: 2rem;
    white-space: nowrap;
}

.top-bar-contact a {
    color: #fff;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.top-bar-contact a:hover {
    opacity: 0.7;
}

.top-bar-email {
    font-size: 0.8rem;
    color: #fff;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

.top-bar-email:hover {
    opacity: 0.7;
}

.top-bar-social {
    display: flex;
    gap: 1.2rem;
}

.top-bar-social a {
    color: #fff;
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.top-bar-social a:hover {
    opacity: 0.7;
}

/* Header & Navigation */
.header {
    background-color: rgb(236, 234, 230);
    position: fixed;
    width: 100%;
    top: 38px;
    z-index: 1000;
    transition: top 0.3s ease;
}
.about-values h2 {
    line-height: 1.25;
}
.header::after {
    content: '';
    position: absolute;
    bottom: -59px;
    left: 0;
    width: 100%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L0,8 C120,30 240,0 360,15 C480,30 540,5 720,10 C850,16 950,25 1050,12 C1120,5 1180,15 1220,30 C1280,48 1350,58 1440,60 L1440,0 Z' fill='rgb(236,234,230)'/%3E%3C/svg%3E") no-repeat;
    background-size: 100% 100%;
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.05rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: block;
}

.logo img {
    height: 59px;
    width: auto;
    margin-top: 10px;
}

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

/* Hamburger Menu Button */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: rgb(100, 75, 50);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links a {
    font-weight: 400;
    font-size: 1rem;
    color: rgb(100, 75, 50);
    letter-spacing: 1px;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: rgb(100, 75, 50);
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('gallery/S1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 2rem;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    line-height: 1.25;
    font-size: 4rem;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: none;
    color: rgb(236, 234, 230);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: #fff;
    line-height: 1.9;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Button */
.btn {
    display: inline-block;
    background-color: rgb(180, 150, 120);
    color: #fff;
    padding: 1rem 3rem;
    border: 2px solid rgb(180, 150, 120);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.btn:hover {
    background-color: rgb(160, 130, 100);
    border-color: rgb(160, 130, 100);
}

/* Services Section */
.services {
    padding: 7rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.services h2 {
    font-size: 2.2rem;
    margin-bottom: 4rem;
    color: #000;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
}

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

.service-card {
    background: #fff;
    padding: 3rem;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: #000;
}

.service-card h3 {
    color: #000;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.service-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* About Section */
.about {
    background-color: rgb(236, 234, 230);
    color: rgb(100, 75, 50);
    padding: 7rem 3rem;
    text-align: center;
}

.about h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 2;
    color: #666;
}

/* Gallery Page Styles */
.gallery-hero {
    background-color: rgb(248, 246, 244);
    color: #1a1a1a;
    text-align: center;
    padding: 10rem 3rem 5rem;
}

.gallery-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: none;
    color: rgb(250, 248, 244);
}


.gallery-hero p {
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: rgb(100, 75, 50);
}


.gallery {
    padding: 4rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Portfolio Grid - White Castle Style */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f5f5f5;
}

.portfolio-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.08);
    filter: brightness(0.9);
}

.portfolio-info {
    padding: 1.5rem 0.5rem;
    text-align: center;
    background: #fff;
    transition: background 0.3s ease;
}

.portfolio-info h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.portfolio-info span {
    font-size: 0.85rem;
    color: #888;
    letter-spacing: 1px;
}

.portfolio-item:hover .portfolio-info h3 {
    color: #666;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}

.lightbox-info {
    text-align: center;
    padding: 1.5rem 0;
}

.lightbox-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.lightbox-size {
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 1rem;
    transition: opacity 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.7;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* About Page Styles */
.about-hero {
    background-color: rgb(248, 246, 244);
    color: #1a1a1a;
    text-align: center;
    padding: 10rem 3rem 5rem;
}

.about-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: none;
    color: rgb(250, 248, 244);
}

.about-hero p {
    font-size: 1.1rem;
    color: #555;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 5rem 3rem;
}

.about-text {
    margin-bottom: 4rem;
}

.about-text h2,
.about-values h2 {
    font-size: 1.8rem;
    color: #000;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 2px;
}

.about-text p {
    color: #555;
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.value-item {
    padding: 2rem;
    border: 1px solid #e5e5e5;
    transition: border-color 0.3s ease;
}

.value-item:hover {
    border-color: #000;
}

.value-item h3 {
    font-size: 1.1rem;
    color: #000;
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.value-item p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Contact Page Styles */
.contact-hero {
    text-align: center;
    padding: 10rem 2rem 4rem;
    background: rgba(212, 187, 175, 0.4);
}

.contact-hero h1 {
    font-size: 2.5rem;
    color: rgb(100, 75, 50);
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-align: center;
    width: 100%;
}

.contact-hero p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.contact-info h2,
.contact-form-container h2 {
    font-size: 1.4rem;
    color: rgb(100, 75, 50);
    margin-bottom: 2.5rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h3 {
    color: rgb(100, 75, 50);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    font-weight: 500;
}

.info-item p {
    color: #333;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: rgb(100, 75, 50);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 1px solid #e5e5e5;
    background-color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgb(100, 75, 50);
}

.checkbox-group {
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: rgb(100, 75, 50);
    cursor: pointer;
}

.checkbox-label span {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.success-message {
    background-color: rgb(236, 234, 230);
    color: rgb(100, 75, 50);
    padding: 2rem;
    border: 1px solid rgb(100, 75, 50);
    text-align: center;
}

.error-message {
    background-color: #fff;
    color: #c00;
    padding: 1rem;
    border: 1px solid #c00;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: linear-gradient(90deg, rgb(50, 42, 35) 0%, rgb(70, 58, 48) 50%, rgb(50, 42, 35) 100%);
    color: #fff;
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: left;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.footer-section p,
.footer-section a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    text-decoration: none;
}

.footer-section a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-social svg {
    fill: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    .top-bar-content {
        padding: 0.5rem 0.15rem;
        display: flex;
        align-items: center;
        gap: .75rem;
        justify-content: center;
    }
    div.about-image img {
        height: 100%;
        object-fit: cover;
        width: auto;
    }
    .about-history {
        height: 100%;
    }
    .top-bar-contact a {
        letter-spacing: 0px;
    }
    .top-bar-email {
        display: none;
    }

    .top-bar-social {
        gap: 0.8rem;
        display: none;
    }

    .top-bar-social svg {
        width: 16px;
        height: 16px;
    }

    .hamburger {
        display: block;
    }

    .nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        background: rgb(236, 234, 230);
        padding: 0.5rem 0;
    }

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

    .nav-links li a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .hero h1 {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .hero p {
        font-size: 1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3rem 2rem;
    }

    .services,
    .about {
        padding: 5rem 2rem;
    }

    .services h2,
    .about h2 {
        font-size: 1.8rem;
    }

    .gallery-hero,
    .realizacje-hero,
    .about-hero,
    .oferta-hero,
    .jak-pracujemy-hero {
        padding: 13rem 2rem 4rem !important;
    }

    .contact-hero {
        padding: 16rem 2rem 4rem !important;
    }

    .contact-hero h1,
    .gallery-hero h1 {
        font-size: 1.8rem;
    }
}

/* Portfolio Slider */
.portfolio-slider {
    padding: 4rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.slider-container {
    position: relative;
    overflow: hidden;
}

.slider-wrapper {
    position: relative;
    width: 100%;
}

.slide {
    display: none;
    width: 100%;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    padding: 1rem;
    z-index: 10;
    transition: background 0.3s ease;
    color: rgb(100, 75, 50);
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active,
.dot:hover {
    background: rgb(100, 75, 50);
}

@media (max-width: 768px) {
    .portfolio-slider {
        padding: 2rem 1rem;
    }

    .slider-btn {
        padding: 0.5rem;
    }

    .slider-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* Realizacje Grid */
.realizacje {
    padding: 4rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.realizacje-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.realizacje-grid.single-project {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
}

.realizacja-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    transition: all 0.3s ease;
}

.realizacja-card:hover {
    border-color: rgb(100, 75, 50);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.realizacja-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.realizacja-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.realizacja-content {
    padding: 1.5rem;
    text-align: center;
}

.realizacja-content h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgb(100, 75, 50);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.realizacja-content p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.realizacja-btn {
    background: rgb(100, 75, 50);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.realizacja-btn:hover {
    background: rgb(70, 50, 35);
}

/* Gallery Lightbox */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox .lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    text-align: center;
}

.gallery-lightbox .lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
}

.gallery-lightbox .lightbox-info {
    padding: 1.5rem 0;
    color: #fff;
}

.gallery-lightbox .lightbox-info h3 {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.gallery-lightbox .lightbox-info span {
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.gallery-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
    line-height: 1;
    z-index: 10;
}

.gallery-lightbox .lightbox-close:hover {
    opacity: 0.7;
}

.gallery-lightbox .lightbox-prev,
.gallery-lightbox .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 1rem;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.gallery-lightbox .lightbox-prev:hover,
.gallery-lightbox .lightbox-next:hover {
    opacity: 0.7;
}

.gallery-lightbox .lightbox-prev {
    left: 20px;
}

.gallery-lightbox .lightbox-next {
    right: 20px;
}

@media (max-width: 1024px) {
    .realizacje-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .realizacje {
        padding: 2rem 1rem;
    }

    .realizacje-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
