/* --- Zmienne kolorystyczne i globalne ustawienia --- */
:root {
    --primary-color: #0097A7; /* Główny kolor - Turkus */
    --secondary-color: #00796B; /* Ciemniejszy turkus dla akcentów */
    --dark-grey: #333333;      /* Kolor tekstu */
    --medium-grey: #666666;    /* Drugorzędny tekst */
    --light-grey-bg: #f4f4f4;  /* Tło dla sekcji */
    --white-color: #ffffff;
    --font-family-body: 'Lato', sans-serif;
    --font-family-headings: 'Montserrat', sans-serif;
}

/* Zapewnia poprawne obliczanie szerokości elementów (padding nie powiększa elementu) */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-family-body);
    color: var(--dark-grey);
    line-height: 1.6;
    overflow-x: hidden; /* Zapobiega poziomemu przewijaniu */
}

.container {
    width: 90%;
    /* POPRAWKA: Zwiększono max-width, aby panele się nie ściskały na desktopie */
    max-width: 600px;
    margin: 0 auto;
    padding: 0 15px; /* Dodatkowy margines wewnętrzny dla bezpieczeństwa */
}

/* Gwarancja responsywności wszystkich grafik */
img {
    max-width: 100%;
    height: auto;
}

/* --- Nagłówek i Nawigacja --- */
header {
    background: var(--white-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 15px;
    flex-wrap: wrap; /* Pozwala logu i menu zawinąć się na bardzo małych ekranach */
}

.logo {
    font-family: var(--font-family-headings);
    font-size: 1.5rem;
    color: var(--dark-grey);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Responsywność menu */
    justify-content: center;
}

nav a {
    text-decoration: none;
    color: var(--medium-grey);
    padding: 0.5rem 1rem;
    font-weight: 700;
    transition: color 0.3s ease;
    display: inline-block;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
}

/* --- Sekcja Hero --- */
.hero {
    /* Użyto placeholder, upewnij się, że link działa lub zmień na własny */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1920x600/0097A7/FFFFFF?text=Wizualizacja+Budynku') no-repeat center center/cover;
    color: var(--white-color);
    text-align: center;
    padding: 8rem 1rem; /* Zwiększony padding dla lepszego efektu */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh; /* Minimalna wysokość sekcji */
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-family: var(--font-family-headings);
    /* POPRAWKA: Responsywna wielkość czcionki */
    font-size: calc(2rem + 1.5vw);
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    /* POPRAWKA: Responsywna wielkość czcionki */
    font-size: calc(1rem + 0.3vw);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.btn {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* --- Sekcja Aktualności --- */
.latest-news {
    padding: 5rem 0;
    background: var(--light-grey-bg);
}

.latest-news h2 {
    text-align: center;
    font-family: var(--font-family-headings);
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 3rem;
}

.news-grid {
    display: grid;
    /* POPRAWKA: Lepsze zarządzanie kolumnami, żeby nie były za wąskie */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

/* Kontener na zdjęcie w karcie, aby zachować proporcje */
.card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Wypełnia przestrzeń bez deformacji */
    display: block;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    color: var(--medium-grey);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.card-content h3 {
    font-family: var(--font-family-headings);
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    line-height: 1.3;
}

.card-content p {
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
    color: var(--medium-grey);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    align-self: flex-start;
}

.read-more:hover {
    text-decoration: underline;
}

/* --- Stopka --- */
footer {
    background: var(--dark-grey);
    color: #b0b0b0; /* Lekko jaśniejszy dla czytelności */
    padding: 4rem 0 1rem 0;
}

.footer-content {
    display: grid;
    /* POPRAWKA: Użycie Grid zamiast Flex dla lepszej kontroli układu */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-family: var(--font-family-headings);
    color: var(--white-color);
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.7rem;
}

.footer-col a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--white-color);
}

.copyright {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 1.5rem;
    font-size: 0.9rem;
    margin-top: 0;
}
/* --- Style dla podstrony "O nas" --- */

.page-header {
    background: var(--light-grey-bg);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    font-family: var(--font-family-headings);
    font-size: 2.8rem;
    color: var(--dark-grey);
    margin: 0;
}

.about-us-content {
    padding: 5rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-family: var(--font-family-headings);
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.team {
    padding: 5rem 0;
    background: var(--light-grey-bg);
}

.team h2 {
    text-align: center;
    font-family: var(--font-family-headings);
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 3rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    background: var(--white-color);
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.team-member:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    border: 4px solid var(--primary-color);
    object-fit: cover; /* Ważne, jeśli zdjęcia nie są kwadratowe */
}

.team-member h4 {
    font-family: var(--font-family-headings);
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
}

.team-member p {
    color: var(--medium-grey);
    margin: 0;
    font-weight: 700;
    color: var(--primary-color);
}

/* --- Style dla podstrony "Kontakt" --- */

.contact-section {
    padding: 5rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Daje więcej miejsca na formularz */
    gap: 4rem;
    align-items: flex-start;
}

.contact-details h3, .contact-form h3 {
    font-family: var(--font-family-headings);
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.contact-details h4 {
    font-family: var(--font-family-headings);
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.contact-details p {
    margin: 0;
    line-height: 1.8;
    color: var(--medium-grey);
}

/* Style formularza */
.contact-form form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--dark-grey);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-family-body);
    font-size: 1rem;
    box-sizing: border-box; /* Ważne dla zachowania szerokości */
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 151, 167, 0.2);
}

.contact-form textarea {
    resize: vertical; /* Pozwala na zmianę wysokości tylko w pionie */
    min-height: 150px;
}

.contact-form button {
    width: auto;
    align-self: flex-start;
    cursor: pointer;
    border: none;
}

.map-section {
    width: 100%;
    /* POPRAWKA: Usunięto sztywną wysokość stąd, iframe ma własną */
    padding-bottom: 4rem;
}

/* Sekcja mapy - poprawki dla iframe */
.map-section iframe {
    display: block;
    /* POPRAWKA: Mapa domyślnie na 100% szerokości (dla mobile) */
    width: 100%;
    max-width: 100%; 
    height: 450px;
    margin: 0 auto;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Style dla podstrony "Oferta" --- */

.offer-section {
    padding: 5rem 0;
}

.offer-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
    font-size: 1.2rem;
    color: var(--medium-grey);
    line-height: 1.8;
}

.offer-grid {
    display: grid;
    /* POPRAWKA: Lepsze minmax, żeby karty nie były za chude */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.offer-card {
    background: var(--white-color); /* Zmieniono na biały dla kontrastu */
    border: 1px solid #eee;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.offer-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-color: transparent;
}

.offer-card img {
    width: 80px;
    height: 80px;
    object-fit: contain; /* Dla ikon */
    margin-bottom: 2rem;
}

.offer-card h3 {
    font-family: var(--font-family-headings);
    font-size: 1.6rem;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
}

.offer-card p {
    margin: 0 0 2rem 0;
    color: var(--medium-grey);
    flex-grow: 1; /* Pcha przycisk do dołu */
}

/* --- Style dla listy aktualności i artykułu --- */
.news-list-section {
    padding: 5rem 0;
}

.article-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 20px;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-header h1 {
    font-family: var(--font-family-headings);
    font-size: calc(2rem + 1.5vw);
    margin: 0;
    line-height: 1.2;
}

.article-meta {
    color: var(--medium-grey);
    font-size: 1rem;
    margin-top: 1rem;
    display: block;
}

.article-featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 3rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #444;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-family: var(--font-family-headings);
    color: var(--primary-color);
    margin: 3rem 0 1.5rem 0;
    font-size: 1.8rem;
}

.article-content blockquote {
    border-left: 5px solid var(--primary-color);
    margin: 2.5rem 0;
    padding: 1rem 2rem;
    background: var(--light-grey-bg);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.back-link {
    display: inline-block;
    margin-top: 3rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Klasa do tymczasowego ukrywania elementów */
.ukryty {
    display: none !important;
}

/* =========================================================
   MEDIA QUERIES - Responsywność
   ========================================================= */

/* Tablety i mniejsze laptopy */
@media (max-width: 1024px) {
    .container {
        width: 95%;
    }
    
    .about-grid, .contact-grid {
        gap: 2rem;
    }
}

/* Duże telefony i małe tablety */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .hero {
        padding: 5rem 1rem;
    }

    .about-grid, .contact-grid {
        grid-template-columns: 1fr; /* Jedna kolumna */
    }
    
    .about-image {
        order: -1; /* Obrazek nad tekstem w "O nas" */
    }

    .page-header h1, .latest-news h2, .team h2 {
        font-size: 2rem;
    }
}

/* Małe telefony */
@media (max-width: 480px) {
    header .container {
        justify-content: center;
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    nav a {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* POPRAWKA DLA MAPY: Specjalna reguła dla dużych ekranów,
   aby mapa nie była na całą szerokość, jeśli tak zakładał projekt */
@media (min-width: 992px) {
    .map-section iframe {
        width: 60%; /* Szerokość na desktopie */
        height: 500px;
    }
}