:root {
    --primary-color: #1a1a1a;
    --secondary-color: #0a0a0a;
    --accent-color: #f39c12;
    --accent-dark: #8c5a08;   /* accent that clears 4.5:1 on white (5.86:1) */
    --light-bg: #f8f9fa;
    --text-dark: #333;
}

* {
    font-family: 'Poppins', sans-serif;
}


html, body {
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
}

/* Header & Navbar */
.navbar {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}

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

.contact-info {
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Hero Slider */
.hero-slider {
    position: relative;
}

.hero-slider .carousel-item {
    height: 620px;
}

.hero-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,26,26,0.45) 0%, rgba(10,10,10,0.35) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: white;
}

.hero-overlay h1,
.hero-overlay .hero-slide-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero-overlay p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-slider .carousel-control-prev-icon,
.hero-slider .carousel-control-next-icon {
    width: 44px;
    height: 44px;
    background-color: rgba(243, 156, 18, 0.85);
    border-radius: 50%;
    background-size: 50%;
}

.hero-slider .carousel-indicators [data-bs-target] {
    background-color: var(--accent-color);
    /* WCAG 2.5.8 wants a 24x24 target; the transparent border keeps the dot at 10px */
    width: 24px;
    height: 24px;
    border: 7px solid transparent;
    background-clip: content-box;
    border-radius: 50%;
    margin: 0 4px;
    opacity: 0.6;
}

.hero-slider .carousel-indicators [data-bs-target].active {
    opacity: 1;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--accent-color) 0%, #e67e22 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 15px 40px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary-custom:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    color: white;
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5);
    animation: pulse 1s ease-out;
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5);
    }
    50% {
        box-shadow: 0 8px 35px rgba(243, 156, 18, 0.8);
    }
    100% {
        box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5);
    }
}

/* Services Section */
.services {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #f0f0f0 100%);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(26, 26, 26, 0.03);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.services::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(243, 156, 18, 0.02);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
    animation: float 8s ease-in-out infinite reverse;
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 30px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(243, 156, 18, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 0;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(45, 126, 59, 0.2);
    border-color: var(--accent-color);
}

.gallery-img {
    cursor: pointer;
    transition: border-color 0.3s ease;
    border: 2px solid transparent;
}

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

.gallery-animate {
    animation: galleryFadeUp 0.5s ease both;
}

/* The whole tile lifts, so the tags stay glued to the photo */
.gallery-tile {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-tile:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(45, 126, 59, 0.2);
}

.gallery-tile:hover .gallery-img {
    border-color: var(--accent-color);
}

/* Category tags overlaid on a photo */
.gallery-tags {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
    max-width: calc(100% - 20px);
    pointer-events: none;   /* a click anywhere on the tile still opens the lightbox */
}

.gallery-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--cat-color, var(--accent-color));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.7;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.gallery-tag i {
    font-size: 0.7rem;
}

@media (max-width: 576px) {
    .gallery-tag {
        font-size: 0.65rem;
        padding: 2px 7px;
    }
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#lightbox.active {
    display: flex;
}

/* Shrink-wraps the image so the tags can sit on its corner, not the overlay's */
#lightbox-frame {
    position: relative;
    line-height: 0;
    animation: zoomIn 0.25s ease;
}

#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    display: block;
}

/* Same tags as on the grid, a touch larger for the bigger picture */
#lightbox-tags {
    top: 14px;
    right: 14px;
}

#lightbox-tags .gallery-tag {
    font-size: 0.8rem;
    padding: 5px 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

#lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 2;   /* never let a tag slide under the close button */
}

#lightbox-close:hover {
    color: var(--accent-color);
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.service-card > * {
    position: relative;
    z-index: 1;
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

/* Hand-drawn SVG icons take their colour from .service-icon, like a font icon would */
.service-icon svg {
    width: 3.2rem;
    height: 3.2rem;
    display: block;
    margin: 0 auto;
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(10deg);
}

.service-card h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

/* About Section */
.about {
    padding: 80px 20px;
    background: white;
}

.about h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.about p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
}

.about-img {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.about-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* Contact Section */
.contact {
    padding: 80px 20px;
    background: white;
    color: var(--text-dark);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.contact-info-box {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 2px solid #eee;
}

.contact-info-box h4 {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.contact-info-box p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.contact-info-box a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info-box a:hover {
    color: var(--accent-color);
}

/* Form Section */
.form-section {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-section h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 25px;
}

.form-control {
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(45, 126, 59, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.btn.btn-warning {
    background: linear-gradient(135deg, var(--accent-color) 0%, #e67e22 100%) !important;
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5);
    background: linear-gradient(135deg, #e67e22 0%, #d67f1c 100%) !important;
}

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

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 0;
}

footer p {
    margin: 10px 0;
}

footer a {
    color: var(--accent-color);
    text-decoration: underline;   /* colour alone must not be the only cue for a link */
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-30px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50% { transform: translateY(10px); opacity: 1; }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(45, 126, 59, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(243, 156, 18, 0.8);
    }
}


/* Responsive */
@media (max-width: 768px) {
    .hero-slider .carousel-item {
        height: 420px;
    }

    .hero-overlay h1,
    .hero-overlay .hero-slide-title {
        font-size: 2rem;
    }

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

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

    .nav-link {
        margin: 5px 0;
    }

    .contact-info {
        margin-top: 10px;
    }
}

/* Legal & Text Pages (privacy policy, 404) */
.legal {
    padding: 80px 20px;
    background: white;
}

.legal h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.legal .legal-updated {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 45px;
}

.legal h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 15px;
}

.legal p,
.legal li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

.legal ul {
    margin-bottom: 20px;
}

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

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

/* Gallery Category Filter */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.gallery-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 2px solid #e4e4e4;
    border-radius: 999px;
    background: #fff;
    color: #666;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
                box-shadow 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
    /* An unselected category is dimmed and blurred out */
    filter: blur(1.2px) grayscale(1);
    opacity: 0.5;
}

.gallery-filter:hover,
.gallery-filter:focus-visible {
    filter: none;
    opacity: 1;
    /* An inactive chip reveals its colour through the border and label */
    border-color: var(--cat-color, var(--accent-color));
    color: var(--cat-color, var(--primary-color));
    outline: none;
}

.gallery-filter.is-active {
    filter: none;
    opacity: 1;
    background: var(--cat-color, var(--accent-color));
    border-color: var(--cat-color, var(--accent-color));
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--cat-rgb, 243, 156, 18), 0.35);
}

/* "Wszystkie" keeps the brand orange. White text on it scores only 2.19:1,
   so the label is graphite instead - same background, 7.94:1, readable. */
.gallery-filter-all.is-active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #1a1a1a;
}

.gallery-filter-all.is-active .gallery-filter-count {
    background: rgba(0, 0, 0, 0.16);
}

.gallery-filter i {
    font-size: 0.95rem;
}

.gallery-filter-count {
    min-width: 24px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.09);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
}

.gallery-filter.is-active .gallery-filter-count {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-empty {
    text-align: center;
    color: #888;
    font-size: 1.05rem;
    margin-top: 35px;
}

@media (max-width: 576px) {
    .gallery-filters {
        gap: 8px;
        margin-bottom: 30px;
    }

    .gallery-filter {
        padding: 7px 14px;
        font-size: 0.85rem;
    }
}
