/* === RESET & GLOBAL === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
}

/*
  Klasa `js-loading` jest dodawana do <body> i usuwana przez JS po załadowaniu tłumaczeń.
  Ukrywa elementy, które mają być tłumaczone, ale zachowuje ich miejsce w układzie (visibility: visible),
  co zapobiega przesunięciom układu (CLS).
*/
.js-loading [data-translate] {
    visibility: visible; /* Zachowaj miejsce w układzie */
    opacity: 0;          /* Ale ukryj treść wizualnie */
    transition: opacity 0.3s ease-in-out;
}

body:not(.js-loading) [data-translate] { opacity: 1; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: #0056b3;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: #212529;
}

ul {
    list-style-type: disc;
    margin-left: 20px;
}

/* === HEADER & NAVIGATION === */
.header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}
.logo:hover {
    text-decoration: none;
}

.nav-menu ul, .lang-switcher ul {
    list-style: none;
    display: flex;
    margin: 0;
    min-height: 2rem; /* Rezerwuje miejsce dla nawigacji, aby zapobiec CLS */
    padding: 0;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-menu a {
    font-weight: 600;
    color: #555;
    padding: 5px 0;
    text-decoration: none;
}

.nav-menu a.active, .nav-menu a:hover {
    color: #0056b3;
    border-bottom: 2px solid #0056b3;
    text-decoration: none;
}

.lang-switcher li {
    margin-left: 8px;
    font-size: 0.9rem;
}

.lang-switcher a {
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 3px;
    text-decoration: none;
    display: block;
}

.lang-switcher a.active {
    background: #0056b3;
    color: #fff;
    text-decoration: none;
}
.lang-switcher a:hover:not(.active) {
    background: #f0f0f0;
    text-decoration: none;
}

/* === FOOTER === */
.footer {
    background: #343a40;
    color: #ffffff;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer a {
    color: #fff;
}

/* === MAIN CONTENT === */
.main-content {
    padding: 2rem 0;
}

.section {
    background: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hero {
    background: #0056b3;
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 8px;
    min-height: 10rem; /* Rezerwuje miejsce (bardziej elastyczne niż px), aby zapobiec CLS */
}

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

/* === SERVICES GRID (HOMEPAGE) === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    position: relative; /* Potrzebne do rozciągnięcia linku */
    flex-direction: column;
}

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

.service-card h3 {
    margin-top: 0;
}

.service-card h3 a.card-link {
    color: #0056b3;
    text-decoration: none;
}

/* Rozciąga link na całą kartę */
.service-card h3 a.card-link::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1; /* Kluczowa poprawka: umieszcza link nad innymi elementami karty */
}

.service-card h3 a.card-link:hover {
    text-decoration: underline;
}

.service-card p {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: #0056b3;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
    margin-top: auto; /* Pushes button to bottom */
}

.btn:hover {
    background: #0056b3;
    color: #fff;
    text-decoration: none;
}

/* === SERVICE SUBPAGE === */
.service-detail h1 {
    border-bottom: 2px solid #0056b3;
    padding-bottom: 0.5rem;
}

.service-detail .scope-list {
    margin-top: 1.5rem;
    padding-left: 0; /* Remove default list-style padding */
    list-style-type: none; /* Remove default bullets */
}

.service-detail .scope-list li {
    background: #f8f9fa;
    padding: 12px 18px;
    margin-bottom: 10px;
    border-left: 4px solid #0056b3;
    border-radius: 4px;
    font-size: 1.05rem;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: bold;
}

/* === CONTACT PAGE === */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info h3, .contact-form h3 {
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
}

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

.form-group-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-group-checkbox input[type="checkbox"] {
    margin-top: 5px;
}

.form-group-checkbox label {
    font-weight: normal;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px 15px;
    }
    
    .nav-menu li {
        margin: 0;
    }
}