:root {
    --primary-color: #dc3545;
    --primary-hover: #bb2d3b;
    --secondary-color: #212529;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --text-color: #333333;
    --border-color: #e9ecef;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 10px;
    --transition: all 0.3s ease;
}

/* ==== Global ==== */
html {
    scroll-behavior: smooth;
}

body {
    padding-top: 76px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #ffffff;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--dark-color);
}

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

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

section {
    scroll-margin-top: 90px;
}

.text-danger {
    color: var(--primary-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

/* ==== Buttons ==== */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

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

.btn-danger:hover,
.btn-danger:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    color: var(--dark-color);
}

/* ==== Navbar ==== */
.navbar {
    padding: 15px 0;
    transition: var(--transition);
    background-color: rgba(0, 0, 0, 0.82);
    box-shadow: none;
}

.navbar.navbar-scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
}

.navbar-brand img {
    max-height: 72px;
    width: auto;
}

.navbar-nav .nav-link {
    color: #fff;
    font-weight: 500;
    padding: 8px 15px;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 70%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff;
}

/* ==== Hero Section ==== */
.hero-section {
    min-height: 78vh;
    padding: 150px 0;
    background: url("img/hero-bg.jpg") no-repeat center center;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero-section .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.62));
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1,
.hero-section p {
    color: #fff;
}

.hero-section h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.hero-section .lead {
    font-size: 1.15rem;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

/* ==== O nas ==== */
#o-nas p,
#kontakt p,
#certyfikaty p,
.card-text,
.realizacja-box p,
.realizacja-meta li,
.realizacja-photo figcaption {
    color: #4f5660;
}

#o-nas img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

/* ==== Usługi ==== */
#uslugi .card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

#uslugi .card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

#uslugi .card-body {
    padding: 28px;
}

.icon-box {
    font-size: 2.4rem;
    line-height: 1;
    color: var(--primary-color);
}

.card-title {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

/* ==== Realizacje ==== */
.realizacja-box {
    padding: 32px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.realizacja-box h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.realizacja-meta {
    margin-bottom: 0;
}

.realizacja-meta li {
    margin-bottom: 6px;
}

.realizacja-highlight {
    height: 100%;
    padding: 24px;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 10px;
}

.realizacja-highlight .badge {
    font-size: 0.95rem;
    padding: 8px 12px;
}

.realizacja-photo {
    margin: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.realizacja-photo img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.realizacja-photo figcaption {
    padding: 12px 14px;
    font-size: 0.95rem;
    background: #fff;
    margin: 0;
}

/* ==== Certyfikaty ==== */
.certificate-box {
    height: 100%;
    border: 1px solid var(--border-color);
}

.certificate-box h3,
.certificate-box h4 {
    margin-bottom: 18px;
}

.certificate-box ul li {
    margin-bottom: 10px;
    color: #4f5660;
}

.logos-container {
    gap: 20px;
}

.logo-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

.logo-item img {
    width: auto;
    max-height: 70px;
}

/* ==== Kontakt ==== */
.contact-form {
    background-color: #fff;
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.contact-form h3,
.contact-form h4 {
    margin-bottom: 24px;
}

.contact-info {
    margin-bottom: 30px;
}

.contact-info p {
    margin-bottom: 14px;
}

.contact-info a {
    color: var(--primary-color);
}

.contact-info a:hover {
    text-decoration: underline;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    margin-bottom: 20px;
    box-shadow: none;
}

.form-control:focus {
    border-color: rgba(220, 53, 69, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

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

.form-check-label {
    font-size: 0.95rem;
    color: #4f5660;
}

/* ==== Footer ==== */
footer {
    background-color: #1f2327 !important;
}

footer h2,
footer h5,
footer p,
footer a,
footer .small {
    color: #fff;
}

footer a:hover {
    color: #f8b4bc;
    text-decoration: none;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.15);
}

/* ==== Utility ==== */
.rounded {
    border-radius: var(--radius) !important;
}

.shadow,
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.list-unstyled li i {
    min-width: 20px;
}

/* ==== Responsive ==== */
@media (max-width: 991.98px) {
    body {
        padding-top: 72px;
    }

    .navbar-brand img {
        max-height: 56px;
    }

    .navbar-collapse {
        background: rgba(0, 0, 0, 0.96);
        margin-top: 12px;
        padding: 12px 16px;
        border-radius: 10px;
    }

    .hero-section {
        min-height: auto;
        padding: 120px 0 90px;
    }

    .hero-section .lead {
        font-size: 1.05rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 110px 0 80px;
    }

    .hero-section .d-flex {
        flex-direction: column;
        gap: 12px;
    }

    .hero-section .btn {
        width: 100%;
    }

    #uslugi .card-body,
    .contact-form,
    .realizacja-box {
        padding: 22px;
    }

    .realizacja-box h3 {
        font-size: 1.25rem;
    }

    .realizacja-photo img {
        height: 220px;
    }
}

@media (max-width: 575.98px) {
    body {
        padding-top: 68px;
    }

    .navbar-brand img {
        max-height: 48px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    section {
        scroll-margin-top: 78px;
    }
}