/* --- Global Styles & Variables --- */
:root {
    --primary-color: #D74C35; /* Extracted red */
    --primary-color-darker: #b10000; /* Darker red for hover */
    --secondary-color: #8a3333; /* Extracted blue */
    --secondary-color-darker: #4b1c1c; /* Darker blue */
    --accent-color: #ffca2c; /* Yellow from warning button */
    --text-color: #333333;
    --text-color-light: #ffffff;
    --bg-light: #F9F9F9;
    --bg-medium: #E9E9E6;
    --border-color: #dddddd;
    --heading-font: 'Manrope', sans-serif;
    --body-font: 'Manrope', sans-serif;
    --base-font-size: 16px;
    --transition-speed: 0.3s;
}

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

html {
    font-size: var(--base-font-size);
    scroll-behavior: smooth;
    height: 100%; /* Ensure html takes full height */
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--text-color-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

main {
    flex-grow: 1; /* Allows main content to push footer down */
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color-darker);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem; /* Add some default padding */
}

li {
    margin-bottom: 0.5rem;
}

strong, b {
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.sr-only { /* Screen reader only */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border: 1px solid transparent;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease, color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    white-space: normal;
    word-break: break-word;
}

.btn i, .btn svg {
    margin-left: 0.5em;
    transition: transform var(--transition-speed) ease;
}

.btn:hover i, .btn:hover svg {
    transform: translateX(3px);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-color-light);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background-color: var(--primary-color-darker);
    border-color: var(--primary-color-darker);
    color: var(--text-color-light);
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-color-light);
     box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-secondary:hover {
    background-color: var(--secondary-color-darker);
    border-color: var(--secondary-color-darker);
    color: var(--text-color-light);
    text-decoration: none;
     box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--bg-light);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.navbar-brand img {
    height: 40px; /* Adjust as needed */
    max-height: 40px;
    width: auto;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: 700;
    padding: 0.5rem 0; /* Add some padding for easier clicking */
    border-bottom: 2px solid transparent; /* For hover effect */
    transition: color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom-color: var(--primary-color);
}

.nav-link i, .nav-link svg {
    font-size: 1.1em; /* Adjust icon size */
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    z-index: 1010; /* Above overlay */
}

.mobile-nav-toggle .close-icon {
    display: none;
}

.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(249, 249, 249, 0.98); /* Slightly transparent light bg */
    z-index: 1005; /* Below toggle, above content */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding-top: 80px; /* Space for header */
    transform: translateX(-100%);
    transition: transform var(--transition-speed) ease-in-out;
}

.mobile-nav-menu.active {
    display: flex;
    transform: translateX(0);
}

.mobile-nav-menu .nav-link {
    font-size: 1.5rem;
    color: var(--text-color);
}
.mobile-nav-menu .nav-link:hover, .mobile-nav-menu .nav-link.active {
     color: var(--primary-color);
     border-bottom: none;
}

/* When mobile menu is active */
body.mobile-nav-active .mobile-nav-toggle .hamburger-icon {
    display: none;
}
body.mobile-nav-active .mobile-nav-toggle .close-icon {
    display: block;
}
body.mobile-nav-active {
    overflow: hidden; /* Prevent scrolling */
}


@media (max-width: 768px) {
    .nav-left, .nav-right {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .navbar {
        justify-content: space-between; /* Ensure brand and toggle are spaced */
    }
     .navbar-brand {
        flex-grow: 1;
        text-align: center;
        margin-left: 40px; /* Offset for toggle */
    }
}

/* --- Hero Section --- */
.hero, .page-hero {
    position: relative;
    padding: 8rem 0; /* Adjust padding */
    color: var(--text-color-light);
    text-align: center;
    background-image: url('../images/hero-background.webp'); /* Your background image */
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Parallax effect */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh; /* Give it some height */
}

.page-hero {
    min-height: 40vh;
    padding: 4rem 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-color); /* Default Red for all heroes now */
    opacity: 0.4; /* Default opacity */
    z-index: 1;
    transition: background-color var(--transition-speed) ease;
}

/* --- USUNIĘTO ZMIANĘ KOLORU NAKŁADKI DLA PODSTRON --- */
/* .page-hero .hero-overlay {
    background-color: var(--secondary-color);
    opacity: 0.6;
} */

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1, .page-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-content span { /* For highlighted text if used */
   background-color: rgba(0, 0, 0, 0.4);
   padding: 0.2em 0.4em;
   border-radius: 4px;
   display: inline; /* Or inline-block */
   line-height: 1.5; /* Adjust if needed */
}

.hero-button, .page-hero .hero-button {
    margin-top: 2rem;
}


@media (max-width: 768px) {
     .hero h1, .page-hero h1 {
        font-size: 2.5rem;
    }
}

/* --- About Section --- */
.about {
    padding: 4rem 0;
    background-color: var(--bg-light);
    text-align: center;
}

.about p {
    font-size: 1.2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Service Sections --- */
.service {
    padding: 5rem 0;
}

.service-tz { /* Twój Zdalny */
    background-color: var(--bg-medium);
}

.service-biegly { /* Biegły IT */
    background-color: var(--text-color-light);
}

.service-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.service-text {
    flex: 1; /* Takes up available space */
}

.service-image {
    flex: 0 0 45%; /* Fixed width, adjust as needed */
}

.service-image img {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover; /* Ensure image covers area */
    aspect-ratio: 4 / 3; /* Maintain aspect ratio */
}

/* Specific border-radius from original design */
.service-tz .service-image img {
   border-radius: 0 5rem; /* Approximate the original large curve */
}
.service-biegly .service-image img {
    border-radius: 1rem; /* Less curved */
}


.service-text h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.service-text ul {
    list-style: none;
    padding-left: 0;
}

.service-text ul li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.service-button {
    margin-top: 2rem;
}

/* Reversed layout for the second service */
.service-container-reversed {
    flex-direction: row-reverse;
}

@media (max-width: 992px) {
    .service-container {
        flex-direction: column;
        gap: 2rem;
    }
     .service-container-reversed {
        flex-direction: column; /* Stack on mobile */
    }
    .service-image {
        flex-basis: auto; /* Let it take full width */
        width: 100%;
        max-width: 500px; /* Optional max width */
        margin-top: 2rem;
    }
     .service-container-reversed .service-image {
        order: -1; /* Image first on mobile for reversed */
    }
}


/* --- Regulamin Page --- */
.page-title-section {
    padding: 2rem 0;
    background-color: var(--secondary-color-darker); /* Ciemny niebieski dla przyjaźniejszego wyglądu podstrony */
    color: var(--text-color-light);
    text-align: center;
}
.page-title-section h2 {
    margin-bottom: 0;
    font-size: 1.8rem;
}

.text-content {
    padding: 3rem 0;
}

.regulamin-article {
    max-width: 800px; /* Improve readability */
    margin: 0 auto;
}

.regulamin-article h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color-darker);
}

.regulamin-article ol {
    padding-left: 2rem;
}
.regulamin-article ol ol { /* Nested lists */
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}
.regulamin-article p {
    margin-bottom: 1.2rem;
}

/* --- 404 Page --- */
.not-found-content {
    padding: 4rem 0;
    text-align: center;
}

.not-found-image img {
    max-width: 300px;
    height: auto;
    margin: 0 auto 2rem auto;
}

.not-found-text h2 {
    font-size: 2rem;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .not-found-text h2 {
        font-size: 1.5rem;
    }
     .not-found-image img {
        max-width: 200px;
    }
}


/* --- Footer --- */
.site-footer {
    background-color: var(--bg-medium);
    padding: 2rem 0;
    color: var(--text-color);
    margin-top: auto; /* Pushes footer to bottom */
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-right: 1rem;
    transition: color var(--transition-speed) ease;
}

.social-links a:hover {
    color: var(--primary-color-darker);
    text-decoration: none;
}

.footer-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center; /* Center on wrap */
}

.footer-nav a {
    color: var(--text-color);
    font-weight: 700;
}
.footer-nav a:hover {
    color: var(--primary-color);
}
.footer-nav span {
    color: var(--text-color);
    opacity: 0.7;
}

.copyright p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: right;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .social-links {
        order: 1;
        margin-bottom: 0.5rem; /* Space before nav */
    }
    .social-links a {
        margin: 0 0.5rem;
    }
    .footer-nav {
        order: 2;
    }
    .copyright {
        order: 3;
    }
     .copyright p {
        text-align: center;
    }
}